diff --git a/assets/js/binary.js b/assets/js/binary.js index 7f033d9..e2ac889 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":"1.3.1","target":"arcade","targetVersion":"1.12.51","repo":"jonesa6/3d-maze"} -// total=2415475 new=18.86% cached=76.72% other=4.42% +// meta={"simUrl":"https://trg-arcade.userpxt.io/v1.12.51/---simulator","cdnUrl":"https://pxt.azureedge.net","version":"1.4.0","target":"arcade","targetVersion":"1.12.51","repo":"jonesa6/3d-maze"} +// total=2586111 new=17.88% cached=77.72% other=4.39% (function (ectx) { 'use strict'; const runtime = ectx.runtime; @@ -115,6 +115,7 @@ pxtrt.mapKeyNames = [ "applyTo", "areaHeight", "areaWidth", + "args", "ax", "ay", "background", @@ -150,6 +151,7 @@ pxtrt.mapKeyNames = [ "change", "charHeight", "charWidth", + "characters", "chunkIndex", "chunkText", "chunks", @@ -161,6 +163,8 @@ pxtrt.mapKeyNames = [ "column", "columnCount", "columns", + "commandIndex", + "commandToArgCount", "condition", "connected", "constrain", @@ -173,6 +177,8 @@ pxtrt.mapKeyNames = [ "createParticle", "createdHandlers", "currIndent", + "current", + "currentCommand", "cursor", "cursorCount", "cursorOn", @@ -181,6 +187,7 @@ pxtrt.mapKeyNames = [ "data", "defaultLifespan", "defaultRate", + "delay", "deltaTime", "deltaTimeMillis", "destroy", @@ -220,8 +227,10 @@ pxtrt.mapKeyNames = [ "effect", "effectSetByUser", "eid", + "elapsedTime", "enabled", "endScreenEffect", + "ensureControlPoint", "event", "eventContext", "factory", @@ -238,7 +247,9 @@ pxtrt.mapKeyNames = [ "frameCallbacks", "frameInterval", "frameWorker", + "frames", "framesInSample", + "func", "fx", "fy", "galois", @@ -296,6 +307,7 @@ pxtrt.mapKeyNames = [ "insertAABB", "insertAtKey", "invDet", + "isHittingTile", "isJudgedGame", "isMultiplayerGame", "isNewBestScore", @@ -314,10 +326,16 @@ pxtrt.mapKeyNames = [ "judged", "key", "kind", + "lastControlX", + "lastControlY", "lastCustomGesture", + "lastFrame", "lastGesture", "lastLightCondition", "lastPerfDump", + "lastState", + "lastX", + "lastY", "layer", "layers", "left", @@ -332,8 +350,10 @@ pxtrt.mapKeyNames = [ "loseMessage", "loseSound", "loseSoundLooping", + "manualFlags", "map", "mapData", + "matchesRule", "maxLifespan", "maxNegativeVelocity", "maxSingleStep", @@ -349,6 +369,7 @@ pxtrt.mapKeyNames = [ "minLifespan", "minSingleStep", "minStep", + "mode", "move", "moveSprite", "msLast", @@ -358,6 +379,7 @@ pxtrt.mapKeyNames = [ "neighbors", "next", "nextPage", + "nodeInterval", "number", "offset", "offsetX", @@ -383,9 +405,11 @@ pxtrt.mapKeyNames = [ "padding", "parent", "particleSources", + "path", "period", "physicsEngine", "pickRandom", + "pickRule", "place", "planeX", "planeY", @@ -396,6 +420,7 @@ pxtrt.mapKeyNames = [ "playerIndex", "playerStates", "position", + "possibleFacingDirections", "preferredDelay", "pressureLevel", "prevPage", @@ -408,6 +433,8 @@ pxtrt.mapKeyNames = [ "raiseButtonUp", "raiseLifeZero", "randomRange", + "readNextCommand", + "readNextToken", "recalcSize", "register", "registerFrameCallbacks", @@ -423,6 +450,7 @@ pxtrt.mapKeyNames = [ "repeatInterval", "repeatX", "repeatY", + "reset", "resetHitbox", "resize", "resizeBuckets", @@ -431,9 +459,12 @@ pxtrt.mapKeyNames = [ "rowCount", "rowHeight", "rows", + "run", "runButtonEvents", "runCallbacks", + "runCurrentCommand", "runningCallbacks", + "runningStartFrames", "s", "sayEndTime", "sayEndTimes", @@ -510,10 +541,13 @@ pxtrt.mapKeyNames = [ "src", "start", "startScreenEffect", + "startX", + "startY", "state", "stop", "stopped", "str", + "strIndex", "sx", "sy", "system", @@ -585,6 +619,7 @@ pxtrt.mapKeyNames = [ "winSoundLooping", "winner", "winnerOverride", + "work", "x", "xFpx", "xOffset", @@ -622,7 +657,7 @@ const pxsim_pxtrt = pxsim.pxtrt; const pxsim_numops = pxsim.numops; -function _main___P197394(s) { +function _main___P200025(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -1022,6 +1057,7 @@ switch (step) { case 35: r0 = s.retval; globals.melt___169823 = (s.tmp_0); + globals.stateNamespace___172877 = ("__animation"); r0 = pxsim.image.ofBuffer(_hex172963); globals.smallDonut___170068 = (r0); r0 = pxsim.image.ofBuffer(_hex172985); @@ -1608,176 +1644,196 @@ switch (step) { s.callLocIdx = 118; s.pc = 64; return s.tmp_0; case 64: r0 = s.retval; - globals.star___197128 = (r0); + globals.star___199588 = (r0); s.tmp_0 = SpriteKind_create__P169006_mk(s); s.callLocIdx = 119; s.pc = 65; return s.tmp_0; case 65: r0 = s.retval; - globals.star2___197131 = (r0); + globals.star2___199591 = (r0); s.tmp_0 = SpriteKind_create__P169006_mk(s); s.callLocIdx = 120; s.pc = 66; return s.tmp_0; case 66: r0 = s.retval; - globals.ultimate_star_rainbow___197134 = (r0); + globals.ultimate_star_rainbow___199594 = (r0); s.tmp_0 = SpriteKind_create__P169006_mk(s); s.callLocIdx = 121; s.pc = 67; return s.tmp_0; case 67: r0 = s.retval; - globals.star3___197137 = (r0); + globals.star3___199597 = (r0); s.tmp_0 = SpriteKind_create__P169006_mk(s); s.callLocIdx = 122; s.pc = 68; return s.tmp_0; case 68: r0 = s.retval; - globals.star4___197140 = (r0); + globals.star4___199600 = (r0); s.tmp_0 = sprites_onOverlap__P168985_mk(s); s.tmp_0.arg0 = globals.Player___169007; - s.tmp_0.arg1 = globals.ultimate_star_rainbow___197134; - s.tmp_0.arg2 = inline__P197145; + s.tmp_0.arg1 = globals.ultimate_star_rainbow___199594; + s.tmp_0.arg2 = inline__P199605; s.callLocIdx = 125; s.pc = 69; return s.tmp_0; case 69: r0 = s.retval; s.tmp_0 = controller_Button_onEvent__P168723_mk(s); - s.tmp_0.arg0 = globals.A___168640; + s.tmp_0.arg0 = globals.B___168641; s.tmp_0.arg1 = 2049; - s.tmp_0.arg2 = inline__P197164; - s.callLocIdx = 127; s.pc = 70; return s.tmp_0; + s.tmp_0.arg2 = inline__P199624; + s.callLocIdx = 129; s.pc = 70; return s.tmp_0; case 70: r0 = s.retval; - s.tmp_0 = sprites_onOverlap__P168985_mk(s); - s.tmp_0.arg0 = globals.Player___169007; - s.tmp_0.arg1 = globals.star4___197140; - s.tmp_0.arg2 = inline__P197174; - s.callLocIdx = 134; s.pc = 71; return s.tmp_0; + s.tmp_0 = controller_Button_onEvent__P168723_mk(s); + s.tmp_0.arg0 = globals.A___168640; + s.tmp_0.arg1 = 2049; + s.tmp_0.arg2 = inline__P199634; + s.callLocIdx = 131; s.pc = 71; return s.tmp_0; case 71: r0 = s.retval; s.tmp_0 = sprites_onOverlap__P168985_mk(s); s.tmp_0.arg0 = globals.Player___169007; - s.tmp_0.arg1 = globals.star2___197131; - s.tmp_0.arg2 = inline__P197199; - s.callLocIdx = 141; s.pc = 72; return s.tmp_0; + s.tmp_0.arg1 = globals.star4___199600; + s.tmp_0.arg2 = inline__P199644; + s.callLocIdx = 138; s.pc = 72; return s.tmp_0; case 72: r0 = s.retval; s.tmp_0 = sprites_onOverlap__P168985_mk(s); s.tmp_0.arg0 = globals.Player___169007; - s.tmp_0.arg1 = globals.star___197128; - s.tmp_0.arg2 = inline__P197224; - s.callLocIdx = 148; s.pc = 73; return s.tmp_0; + s.tmp_0.arg1 = globals.star2___199591; + s.tmp_0.arg2 = inline__P199669; + s.callLocIdx = 145; s.pc = 73; return s.tmp_0; case 73: + r0 = s.retval; + s.tmp_0 = controller_Button_onEvent__P168723_mk(s); + s.tmp_0.arg0 = globals.B___168641; + s.tmp_0.arg1 = 2048; + s.tmp_0.arg2 = inline__P199694; + s.callLocIdx = 147; s.pc = 74; return s.tmp_0; + case 74: r0 = s.retval; s.tmp_0 = sprites_onOverlap__P168985_mk(s); s.tmp_0.arg0 = globals.Player___169007; - s.tmp_0.arg1 = globals.star3___197137; - s.tmp_0.arg2 = inline__P197247; - s.callLocIdx = 155; s.pc = 74; return s.tmp_0; - case 74: + s.tmp_0.arg1 = globals.star___199588; + s.tmp_0.arg2 = inline__P199700; + s.callLocIdx = 154; s.pc = 75; return s.tmp_0; + case 75: + r0 = s.retval; + s.tmp_0 = sprites_onOverlap__P168985_mk(s); + s.tmp_0.arg0 = globals.Player___169007; + s.tmp_0.arg1 = globals.star3___199597; + s.tmp_0.arg2 = inline__P199723; + s.callLocIdx = 161; s.pc = 76; return s.tmp_0; + case 76: r0 = s.retval; - globals.mySprite5___197212 = (null); - globals.mySprite3___197206 = (null); - globals.mySprite4___197187 = (null); - globals.mySprite6___197181 = (null); - globals.sec___197155 = (0); - globals.mySprite2___197231 = (null); - globals.mySprite___197167 = (null); + globals.mySprite5___199682 = (null); + globals.mySprite3___199676 = (null); + globals.mySprite4___199657 = (null); + globals.mySprite6___199651 = (null); + globals.sec___199615 = (0); + globals.mySprite2___199707 = (null); + globals.mySprite___199637 = (null); s.tmp_0 = game_showLongText__P169487_mk(s); - s.tmp_0.arg0 = "Welcome to 3D Mazes. Use WASD to move or arrows, press A to jump."; + s.tmp_0.arg0 = "Welcome to 3D Mazes. Use WASD to move or arrows, press A to jump. B to zoom"; s.tmp_0.arg1 = 5; - s.callLocIdx = 156; s.pc = 75; return s.tmp_0; - case 75: + s.callLocIdx = 162; s.pc = 77; return s.tmp_0; + case 77: r0 = s.retval; s.tmp_0 = sprites_create__P168802_mk(s); - r0 = pxsim.image.ofBuffer(_hex197270); + r0 = pxsim.image.ofBuffer(_hex199746); s.tmp_0.arg0 = r0; s.tmp_0.arg1 = globals.Player___169007; - s.callLocIdx = 157; s.pc = 76; return s.tmp_0; - case 76: + s.callLocIdx = 163; s.pc = 78; return s.tmp_0; + case 78: r0 = s.retval; - globals.mySprite___197167 = (r0); + globals.mySprite___199637 = (r0); r0 = globals.raycastingRender___171795.fields["sprSelf"]; - globals.mySprite___197167 = (r0); + globals.mySprite___199637 = (r0); s.tmp_0 = tiles_setCurrentTilemap__P169291_mk(s); s.tmp_1 = helpers_getTilemapByName__P169862_mk(s); s.tmp_1.arg0 = "level2"; - s.callLocIdx = 159; s.pc = 78; return s.tmp_1; - case 78: + s.callLocIdx = 165; s.pc = 80; return s.tmp_1; + case 80: r0 = s.retval; s.tmp_0.arg0 = r0; - s.callLocIdx = 160; s.pc = 77; return s.tmp_0; - case 77: + s.callLocIdx = 166; s.pc = 79; return s.tmp_0; + case 79: r0 = s.retval; s.tmp_0 = Render_moveWithController__P171833_mk(s); s.tmp_0.arg0 = 3; s.tmp_0.arg1 = 2; s.tmp_0.arg2 = 1; - s.callLocIdx = 161; s.pc = 79; return s.tmp_0; - case 79: + s.callLocIdx = 167; s.pc = 81; return s.tmp_0; + case 81: r0 = s.retval; s.tmp_0 = Render_setAttribute__P171822_mk(s); s.tmp_0.arg0 = 2; - s.tmp_0.arg1 = 0.66; - s.callLocIdx = 162; s.pc = 80; return s.tmp_0; - case 80: + s.tmp_0.arg1 = 1; + s.callLocIdx = 168; s.pc = 82; return s.tmp_0; + case 82: r0 = s.retval; s.tmp_0 = Render_setAttribute__P171822_mk(s); s.tmp_0.arg0 = 0; s.tmp_0.arg1 = 0.066; - s.callLocIdx = 163; s.pc = 81; return s.tmp_0; - case 81: + s.callLocIdx = 169; s.pc = 83; return s.tmp_0; + case 83: r0 = s.retval; s.tmp_0 = Render_setAttribute__P171822_mk(s); s.tmp_0.arg0 = 1; s.tmp_0.arg1 = 0.066; - s.callLocIdx = 164; s.pc = 82; return s.tmp_0; - case 82: + s.callLocIdx = 170; s.pc = 84; return s.tmp_0; + case 84: r0 = s.retval; s.tmp_0 = Render_setAttribute__P171822_mk(s); s.tmp_0.arg0 = 3; s.tmp_0.arg1 = 1.6; - s.callLocIdx = 165; s.pc = 83; return s.tmp_0; - case 83: + s.callLocIdx = 171; s.pc = 85; return s.tmp_0; + case 85: r0 = s.retval; s.tmp_0 = Render_setViewAngleInDegree__P171824_mk(s); s.tmp_0.arg0 = 0; - s.callLocIdx = 166; s.pc = 84; return s.tmp_0; - case 84: + s.callLocIdx = 172; s.pc = 86; return s.tmp_0; + case 86: r0 = s.retval; s.tmp_0 = sprites_create__P168802_mk(s); - r0 = pxsim.image.ofBuffer(_hex197290); + r0 = pxsim.image.ofBuffer(_hex199766); s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = globals.star___197128; - s.callLocIdx = 167; s.pc = 85; return s.tmp_0; - case 85: + s.tmp_0.arg1 = globals.star___199588; + s.callLocIdx = 173; s.pc = 87; return s.tmp_0; + case 87: r0 = s.retval; - globals.mySprite2___197231 = (r0); + globals.mySprite2___199707 = (r0); s.tmp_0 = tiles_placeOnTile__P169300_mk(s); - s.tmp_0.arg0 = globals.mySprite2___197231; + s.tmp_0.arg0 = globals.mySprite2___199707; s.tmp_1 = tiles_getTileLocation__P169294_mk(s); s.tmp_1.arg0 = 60; s.tmp_1.arg1 = 3; - s.callLocIdx = 168; s.pc = 87; return s.tmp_1; - case 87: + s.callLocIdx = 174; s.pc = 89; return s.tmp_1; + case 89: r0 = s.retval; s.tmp_0.arg1 = r0; - s.callLocIdx = 169; s.pc = 86; return s.tmp_0; - case 86: + s.callLocIdx = 175; s.pc = 88; return s.tmp_0; + case 88: r0 = s.retval; - globals.sec___197155 = (0); - globals.seconds_calculating___197297 = (0); + globals.sec___199615 = (0); + globals.seconds_calculating___199773 = (0); s.tmp_0 = game_onUpdate__P169550_mk(s); - s.tmp_0.arg0 = inline__P197299; - s.callLocIdx = 171; s.pc = 88; return s.tmp_0; - case 88: + s.tmp_0.arg0 = inline__P199775; + s.callLocIdx = 177; s.pc = 90; return s.tmp_0; + case 90: + r0 = s.retval; + s.tmp_0 = game_onUpdateInterval__P169551_mk(s); + s.tmp_0.arg0 = 500; + s.tmp_0.arg1 = inline__P199790; + s.callLocIdx = 181; s.pc = 91; return s.tmp_0; + case 91: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -_main___P197394.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"pxt_modules/Sprite Grid/main.ts","functionName":"
","argumentNames":[]} -_main___P197394.continuations = [ 49,50,51,52 ] +_main___P200025.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"pxt_modules/Sprite Grid/main.ts","functionName":"
","argumentNames":[]} +_main___P200025.continuations = [ 49,50,51,52 ] -function _main___P197394_mk(s) { +function _main___P200025_mk(s) { checkStack(s.depth); return { - parent: s, fn: _main___P197394, depth: s.depth + 1, + parent: s, fn: _main___P200025, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -1895,8 +1951,8 @@ const _hex175005 = pxsim.BufferMethods.createBufferFromHex("87041000100000000000 const _hex175009 = pxsim.BufferMethods.createBufferFromHex("87041000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") const _hex175013 = pxsim.BufferMethods.createBufferFromHex("87041000100000007177771777777717177777177777777117777717777777717771771777771777777177177777717777177717777771777717771777177777777771177717777777777117777177777777171777717777777717171777777777777711717777777777771171777777777777177777777777777717777777777777777777777777") const _hex175017 = pxsim.BufferMethods.createBufferFromHex("87041000100000007777777777777777777777777177777777777777717777777777771711777777777777171177777777777771717177777777177771717777777717777117777777777177711777777777717771777177771777777177717777177777717717777771777771771777177777777177777117777777717777717177777771777717") -const _hex197270 = pxsim.BufferMethods.createBufferFromHex("87041000100000000000000000000000000000f00f00000000f0fffffee0440000ffefefee4f4d00f0ff2effe4feff00f0eff2bfd12e42ffffe2f2fedf2442ff2fe2f24edd24520f2fe2f24edd24520fffe2f2fedf2442fff0eff2bfd12e42fff0ff2effe4feff0000ffeeefee4f4d0000f0fffffee04400000000f00f0000000000000000000000") -const _hex197290 = pxsim.BufferMethods.createBufferFromHex("87041000100000000000000000000000000000050000000000000055000000000000005500005005000000550500550500005055055555000050555555550500505555555555000050555555555500000050555555550500000050550555550000000055050055050000005500005005000000550000000000000005000000000000000000000000") +const _hex199746 = pxsim.BufferMethods.createBufferFromHex("87041000100000000000000000000000000000f00f00000000f0fffffee0440000ffefefee4f4d00f0ff2effe4feff00f0eff2bfd12e42ffffe2f2fedf2442ff2fe2f24edd24520f2fe2f24edd24520fffe2f2fedf2442fff0eff2bfd12e42fff0ff2effe4feff0000ffeeefee4f4d0000f0fffffee04400000000f00f0000000000000000000000") +const _hex199766 = pxsim.BufferMethods.createBufferFromHex("87041000100000000000000000000000000000050000000000000055000000000000005500005005000000550500550500005055055555000050555555550500505555555555000050555555555500000050555555550500000050550555550000000055050055050000005500005005000000550000000000000005000000000000000000000000") @@ -3368,7 +3424,7 @@ function myTiles_inline__P175255_mk(s) { -function inline__P197145(s) { +function inline__P199605(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3385,12 +3441,12 @@ switch (step) { } s.tmp_0 = game_setGameOverMessage__P169536_mk(s); s.tmp_0.arg0 = true; - if ((globals.sec___197155) && (globals.sec___197155).vtable) { + if ((globals.sec___199615) && (globals.sec___199615).vtable) { setupResume(s, 2); - pxsim_String__stringConv(globals.sec___197155); + pxsim_String__stringConv(globals.sec___199615); checkResumeConsumed(); return; - } else { s.retval = (globals.sec___197155) + ""; } + } else { s.retval = (globals.sec___199615) + ""; } case 2: r0 = s.retval; s.tmp_3 = r0; @@ -3419,12 +3475,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -inline__P197145.info = {"start":336,"length":135,"line":7,"column":71,"endLine":10,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":["sprite","otherSprite"]} +inline__P199605.info = {"start":336,"length":135,"line":7,"column":71,"endLine":10,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":["sprite","otherSprite"]} -function inline__P197145_mk(s) { +function inline__P199605_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P197145, depth: s.depth + 1, + parent: s, fn: inline__P199605, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -3438,7 +3494,81 @@ function inline__P197145_mk(s) { -function inline__P197164(s) { +function inline__P199624(s) { +let r0 = s.r0, 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 = Render_setAttribute__P171822_mk(s); + s.tmp_0.arg0 = 2; + s.tmp_0.arg1 = 0.5; + s.callLocIdx = 126; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + s.tmp_0 = timer_after__P170892_mk(s); + s.tmp_0.arg0 = 50; + s.tmp_0.arg1 = inline__P199628; + s.callLocIdx = 128; s.pc = 2; return s.tmp_0; + case 2: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +inline__P199624.info = {"start":525,"length":162,"line":11,"column":52,"endLine":16,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":[]} + +function inline__P199624_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: inline__P199624, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, +} } + + + + + +function inline__P199628(s) { +let r0 = s.r0, 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 = Render_setAttribute__P171822_mk(s); + s.tmp_0.arg0 = 2; + s.tmp_0.arg1 = 0.1; + s.callLocIdx = 127; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +inline__P199628.info = {"start":610,"length":74,"line":13,"column":20,"endLine":15,"endColumn":5,"fileName":"main.ts","functionName":"inline","argumentNames":[]} + +function inline__P199628_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: inline__P199628, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, +} } + + + + + +function inline__P199634(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3449,22 +3579,22 @@ switch (step) { case 0: s.tmp_0 = Render_move__P171832_mk(s); - s.tmp_0.arg0 = globals.mySprite___197167; + s.tmp_0.arg0 = globals.mySprite___199637; s.tmp_0.arg1 = 100; s.tmp_0.arg2 = -100; - s.callLocIdx = 126; s.pc = 1; return s.tmp_0; + s.callLocIdx = 130; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P197164.info = {"start":525,"length":52,"line":11,"column":52,"endLine":13,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":[]} +inline__P199634.info = {"start":741,"length":52,"line":17,"column":52,"endLine":19,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":[]} -function inline__P197164_mk(s) { +function inline__P199634_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P197164, depth: s.depth + 1, + parent: s, fn: inline__P199634, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, } } @@ -3473,7 +3603,7 @@ function inline__P197164_mk(s) { -function inline__P197174(s) { +function inline__P199644(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3489,52 +3619,52 @@ switch (step) { s.lambdaArgs = null; } s.tmp_0 = sprites_destroy__P168804_mk(s); - s.tmp_0.arg0 = globals.mySprite6___197181; + s.tmp_0.arg0 = globals.mySprite6___199651; s.tmp_0.arg1 = undefined; s.tmp_0.arg2 = undefined; - s.callLocIdx = 128; s.pc = 1; return s.tmp_0; + s.callLocIdx = 132; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; s.tmp_0 = tiles_setCurrentTilemap__P169291_mk(s); s.tmp_1 = helpers_getTilemapByName__P169862_mk(s); s.tmp_1.arg0 = "level18"; - s.callLocIdx = 129; s.pc = 3; return s.tmp_1; + s.callLocIdx = 133; s.pc = 3; return s.tmp_1; case 3: r0 = s.retval; s.tmp_0.arg0 = r0; - s.callLocIdx = 130; s.pc = 2; return s.tmp_0; + s.callLocIdx = 134; s.pc = 2; return s.tmp_0; case 2: r0 = s.retval; s.tmp_0 = sprites_create__P168802_mk(s); - r0 = pxsim.image.ofBuffer(_hex197191); + r0 = pxsim.image.ofBuffer(_hex199661); s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = globals.ultimate_star_rainbow___197134; - s.callLocIdx = 131; s.pc = 4; return s.tmp_0; + s.tmp_0.arg1 = globals.ultimate_star_rainbow___199594; + s.callLocIdx = 135; s.pc = 4; return s.tmp_0; case 4: r0 = s.retval; - globals.mySprite4___197187 = (r0); + globals.mySprite4___199657 = (r0); s.tmp_0 = tiles_placeOnTile__P169300_mk(s); - s.tmp_0.arg0 = globals.mySprite4___197187; + s.tmp_0.arg0 = globals.mySprite4___199657; s.tmp_1 = tiles_getTileLocation__P169294_mk(s); s.tmp_1.arg0 = 51; s.tmp_1.arg1 = 49; - s.callLocIdx = 132; s.pc = 6; return s.tmp_1; + s.callLocIdx = 136; s.pc = 6; return s.tmp_1; case 6: r0 = s.retval; s.tmp_0.arg1 = r0; - s.callLocIdx = 133; s.pc = 5; return s.tmp_0; + s.callLocIdx = 137; s.pc = 5; return s.tmp_0; case 5: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P197174.info = {"start":634,"length":912,"line":14,"column":55,"endLine":36,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":["sprite","otherSprite"]} +inline__P199644.info = {"start":850,"length":912,"line":20,"column":55,"endLine":42,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":["sprite","otherSprite"]} -function inline__P197174_mk(s) { +function inline__P199644_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P197174, depth: s.depth + 1, + parent: s, fn: inline__P199644, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -3542,12 +3672,12 @@ function inline__P197174_mk(s) { arg1: undefined, } } -const _hex197191 = pxsim.BufferMethods.createBufferFromHex("870410001000000000000000000000000000000f00000000000000220000000000000033000030030000004404004404000050550555550000006666666666000077777777770700008888888888080000009999999999000000a0aa0aaaaa00000000bb0b00bb0b000000cc0000c00c000000dd000000000000000f000000000000000000000000") +const _hex199661 = pxsim.BufferMethods.createBufferFromHex("870410001000000000000000000000000000000f00000000000000220000000000000033000030030000004404004404000050550555550000006666666666000077777777770700008888888888080000009999999999000000a0aa0aaaaa00000000bb0b00bb0b000000cc0000c00c000000dd000000000000000f000000000000000000000000") -function inline__P197199(s) { +function inline__P199669(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3563,52 +3693,52 @@ switch (step) { s.lambdaArgs = null; } s.tmp_0 = sprites_destroy__P168804_mk(s); - s.tmp_0.arg0 = globals.mySprite3___197206; + s.tmp_0.arg0 = globals.mySprite3___199676; s.tmp_0.arg1 = undefined; s.tmp_0.arg2 = undefined; - s.callLocIdx = 135; s.pc = 1; return s.tmp_0; + s.callLocIdx = 139; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; s.tmp_0 = tiles_setCurrentTilemap__P169291_mk(s); s.tmp_1 = helpers_getTilemapByName__P169862_mk(s); s.tmp_1.arg0 = "level5"; - s.callLocIdx = 136; s.pc = 3; return s.tmp_1; + s.callLocIdx = 140; s.pc = 3; return s.tmp_1; case 3: r0 = s.retval; s.tmp_0.arg0 = r0; - s.callLocIdx = 137; s.pc = 2; return s.tmp_0; + s.callLocIdx = 141; s.pc = 2; return s.tmp_0; case 2: r0 = s.retval; s.tmp_0 = sprites_create__P168802_mk(s); - r0 = pxsim.image.ofBuffer(_hex197216); + r0 = pxsim.image.ofBuffer(_hex199686); s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = globals.star3___197137; - s.callLocIdx = 138; s.pc = 4; return s.tmp_0; + s.tmp_0.arg1 = globals.star3___199597; + s.callLocIdx = 142; s.pc = 4; return s.tmp_0; case 4: r0 = s.retval; - globals.mySprite5___197212 = (r0); + globals.mySprite5___199682 = (r0); s.tmp_0 = tiles_placeOnTile__P169300_mk(s); - s.tmp_0.arg0 = globals.mySprite5___197212; + s.tmp_0.arg0 = globals.mySprite5___199682; s.tmp_1 = tiles_getTileLocation__P169294_mk(s); s.tmp_1.arg0 = 49; s.tmp_1.arg1 = 49; - s.callLocIdx = 139; s.pc = 6; return s.tmp_1; + s.callLocIdx = 143; s.pc = 6; return s.tmp_1; case 6: r0 = s.retval; s.tmp_0.arg1 = r0; - s.callLocIdx = 140; s.pc = 5; return s.tmp_0; + s.callLocIdx = 144; s.pc = 5; return s.tmp_0; case 5: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P197199.info = {"start":1603,"length":895,"line":37,"column":55,"endLine":59,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":["sprite","otherSprite"]} +inline__P199669.info = {"start":1819,"length":895,"line":43,"column":55,"endLine":65,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":["sprite","otherSprite"]} -function inline__P197199_mk(s) { +function inline__P199669_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P197199, depth: s.depth + 1, + parent: s, fn: inline__P199669, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -3616,12 +3746,46 @@ function inline__P197199_mk(s) { arg1: undefined, } } -const _hex197216 = pxsim.BufferMethods.createBufferFromHex("87041000100000000000000000000000000000090000000000000099000000000000009900009009000000990900990900009099099999000090999999990900909999999999000090999999999900000090999999990900000090990999990000000099090099090000009900009009000000990000000000000009000000000000000000000000") +const _hex199686 = pxsim.BufferMethods.createBufferFromHex("87041000100000000000000000000000000000090000000000000099000000000000009900009009000000990900990900009099099999000090999999990900909999999999000090999999999900000090999999990900000090990999990000000099090099090000009900009009000000990000000000000009000000000000000000000000") + + + + +function inline__P199694(s) { +let r0 = s.r0, 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 = Render_setAttribute__P171822_mk(s); + s.tmp_0.arg0 = 2; + s.tmp_0.arg1 = 1; + s.callLocIdx = 146; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +inline__P199694.info = {"start":2769,"length":64,"line":66,"column":53,"endLine":68,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":[]} + +function inline__P199694_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: inline__P199694, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, +} } + -function inline__P197224(s) { +function inline__P199700(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3637,52 +3801,52 @@ switch (step) { s.lambdaArgs = null; } s.tmp_0 = sprites_destroy__P168804_mk(s); - s.tmp_0.arg0 = globals.mySprite2___197231; + s.tmp_0.arg0 = globals.mySprite2___199707; s.tmp_0.arg1 = undefined; s.tmp_0.arg2 = undefined; - s.callLocIdx = 142; s.pc = 1; return s.tmp_0; + s.callLocIdx = 148; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; s.tmp_0 = tiles_setCurrentTilemap__P169291_mk(s); s.tmp_1 = helpers_getTilemapByName__P169862_mk(s); s.tmp_1.arg0 = "level3"; - s.callLocIdx = 143; s.pc = 3; return s.tmp_1; + s.callLocIdx = 149; s.pc = 3; return s.tmp_1; case 3: r0 = s.retval; s.tmp_0.arg0 = r0; - s.callLocIdx = 144; s.pc = 2; return s.tmp_0; + s.callLocIdx = 150; s.pc = 2; return s.tmp_0; case 2: r0 = s.retval; s.tmp_0 = sprites_create__P168802_mk(s); - r0 = pxsim.image.ofBuffer(_hex197239); + r0 = pxsim.image.ofBuffer(_hex199715); s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = globals.star2___197131; - s.callLocIdx = 145; s.pc = 4; return s.tmp_0; + s.tmp_0.arg1 = globals.star2___199591; + s.callLocIdx = 151; s.pc = 4; return s.tmp_0; case 4: r0 = s.retval; - globals.mySprite3___197206 = (r0); + globals.mySprite3___199676 = (r0); s.tmp_0 = tiles_placeOnTile__P169300_mk(s); - s.tmp_0.arg0 = globals.mySprite3___197206; + s.tmp_0.arg0 = globals.mySprite3___199676; s.tmp_1 = tiles_getTileLocation__P169294_mk(s); s.tmp_1.arg0 = 32; s.tmp_1.arg1 = 24; - s.callLocIdx = 146; s.pc = 6; return s.tmp_1; + s.callLocIdx = 152; s.pc = 6; return s.tmp_1; case 6: r0 = s.retval; s.tmp_0.arg1 = r0; - s.callLocIdx = 147; s.pc = 5; return s.tmp_0; + s.callLocIdx = 153; s.pc = 5; return s.tmp_0; case 5: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P197224.info = {"start":2554,"length":895,"line":60,"column":54,"endLine":82,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":["sprite","otherSprite"]} +inline__P199700.info = {"start":2889,"length":895,"line":69,"column":54,"endLine":91,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":["sprite","otherSprite"]} -function inline__P197224_mk(s) { +function inline__P199700_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P197224, depth: s.depth + 1, + parent: s, fn: inline__P199700, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -3690,12 +3854,12 @@ function inline__P197224_mk(s) { arg1: undefined, } } -const _hex197239 = pxsim.BufferMethods.createBufferFromHex("87041000100000000000000000000000000000020000000000000022000000000000002200002002000000220200220200002022022222000020222222220200202222222222000020222222222200000020222222220200000020220222220000000022020022020000002200002002000000220000000000000002000000000000000000000000") +const _hex199715 = pxsim.BufferMethods.createBufferFromHex("87041000100000000000000000000000000000020000000000000022000000000000002200002002000000220200220200002022022222000020222222220200202222222222000020222222222200000020222222220200000020220222220000000022020022020000002200002002000000220000000000000002000000000000000000000000") -function inline__P197247(s) { +function inline__P199723(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3711,52 +3875,52 @@ switch (step) { s.lambdaArgs = null; } s.tmp_0 = sprites_destroy__P168804_mk(s); - s.tmp_0.arg0 = globals.mySprite5___197212; + s.tmp_0.arg0 = globals.mySprite5___199682; s.tmp_0.arg1 = undefined; s.tmp_0.arg2 = undefined; - s.callLocIdx = 149; 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 = sprites_create__P168802_mk(s); - r0 = pxsim.image.ofBuffer(_hex197257); + r0 = pxsim.image.ofBuffer(_hex199733); s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = globals.star4___197140; - s.callLocIdx = 150; s.pc = 2; return s.tmp_0; + s.tmp_0.arg1 = globals.star4___199600; + s.callLocIdx = 156; s.pc = 2; return s.tmp_0; case 2: r0 = s.retval; - globals.mySprite6___197181 = (r0); + globals.mySprite6___199651 = (r0); s.tmp_0 = tiles_setCurrentTilemap__P169291_mk(s); s.tmp_1 = helpers_getTilemapByName__P169862_mk(s); s.tmp_1.arg0 = "level19"; - s.callLocIdx = 151; s.pc = 4; return s.tmp_1; + s.callLocIdx = 157; s.pc = 4; return s.tmp_1; case 4: r0 = s.retval; s.tmp_0.arg0 = r0; - s.callLocIdx = 152; s.pc = 3; return s.tmp_0; + s.callLocIdx = 158; s.pc = 3; return s.tmp_0; case 3: r0 = s.retval; s.tmp_0 = tiles_placeOnTile__P169300_mk(s); - s.tmp_0.arg0 = globals.mySprite6___197181; + s.tmp_0.arg0 = globals.mySprite6___199651; s.tmp_1 = tiles_getTileLocation__P169294_mk(s); s.tmp_1.arg0 = 22; s.tmp_1.arg1 = 26; - s.callLocIdx = 153; s.pc = 6; return s.tmp_1; + s.callLocIdx = 159; s.pc = 6; return s.tmp_1; case 6: r0 = s.retval; s.tmp_0.arg1 = r0; - s.callLocIdx = 154; s.pc = 5; return s.tmp_0; + s.callLocIdx = 160; s.pc = 5; return s.tmp_0; case 5: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P197247.info = {"start":3506,"length":896,"line":83,"column":55,"endLine":105,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":["sprite","otherSprite"]} +inline__P199723.info = {"start":3841,"length":896,"line":92,"column":55,"endLine":114,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":["sprite","otherSprite"]} -function inline__P197247_mk(s) { +function inline__P199723_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P197247, depth: s.depth + 1, + parent: s, fn: inline__P199723, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -3764,12 +3928,12 @@ function inline__P197247_mk(s) { arg1: undefined, } } -const _hex197257 = pxsim.BufferMethods.createBufferFromHex("87041000100000000000000000000000000000070000000000000077000000000000007700007007000000770700770700007077077777000070777777770700707777777777000070777777777700000070777777770700000070770777770000000077070077070000007700007007000000770000000000000007000000000000000000000000") +const _hex199733 = pxsim.BufferMethods.createBufferFromHex("87041000100000000000000000000000000000070000000000000077000000000000007700007007000000770700770700007077077777000070777777770700707777777777000070777777777700000070777777770700000070770777770000000077070077070000007700007007000000770000000000000007000000000000000000000000") -function inline__P197299(s) { +function inline__P199775(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3780,33 +3944,33 @@ switch (step) { case 0: s.tmp_1 = game_runtime__P169552_mk(s); - s.callLocIdx = 170; s.pc = 3; return s.tmp_1; + s.callLocIdx = 176; s.pc = 3; return s.tmp_1; case 3: r0 = s.retval; s.tmp_0 = r0; - r0 = (globals.sec___197155 * 1000); + r0 = (globals.sec___199615 * 1000); s.tmp_2 = r0; r0 = (s.tmp_0 - s.tmp_2); - globals.seconds_calculating___197297 = (r0); - r0 = (globals.seconds_calculating___197297 == 1000); + globals.seconds_calculating___199773 = (r0); + r0 = (globals.seconds_calculating___199773 == 1000); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = (globals.sec___197155 + 1); - globals.sec___197155 = (r0); - globals.seconds_calculating___197297 = (0); + r0 = (globals.sec___199615 + 1); + globals.sec___199615 = (r0); + globals.seconds_calculating___199773 = (0); case 1: case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P197299.info = {"start":6454,"length":163,"line":161,"column":14,"endLine":167,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":[]} +inline__P199775.info = {"start":6796,"length":163,"line":170,"column":14,"endLine":176,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":[]} -function inline__P197299_mk(s) { +function inline__P199775_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P197299, depth: s.depth + 1, + parent: s, fn: inline__P199775, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -3817,7 +3981,7 @@ function inline__P197299_mk(s) { -function game_runtime__P169552(s) { +function inline__P199790(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3827,31 +3991,79 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_1 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1390; s.pc = 1; return s.tmp_1; - case 1: + s.tmp_1 = characterAnimations_matchesRule__P170915_mk(s); + s.tmp_1.arg0 = globals.mySprite___199637; + s.tmp_2 = characterAnimations_rule__P170919_mk(s); + s.tmp_2.arg0 = 2; + s.tmp_2.arg1 = undefined; + s.tmp_2.arg2 = undefined; + s.tmp_2.arg3 = undefined; + s.tmp_2.arg4 = undefined; + s.callLocIdx = 178; s.pc = 4; return s.tmp_2; + case 4: + r0 = s.retval; + s.tmp_1.arg1 = r0; + s.callLocIdx = 179; s.pc = 3; return s.tmp_1; + case 3: r0 = s.retval; s.tmp_0 = r0; - r0 = s.tmp_0.fields["_millis"]; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = pxsim_Array__mk(); + s.tmp_3 = r0; + r0 = pxsim.image.ofBuffer(_hex199803); + s.tmp_4 = r0; + r0 = pxsim_Array__push(s.tmp_3, s.tmp_4); + r0 = pxsim.image.ofBuffer(_hex199805); + s.tmp_5 = r0; + r0 = pxsim_Array__push(s.tmp_3, s.tmp_5); + r0 = pxsim.image.ofBuffer(_hex199807); + s.tmp_6 = r0; + r0 = pxsim_Array__push(s.tmp_3, s.tmp_6); + r0 = pxsim.image.ofBuffer(_hex199809); + s.tmp_7 = r0; + r0 = pxsim_Array__push(s.tmp_3, s.tmp_7); + s.tmp_8 = animation_runImageAnimation__P169889_mk(s); + s.tmp_8.arg0 = globals.mySprite___199637; + s.tmp_8.arg1 = s.tmp_3; + s.tmp_8.arg2 = 500; + s.tmp_8.arg3 = false; + s.callLocIdx = 180; s.pc = 5; return s.tmp_8; + case 5: + r0 = s.retval; + case 1: + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -game_runtime__P169552.info = {"start":1426,"length":81,"line":44,"column":4,"endLine":46,"endColumn":5,"fileName":"pxt_modules/game/gameutil.ts","functionName":"runtime","argumentNames":[]} +inline__P199790.info = {"start":6988,"length":3177,"line":177,"column":27,"endLine":254,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":[]} -function game_runtime__P169552_mk(s) { +function inline__P199790_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_runtime__P169552, depth: s.depth + 1, + parent: s, fn: inline__P199790, depth: s.depth + 1, pc: 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, } } +const _hex199803 = pxsim.BufferMethods.createBufferFromHex("87041000100000000000000000000000000000f00f00000000f0fffffee0440000ffefefee4f4d00f0ff2effe4feff00f0eff2bfd12e42ffffe2f2fedf2442ff2fe2f24edd24520f2fe2f24edd24520fffe2f2fedf2442fff0eff2bfd12e42fff0ff2effe4feff0000ffeeefee4f4d0000f0fffffee04400000000f00f0000000000000000000000") +const _hex199805 = pxsim.BufferMethods.createBufferFromHex("87041000100000000000000000000000000000ff000000000000fffffff00e0000f0fffeeeef040000ffeff24ffeffff00ff2eff1b2442fff02f2eefff2d42fff0222eefd42d520ff0222eefd42d520ff02f2eefffedfe0f00ff2eff1bd4ed0f00ffeff24fdeed0000f0effeee4f0e000000ffffffee0000000000ff000000000000000000000000") +const _hex199807 = pxsim.BufferMethods.createBufferFromHex("87041000100000000000000000000000000000f00f00000000f0fffffee0440000ffefefee4f4d00f0ff2effe4feff00f0eff2bfd12e42ffffe2f2fedf2442ff2fe2f24edd24520f2fe2f24edd24520fffe2f2fedf2442fff0eff2bfd12e42fff0ff2effe4feff0000ffeeefee4f4d0000f0fffffee04400000000f00f0000000000000000000000") +const _hex199809 = pxsim.BufferMethods.createBufferFromHex("87041000100000000000000000000000000000ff000000000000ffffffee000000f0effeee4f0e0000ffeff24fdeed0000ff2eff1bd4ed0ff02f2eefffedfe0ff0222eefd42d520ff0222eefd42d520ff02f2eefff2d42ff00ff2eff1b2442ff00ffeff24ffeffff00f0fffeeeef04000000fffffff00e00000000ff000000000000000000000000") -function scene_Scene_millis__P169396(s) { +function animation_runImageAnimation__P169889(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3861,31 +4073,78 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.anim___175466 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, scene_Scene__C169370_VT)) failedCast(r0); - r0 = s.arg0.fields["_millis"]; + r0 = pxsim_pxtcore_mkClassInstance(animation_ImageAnimation__C169883_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 = 500; + case 2: + // jmp value (already in r0) + s.tmp_2 = r0; + s.tmp_3 = animation_ImageAnimation_constructor__P169884_mk(s); + s.tmp_3.arg0 = s.tmp_0; + s.tmp_3.arg1 = s.arg0; + s.tmp_3.arg2 = s.arg1; + s.tmp_3.arg3 = s.tmp_2; + r0 = pxsim_numops_toBoolDecr(s.arg3); + s.tmp_6 = r0; + r0 = pxsim_Boolean__bang(s.tmp_6); + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + s.tmp_4 = r0; + r0 = pxsim_Boolean__bang(s.tmp_4); + s.tmp_3.arg4 = r0; + s.callLocIdx = 1783; s.pc = 3; return s.tmp_3; + case 3: + r0 = s.retval; + s.anim___175466 = (s.tmp_0); + s.tmp_0 = animation_SpriteAnimation_init__P169881_mk(s); + s.tmp_0.arg0 = s.anim___175466; + s.callLocIdx = 1784; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -scene_Scene_millis__P169396.info = {"start":7147,"length":61,"line":196,"column":8,"endLine":198,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"millis","argumentNames":["this"]} +animation_runImageAnimation__P169889.info = {"start":21512,"length":222,"line":588,"column":4,"endLine":591,"endColumn":5,"fileName":"pxt_modules/game/animation.ts","functionName":"runImageAnimation","argumentNames":["sprite","frames","frameInterval","loop"]} -function scene_Scene_millis__P169396_mk(s) { +function animation_runImageAnimation__P169889_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_millis__P169396, depth: s.depth + 1, + parent: s, fn: animation_runImageAnimation__P169889, depth: s.depth + 1, pc: 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, + anim___175466: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function game_onUpdate__P169550(s) { +function animation_ImageAnimation_constructor__P169884(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3897,52 +4156,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.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; } + r0 = s.arg0; + if (!checkSubtype(r0, animation_ImageAnimation__C169883_VT)) failedCast(r0); + r0 = (s.arg0).fields["frames"] = (s.arg2); + r0 = (s.arg0).fields["frameInterval"] = (s.arg3); + s.tmp_0 = animation_SpriteAnimation_constructor__P169880_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.tmp_0.arg2 = s.arg4; + s.callLocIdx = 1771; s.pc = 1; return s.tmp_0; case 1: - case 2: - s.tmp_2 = control_EventContext_registerFrameHandler__P166930_mk(s); - s.tmp_3 = game_eventContext__P169529_mk(s); - s.callLocIdx = 1383; 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 = 1384; s.pc = 4; return s.tmp_2; - case 4: r0 = s.retval; - case 3: + r0 = (s.arg0).fields["lastFrame"] = (-1); r0 = undefined; return leave(s, r0) default: oops() } } } -game_onUpdate__P169550.info = {"start":327,"length":153,"line":13,"column":4,"endLine":16,"endColumn":5,"fileName":"pxt_modules/game/gameutil.ts","functionName":"onUpdate","argumentNames":["a"]} +animation_ImageAnimation_constructor__P169884.info = {"start":19278,"length":177,"line":527,"column":8,"endLine":530,"endColumn":9,"fileName":"pxt_modules/game/animation.ts","functionName":"inline","argumentNames":["this","sprite","frames","frameInterval","loop"]} -function game_onUpdate__P169550_mk(s) { +function animation_ImageAnimation_constructor__P169884_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_onUpdate__P169550, depth: s.depth + 1, + parent: s, fn: animation_ImageAnimation_constructor__P169884, depth: s.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_registerFrameHandler__P166930(s) { +function animation_SpriteAnimation_constructor__P169880(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3952,8 +4207,6 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.fn___175587 = undefined; - s.i___175596 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); @@ -3961,86 +4214,21 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, control_EventContext__C166922_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; } - 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__P171955_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 71; s.pc = 8; return s.tmp_0; - case 8: - r0 = s.retval; - case 1: - case 2: - r0 = pxsim_pxtcore_mkClassInstance(control_FrameCallback__C166919_VT); - s.fn___175587 = (r0); - r0 = (s.fn___175587).fields["order"] = (s.arg1); - r0 = (s.fn___175587).fields["handler"] = (s.arg2); - s.i___175596 = (0); - case 3: - s.tmp_1 = r0 = s.i___175596; - r0 = s.arg0.fields["frameCallbacks"]; - s.tmp_3 = r0; - r0 = pxsim_Array__length(s.tmp_3); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 6; continue; } - r0 = s.arg0.fields["frameCallbacks"]; - s.tmp_6 = r0; - r0 = pxsim_Array__getAt(s.tmp_6, s.i___175596); - 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___175596, s.fn___175587); - r0 = s.fn___175587; - { step = 7; continue; } - case 4: - case 5: - r0 = (s.i___175596 + 1); - s.i___175596 = (r0); - { step = 3; continue; } - case 6: - r0 = s.arg0.fields["frameCallbacks"]; - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.fn___175587); - r0 = s.fn___175587; - case 7: + if (!checkSubtype(r0, animation_SpriteAnimation__C169879_VT)) failedCast(r0); + r0 = (s.arg0).fields["sprite"] = (s.arg1); + r0 = (s.arg0).fields["loop"] = (s.arg2); + r0 = (s.arg0).fields["elapsedTime"] = (0); + r0 = undefined; return leave(s, r0) default: oops() } } } -control_EventContext_registerFrameHandler__P166930.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"]} +animation_SpriteAnimation_constructor__P169880.info = {"start":17626,"length":105,"line":486,"column":8,"endLine":488,"endColumn":9,"fileName":"pxt_modules/game/animation.ts","functionName":"inline","argumentNames":["this","sprite","loop"]} -function control_EventContext_registerFrameHandler__P166930_mk(s) { +function animation_SpriteAnimation_constructor__P169880_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_registerFrameHandler__P166930, depth: s.depth + 1, + parent: s, fn: animation_SpriteAnimation_constructor__P169880, depth: s.depth + 1, pc: 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___175587: undefined, - i___175596: undefined, arg0: undefined, arg1: undefined, arg2: undefined, @@ -4050,7 +4238,7 @@ function control_EventContext_registerFrameHandler__P166930_mk(s) { -function control_EventContext_registerFrameCallbacks__P171955(s) { +function animation_SpriteAnimation_init__P169881(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4060,14 +4248,27 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.worker___175630 = undefined; + s.state___175479 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, control_EventContext__C166922_VT)) failedCast(r0); - r0 = s.arg0.fields["frameCallbacks"]; + if (!checkSubtype(r0, animation_SpriteAnimation__C169879_VT)) failedCast(r0); + r0 = pxsim_pxtrt.mklocRef(); + s.state___175479 = (r0); + s.tmp_0 = r0 = s.state___175479; + s.tmp_4 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1758; s.pc = 3; return s.tmp_4; + case 3: + r0 = s.retval; + s.tmp_3 = r0; + r0 = s.tmp_3.fields["_data"]; + s.tmp_2 = r0; + r0 = pxsim_pxtrt.mapGetGeneric(s.tmp_2, globals.stateNamespace___172877); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + r0 = pxsim_pxtrt_ldlocRef(s.state___175479); s.tmp_2 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; @@ -4075,32 +4276,107 @@ switch (step) { s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - { step = 3; continue; } + r0 = pxsim_pxtrt.mkMap(); + s.tmp_3 = r0; + r0 = pxsim_Array__mk(); + s.tmp_4 = r0; + r0 = pxsim_pxtrt.mapSetByString(s.tmp_3, "animations", s.tmp_4); + s.tmp_7 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1760; s.pc = 4; return s.tmp_7; + case 4: + r0 = s.retval; + s.tmp_6 = r0; + r0 = s.tmp_6.fields["_data"]; + s.tmp_5 = r0; + r0 = pxsim_pxtrt.mapSetGeneric(s.tmp_5, globals.stateNamespace___172877, s.tmp_3); + r0 = pxsim_pxtrt_stlocRef(s.state___175479, s.tmp_3); + r0 = pxsim_pxtcore_mkAction(1, animation_SpriteAnimation_init_inline__P175495); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.state___175479); + s.tmp_1 = control_EventContext_registerFrameHandler__P166930_mk(s); + s.tmp_2 = game_eventContext__P169529_mk(s); + s.callLocIdx = 1762; s.pc = 6; return s.tmp_2; + case 6: + r0 = s.retval; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 15; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 1766; s.pc = 5; return s.tmp_1; + case 5: + r0 = s.retval; case 1: case 2: - r0 = s.arg0.fields["frameWorker"]; - s.worker___175630 = (r0); - r0 = pxsim_pxtcore_mkAction(2, control_EventContext_registerFrameCallbacks_inline__P175636); + r0 = pxsim_pxtcore_mkAction(1, animation_SpriteAnimation_init_inline__P175519); s.tmp_0 = r0; r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.worker___175630); - r0 = pxsim.control.runInParallel(s.tmp_0); - case 3: + s.tmp_1 = if_animations_2_mk(s); + r0 = pxsim_pxtrt_ldlocRef(s.state___175479); + s.tmp_1.arg0 = r0; + s.tmp_2 = helpers_arrayFilter__P166637_mk(s); + s.tmp_3 = if_animations_1_mk(s); + r0 = pxsim_pxtrt_ldlocRef(s.state___175479); + s.tmp_3.arg0 = r0; + if (!s.tmp_3.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "animations"); + } else { + s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["animations"]; + if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["animations"]; } + else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } + else { s.callLocIdx = 1767; s.pc = 9; return s.tmp_3; } + } + case 9: + r0 = s.retval; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = s.tmp_0; + s.callLocIdx = 1768; s.pc = 8; return s.tmp_2; + case 8: + r0 = s.retval; + s.tmp_1.arg1 = r0; + if (!s.tmp_1.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapSetByString(s.tmp_1.arg0, "animations", s.tmp_1.arg1); + } else { + s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["set/animations"]; + if (s.tmp_1.fn === null) { s.tmp_1.arg0.fields["animations"] = s.tmp_1.arg1; } + else if (s.tmp_1.fn === undefined) { failedCast(s.tmp_1.arg0) } + else { s.callLocIdx = 1769; s.pc = 7; return s.tmp_1; } + } + case 7: + r0 = s.retval; + s.tmp_1 = if_animations_1_mk(s); + r0 = pxsim_pxtrt_ldlocRef(s.state___175479); + s.tmp_1.arg0 = r0; + if (!s.tmp_1.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "animations"); + } else { + s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["animations"]; + if (s.tmp_1.fn == null) { s.retval = s.tmp_1.arg0.fields["animations"]; } + else if (!s.tmp_1.fn.isGetter) { s.retval = bind(s.tmp_1); } + else { s.callLocIdx = 1770; s.pc = 10; return s.tmp_1; } + } + case 10: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.arg0); r0 = undefined; return leave(s, r0) default: oops() } } } -control_EventContext_registerFrameCallbacks__P171955.info = {"start":3668,"length":895,"line":109,"column":8,"endLine":133,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"registerFrameCallbacks","argumentNames":["this"]} +animation_SpriteAnimation_init__P169881.info = {"start":17741,"length":1299,"line":490,"column":8,"endLine":516,"endColumn":9,"fileName":"pxt_modules/game/animation.ts","functionName":"init","argumentNames":["this"]} -function control_EventContext_registerFrameCallbacks__P171955_mk(s) { +function animation_SpriteAnimation_init__P169881_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_registerFrameCallbacks__P171955, depth: s.depth + 1, + parent: s, fn: animation_SpriteAnimation_init__P169881, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - worker___175630: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + state___175479: undefined, arg0: undefined, } } @@ -4108,7 +4384,7 @@ function control_EventContext_registerFrameCallbacks__P171955_mk(s) { -function control_EventContext_registerFrameCallbacks_inline__P175636(s) { +function animation_SpriteAnimation_init_inline__P175495(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4118,73 +4394,60 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.delay___175666 = 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__P175642); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.caps[0]); - s.tmp_2 = pauseUntil__P166894_mk(s); - s.tmp_2.arg0 = s.tmp_1; - s.tmp_2.arg1 = undefined; - s.callLocIdx = 65; s.pc = 5; return s.tmp_2; - case 5: + s.tmp_0 = if_animations_2_mk(s); + r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); + s.tmp_0.arg0 = r0; + s.tmp_1 = helpers_arrayFilter__P166637_mk(s); + s.tmp_2 = if_animations_1_mk(s); + r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); + s.tmp_2.arg0 = r0; + if (!s.tmp_2.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "animations"); + } else { + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["animations"]; + if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["animations"]; } + else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } + else { s.callLocIdx = 1763; s.pc = 3; return s.tmp_2; } + } + case 3: r0 = s.retval; - case 1: + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = animation_SpriteAnimation_init_inline__P175502; + s.callLocIdx = 1764; s.pc = 2; return s.tmp_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__P171954_mk(s); - s.tmp_2.arg0 = s.caps[0]; - s.callLocIdx = 66; s.pc = 6; return s.tmp_2; - case 6: r0 = s.retval; - s.delay___175666 = (r0); - s.tmp_0 = pause__P166940_mk(s); - s.tmp_0.arg0 = s.delay___175666; - s.callLocIdx = 67; s.pc = 7; return s.tmp_0; - case 7: + s.tmp_0.arg1 = r0; + if (!s.tmp_0.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapSetByString(s.tmp_0.arg0, "animations", s.tmp_0.arg1); + } else { + s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["set/animations"]; + if (s.tmp_0.fn === null) { s.tmp_0.arg0.fields["animations"] = s.tmp_0.arg1; } + else if (s.tmp_0.fn === undefined) { failedCast(s.tmp_0.arg0) } + else { s.callLocIdx = 1765; s.pc = 1; return s.tmp_0; } + } + case 1: 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__P175636.info = {"start":3829,"length":723,"line":113,"column":34,"endLine":132,"endColumn":13,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":[]} +animation_SpriteAnimation_init_inline__P175495.info = {"start":18173,"length":371,"line":499,"column":90,"endLine":505,"endColumn":17,"fileName":"pxt_modules/game/animation.ts","functionName":"inline","argumentNames":[]} -function control_EventContext_registerFrameCallbacks_inline__P175636_mk(s) { +function animation_SpriteAnimation_init_inline__P175495_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_registerFrameCallbacks_inline__P175636, depth: s.depth + 1, + parent: s, fn: animation_SpriteAnimation_init_inline__P175495, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - delay___175666: undefined, } } -function control_EventContext_registerFrameCallbacks_inline__P175642(s) { +function animation_SpriteAnimation_init_inline__P175502(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4194,30 +4457,56 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = s.caps[0].fields["runningCallbacks"]; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0.fields["sprite"]; + r0 = r0.fields["flags"]; s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); + r0 = (s.tmp_1 & 2); s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = false; + { step = 3; continue; } + case 1: + case 2: + s.tmp_4 = animation_SpriteAnimation__C169879_v0_1_mk(s); + s.tmp_4.arg0 = s.arg0; + if (!checkSubtype(s.tmp_4.arg0, animation_SpriteAnimation__C169879_VT)) failedCast(s.tmp_4.arg0); + s.tmp_4.fn = s.tmp_4.arg0.vtable.methods.update; + s.pc = 4; return s.tmp_4; + case 4: + 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 3: return leave(s, r0) default: oops() } } } -control_EventContext_registerFrameCallbacks_inline__P175642.info = {"start":4060,"length":28,"line":117,"column":31,"endLine":117,"endColumn":59,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":[]} +animation_SpriteAnimation_init_inline__P175502.info = {"start":18244,"length":280,"line":500,"column":63,"endLine":504,"endColumn":21,"fileName":"pxt_modules/game/animation.ts","functionName":"inline","argumentNames":["anim"]} -function control_EventContext_registerFrameCallbacks_inline__P175642_mk(s) { +function animation_SpriteAnimation_init_inline__P175502_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_registerFrameCallbacks_inline__P175642, depth: s.depth + 1, + parent: s, fn: animation_SpriteAnimation_init_inline__P175502, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + arg0: undefined, } } -function control_EventContext_runCallbacks__P171954(s) { +function animation_SpriteAnimation_init_inline__P175519(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4227,12 +4516,450 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.loopStart___175675 = undefined; - s.f___175688 = undefined; - s.unnamed792___U2 = undefined; - s.unnamed793___U3 = undefined; - s.now___175693 = undefined; - s.runtime___175696 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0.fields["sprite"]; + s.tmp_1 = r0; + r0 = s.caps[0].fields["sprite"]; + 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 = 8; continue; } + case 1: + r0 = s.arg0; + r0 = checkSubtype(r0, animation_ImageAnimation__C169883_VT); + s.tmp_3 = r0; + r0 = pxsim_numops_toBool(s.tmp_3); + if (r0) { step = 2; continue; } + r0 = s.tmp_3; + { step = 3; continue; } + case 2: + r0 = s.caps[0]; + r0 = checkSubtype(r0, animation_ImageAnimation__C169883_VT); + case 3: + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = pxsim_numops_toBool(s.tmp_4); + if (!r0) { step = 4; continue; } + r0 = s.tmp_4; + { step = 7; continue; } + case 4: + r0 = s.arg0; + r0 = checkSubtype(r0, animation_MovementAnimation__C169886_VT); + s.tmp_5 = r0; + r0 = pxsim_numops_toBool(s.tmp_5); + if (r0) { step = 5; continue; } + r0 = s.tmp_5; + { step = 6; continue; } + case 5: + r0 = s.caps[0]; + r0 = checkSubtype(r0, animation_MovementAnimation__C169886_VT); + case 6: + // jmp value (already in r0) + s.tmp_6 = r0; + r0 = s.tmp_6; + case 7: + // jmp value (already in r0) + s.tmp_7 = r0; + r0 = s.tmp_7; + case 8: + // jmp value (already in r0) + s.tmp_8 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_8); + s.tmp_9 = r0; + r0 = pxsim_Boolean__bang(s.tmp_9); + return leave(s, r0) + default: oops() +} } } +animation_SpriteAnimation_init_inline__P175519.info = {"start":18701,"length":285,"line":509,"column":55,"endLine":513,"endColumn":13,"fileName":"pxt_modules/game/animation.ts","functionName":"inline","argumentNames":["anim"]} + +function animation_SpriteAnimation_init_inline__P175519_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: animation_SpriteAnimation_init_inline__P175519, depth: s.depth + 1, + pc: 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 animation_SpriteAnimation_update__P169882(s) { +let r0 = s.r0, 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, animation_SpriteAnimation__C169879_VT)) failedCast(r0); + r0 = false; + return leave(s, r0) + default: oops() +} } } +animation_SpriteAnimation_update__P169882.info = {"start":19050,"length":118,"line":518,"column":8,"endLine":521,"endColumn":9,"fileName":"pxt_modules/game/animation.ts","functionName":"update","argumentNames":["this"]} + +function animation_SpriteAnimation_update__P169882_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: animation_SpriteAnimation_update__P169882, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function scene_Scene_data__P169395(s) { +let r0 = s.r0, 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__C169370_VT)) failedCast(r0); + r0 = s.arg0.fields["_data"]; + return leaveAccessor(s, r0) + default: oops() +} } } +scene_Scene_data__P169395.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__P169395.isGetter = true; + +function scene_Scene_data__P169395_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: scene_Scene_data__P169395, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function control_EventContext_registerFrameHandler__P166930(s) { +let r0 = s.r0, 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.fn___175587 = undefined; + s.i___175596 = 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__C166922_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; } + 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__P171955_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 71; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + case 1: + case 2: + r0 = pxsim_pxtcore_mkClassInstance(control_FrameCallback__C166919_VT); + s.fn___175587 = (r0); + r0 = (s.fn___175587).fields["order"] = (s.arg1); + r0 = (s.fn___175587).fields["handler"] = (s.arg2); + s.i___175596 = (0); + case 3: + s.tmp_1 = r0 = s.i___175596; + r0 = s.arg0.fields["frameCallbacks"]; + s.tmp_3 = r0; + r0 = pxsim_Array__length(s.tmp_3); + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 6; continue; } + r0 = s.arg0.fields["frameCallbacks"]; + s.tmp_6 = r0; + r0 = pxsim_Array__getAt(s.tmp_6, s.i___175596); + 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___175596, s.fn___175587); + r0 = s.fn___175587; + { step = 7; continue; } + case 4: + case 5: + r0 = (s.i___175596 + 1); + s.i___175596 = (r0); + { step = 3; continue; } + case 6: + r0 = s.arg0.fields["frameCallbacks"]; + s.tmp_0 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.fn___175587); + r0 = s.fn___175587; + case 7: + return leave(s, r0) + default: oops() +} } } +control_EventContext_registerFrameHandler__P166930.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 control_EventContext_registerFrameHandler__P166930_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: control_EventContext_registerFrameHandler__P166930, depth: s.depth + 1, + pc: 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___175587: undefined, + i___175596: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, +} } + + + + + +function control_EventContext_registerFrameCallbacks__P171955(s) { +let r0 = s.r0, 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.worker___175630 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, control_EventContext__C166922_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: + case 2: + r0 = s.arg0.fields["frameWorker"]; + s.worker___175630 = (r0); + r0 = pxsim_pxtcore_mkAction(2, control_EventContext_registerFrameCallbacks_inline__P175636); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.worker___175630); + r0 = pxsim.control.runInParallel(s.tmp_0); + case 3: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +control_EventContext_registerFrameCallbacks__P171955.info = {"start":3668,"length":895,"line":109,"column":8,"endLine":133,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"registerFrameCallbacks","argumentNames":["this"]} + +function control_EventContext_registerFrameCallbacks__P171955_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: control_EventContext_registerFrameCallbacks__P171955, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + worker___175630: undefined, + arg0: undefined, +} } + + + + + +function control_EventContext_registerFrameCallbacks_inline__P175636(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + s.delay___175666 = 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__P175642); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.caps[0]); + s.tmp_2 = pauseUntil__P166894_mk(s); + s.tmp_2.arg0 = s.tmp_1; + s.tmp_2.arg1 = undefined; + s.callLocIdx = 65; s.pc = 5; return s.tmp_2; + case 5: + r0 = s.retval; + case 1: + case 2: + r0 = (s.caps[0]).fields["runningCallbacks"] = (true); + r0 = (s.caps[0]).fields["framesInSample"] = (0); + r0 = (s.caps[0]).fields["timeInSample"] = (0); + r0 = (s.caps[0]).fields["deltaTimeMillis"] = (0); + s.tmp_0 = r0 = s.caps[0]; + r0 = pxsim.control.millis(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["prevTimeMillis"] = (s.tmp_1); + case 3: + r0 = s.caps[0].fields["frameWorker"]; + s.tmp_1 = r0; + r0 = (s.caps[1] == s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + s.tmp_2 = control_EventContext_runCallbacks__P171954_mk(s); + s.tmp_2.arg0 = s.caps[0]; + s.callLocIdx = 66; s.pc = 6; return s.tmp_2; + case 6: + r0 = s.retval; + s.delay___175666 = (r0); + s.tmp_0 = pause__P166940_mk(s); + s.tmp_0.arg0 = s.delay___175666; + s.callLocIdx = 67; 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__P175636.info = {"start":3829,"length":723,"line":113,"column":34,"endLine":132,"endColumn":13,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":[]} + +function control_EventContext_registerFrameCallbacks_inline__P175636_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: control_EventContext_registerFrameCallbacks_inline__P175636, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + delay___175666: undefined, +} } + + + + + +function control_EventContext_registerFrameCallbacks_inline__P175642(s) { +let r0 = s.r0, 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["runningCallbacks"]; + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_Boolean__bang(s.tmp_0); + return leave(s, r0) + default: oops() +} } } +control_EventContext_registerFrameCallbacks_inline__P175642.info = {"start":4060,"length":28,"line":117,"column":31,"endLine":117,"endColumn":59,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":[]} + +function control_EventContext_registerFrameCallbacks_inline__P175642_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: control_EventContext_registerFrameCallbacks_inline__P175642, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, +} } + + + + + +function control_EventContext_runCallbacks__P171954(s) { +let r0 = s.r0, 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.loopStart___175675 = undefined; + s.f___175688 = undefined; + s.unnamed792___U2 = undefined; + s.unnamed793___U3 = undefined; + s.now___175693 = undefined; + s.runtime___175696 = undefined; s.realTimeInSample___175715 = undefined; s.fps___175724 = undefined; s.delay___175793 = undefined; @@ -5356,7 +6083,7 @@ function control_EventHandler_register_inline__P175932_mk(s) { -function Render_setViewAngleInDegree__P171824(s) { +function helpers_arrayFilter__P166637(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5366,40 +6093,71 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.res___175552 = undefined; + s.len___175554 = undefined; + s.i___175557 = undefined; + s.v___175562 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = Render_RayCastingRender_viewAngle__P171770_mk(s); - s.tmp_0.arg0 = globals.raycastingRender___171795; - r0 = (s.arg0 * 3.141592653589793); - s.tmp_1 = r0; - r0 = (s.tmp_1 / 180); - s.tmp_0.arg1 = r0; - s.callLocIdx = 2078; s.pc = 1; return s.tmp_0; + r0 = pxsim_Array__mk(); + s.res___175552 = (r0); + r0 = pxsim_Array__length(s.arg0); + s.len___175554 = (r0); + s.i___175557 = (0); case 1: + r0 = (s.i___175557 < s.len___175554); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + r0 = pxsim_Array__getAt(s.arg0, s.i___175557); + s.v___175562 = (r0); + s.tmp_1 = lambda_3_mk(s); + s.tmp_1.argL = s.arg1; + s.tmp_1.arg0 = s.v___175562; + s.tmp_1.arg1 = s.i___175557; + setupLambda(s.tmp_1, s.tmp_1.argL); + s.callLocIdx = 7; s.pc = 5; return s.tmp_1; + case 5: r0 = s.retval; - r0 = undefined; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + r0 = pxsim_Array__push(s.res___175552, s.v___175562); + case 2: + case 3: + r0 = (s.i___175557 + 1); + s.i___175557 = (r0); + { step = 1; continue; } + case 4: + r0 = s.res___175552; return leave(s, r0) default: oops() } } } -Render_setViewAngleInDegree__P171824.info = {"start":8045,"length":118,"line":230,"column":4,"endLine":232,"endColumn":5,"fileName":"pxt_modules/pxt-raycasting/render_blocks.ts","functionName":"setViewAngleInDegree","argumentNames":["angle"]} +helpers_arrayFilter__P166637.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 Render_setViewAngleInDegree__P171824_mk(s) { +function helpers_arrayFilter__P166637_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_setViewAngleInDegree__P171824, depth: s.depth + 1, + parent: s, fn: helpers_arrayFilter__P166637, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + res___175552: undefined, + len___175554: undefined, + i___175557: undefined, + v___175562: undefined, arg0: undefined, + arg1: undefined, } } -function Render_RayCastingRender_viewAngle__P171770(s) { +function characterAnimations_rule__P170919(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5409,115 +6167,182 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.rule___176070 = 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, Render_RayCastingRender__C171738_VT)) failedCast(r0); - r0 = (s.arg0).fields["_angle"] = (s.arg1); - s.tmp_0 = Render_RayCastingRender_setVectors__P174847_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1943; s.pc = 1; return s.tmp_0; + s.rule___176070 = (s.arg0); + r0 = pxsim_numops_toBoolDecr(s.arg1); + if (!r0) { step = 1; continue; } + r0 = (s.rule___176070 | s.arg1); + s.rule___176070 = (r0); case 1: - r0 = s.retval; - s.tmp_0 = Render_RayCastingRender_updateSelfImage__P171788_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1944; s.pc = 2; return s.tmp_0; case 2: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -Render_RayCastingRender_viewAngle__P171770.info = {"start":4629,"length":137,"line":149,"column":8,"endLine":153,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"viewAngle","argumentNames":["this","angle"]} - -function Render_RayCastingRender_viewAngle__P171770_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Render_RayCastingRender_viewAngle__P171770, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function Render_RayCastingRender_setVectors__P174847(s) { -let r0 = s.r0, 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.sin___177440 = undefined; - s.cos___177445 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); - r0 = s.arg0.fields["_angle"]; - s.tmp_0 = r0; - r0 = pxsim.Math_.sin(s.tmp_0); - s.sin___177440 = (r0); - r0 = s.arg0.fields["_angle"]; + r0 = pxsim_numops_toBoolDecr(s.arg2); + if (!r0) { step = 3; continue; } + r0 = (s.rule___176070 | s.arg2); + s.rule___176070 = (r0); + case 3: + case 4: + r0 = pxsim_numops_toBoolDecr(s.arg3); + if (!r0) { step = 5; continue; } + r0 = (s.rule___176070 | s.arg3); + s.rule___176070 = (r0); + case 5: + case 6: + r0 = (s.rule___176070 & 1); s.tmp_0 = r0; - r0 = pxsim.Math_.cos(s.tmp_0); - s.cos___177445 = (r0); - s.tmp_0 = r0 = s.arg0; - r0 = (s.cos___177445 * 256); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 7; continue; } + r0 = s.tmp_0; + { step = 8; continue; } + case 7: + r0 = (s.rule___176070 & 962); + case 8: + // jmp value (already in r0) s.tmp_1 = r0; - r0 = (s.tmp_0).fields["dirXFpx"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = (s.sin___177440 * 256); + r0 = pxsim_numops_toBool(s.tmp_1); + if (!r0) { step = 9; continue; } + r0 = s.tmp_1; + { step = 12; continue; } + case 9: + r0 = (s.rule___176070 & 544); s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["dirYFpx"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["_fov"]; + r0 = pxsim_numops_toBool(s.tmp_2); + if (r0) { step = 10; continue; } + r0 = s.tmp_2; + { step = 11; continue; } + case 10: + r0 = (s.rule___176070 & 136); + case 11: + // jmp value (already in r0) s.tmp_3 = r0; - r0 = (s.sin___177440 * s.tmp_3); - s.tmp_2 = r0; - r0 = (s.tmp_2 * 256); + r0 = s.tmp_3; + case 12: + // jmp value (already in r0) s.tmp_4 = r0; - r0 = (s.tmp_4 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["planeX"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - s.tmp_3 = r0 = s.cos___177445; - r0 = s.arg0.fields["_fov"]; + r0 = pxsim_numops_toBool(s.tmp_4); + if (!r0) { step = 13; continue; } + r0 = s.tmp_4; + { step = 16; continue; } + case 13: + r0 = (s.rule___176070 & 68); s.tmp_5 = r0; - r0 = (0 - s.tmp_5); - s.tmp_4 = r0; - r0 = (s.tmp_3 * s.tmp_4); - s.tmp_2 = r0; - r0 = (s.tmp_2 * 256); + r0 = pxsim_numops_toBool(s.tmp_5); + if (r0) { step = 14; continue; } + r0 = s.tmp_5; + { step = 15; continue; } + case 14: + r0 = (s.rule___176070 & 272); + case 15: + // jmp value (already in r0) s.tmp_6 = r0; - r0 = (s.tmp_6 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["planeY"] = (s.tmp_1); - r0 = undefined; + r0 = s.tmp_6; + case 16: + // jmp value (already in r0) + s.tmp_7 = r0; + r0 = pxsim_numops_toBool(s.tmp_7); + if (!r0) { step = 17; continue; } + r0 = s.tmp_7; + { step = 20; continue; } + case 17: + r0 = (s.rule___176070 & 256); + s.tmp_8 = r0; + r0 = pxsim_numops_toBool(s.tmp_8); + if (r0) { step = 18; continue; } + r0 = s.tmp_8; + { step = 19; continue; } + case 18: + r0 = (s.rule___176070 & 4096); + case 19: + // jmp value (already in r0) + s.tmp_9 = r0; + r0 = s.tmp_9; + case 20: + // jmp value (already in r0) + s.tmp_10 = r0; + r0 = pxsim_numops_toBool(s.tmp_10); + if (!r0) { step = 21; continue; } + r0 = s.tmp_10; + { step = 24; continue; } + case 21: + r0 = (s.rule___176070 & 64); + s.tmp_11 = r0; + r0 = pxsim_numops_toBool(s.tmp_11); + if (r0) { step = 22; continue; } + r0 = s.tmp_11; + { step = 23; continue; } + case 22: + r0 = (s.rule___176070 & 1024); + case 23: + // jmp value (already in r0) + s.tmp_12 = r0; + r0 = s.tmp_12; + case 24: + // jmp value (already in r0) + s.tmp_13 = r0; + r0 = pxsim_numops_toBool(s.tmp_13); + if (!r0) { step = 25; continue; } + r0 = s.tmp_13; + { step = 28; continue; } + case 25: + r0 = (s.rule___176070 & 128); + s.tmp_14 = r0; + r0 = pxsim_numops_toBool(s.tmp_14); + if (r0) { step = 26; continue; } + r0 = s.tmp_14; + { step = 27; continue; } + case 26: + r0 = (s.rule___176070 & 2048); + case 27: + // jmp value (already in r0) + s.tmp_15 = r0; + r0 = s.tmp_15; + case 28: + // jmp value (already in r0) + s.tmp_16 = r0; + r0 = pxsim_numops_toBool(s.tmp_16); + if (!r0) { step = 29; continue; } + r0 = s.tmp_16; + { step = 32; continue; } + case 29: + r0 = (s.rule___176070 & 512); + s.tmp_17 = r0; + r0 = pxsim_numops_toBool(s.tmp_17); + if (r0) { step = 30; continue; } + r0 = s.tmp_17; + { step = 31; continue; } + case 30: + r0 = (s.rule___176070 & 8192); + case 31: + // jmp value (already in r0) + s.tmp_18 = r0; + r0 = s.tmp_18; + case 32: + // jmp value (already in r0) + s.tmp_19 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_19); + if (!r0) { step = 33; continue; } + r0 = 0; + { step = 35; continue; } + case 33: + case 34: + r0 = s.rule___176070; + case 35: return leave(s, r0) default: oops() } } } -Render_RayCastingRender_setVectors__P174847.info = {"start":15316,"length":299,"line":410,"column":8,"endLine":417,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"setVectors","argumentNames":["this"]} +characterAnimations_rule__P170919.info = {"start":21959,"length":1258,"line":631,"column":4,"endLine":659,"endColumn":5,"fileName":"pxt_modules/arcade-character-animations/main.ts","functionName":"rule","argumentNames":["p1","p2","p3","p4","p5"]} -function Render_RayCastingRender_setVectors__P174847_mk(s) { +function characterAnimations_rule__P170919_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_setVectors__P174847, depth: s.depth + 1, + parent: s, fn: characterAnimations_rule__P170919, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -5526,16 +6351,32 @@ function Render_RayCastingRender_setVectors__P174847_mk(s) { tmp_4: undefined, tmp_5: undefined, tmp_6: undefined, - sin___177440: undefined, - cos___177445: 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, + rule___176070: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, } } -function Render_tofpx__P171736(s) { +function characterAnimations_matchesRule__P170915(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5545,32 +6386,199 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.existing___176160 = undefined; + s.state___176168 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg0 * 256); + s.tmp_0 = characterAnimations_getStateForSprite__P174576_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = false; + s.callLocIdx = 1883; s.pc = 22; return s.tmp_0; + case 22: + r0 = s.retval; + s.existing___176160 = (r0); + r0 = pxsim_numops_toBoolDecr(s.existing___176160); + if (!r0) { step = 1; continue; } + s.tmp_0 = characterAnimations_CharacterState_matchesRule__P174567_mk(s); + s.tmp_0.arg0 = s.existing___176160; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 1884; s.pc = 23; return s.tmp_0; + case 23: + r0 = s.retval; + { step = 21; continue; } + case 1: + case 2: + s.state___176168 = (0); + s.tmp_2 = Sprite_vx__P168885_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 1885; s.pc = 24; return s.tmp_2; + case 24: + r0 = s.retval; + s.tmp_1 = r0; + s.tmp_4 = Sprite_vy__P168887_mk(s); + s.tmp_4.arg0 = s.arg0; + s.callLocIdx = 1886; s.pc = 25; return s.tmp_4; + case 25: + r0 = s.retval; + s.tmp_3 = r0; + r0 = (s.tmp_1 | s.tmp_3); s.tmp_0 = r0; - r0 = (s.tmp_0 | 0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 11; continue; } + r0 = (s.state___176168 | 2); + s.state___176168 = (r0); + s.tmp_2 = Sprite_vx__P168885_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 1887; s.pc = 26; return s.tmp_2; + case 26: + r0 = s.retval; + 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.state___176168 | 136); + s.state___176168 = (r0); + { step = 6; continue; } + case 3: + s.tmp_2 = Sprite_vx__P168885_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 1888; s.pc = 27; return s.tmp_2; + case 27: + r0 = s.retval; + 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; } + r0 = (s.state___176168 | 544); + s.state___176168 = (r0); + case 4: + case 5: + case 6: + s.tmp_2 = Sprite_vy__P168887_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 1889; s.pc = 28; return s.tmp_2; + case 28: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_1 > 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; continue; } + r0 = (s.state___176168 | 272); + s.state___176168 = (r0); + { step = 10; continue; } + case 7: + s.tmp_2 = Sprite_vy__P168887_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 1890; s.pc = 29; return s.tmp_2; + case 29: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_1 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 8; continue; } + r0 = (s.state___176168 | 68); + s.state___176168 = (r0); + case 8: + case 9: + case 10: + { step = 12; continue; } + case 11: + r0 = (s.state___176168 | 1); + s.state___176168 = (r0); + case 12: + s.tmp_1 = Sprite_isHittingTile__P168948_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_1.arg1 = 3; + s.callLocIdx = 1891; s.pc = 30; return s.tmp_1; + case 30: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 13; continue; } + r0 = (s.state___176168 | 4096); + s.state___176168 = (r0); + case 13: + case 14: + s.tmp_1 = Sprite_isHittingTile__P168948_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_1.arg1 = 1; + s.callLocIdx = 1892; 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 = 15; continue; } + r0 = (s.state___176168 | 1024); + s.state___176168 = (r0); + case 15: + case 16: + s.tmp_1 = Sprite_isHittingTile__P168948_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_1.arg1 = 2; + s.callLocIdx = 1893; s.pc = 32; return s.tmp_1; + case 32: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 17; continue; } + r0 = (s.state___176168 | 2048); + s.state___176168 = (r0); + case 17: + case 18: + s.tmp_1 = Sprite_isHittingTile__P168948_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_1.arg1 = 0; + s.callLocIdx = 1894; s.pc = 33; return s.tmp_1; + case 33: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 19; continue; } + r0 = (s.state___176168 | 8192); + s.state___176168 = (r0); + case 19: + case 20: + r0 = (s.state___176168 & s.arg1); + s.tmp_2 = r0; + r0 = (s.tmp_2 ^ s.arg1); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_Boolean__bang(s.tmp_0); + case 21: return leave(s, r0) default: oops() } } } -Render_tofpx__P171736.info = {"start":402,"length":63,"line":17,"column":4,"endLine":17,"endColumn":67,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"tofpx","argumentNames":["n"]} +characterAnimations_matchesRule__P170915.info = {"start":17226,"length":1746,"line":510,"column":4,"endLine":553,"endColumn":5,"fileName":"pxt_modules/arcade-character-animations/main.ts","functionName":"matchesRule","argumentNames":["sprite","rule"]} -function Render_tofpx__P171736_mk(s) { +function characterAnimations_matchesRule__P170915_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_tofpx__P171736, depth: s.depth + 1, + parent: s, fn: characterAnimations_matchesRule__P170915, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + existing___176160: undefined, + state___176168: undefined, arg0: undefined, + arg1: undefined, } } -function Render_RayCastingRender_updateSelfImage__P171788(s) { +function characterAnimations_getStateForSprite__P174576(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5580,71 +6588,93 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.img___177331 = undefined; - s.arrowLength___177338 = undefined; + s.sceneState___176301 = undefined; + s.state___176308 = undefined; + s.unnamed846___U2 = undefined; + s.unnamed847___U3 = undefined; + s.newState___176319 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); - r0 = s.arg0.fields["sprSelf"]; - s.tmp_0 = r0; - r0 = s.tmp_0.fields["_image"]; - s.img___177331 = (r0); - r0 = pxsim_ImageMethods.fill(s.img___177331, 6); - r0 = pxsim_ImageMethods.width(s.img___177331); + s.tmp_0 = characterAnimations_init__P174573_mk(s); + s.callLocIdx = 1881; s.pc = 10; return s.tmp_0; + case 10: + 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 = (s.tmp_0 / 2); - s.arrowLength___177338 = (r0); - s.tmp_0 = helpers_imageDrawLine__P168485_mk(s); - s.tmp_0.arg0 = s.img___177331; - s.tmp_0.arg1 = s.arrowLength___177338; - s.tmp_0.arg2 = s.arrowLength___177338; - s.tmp_1 = r0 = s.arrowLength___177338; - r0 = s.arg0.fields["dirXFpx"]; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = undefined; + { step = 9; continue; } + case 1: + case 2: + s.tmp_2 = r0 = globals.sceneStack___174556; + r0 = pxsim_Array__length(globals.sceneStack___174556); s.tmp_4 = r0; - r0 = (s.tmp_4 / 256); + r0 = (s.tmp_4 - 1); s.tmp_3 = r0; - r0 = (s.tmp_3 * s.arrowLength___177338); + r0 = pxsim_Array__getAt(s.tmp_2, s.tmp_3); + s.sceneState___176301 = (r0); + s.state___176308 = (undefined); + r0 = s.sceneState___176301.fields["characters"]; + s.unnamed846___U2 = (r0); + s.unnamed847___U3 = (0); + case 3: + s.tmp_0 = r0 = s.unnamed847___U3; + r0 = pxsim_Array__length(s.unnamed846___U2); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 6; continue; } + r0 = pxsim_Array__getAt(s.unnamed846___U2, s.unnamed847___U3); + s.state___176308 = (r0); + r0 = s.state___176308.fields["sprite"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 === s.arg0); s.tmp_2 = r0; - r0 = (s.tmp_1 + s.tmp_2); - s.tmp_0.arg3 = r0; - s.tmp_5 = r0 = s.arrowLength___177338; - r0 = s.arg0.fields["dirYFpx"]; - s.tmp_8 = r0; - r0 = (s.tmp_8 / 256); - s.tmp_7 = r0; - r0 = (s.tmp_7 * s.arrowLength___177338); - s.tmp_6 = r0; - r0 = (s.tmp_5 + s.tmp_6); - s.tmp_0.arg4 = r0; - s.tmp_0.arg5 = 2; - s.callLocIdx = 2022; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.tmp_0 = helpers_imageFillRect__P168483_mk(s); - s.tmp_0.arg0 = s.img___177331; - r0 = (s.arrowLength___177338 - 1); - s.tmp_0.arg1 = r0; - r0 = (s.arrowLength___177338 - 1); - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = 2; - s.tmp_0.arg4 = 2; - s.tmp_0.arg5 = 2; - s.callLocIdx = 2023; s.pc = 2; return s.tmp_0; - case 2: + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 4; continue; } + r0 = s.state___176308; + { step = 9; continue; } + case 4: + case 5: + r0 = (s.unnamed847___U3 + 1); + s.unnamed847___U3 = (r0); + { step = 3; continue; } + case 6: + s.unnamed846___U2 = (undefined); + r0 = pxsim_numops_toBoolDecr(s.arg1); + if (!r0) { step = 7; continue; } + r0 = pxsim_pxtcore_mkClassInstance(characterAnimations_CharacterState__C174562_VT); + s.tmp_4 = r0; + s.tmp_5 = characterAnimations_CharacterState_constructor__P174572_mk(s); + s.tmp_5.arg0 = s.tmp_4; + s.tmp_5.arg1 = s.arg0; + s.callLocIdx = 1882; s.pc = 11; return s.tmp_5; + case 11: r0 = s.retval; + s.newState___176319 = (s.tmp_4); + r0 = s.sceneState___176301.fields["characters"]; + s.tmp_0 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.newState___176319); + r0 = s.newState___176319; + { step = 9; continue; } + case 7: + case 8: r0 = undefined; + case 9: return leave(s, r0) default: oops() } } } -Render_RayCastingRender_updateSelfImage__P171788.info = {"start":15668,"length":349,"line":420,"column":8,"endLine":426,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"updateSelfImage","argumentNames":["this"]} +characterAnimations_getStateForSprite__P174576.info = {"start":11738,"length":551,"line":363,"column":4,"endLine":381,"endColumn":5,"fileName":"pxt_modules/arcade-character-animations/main.ts","functionName":"getStateForSprite","argumentNames":["sprite","createIfNotFound"]} -function Render_RayCastingRender_updateSelfImage__P171788_mk(s) { +function characterAnimations_getStateForSprite__P174576_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_updateSelfImage__P171788, depth: s.depth + 1, + parent: s, fn: characterAnimations_getStateForSprite__P174576, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -5652,19 +6682,20 @@ function Render_RayCastingRender_updateSelfImage__P171788_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - img___177331: undefined, - arrowLength___177338: undefined, + sceneState___176301: undefined, + state___176308: undefined, + unnamed846___U2: undefined, + unnamed847___U3: undefined, + newState___176319: undefined, arg0: undefined, + arg1: undefined, } } -function Render_RayCastingRender_dirY__P171762(s) { +function characterAnimations_init__P174573(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5674,73 +6705,64 @@ 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, Render_RayCastingRender__C171738_VT)) failedCast(r0); - r0 = s.arg0.fields["dirYFpx"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) - default: oops() -} } } -Render_RayCastingRender_dirY__P171762.info = {"start":3556,"length":74,"line":113,"column":8,"endLine":115,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"dirY","argumentNames":["this"]} -Render_RayCastingRender_dirY__P171762.isGetter = true; - -function Render_RayCastingRender_dirY__P171762_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Render_RayCastingRender_dirY__P171762, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, -} } - - - - - -function Render_RayCastingRender_dirX__P171761(s) { -let r0 = s.r0, 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, Render_RayCastingRender__C171738_VT)) failedCast(r0); - r0 = s.arg0.fields["dirXFpx"]; + r0 = pxsim_numops_toBoolDecr(globals.sceneStack___174556); + if (!r0) { step = 3; continue; } + r0 = pxsim_Array__length(globals.sceneStack___174556); + 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 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_3 = characterAnimations_initScene__P174574_mk(s); + s.callLocIdx = 1873; s.pc = 6; return s.tmp_3; + case 6: + r0 = s.retval; + case 1: + case 2: + { step = 5; continue; } + case 3: + case 4: + r0 = pxsim_Array__mk(); + globals.sceneStack___174556 = (r0); + s.tmp_0 = game_addScenePushHandler__P169545_mk(s); + s.tmp_0.arg0 = characterAnimations_initScene__P174574; + s.callLocIdx = 1874; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + s.tmp_0 = game_addScenePopHandler__P169547_mk(s); + s.tmp_0.arg0 = characterAnimations_init_inline__P176405; + s.callLocIdx = 1875; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + s.tmp_0 = characterAnimations_initScene__P174574_mk(s); + s.callLocIdx = 1876; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; + case 5: + r0 = undefined; + return leave(s, r0) default: oops() } } } -Render_RayCastingRender_dirX__P171761.info = {"start":3472,"length":74,"line":109,"column":8,"endLine":111,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"dirX","argumentNames":["this"]} -Render_RayCastingRender_dirX__P171761.isGetter = true; +characterAnimations_init__P174573.info = {"start":10726,"length":376,"line":320,"column":5,"endLine":336,"endColumn":6,"fileName":"pxt_modules/arcade-character-animations/main.ts","functionName":"init","argumentNames":[]} -function Render_RayCastingRender_dirX__P171761_mk(s) { +function characterAnimations_init__P174573_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_dirX__P171761, depth: s.depth + 1, + parent: s, fn: characterAnimations_init__P174573, 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 Sprite_image__P168917(s) { +function characterAnimations_init_inline__P176405(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5754,19 +6776,17 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - r0 = s.arg0.fields["_image"]; - return leaveAccessor(s, r0) + r0 = pxsim_Array_.pop(globals.sceneStack___174556); + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_image__P168917.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__P168917.isGetter = true; +characterAnimations_init_inline__P176405.info = {"start":10994,"length":76,"line":331,"column":33,"endLine":333,"endColumn":10,"fileName":"pxt_modules/arcade-character-animations/main.ts","functionName":"inline","argumentNames":["oldScene"]} -function Sprite_image__P168917_mk(s) { +function characterAnimations_init_inline__P176405_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_image__P168917, depth: s.depth + 1, + parent: s, fn: characterAnimations_init_inline__P176405, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, } } @@ -5775,7 +6795,7 @@ function Sprite_image__P168917_mk(s) { -function helpers_imageDrawLine__P168485(s) { +function characterAnimations_initScene__P174574(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5785,60 +6805,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.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__P172094_mk(s); - s.tmp_2.arg0 = s.arg1; - s.tmp_2.arg1 = s.arg2; - s.callLocIdx = 151; s.pc = 1; return s.tmp_2; + s.sceneState___176416 = undefined; + r0 = pxsim_pxtcore_mkClassInstance(characterAnimations_CharacterAnimationSceneState__C174557_VT); + s.tmp_0 = r0; + s.tmp_1 = characterAnimations_CharacterAnimationSceneState_constructor__P174559_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 1877; s.pc = 1; return s.tmp_1; case 1: r0 = s.retval; + r0 = pxsim_Array__push(globals.sceneStack___174556, s.tmp_0); + s.tmp_0 = r0 = globals.sceneStack___174556; + r0 = pxsim_Array__length(globals.sceneStack___174556); + s.tmp_2 = r0; + r0 = (s.tmp_2 - 1); s.tmp_1 = r0; - s.tmp_4 = helpers_pack__P172094_mk(s); - s.tmp_4.arg0 = s.arg3; - s.tmp_4.arg1 = s.arg4; - s.callLocIdx = 152; s.pc = 2; return s.tmp_4; + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); + s.sceneState___176416 = (r0); + r0 = pxsim_pxtcore_mkAction(1, characterAnimations_initScene_inline__P176427); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.sceneState___176416); + s.tmp_1 = control_EventContext_registerFrameHandler__P166930_mk(s); + s.tmp_2 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1878; s.pc = 3; return s.tmp_2; + case 3: + r0 = s.retval; + r0 = r0.fields["eventContext"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 15; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 1880; s.pc = 2; return s.tmp_1; 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() } } } -helpers_imageDrawLine__P168485.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"]} +characterAnimations_initScene__P174574.info = {"start":11109,"length":361,"line":338,"column":5,"endLine":347,"endColumn":6,"fileName":"pxt_modules/arcade-character-animations/main.ts","functionName":"initScene","argumentNames":[]} -function helpers_imageDrawLine__P168485_mk(s) { +function characterAnimations_initScene__P174574_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_imageDrawLine__P168485, depth: s.depth + 1, + parent: s, fn: characterAnimations_initScene__P174574, depth: s.depth + 1, pc: 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, + sceneState___176416: undefined, } } -function helpers_pack__P172094(s) { +function characterAnimations_initScene_inline__P176427(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5848,59 +6867,34 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - s.tmp_2 = Math_clamp__P166654_mk(s); - s.tmp_2.arg0 = -30000; - s.tmp_2.arg1 = 30000; - r0 = (s.arg0 | 0); - s.tmp_2.arg2 = r0; - s.callLocIdx = 144; s.pc = 1; return s.tmp_2; - case 1: + r0 = pxsim_numops_toBoolDecr(s.caps[0]); + if (!r0) { step = 1; continue; } + s.tmp_0 = characterAnimations_CharacterAnimationSceneState_update__P174558_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.callLocIdx = 1879; s.pc = 3; return s.tmp_0; + case 3: r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 65535); - s.tmp_0 = r0; - s.tmp_5 = Math_clamp__P166654_mk(s); - s.tmp_5.arg0 = -30000; - s.tmp_5.arg1 = 30000; - r0 = (s.arg1 | 0); - s.tmp_5.arg2 = r0; - s.callLocIdx = 145; s.pc = 2; return s.tmp_5; + case 1: 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__P172094.info = {"start":4278,"length":145,"line":148,"column":4,"endLine":150,"endColumn":5,"fileName":"pxt_modules/screen/image.ts","functionName":"pack","argumentNames":["x","y"]} +characterAnimations_initScene_inline__P176427.info = {"start":11354,"length":107,"line":342,"column":96,"endLine":346,"endColumn":10,"fileName":"pxt_modules/arcade-character-animations/main.ts","functionName":"inline","argumentNames":[]} -function helpers_pack__P172094_mk(s) { +function characterAnimations_initScene_inline__P176427_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_pack__P172094, depth: s.depth + 1, + parent: s, fn: characterAnimations_initScene_inline__P176427, depth: s.depth + 1, pc: 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__P166654(s) { +function characterAnimations_CharacterAnimationSceneState_constructor__P174559(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5912,44 +6906,35 @@ 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__P166658_mk(s); - s.tmp_0.arg0 = s.arg1; - s.tmp_1 = Math_max__P166657_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_1.arg1 = s.arg2; - s.callLocIdx = 26; s.pc = 2; return s.tmp_1; - case 2: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 27; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; + r0 = s.arg0; + if (!checkSubtype(r0, characterAnimations_CharacterAnimationSceneState__C174557_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["characters"] = (s.tmp_1); + r0 = undefined; return leave(s, r0) default: oops() } } } -Math_clamp__P166654.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"]} +characterAnimations_CharacterAnimationSceneState_constructor__P174559.info = {"start":1552,"length":59,"line":52,"column":8,"endLine":54,"endColumn":9,"fileName":"pxt_modules/arcade-character-animations/main.ts","functionName":"inline","argumentNames":["this"]} -function Math_clamp__P166654_mk(s) { +function characterAnimations_CharacterAnimationSceneState_constructor__P174559_mk(s) { checkStack(s.depth); return { - parent: s, fn: Math_clamp__P166654, depth: s.depth + 1, + parent: s, fn: characterAnimations_CharacterAnimationSceneState_constructor__P174559, 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 Math_min__P166658(s) { +function characterAnimations_CharacterAnimationSceneState_update__P174558(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5959,104 +6944,100 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.dt___176432 = undefined; + s.cleanup___176437 = undefined; + s.character___176439 = undefined; + s.unnamed842___U3 = undefined; + s.unnamed843___U4 = undefined; 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, characterAnimations_CharacterAnimationSceneState__C174557_VT)) failedCast(r0); + s.tmp_0 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1842; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + r0 = r0.fields["eventContext"]; + r0 = r0.fields["deltaTimeMillis"]; + s.dt___176432 = (r0); + s.cleanup___176437 = (false); + s.character___176439 = (undefined); + r0 = s.arg0.fields["characters"]; + s.unnamed842___U3 = (r0); + s.unnamed843___U4 = (0); case 1: + s.tmp_0 = r0 = s.unnamed843___U4; + r0 = pxsim_Array__length(s.unnamed842___U3); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 4; continue; } + r0 = pxsim_Array__getAt(s.unnamed842___U3, s.unnamed843___U4); + s.character___176439 = (r0); + r0 = s.character___176439.fields["sprite"]; + r0 = r0.fields["flags"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 & 2); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 2; continue; } + s.cleanup___176437 = (true); case 2: - r0 = s.arg1; case 3: - return leave(s, r0) - default: oops() -} } } -Math_min__P166658.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 Math_min__P166658_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Math_min__P166658, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function helpers_imageFillRect__P168483(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); - s.arg5 = (s.lambdaArgs[5]); - s.lambdaArgs = null; - } + s.tmp_0 = characterAnimations_CharacterState_update__P174566_mk(s); + s.tmp_0.arg0 = s.character___176439; + s.tmp_0.arg1 = s.dt___176432; + s.callLocIdx = 1843; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + r0 = (s.unnamed843___U4 + 1); + s.unnamed843___U4 = (r0); + { step = 1; continue; } + case 4: + s.unnamed842___U3 = (undefined); + r0 = pxsim_numops_toBoolDecr(s.cleanup___176437); + if (!r0) { step = 5; continue; } s.tmp_0 = r0 = s.arg0; - s.tmp_2 = helpers_pack__P172094_mk(s); - s.tmp_2.arg0 = s.arg1; - s.tmp_2.arg1 = s.arg2; - s.callLocIdx = 149; s.pc = 1; return s.tmp_2; - case 1: + s.tmp_2 = helpers_arrayFilter__P166637_mk(s); + r0 = s.arg0.fields["characters"]; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = characterAnimations_CharacterAnimationSceneState_update_inline__P176457; + s.callLocIdx = 1844; s.pc = 9; return s.tmp_2; + case 9: r0 = s.retval; s.tmp_1 = r0; - s.tmp_4 = helpers_pack__P172094_mk(s); - s.tmp_4.arg0 = s.arg3; - s.tmp_4.arg1 = s.arg4; - s.callLocIdx = 150; 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 = (s.tmp_0).fields["characters"] = (s.tmp_1); + case 5: + case 6: r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_imageFillRect__P168483.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"]} +characterAnimations_CharacterAnimationSceneState_update__P174558.info = {"start":1621,"length":483,"line":56,"column":8,"endLine":68,"endColumn":9,"fileName":"pxt_modules/arcade-character-animations/main.ts","functionName":"update","argumentNames":["this"]} -function helpers_imageFillRect__P168483_mk(s) { +function characterAnimations_CharacterAnimationSceneState_update__P174558_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_imageFillRect__P168483, depth: s.depth + 1, + parent: s, fn: characterAnimations_CharacterAnimationSceneState_update__P174558, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - tmp_4: undefined, + dt___176432: undefined, + cleanup___176437: undefined, + character___176439: undefined, + unnamed842___U3: undefined, + unnamed843___U4: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, - arg5: undefined, } } -function Render_RayCastingRender_viewAngle__P171769(s) { +function characterAnimations_CharacterAnimationSceneState_update_inline__P176457(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6070,20 +7051,27 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); - r0 = s.arg0.fields["_angle"]; - return leaveAccessor(s, r0) + r0 = s.arg0.fields["sprite"]; + r0 = r0.fields["flags"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 & 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() } } } -Render_RayCastingRender_viewAngle__P171769.info = {"start":4554,"length":66,"line":146,"column":8,"endLine":148,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"viewAngle","argumentNames":["this"]} -Render_RayCastingRender_viewAngle__P171769.isGetter = true; +characterAnimations_CharacterAnimationSceneState_update_inline__P176457.info = {"start":2016,"length":63,"line":66,"column":57,"endLine":66,"endColumn":120,"fileName":"pxt_modules/arcade-character-animations/main.ts","functionName":"inline","argumentNames":["character"]} -function Render_RayCastingRender_viewAngle__P171769_mk(s) { +function characterAnimations_CharacterAnimationSceneState_update_inline__P176457_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_viewAngle__P171769, depth: s.depth + 1, + parent: s, fn: characterAnimations_CharacterAnimationSceneState_update_inline__P176457, 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, } } @@ -6091,7 +7079,7 @@ function Render_RayCastingRender_viewAngle__P171769_mk(s) { -function Render_setAttribute__P171822(s) { +function characterAnimations_CharacterState_update__P174566(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6101,222 +7089,671 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.state___176468 = undefined; + s.newAnimation___176694 = 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(0, 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 = 6; continue; } - r0 = s.tmp_0; - { step = 9; continue; } + r0 = s.arg0; + if (!checkSubtype(r0, characterAnimations_CharacterState__C174562_VT)) failedCast(r0); + s.state___176468 = (0); + s.tmp_2 = Sprite_vx__P168885_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 1847; s.pc = 66; return s.tmp_2; + case 66: + r0 = s.retval; + s.tmp_1 = r0; + s.tmp_4 = Sprite_vy__P168887_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_4.arg0 = r0; + s.callLocIdx = 1848; s.pc = 67; return s.tmp_4; + case 67: + 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 = 11; continue; } + r0 = (s.state___176468 | 2); + s.state___176468 = (r0); + s.tmp_2 = Sprite_vx__P168885_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 1849; s.pc = 68; return s.tmp_2; + case 68: + r0 = s.retval; + 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; } + s.tmp_3 = r0 = s.state___176468; + r0 = s.arg0.fields["possibleFacingDirections"]; + s.tmp_6 = r0; + r0 = (8 & s.tmp_6); + s.tmp_5 = r0; + r0 = (s.tmp_5 | 128); + s.tmp_4 = r0; + r0 = (s.tmp_3 | s.tmp_4); + s.state___176468 = (r0); + { step = 4; continue; } case 1: - s.tmp_1 = Render_RayCastingRender_dirX__P171763_mk(s); - s.tmp_1.arg0 = globals.raycastingRender___171795; - s.tmp_1.arg1 = s.arg1; - s.callLocIdx = 2074; s.pc = 11; return s.tmp_1; - case 11: + s.tmp_2 = Sprite_vx__P168885_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 1850; s.pc = 69; return s.tmp_2; + case 69: r0 = s.retval; - { step = 10; continue; } + s.tmp_1 = r0; + r0 = (s.tmp_1 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + s.tmp_3 = r0 = s.state___176468; + r0 = s.arg0.fields["possibleFacingDirections"]; + s.tmp_6 = r0; + r0 = (32 & s.tmp_6); + s.tmp_5 = r0; + r0 = (s.tmp_5 | 512); + s.tmp_4 = r0; + r0 = (s.tmp_3 | s.tmp_4); + s.state___176468 = (r0); case 2: - s.tmp_0 = Render_RayCastingRender_dirY__P171764_mk(s); - s.tmp_0.arg0 = globals.raycastingRender___171795; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 2075; s.pc = 12; return s.tmp_0; - case 12: - r0 = s.retval; - { step = 10; continue; } case 3: - r0 = (s.arg1 < 0); + case 4: + s.tmp_2 = Sprite_vy__P168887_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 1851; s.pc = 70; return s.tmp_2; + case 70: + r0 = s.retval; + 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.arg1 = (0); - case 4: + if (!r0) { step = 5; continue; } + s.tmp_3 = r0 = s.state___176468; + r0 = s.arg0.fields["possibleFacingDirections"]; + s.tmp_6 = r0; + r0 = (16 & s.tmp_6); + s.tmp_5 = r0; + r0 = (s.tmp_5 | 256); + s.tmp_4 = r0; + r0 = (s.tmp_3 | s.tmp_4); + s.state___176468 = (r0); + { step = 8; continue; } case 5: - s.tmp_0 = Render_RayCastingRender_fov__P171768_mk(s); - s.tmp_0.arg0 = globals.raycastingRender___171795; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 2076; s.pc = 13; return s.tmp_0; - case 13: + s.tmp_2 = Sprite_vy__P168887_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 1852; s.pc = 71; return s.tmp_2; + case 71: r0 = s.retval; - { step = 10; continue; } - case 6: - r0 = (s.arg1 < 0); + s.tmp_1 = r0; + r0 = (s.tmp_1 < 0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - s.arg1 = (0); + if (!r0) { step = 6; continue; } + s.tmp_3 = r0 = s.state___176468; + r0 = s.arg0.fields["possibleFacingDirections"]; + s.tmp_6 = r0; + r0 = (4 & s.tmp_6); + s.tmp_5 = r0; + r0 = (s.tmp_5 | 64); + s.tmp_4 = r0; + r0 = (s.tmp_3 | s.tmp_4); + s.state___176468 = (r0); + case 6: case 7: case 8: - s.tmp_0 = Render_RayCastingRender_wallZScale__P171772_mk(s); - s.tmp_0.arg0 = globals.raycastingRender___171795; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 2077; s.pc = 14; return s.tmp_0; - case 14: - r0 = s.retval; + r0 = (s.state___176468 & 60); + 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 = 9; continue; } + s.tmp_3 = r0 = s.state___176468; + r0 = s.arg0.fields["lastState"]; + s.tmp_5 = r0; + r0 = (s.tmp_5 & 60); + s.tmp_4 = r0; + r0 = (s.tmp_3 | s.tmp_4); + s.state___176468 = (r0); case 9: case 10: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -Render_setAttribute__P171822.info = {"start":6789,"length":619,"line":188,"column":4,"endLine":206,"endColumn":5,"fileName":"pxt_modules/pxt-raycasting/render_blocks.ts","functionName":"setAttribute","argumentNames":["attr","value"]} - -function Render_setAttribute__P171822_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Render_setAttribute__P171822, 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 Render_RayCastingRender_wallZScale__P171772(s) { -let r0 = s.r0, 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, Render_RayCastingRender__C171738_VT)) failedCast(r0); - r0 = (s.arg0).fields["_wallZScale"] = (s.arg1); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -Render_RayCastingRender_wallZScale__P171772.info = {"start":4857,"length":70,"line":158,"column":8,"endLine":160,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"wallZScale","argumentNames":["this","v"]} - -function Render_RayCastingRender_wallZScale__P171772_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Render_RayCastingRender_wallZScale__P171772, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, - arg1: undefined, -} } - - - - - -function Render_RayCastingRender_wallZScale__P171771(s) { -let r0 = s.r0, 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, Render_RayCastingRender__C171738_VT)) failedCast(r0); - r0 = s.arg0.fields["_wallZScale"]; - return leaveAccessor(s, r0) - default: oops() -} } } -Render_RayCastingRender_wallZScale__P171771.info = {"start":4776,"length":72,"line":155,"column":8,"endLine":157,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"wallZScale","argumentNames":["this"]} -Render_RayCastingRender_wallZScale__P171771.isGetter = true; - -function Render_RayCastingRender_wallZScale__P171771_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Render_RayCastingRender_wallZScale__P171771, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function Render_RayCastingRender_fov__P171768(s) { -let r0 = s.r0, 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, Render_RayCastingRender__C171738_VT)) failedCast(r0); - r0 = (s.arg0).fields["_fov"] = (s.arg1); + { step = 26; continue; } + case 11: + s.tmp_2 = Sprite_x__P168881_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 1853; s.pc = 72; return s.tmp_2; + case 72: + r0 = s.retval; + s.tmp_1 = r0; + r0 = s.arg0.fields["lastX"]; + 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 = 12; continue; } + r0 = s.tmp_0; + { step = 13; continue; } + case 12: + s.tmp_5 = Sprite_y__P168883_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_5.arg0 = r0; + s.callLocIdx = 1854; s.pc = 73; return s.tmp_5; + case 73: + r0 = s.retval; + s.tmp_4 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_6 = r0; + r0 = (s.tmp_4 != s.tmp_6); + case 13: + // jmp value (already in r0) + s.tmp_7 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_7); + if (!r0) { step = 24; continue; } + r0 = (s.state___176468 | 2); + s.state___176468 = (r0); + s.tmp_2 = Sprite_x__P168881_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 1855; s.pc = 74; return s.tmp_2; + case 74: + r0 = s.retval; + s.tmp_1 = r0; + r0 = s.arg0.fields["lastX"]; + 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 = 14; continue; } + s.tmp_4 = r0 = s.state___176468; + r0 = s.arg0.fields["possibleFacingDirections"]; + s.tmp_7 = r0; + r0 = (8 & s.tmp_7); + s.tmp_6 = r0; + r0 = (s.tmp_6 | 128); + s.tmp_5 = r0; + r0 = (s.tmp_4 | s.tmp_5); + s.state___176468 = (r0); + { step = 17; continue; } + case 14: + s.tmp_2 = Sprite_x__P168881_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 1856; s.pc = 75; return s.tmp_2; + case 75: + r0 = s.retval; + s.tmp_1 = r0; + r0 = s.arg0.fields["lastX"]; + 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 = 15; continue; } + s.tmp_4 = r0 = s.state___176468; + r0 = s.arg0.fields["possibleFacingDirections"]; + s.tmp_7 = r0; + r0 = (32 & s.tmp_7); + s.tmp_6 = r0; + r0 = (s.tmp_6 | 512); + s.tmp_5 = r0; + r0 = (s.tmp_4 | s.tmp_5); + s.state___176468 = (r0); + case 15: + case 16: + case 17: + s.tmp_2 = Sprite_y__P168883_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 1857; s.pc = 76; return s.tmp_2; + case 76: + r0 = s.retval; + s.tmp_1 = r0; + r0 = s.arg0.fields["lastY"]; + 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 = 18; continue; } + s.tmp_4 = r0 = s.state___176468; + r0 = s.arg0.fields["possibleFacingDirections"]; + s.tmp_7 = r0; + r0 = (16 & s.tmp_7); + s.tmp_6 = r0; + r0 = (s.tmp_6 | 256); + s.tmp_5 = r0; + r0 = (s.tmp_4 | s.tmp_5); + s.state___176468 = (r0); + { step = 21; continue; } + case 18: + s.tmp_2 = Sprite_y__P168883_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 1858; s.pc = 77; return s.tmp_2; + case 77: + r0 = s.retval; + s.tmp_1 = r0; + r0 = s.arg0.fields["lastY"]; + 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 = 19; continue; } + s.tmp_4 = r0 = s.state___176468; + r0 = s.arg0.fields["possibleFacingDirections"]; + s.tmp_7 = r0; + r0 = (4 & s.tmp_7); + s.tmp_6 = r0; + r0 = (s.tmp_6 | 64); + s.tmp_5 = r0; + r0 = (s.tmp_4 | s.tmp_5); + s.state___176468 = (r0); + case 19: + case 20: + case 21: + r0 = (s.state___176468 & 60); + 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 = 22; continue; } + s.tmp_3 = r0 = s.state___176468; + r0 = s.arg0.fields["lastState"]; + s.tmp_5 = r0; + r0 = (s.tmp_5 & 60); + s.tmp_4 = r0; + r0 = (s.tmp_3 | s.tmp_4); + s.state___176468 = (r0); + case 22: + case 23: + { step = 25; continue; } + case 24: + r0 = (s.state___176468 | 1); + s.state___176468 = (r0); + s.tmp_0 = r0 = s.state___176468; + r0 = s.arg0.fields["lastState"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 & 60); + s.tmp_1 = r0; + r0 = (s.tmp_0 | s.tmp_1); + s.state___176468 = (r0); + case 25: + case 26: + s.tmp_1 = Sprite_isHittingTile__P168948_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 3; + s.callLocIdx = 1859; s.pc = 78; return s.tmp_1; + case 78: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 27; continue; } + r0 = (s.state___176468 | 4096); + s.state___176468 = (r0); + case 27: + case 28: + s.tmp_1 = Sprite_isHittingTile__P168948_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 1; + s.callLocIdx = 1860; s.pc = 79; return s.tmp_1; + case 79: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 29; continue; } + r0 = (s.state___176468 | 1024); + s.state___176468 = (r0); + case 29: + case 30: + s.tmp_1 = Sprite_isHittingTile__P168948_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 2; + s.callLocIdx = 1861; s.pc = 80; return s.tmp_1; + case 80: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 31; continue; } + r0 = (s.state___176468 | 2048); + s.state___176468 = (r0); + case 31: + case 32: + s.tmp_1 = Sprite_isHittingTile__P168948_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 0; + s.callLocIdx = 1862; s.pc = 81; return s.tmp_1; + case 81: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 33; continue; } + r0 = (s.state___176468 | 8192); + s.state___176468 = (r0); + case 33: + case 34: s.tmp_0 = r0 = s.arg0; - r0 = (globals.SW___174806 << 7); + s.tmp_2 = Sprite_x__P168881_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 1863; s.pc = 82; return s.tmp_2; + case 82: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["lastX"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = Sprite_y__P168883_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 1864; s.pc = 83; return s.tmp_2; + case 83: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["lastY"] = (s.tmp_1); + r0 = s.arg0.fields["manualFlags"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 35; continue; } + r0 = s.tmp_0; + { step = 36; continue; } + case 35: + r0 = s.state___176468; + case 36: + // jmp value (already in r0) + s.tmp_1 = r0; + s.tmp_2 = characterAnimations_CharacterState_pickRule__P174571_mk(s); + s.tmp_2.arg0 = s.arg0; + s.tmp_2.arg1 = s.tmp_1; + s.callLocIdx = 1865; s.pc = 84; return s.tmp_2; + case 84: + r0 = s.retval; + s.newAnimation___176694 = (r0); + r0 = s.arg0.fields["current"]; + s.tmp_1 = r0; + r0 = (s.newAnimation___176694 !== s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 45; continue; } + r0 = (s.arg0).fields["frame"] = (0); + r0 = (s.arg0).fields["timer"] = (0); + s.tmp_0 = r0 = s.newAnimation___176694; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 37; continue; } + r0 = s.tmp_0; + { step = 38; continue; } + case 37: + r0 = s.newAnimation___176694.fields["startFrames"]; + case 38: + // jmp value (already in r0) + s.tmp_1 = r0; + s.tmp_2 = r0 = s.arg0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + s.tmp_6 = r0; + r0 = pxsim_Boolean__bang(s.tmp_6); + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + s.tmp_4 = r0; + r0 = pxsim_Boolean__bang(s.tmp_4); + s.tmp_3 = r0; + r0 = (s.tmp_2).fields["runningStartFrames"] = (s.tmp_3); + r0 = (s.arg0).fields["current"] = (s.newAnimation___176694); + r0 = s.arg0.fields["current"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 39; continue; } + r0 = s.tmp_0; + { step = 40; continue; } + case 39: + r0 = s.arg0.fields["enabled"]; + case 40: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 43; continue; } + r0 = s.arg0.fields["runningStartFrames"]; s.tmp_2 = r0; - r0 = s.arg0.fields["_fov"]; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 41; continue; } + s.tmp_3 = Sprite_setImage__P168918_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_3.arg0 = r0; + r0 = s.arg0.fields["current"]; + r0 = r0.fields["startFrames"]; + s.tmp_4 = r0; + r0 = pxsim_Array__getAt(s.tmp_4, 0); + s.tmp_3.arg1 = r0; + s.callLocIdx = 1866; s.pc = 85; return s.tmp_3; + case 85: + r0 = s.retval; + { step = 42; continue; } + case 41: + s.tmp_0 = Sprite_setImage__P168918_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_0.arg0 = r0; + r0 = s.arg0.fields["current"]; + r0 = r0.fields["loopFrames"]; + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_1, 0); + s.tmp_0.arg1 = r0; + s.callLocIdx = 1867; s.pc = 86; return s.tmp_0; + case 86: + r0 = s.retval; + case 42: + case 43: + case 44: + case 45: + case 46: + r0 = s.arg0.fields["current"]; + 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 = 47; continue; } + r0 = s.tmp_0; + { step = 48; continue; } + case 47: + r0 = s.arg0.fields["enabled"]; + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); s.tmp_3 = r0; - r0 = (s.tmp_2 / s.tmp_3); + r0 = pxsim_Boolean__bang(s.tmp_3); + case 48: + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + if (!r0) { step = 49; continue; } + { step = 65; continue; } + case 49: + case 50: + s.tmp_6 = r0 = s.arg0; + r0 = s.tmp_6.fields["timer"]; + s.tmp_8 = r0; + r0 = (s.tmp_8 + s.arg1); + s.tmp_7 = r0; + r0 = (s.tmp_6).fields["timer"] = (s.tmp_7); + r0 = s.arg0.fields["runningStartFrames"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 59; continue; } + case 51: + r0 = s.arg0.fields["timer"]; + s.tmp_2 = r0; + r0 = s.arg0.fields["current"]; + r0 = r0.fields["startInterval"]; + s.tmp_3 = r0; + r0 = (s.tmp_2 >= s.tmp_3); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["wallHeightInView"] = (s.tmp_1); + r0 = pxsim_numops_toBool(s.tmp_1); + if (r0) { step = 52; continue; } + r0 = s.tmp_1; + { step = 53; continue; } + case 52: + r0 = s.arg0.fields["runningStartFrames"]; + case 53: + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + if (!r0) { step = 58; continue; } + s.tmp_5 = r0 = s.arg0; + r0 = s.tmp_5.fields["timer"]; + s.tmp_7 = r0; + r0 = s.arg0.fields["current"]; + r0 = r0.fields["startInterval"]; + s.tmp_8 = r0; + r0 = (s.tmp_7 - s.tmp_8); + s.tmp_6 = r0; + r0 = (s.tmp_5).fields["timer"] = (s.tmp_6); s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["wallHeightInView"]; + r0 = s.tmp_0.fields["frame"]; s.tmp_2 = r0; - r0 = (s.tmp_2 >> 8); + r0 = (s.tmp_2 + 1); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["wallWidthInView"] = (s.tmp_1); + r0 = (s.tmp_0).fields["frame"] = (s.tmp_1); + r0 = s.arg0.fields["frame"]; + s.tmp_1 = r0; + r0 = s.arg0.fields["current"]; + r0 = r0.fields["startFrames"]; + 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 = 56; continue; } + r0 = (s.arg0).fields["runningStartFrames"] = (false); + r0 = s.arg0.fields["current"]; + r0 = r0.fields["loopFrames"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 54; continue; } + s.tmp_1 = Sprite_setImage__P168918_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_1.arg0 = r0; + r0 = s.arg0.fields["current"]; + r0 = r0.fields["loopFrames"]; + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_2, 0); + s.tmp_1.arg1 = r0; + s.callLocIdx = 1868; s.pc = 87; return s.tmp_1; + case 87: + r0 = s.retval; + r0 = (s.arg0).fields["timer"] = (0); + r0 = (s.arg0).fields["frame"] = (0); + case 54: + case 55: + { step = 57; continue; } + case 56: + s.tmp_0 = Sprite_setImage__P168918_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_0.arg0 = r0; + r0 = s.arg0.fields["current"]; + r0 = r0.fields["startFrames"]; + s.tmp_1 = r0; + r0 = s.arg0.fields["frame"]; + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_1, s.tmp_2); + s.tmp_0.arg1 = r0; + s.callLocIdx = 1869; s.pc = 88; return s.tmp_0; + case 88: + r0 = s.retval; + case 57: + { step = 51; continue; } + case 58: + { step = 64; continue; } + case 59: + r0 = s.arg0.fields["current"]; + r0 = r0.fields["loopFrames"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 62; continue; } + case 60: + r0 = s.arg0.fields["timer"]; + s.tmp_2 = r0; + r0 = s.arg0.fields["current"]; + r0 = r0.fields["loopInterval"]; + s.tmp_3 = r0; + r0 = (s.tmp_2 >= s.tmp_3); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 61; continue; } + s.tmp_4 = r0 = s.arg0; + r0 = s.tmp_4.fields["timer"]; + s.tmp_6 = r0; + r0 = s.arg0.fields["current"]; + r0 = r0.fields["loopInterval"]; + 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 = r0 = s.arg0; - r0 = s.arg0.fields["_fov"]; + r0 = s.arg0.fields["frame"]; s.tmp_3 = r0; - r0 = pxsim.Math_.atan(s.tmp_3); + r0 = (s.tmp_3 + 1); s.tmp_2 = r0; - r0 = (s.tmp_2 + 0.1); + r0 = s.arg0.fields["current"]; + r0 = r0.fields["loopFrames"]; + s.tmp_5 = r0; + r0 = pxsim_Array__length(s.tmp_5); + s.tmp_4 = r0; + r0 = (s.tmp_2 % s.tmp_4); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["cameraRangeAngle"] = (s.tmp_1); - s.tmp_0 = Render_RayCastingRender_setVectors__P174847_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1942; s.pc = 1; return s.tmp_0; - case 1: + r0 = (s.tmp_0).fields["frame"] = (s.tmp_1); + s.tmp_0 = Sprite_setImage__P168918_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_0.arg0 = r0; + r0 = s.arg0.fields["current"]; + r0 = r0.fields["loopFrames"]; + s.tmp_1 = r0; + r0 = s.arg0.fields["frame"]; + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_1, s.tmp_2); + s.tmp_0.arg1 = r0; + s.callLocIdx = 1870; s.pc = 89; return s.tmp_0; + case 89: r0 = s.retval; + { step = 60; continue; } + case 61: + case 62: + case 63: + case 64: + case 65: r0 = undefined; return leave(s, r0) default: oops() } } } -Render_RayCastingRender_fov__P171768.info = {"start":4169,"length":375,"line":137,"column":8,"endLine":144,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"fov","argumentNames":["this","fov"]} +characterAnimations_CharacterState_update__P174566.info = {"start":4466,"length":4626,"line":148,"column":8,"endLine":265,"endColumn":9,"fileName":"pxt_modules/arcade-character-animations/main.ts","functionName":"update","argumentNames":["this","dt"]} -function Render_RayCastingRender_fov__P171768_mk(s) { +function characterAnimations_CharacterState_update__P174566_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_fov__P171768, depth: s.depth + 1, + parent: s, fn: characterAnimations_CharacterState_update__P174566, depth: s.depth + 1, pc: 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, + state___176468: undefined, + newAnimation___176694: undefined, arg0: undefined, arg1: undefined, } } @@ -6325,7 +7762,7 @@ function Render_RayCastingRender_fov__P171768_mk(s) { -function Render_RayCastingRender_fov__P171767(s) { +function characterAnimations_CharacterState_pickRule__P174571(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6335,32 +7772,120 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.best___177216 = undefined; + s.bestScore___177219 = undefined; + s.currentScore___177228 = undefined; + s.animation___177230 = undefined; + s.unnamed844___U4 = undefined; + s.unnamed845___U5 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); - r0 = s.arg0.fields["_fov"]; - return leaveAccessor(s, r0) + if (!checkSubtype(r0, characterAnimations_CharacterState__C174562_VT)) failedCast(r0); + r0 = (s.arg0).fields["lastState"] = (s.arg1); + r0 = s.arg0.fields["current"]; + s.best___177216 = (r0); + r0 = s.arg0.fields["current"]; + 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 = characterAnimations_score__P174575_mk(s); + s.tmp_1.arg0 = s.arg1; + r0 = s.best___177216.fields["rule"]; + s.tmp_1.arg1 = r0; + s.callLocIdx = 1871; s.pc = 12; return s.tmp_1; + case 12: + r0 = s.retval; + case 2: + // jmp value (already in r0) + s.tmp_2 = r0; + s.bestScore___177219 = (s.tmp_2); + s.animation___177230 = (undefined); + r0 = s.arg0.fields["animations"]; + s.unnamed844___U4 = (r0); + s.unnamed845___U5 = (0); + case 3: + s.tmp_0 = r0 = s.unnamed845___U5; + r0 = pxsim_Array__length(s.unnamed844___U4); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 6; continue; } + r0 = pxsim_Array__getAt(s.unnamed844___U4, s.unnamed845___U5); + s.animation___177230 = (r0); + s.tmp_2 = characterAnimations_score__P174575_mk(s); + s.tmp_2.arg0 = s.arg1; + r0 = s.animation___177230.fields["rule"]; + s.tmp_2.arg1 = r0; + s.callLocIdx = 1872; s.pc = 13; return s.tmp_2; + case 13: + r0 = s.retval; + s.currentScore___177228 = (r0); + r0 = (s.currentScore___177228 > s.bestScore___177219); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + s.bestScore___177219 = (s.currentScore___177228); + s.best___177216 = (s.animation___177230); + case 4: + case 5: + r0 = (s.unnamed845___U5 + 1); + s.unnamed845___U5 = (r0); + { step = 3; continue; } + case 6: + s.unnamed844___U4 = (undefined); + r0 = (s.bestScore___177219 === 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 7; continue; } + r0 = s.tmp_0; + { step = 8; continue; } + case 7: + r0 = (s.bestScore___177219 == undefined); + case 8: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 9; continue; } + r0 = null; + { step = 11; continue; } + case 9: + case 10: + r0 = s.best___177216; + case 11: + return leave(s, r0) default: oops() } } } -Render_RayCastingRender_fov__P171767.info = {"start":4101,"length":58,"line":133,"column":8,"endLine":135,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"fov","argumentNames":["this"]} -Render_RayCastingRender_fov__P171767.isGetter = true; +characterAnimations_CharacterState_pickRule__P174571.info = {"start":9914,"length":799,"line":296,"column":8,"endLine":317,"endColumn":9,"fileName":"pxt_modules/arcade-character-animations/main.ts","functionName":"pickRule","argumentNames":["this","state"]} -function Render_RayCastingRender_fov__P171767_mk(s) { +function characterAnimations_CharacterState_pickRule__P174571_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_fov__P171767, depth: s.depth + 1, + parent: s, fn: characterAnimations_CharacterState_pickRule__P174571, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + best___177216: undefined, + bestScore___177219: undefined, + currentScore___177228: undefined, + animation___177230: undefined, + unnamed844___U4: undefined, + unnamed845___U5: undefined, arg0: undefined, + arg1: undefined, } } -function Render_RayCastingRender_dirY__P171764(s) { +function characterAnimations_score__P174575(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6370,30 +7895,55 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.res___177255 = undefined; + s.check___177256 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 * 256); + s.res___177255 = (0); + r0 = (s.arg0 & s.arg1); + s.check___177256 = (r0); + r0 = (s.check___177256 ^ s.arg1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = 0; + { step = 7; continue; } + case 1: + case 2: + case 3: + r0 = pxsim_numops_toBoolDecr(s.check___177256); + if (!r0) { step = 6; continue; } + r0 = (s.check___177256 & 1); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["dirYFpx"] = (s.tmp_1); - r0 = undefined; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 4; continue; } + r0 = (s.res___177255 + 1); + s.res___177255 = (r0); + case 4: + case 5: + r0 = (s.check___177256 >> 1); + s.check___177256 = (r0); + { step = 3; continue; } + case 6: + r0 = s.res___177255; + case 7: return leave(s, r0) default: oops() } } } -Render_RayCastingRender_dirY__P171764.info = {"start":3722,"length":72,"line":121,"column":8,"endLine":123,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"dirY","argumentNames":["this","v"]} +characterAnimations_score__P174575.info = {"start":11476,"length":256,"line":349,"column":4,"endLine":361,"endColumn":5,"fileName":"pxt_modules/arcade-character-animations/main.ts","functionName":"score","argumentNames":["state","rule"]} -function Render_RayCastingRender_dirY__P171764_mk(s) { +function characterAnimations_score__P174575_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_dirY__P171764, depth: s.depth + 1, + parent: s, fn: characterAnimations_score__P174575, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + res___177255: undefined, + check___177256: undefined, arg0: undefined, arg1: undefined, } } @@ -6402,7 +7952,7 @@ function Render_RayCastingRender_dirY__P171764_mk(s) { -function Render_RayCastingRender_dirX__P171763(s) { +function Sprite_setImage__P168918(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6418,33 +7968,60 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 * 256); + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(s.arg1); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["dirXFpx"] = (s.tmp_1); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -Render_RayCastingRender_dirX__P171763.info = {"start":3640,"length":72,"line":117,"column":8,"endLine":119,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"dirX","argumentNames":["this","v"]} - -function Render_RayCastingRender_dirX__P171763_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Render_RayCastingRender_dirX__P171763, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, - arg1: undefined, -} } - - + 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"]; + 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__C168868_v5_1_mk(s); + s.tmp_0.arg0 = s.arg0; + if (!checkSubtype(s.tmp_0.arg0, Sprite__C168868_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() +} } } +Sprite_setImage__P168918.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 Sprite_setImage__P168918_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Sprite_setImage__P168918, depth: s.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 Render_moveWithController__P171833(s) { + + + +function Sprite_recalcSize__P172265(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6456,46 +8033,78 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = (globals.raycastingRender___171795).fields["velocity"] = (s.arg0); - r0 = (globals.raycastingRender___171795).fields["velocityAngle"] = (s.arg1); - r0 = (s.arg2 != undefined); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_1 = r0 = globals.raycastingRender___171795; - r0 = (s.arg2 | 0); - s.tmp_2 = r0; - r0 = (s.tmp_1).fields["cameraSway"] = (s.tmp_2); + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C168868_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__P168897_mk(s); + s.tmp_6.arg0 = s.arg0; + s.callLocIdx = 442; 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__P168899_mk(s); + s.tmp_6.arg0 = s.arg0; + s.callLocIdx = 444; s.pc = 2; return s.tmp_6; case 2: + r0 = s.retval; + s.tmp_5 = r0; + r0 = (s.tmp_3 * s.tmp_5); + s.tmp_2 = r0; + r0 = (s.tmp_2 * 256); + s.tmp_7 = r0; + r0 = (s.tmp_7 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_height"] = (s.tmp_1); + s.tmp_0 = Sprite_resetHitbox__P168920_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 446; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -Render_moveWithController__P171833.info = {"start":14881,"length":262,"line":397,"column":4,"endLine":402,"endColumn":5,"fileName":"pxt_modules/pxt-raycasting/render_blocks.ts","functionName":"moveWithController","argumentNames":["v","va","cameraSway"]} +Sprite_recalcSize__P172265.info = {"start":9982,"length":178,"line":363,"column":4,"endLine":367,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"recalcSize","argumentNames":["this"]} -function Render_moveWithController__P171833_mk(s) { +function Sprite_recalcSize__P172265_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_moveWithController__P171833, depth: s.depth + 1, + parent: s, fn: Sprite_recalcSize__P172265, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function Render_getRenderSpriteVariable__P171816(s) { +function Sprite_resetHitbox__P168920(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6505,24 +8114,40 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = globals.raycastingRender___171795.fields["sprSelf"]; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + r0 = (s.arg0).fields["_hitbox"] = (null); + s.tmp_0 = Sprite__C168868_v4_1_mk(s); + s.tmp_0.arg0 = s.arg0; + if (!checkSubtype(s.tmp_0.arg0, Sprite__C168868_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.setHitbox; + s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -Render_getRenderSpriteVariable__P171816.info = {"start":4005,"length":97,"line":102,"column":4,"endLine":104,"endColumn":5,"fileName":"pxt_modules/pxt-raycasting/render_blocks.ts","functionName":"getRenderSpriteVariable","argumentNames":[]} +Sprite_resetHitbox__P168920.info = {"start":9580,"length":76,"line":342,"column":4,"endLine":345,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"resetHitbox","argumentNames":["this"]} -function Render_getRenderSpriteVariable__P171816_mk(s) { +function Sprite_resetHitbox__P168920_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_getRenderSpriteVariable__P171816, depth: s.depth + 1, + parent: s, fn: Sprite_resetHitbox__P168920, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, } } -function game_showLongText__P169487(s) { +function Sprite_setHitbox__P168921(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6532,271 +8157,55 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.width___177600 = undefined; - s.height___177601 = undefined; - s.top___177602 = undefined; - s.left___177603 = undefined; - s.dialog___177714 = undefined; - s.s___177722 = undefined; - s.pressed___177738 = undefined; - s.done___177739 = undefined; - s.upPressed___177740 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = console_inspect__P166909_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 20; - s.callLocIdx = 1292; s.pc = 8; return s.tmp_0; - case 8: - r0 = s.retval; - s.arg0 = (r0); - s.tmp_0 = controller__setUserEventsEnabled__P168733_mk(s); - s.tmp_0.arg0 = false; - s.callLocIdx = 1293; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; - s.tmp_0 = game_pushScene__P169530_mk(s); - s.callLocIdx = 1294; s.pc = 10; return s.tmp_0; - case 10: - r0 = s.retval; - s.tmp_1 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1295; s.pc = 11; return s.tmp_1; - case 11: - r0 = s.retval; - s.tmp_0 = r0; - r0 = s.tmp_0.fields["flags"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 | 2); - s.tmp_2 = r0; - r0 = (s.tmp_0).fields["flags"] = (s.tmp_2); - s.tmp_0 = r0 = s.arg1; - r0 = pxsim_pxtcore.switch_eq(0, s.tmp_0); - if (r0) { step = 1; continue; } - r0 = pxsim_pxtcore.switch_eq(3, s.tmp_0); - if (r0) { step = 2; continue; } - r0 = pxsim_pxtcore.switch_eq(1, s.tmp_0); - if (r0) { step = 3; continue; } - r0 = pxsim_pxtcore.switch_eq(2, s.tmp_0); - if (r0) { step = 4; continue; } - r0 = pxsim_pxtcore.switch_eq(4, 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 1: - r0 = pxsim_ImageMethods.width(globals.screen___168559); - s.tmp_1 = r0; - r0 = (s.tmp_1 - 4); - s.width___177600 = (r0); - r0 = pxsim_ImageMethods.height(globals.screen___168559); - s.tmp_1 = r0; - r0 = pxsim.Math_.idiv(s.tmp_1, 3); - s.tmp_0 = r0; - r0 = (s.tmp_0 + 5); - s.height___177601 = (r0); - r0 = pxsim_ImageMethods.height(globals.screen___168559); - s.tmp_0 = r0; - r0 = (s.tmp_0 - s.height___177601); - s.top___177602 = (r0); - r0 = pxsim_ImageMethods.width(globals.screen___168559); - s.tmp_1 = r0; - r0 = (s.tmp_1 - s.width___177600); - s.tmp_0 = r0; - r0 = (s.tmp_0 >> 1); - s.left___177603 = (r0); - { step = 7; continue; } - case 2: - r0 = pxsim_ImageMethods.width(globals.screen___168559); - s.tmp_0 = r0; - r0 = (s.tmp_0 - 4); - s.width___177600 = (r0); - r0 = pxsim_ImageMethods.height(globals.screen___168559); - s.tmp_1 = r0; - r0 = pxsim.Math_.idiv(s.tmp_1, 3); - s.tmp_0 = r0; - r0 = (s.tmp_0 + 5); - s.height___177601 = (r0); - s.top___177602 = (0); - r0 = pxsim_ImageMethods.width(globals.screen___168559); - s.tmp_1 = r0; - r0 = (s.tmp_1 - s.width___177600); + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + r0 = s.arg0.fields["_hitbox"]; s.tmp_0 = r0; - r0 = (s.tmp_0 >> 1); - s.left___177603 = (r0); - { step = 7; continue; } + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_1 = game_Hitbox_updateIfInvalid__P168749_mk(s); + r0 = s.arg0.fields["_hitbox"]; + s.tmp_1.arg0 = r0; + s.callLocIdx = 440; s.pc = 3; return s.tmp_1; case 3: - r0 = pxsim_ImageMethods.width(globals.screen___168559); - s.tmp_1 = r0; - r0 = pxsim.Math_.idiv(s.tmp_1, 3); - s.tmp_0 = r0; - r0 = (s.tmp_0 + 5); - s.width___177600 = (r0); - r0 = pxsim_ImageMethods.height(globals.screen___168559); - s.height___177601 = (r0); - s.top___177602 = (0); - s.left___177603 = (0); - { step = 7; continue; } - case 4: - r0 = pxsim_ImageMethods.width(globals.screen___168559); - s.tmp_1 = r0; - r0 = pxsim.Math_.idiv(s.tmp_1, 3); - s.tmp_0 = r0; - r0 = (s.tmp_0 + 5); - s.width___177600 = (r0); - r0 = pxsim_ImageMethods.height(globals.screen___168559); - s.height___177601 = (r0); - s.top___177602 = (0); - r0 = pxsim_ImageMethods.width(globals.screen___168559); - s.tmp_0 = r0; - r0 = (s.tmp_0 - s.width___177600); - s.left___177603 = (r0); - { step = 7; continue; } - case 5: - r0 = pxsim_ImageMethods.width(globals.screen___168559); - s.tmp_1 = r0; - r0 = (s.tmp_1 << 1); - s.tmp_0 = r0; - r0 = pxsim.Math_.idiv(s.tmp_0, 3); - s.width___177600 = (r0); - r0 = pxsim_ImageMethods.width(globals.screen___168559); - s.tmp_1 = r0; - r0 = (s.tmp_1 << 1); - s.tmp_0 = r0; - r0 = pxsim.Math_.idiv(s.tmp_0, 3); - s.height___177601 = (r0); - r0 = pxsim_ImageMethods.height(globals.screen___168559); - s.tmp_1 = r0; - r0 = (s.tmp_1 - s.height___177601); - s.tmp_0 = r0; - r0 = (s.tmp_0 >> 1); - s.top___177602 = (r0); - r0 = pxsim_ImageMethods.width(globals.screen___168559); - s.tmp_1 = r0; - r0 = (s.tmp_1 - s.width___177600); - s.tmp_0 = r0; - r0 = (s.tmp_0 >> 1); - s.left___177603 = (r0); - { step = 7; continue; } - case 6: - r0 = pxsim_ImageMethods.width(globals.screen___168559); - s.width___177600 = (r0); - r0 = pxsim_ImageMethods.height(globals.screen___168559); - s.height___177601 = (r0); - s.top___177602 = (0); - s.left___177603 = (0); - case 7: - r0 = pxsim_pxtcore_mkClassInstance(game_Dialog__C169448_VT); - s.tmp_0 = r0; - s.tmp_1 = game_Dialog_constructor__P169451_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = s.width___177600; - s.tmp_1.arg2 = s.height___177601; - s.tmp_1.arg3 = undefined; - s.tmp_1.arg4 = undefined; - s.tmp_1.arg5 = undefined; - s.callLocIdx = 1296; s.pc = 12; return s.tmp_1; - case 12: - r0 = s.retval; - s.dialog___177714 = (s.tmp_0); - s.tmp_0 = sprites_create__P168802_mk(s); - r0 = s.dialog___177714.fields["image"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = -1; - s.callLocIdx = 1297; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; - s.s___177722 = (r0); - s.tmp_0 = Sprite_top__P168931_mk(s); - s.tmp_0.arg0 = s.s___177722; - s.tmp_0.arg1 = s.top___177602; - s.callLocIdx = 1298; s.pc = 14; return s.tmp_0; - case 14: - r0 = s.retval; - s.tmp_0 = Sprite_left__P168927_mk(s); - s.tmp_0.arg0 = s.s___177722; - s.tmp_0.arg1 = s.left___177603; - s.callLocIdx = 1299; s.pc = 15; return s.tmp_0; - case 15: - r0 = s.retval; - s.tmp_0 = game_Dialog__C169448_v1_2_mk(s); - s.tmp_0.arg0 = s.dialog___177714; - s.tmp_0.arg1 = s.arg0; - if (!checkSubtype(s.tmp_0.arg0, game_Dialog__C169448_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.setText; - s.pc = 16; return s.tmp_0; - case 16: - r0 = s.retval; - r0 = pxsim_pxtrt.mklocRef(); - s.pressed___177738 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.pressed___177738, true); - r0 = pxsim_pxtrt.mklocRef(); - s.done___177739 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.done___177739, false); - r0 = pxsim_pxtrt.mklocRef(); - s.upPressed___177740 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.upPressed___177740, true); - r0 = pxsim_pxtcore_mkAction(4, game_showLongText_inline__P177742); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.dialog___177714); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.pressed___177738); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.done___177739); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 3, s.upPressed___177740); - s.tmp_1 = game_onUpdate__P169550_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 1306; s.pc = 17; return s.tmp_1; - case 17: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, game_showLongText_inline__P177790); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.done___177739); - s.tmp_1 = pauseUntil__P166894_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = undefined; - s.callLocIdx = 1307; s.pc = 18; return s.tmp_1; - case 18: r0 = s.retval; - s.tmp_0 = controller__setUserEventsEnabled__P168733_mk(s); - s.tmp_0.arg0 = true; - s.callLocIdx = 1308; s.pc = 19; return s.tmp_0; - case 19: + { step = 2; continue; } + case 1: + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = game_calculateHitBox__P168751_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 441; 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() } } } -game_showLongText__P169487.info = {"start":24237,"length":3072,"line":649,"column":4,"endLine":742,"endColumn":5,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"showLongText","argumentNames":["str","layout"]} +Sprite_setHitbox__P168921.info = {"start":9662,"length":173,"line":347,"column":4,"endLine":353,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"setHitbox","argumentNames":["this"]} -function game_showLongText__P169487_mk(s) { +function Sprite_setHitbox__P168921_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_showLongText__P169487, depth: s.depth + 1, + parent: s, fn: Sprite_setHitbox__P168921, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - width___177600: undefined, - height___177601: undefined, - top___177602: undefined, - left___177603: undefined, - dialog___177714: undefined, - s___177722: undefined, - pressed___177738: undefined, - done___177739: undefined, - upPressed___177740: undefined, arg0: undefined, - arg1: undefined, } } -function game_showLongText_inline__P177742(s) { +function game_calculateHitBox__P168751(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6806,188 +8215,215 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.currentState___177745 = undefined; - s.moveBack___177770 = undefined; - s.tmp_0 = game_BaseDialog__C169430_v0_1_mk(s); - s.tmp_0.arg0 = s.caps[0]; - if (!checkSubtype(s.tmp_0.arg0, game_BaseDialog__C169430_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.update; - s.pc = 23; return s.tmp_0; - case 23: - r0 = s.retval; - s.tmp_1 = controller_Button__C168716_v0_1_mk(s); - s.tmp_1.arg0 = globals.A___168640; - if (!checkSubtype(s.tmp_1.arg0, controller_Button__C168716_VT)) failedCast(s.tmp_1.arg0); - s.tmp_1.fn = s.tmp_1.arg0.vtable.methods.isPressed; - s.pc = 24; return s.tmp_1; - case 24: - r0 = s.retval; + s.i___176902 = undefined; + s.minX___176905 = undefined; + s.minY___176909 = undefined; + s.maxX___176913 = undefined; + s.maxY___176915 = undefined; + s.c___176917 = undefined; + s.fxc___176918 = undefined; + s.r___176925 = undefined; + s.fxr___176926 = undefined; + s.width___176990 = undefined; + s.height___176998 = 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; } + if (r0) { step = 1; continue; } r0 = s.tmp_0; { step = 2; continue; } case 1: - s.tmp_2 = controller_Button__C168716_v0_1_mk(s); - s.tmp_2.arg0 = globals.down___168645; - if (!checkSubtype(s.tmp_2.arg0, controller_Button__C168716_VT)) failedCast(s.tmp_2.arg0); - s.tmp_2.fn = s.tmp_2.arg0.vtable.methods.isPressed; - s.pc = 25; return s.tmp_2; - case 25: + s.tmp_1 = game_Hitbox_isValid__P168747_mk(s); + r0 = s.arg0.fields["_hitbox"]; + s.tmp_1.arg0 = r0; + s.callLocIdx = 373; s.pc = 12; return s.tmp_1; + case 12: r0 = s.retval; case 2: // jmp value (already in r0) - s.tmp_3 = r0; - s.currentState___177745 = (s.tmp_3); - s.tmp_0 = r0 = s.currentState___177745; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 3; continue; } - r0 = s.tmp_0; - { step = 4; continue; } - case 3: - 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); + if (!r0) { step = 3; continue; } + r0 = s.arg0.fields["_hitbox"]; + { step = 11; continue; } + case 3: case 4: - // jmp value (already in r0) + r0 = s.arg0.fields["_image"]; + s.i___176902 = (r0); + r0 = pxsim_ImageMethods.width(s.i___176902); + s.tmp_0 = r0; + r0 = (s.tmp_0 * 256); + s.tmp_1 = r0; + r0 = (s.tmp_1 | 0); + s.minX___176905 = (r0); + r0 = pxsim_ImageMethods.height(s.i___176902); + s.tmp_0 = r0; + r0 = (s.tmp_0 * 256); + s.tmp_1 = r0; + r0 = (s.tmp_1 | 0); + s.minY___176909 = (r0); + s.maxX___176913 = (0); + s.maxY___176915 = (0); + s.c___176917 = (0); + s.fxc___176918 = (0); + case 5: + s.tmp_1 = r0 = s.c___176917; + r0 = pxsim_ImageMethods.width(s.i___176902); + 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___176925 = (0); + s.fxr___176926 = (0); + case 6: + s.tmp_1 = r0 = s.r___176925; + r0 = pxsim_ImageMethods.height(s.i___176902); + 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___176902, s.c___176917, s.r___176925); s.tmp_3 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_3); if (!r0) { step = 7; continue; } - r0 = pxsim_pxtrt_stlocRef(s.caps[1], true); - s.tmp_1 = game_Dialog_hasNext__P169452_mk(s); - s.tmp_1.arg0 = s.caps[0]; - s.callLocIdx = 1300; s.pc = 26; return s.tmp_1; - case 26: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - s.tmp_2 = game_Dialog_nextPage__P169454_mk(s); - s.tmp_2.arg0 = s.caps[0]; - s.callLocIdx = 1301; s.pc = 27; return s.tmp_2; - case 27: + s.tmp_4 = Fx_min__P166693_mk(s); + s.tmp_4.arg0 = s.minX___176905; + s.tmp_4.arg1 = s.fxc___176918; + s.callLocIdx = 377; s.pc = 13; return s.tmp_4; + case 13: r0 = s.retval; - { step = 6; continue; } - case 5: - s.tmp_0 = scene_setBackgroundImage__P169412_mk(s); - s.tmp_0.arg0 = null; - s.callLocIdx = 1302; s.pc = 28; return s.tmp_0; - case 28: + s.minX___176905 = (r0); + s.tmp_0 = Fx_min__P166693_mk(s); + s.tmp_0.arg0 = s.minY___176909; + s.tmp_0.arg1 = s.fxr___176926; + s.callLocIdx = 378; s.pc = 14; return s.tmp_0; + case 14: r0 = s.retval; - s.tmp_0 = game_popScene__P169531_mk(s); - s.callLocIdx = 1303; s.pc = 29; return s.tmp_0; - case 29: + s.minY___176909 = (r0); + s.tmp_0 = Fx_max__P166694_mk(s); + s.tmp_0.arg0 = s.maxX___176913; + s.tmp_0.arg1 = s.fxc___176918; + s.callLocIdx = 379; s.pc = 15; return s.tmp_0; + case 15: r0 = s.retval; - r0 = pxsim_pxtrt_stlocRef(s.caps[2], true); - case 6: - { step = 12; continue; } + s.maxX___176913 = (r0); + s.tmp_0 = Fx_max__P166694_mk(s); + s.tmp_0.arg0 = s.maxY___176915; + s.tmp_0.arg1 = s.fxr___176926; + s.callLocIdx = 380; s.pc = 16; return s.tmp_0; + case 16: + r0 = s.retval; + s.maxY___176915 = (r0); case 7: - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + case 8: + r0 = (s.r___176925 + 1); + s.r___176925 = (r0); + r0 = (s.fxr___176926 + 256); s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 8; continue; } + s.fxr___176926 = (r0); r0 = s.tmp_0; - { step = 9; continue; } - case 8: - r0 = pxsim_numops_toBoolDecr(s.currentState___177745); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + { step = 6; continue; } case 9: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 10; continue; } - r0 = pxsim_pxtrt_stlocRef(s.caps[1], false); - case 10: - case 11: - case 12: - s.tmp_0 = controller_Button__C168716_v0_1_mk(s); - s.tmp_0.arg0 = globals.up___168643; - if (!checkSubtype(s.tmp_0.arg0, controller_Button__C168716_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.isPressed; - s.pc = 30; return s.tmp_0; - case 30: - r0 = s.retval; - s.moveBack___177770 = (r0); - s.tmp_0 = r0 = s.moveBack___177770; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 13; continue; } + r0 = (s.c___176917 + 1); + s.c___176917 = (r0); + r0 = (s.fxc___176918 + 256); + s.tmp_0 = r0; + s.fxc___176918 = (r0); r0 = s.tmp_0; - { step = 14; continue; } - case 13: - r0 = pxsim_pxtrt_ldlocRef(s.caps[3]); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + { step = 5; continue; } + case 10: + r0 = s.arg0.fields["_sx"]; + s.tmp_0 = r0; + r0 = pxsim.Math_.imul(s.minX___176905, s.tmp_0); s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - case 14: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 17; continue; } - r0 = pxsim_pxtrt_stlocRef(s.caps[3], true); - s.tmp_1 = game_Dialog_hasPrev__P169453_mk(s); - s.tmp_1.arg0 = s.caps[0]; - s.callLocIdx = 1304; s.pc = 31; return s.tmp_1; - case 31: - r0 = s.retval; + r0 = (s.tmp_1 >> 8); + s.minX___176905 = (r0); + r0 = s.arg0.fields["_sy"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 15; continue; } - s.tmp_2 = game_Dialog_prevPage__P169455_mk(s); - s.tmp_2.arg0 = s.caps[0]; - s.callLocIdx = 1305; s.pc = 32; return s.tmp_2; - case 32: - r0 = s.retval; - case 15: - case 16: - { step = 22; continue; } - case 17: - r0 = pxsim_pxtrt_ldlocRef(s.caps[3]); + r0 = pxsim.Math_.imul(s.minY___176909, s.tmp_0); + s.tmp_1 = r0; + r0 = (s.tmp_1 >> 8); + s.minY___176909 = (r0); + r0 = s.arg0.fields["_sx"]; 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 = pxsim_numops_toBoolDecr(s.moveBack___177770); + r0 = pxsim.Math_.imul(s.maxX___176913, s.tmp_0); s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - case 19: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 20; continue; } - r0 = pxsim_pxtrt_stlocRef(s.caps[3], false); - case 20: - case 21: - case 22: - r0 = undefined; + r0 = (s.tmp_1 >> 8); + s.maxX___176913 = (r0); + r0 = s.arg0.fields["_sy"]; + s.tmp_0 = r0; + r0 = pxsim.Math_.imul(s.maxY___176915, s.tmp_0); + s.tmp_1 = r0; + r0 = (s.tmp_1 >> 8); + s.maxY___176915 = (r0); + r0 = (s.maxX___176913 - s.minX___176905); + s.tmp_0 = r0; + r0 = s.arg0.fields["_sx"]; + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); + s.width___176990 = (r0); + r0 = (s.maxY___176915 - s.minY___176909); + s.tmp_0 = r0; + r0 = s.arg0.fields["_sy"]; + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); + s.height___176998 = (r0); + r0 = pxsim_pxtcore_mkClassInstance(game_Hitbox__C168735_VT); + s.tmp_0 = r0; + s.tmp_1 = game_Hitbox_constructor__P168742_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = s.arg0; + s.tmp_1.arg2 = s.width___176990; + s.tmp_1.arg3 = s.height___176998; + r0 = (s.minX___176905 & -256); + s.tmp_1.arg4 = r0; + r0 = (s.minY___176909 & -256); + s.tmp_1.arg5 = r0; + s.callLocIdx = 393; s.pc = 17; return s.tmp_1; + case 17: + r0 = s.retval; + r0 = s.tmp_0; + case 11: return leave(s, r0) default: oops() } } } -game_showLongText_inline__P177742.info = {"start":26290,"length":931,"line":710,"column":22,"endLine":738,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"inline","argumentNames":[]} +game_calculateHitBox__P168751.info = {"start":3223,"length":1086,"line":103,"column":4,"endLine":132,"endColumn":5,"fileName":"pxt_modules/game/hitbox.ts","functionName":"calculateHitBox","argumentNames":["s"]} -function game_showLongText_inline__P177742_mk(s) { +function game_calculateHitBox__P168751_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_showLongText_inline__P177742, depth: s.depth + 1, + parent: s, fn: game_calculateHitBox__P168751, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - currentState___177745: undefined, - moveBack___177770: undefined, + tmp_4: undefined, + i___176902: undefined, + minX___176905: undefined, + minY___176909: undefined, + maxX___176913: undefined, + maxY___176915: undefined, + c___176917: undefined, + fxc___176918: undefined, + r___176925: undefined, + fxr___176926: undefined, + width___176990: undefined, + height___176998: undefined, + arg0: undefined, } } -function game_showLongText_inline__P177790(s) { +function Sprite_image__P168917(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6997,24 +8433,32 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); - return leave(s, r0) + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + r0 = s.arg0.fields["_image"]; + return leaveAccessor(s, r0) default: oops() } } } -game_showLongText_inline__P177790.info = {"start":27243,"length":10,"line":740,"column":19,"endLine":740,"endColumn":29,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"inline","argumentNames":[]} +Sprite_image__P168917.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__P168917.isGetter = true; -function game_showLongText_inline__P177790_mk(s) { +function Sprite_image__P168917_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_showLongText_inline__P177790, depth: s.depth + 1, + parent: s, fn: Sprite_image__P168917, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, } } -function game_popScene__P169531(s) { +function game_Hitbox_isValid__P168747(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7024,84 +8468,43 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.oldScene___177810 = undefined; - s.tmp_0 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1342; s.pc = 11; return s.tmp_0; - case 11: - r0 = s.retval; - s.oldScene___177810 = (r0); - s.tmp_0 = r0 = globals._sceneStack___172458; - 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___172458); - 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___172458); - globals._scene___172457 = (r0); - s.tmp_0 = control_popEventContext__P166937_mk(s); - s.callLocIdx = 1343; s.pc = 12; return s.tmp_0; - case 12: - r0 = s.retval; - { step = 6; continue; } - case 3: - r0 = pxsim_numops_toBoolDecr(globals._scene___172457); - if (!r0) { step = 4; continue; } - s.tmp_0 = control_popEventContext__P166937_mk(s); - s.callLocIdx = 1344; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; - globals._scene___172457 = (undefined); - case 4: - case 5: - case 6: - r0 = pxsim_numops_toBoolDecr(globals._scene___172457); - if (!r0) { step = 7; continue; } - s.tmp_0 = particles_enableAll__P169710_mk(s); - s.callLocIdx = 1345; s.pc = 14; return s.tmp_0; - case 14: - r0 = s.retval; - case 7: - case 8: - r0 = pxsim_numops_toBoolDecr(globals._scenePopHandlers___172460); - if (!r0) { step = 9; continue; } - r0 = pxsim_pxtcore_mkAction(1, game_popScene_inline__P177831); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, game_Hitbox__C168735_VT)) failedCast(r0); + r0 = s.arg0.fields["hash"]; s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.oldScene___177810); - s.tmp_1 = helpers_arrayForEach__P166636_mk(s); - s.tmp_1.arg0 = globals._scenePopHandlers___172460; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 1347; s.pc = 15; return s.tmp_1; - case 15: + s.tmp_2 = Sprite_calcDimensionalHash__P168919_mk(s); + r0 = s.arg0.fields["parent"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 326; s.pc = 1; return s.tmp_2; + case 1: r0 = s.retval; - case 9: - case 10: - r0 = undefined; + s.tmp_1 = r0; + r0 = (s.tmp_0 === s.tmp_1); return leave(s, r0) default: oops() } } } -game_popScene__P169531.info = {"start":5133,"length":548,"line":161,"column":4,"endLine":179,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"popScene","argumentNames":[]} +game_Hitbox_isValid__P168747.info = {"start":935,"length":89,"line":40,"column":8,"endLine":42,"endColumn":9,"fileName":"pxt_modules/game/hitbox.ts","functionName":"isValid","argumentNames":["this"]} -function game_popScene__P169531_mk(s) { +function game_Hitbox_isValid__P168747_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_popScene__P169531, depth: s.depth + 1, + parent: s, fn: game_Hitbox_isValid__P168747, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - oldScene___177810: undefined, + tmp_2: undefined, + arg0: undefined, } } -function game_popScene_inline__P177831(s) { +function Sprite_calcDimensionalHash__P168919(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7115,25 +8518,46 @@ 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 = 1346; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + r0 = s.arg0.fields["_image"]; + s.tmp_2 = r0; + r0 = pxsim_ImageMethods.revision(s.tmp_2); + s.tmp_1 = r0; + r0 = s.arg0.fields["_width"]; + s.tmp_4 = r0; + r0 = (8 + 8); + s.tmp_5 = r0; + r0 = (s.tmp_4 >> s.tmp_5); + s.tmp_3 = r0; + r0 = (s.tmp_1 + s.tmp_3); + s.tmp_0 = r0; + r0 = s.arg0.fields["_height"]; + s.tmp_7 = r0; + r0 = (16 + 8); + s.tmp_8 = r0; + r0 = (s.tmp_7 >> s.tmp_8); + s.tmp_6 = r0; + r0 = (s.tmp_0 + s.tmp_6); return leave(s, r0) default: oops() } } } -game_popScene_inline__P177831.info = {"start":5645,"length":18,"line":177,"column":38,"endLine":177,"endColumn":56,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":["cb"]} +Sprite_calcDimensionalHash__P168919.info = {"start":9436,"length":138,"line":338,"column":4,"endLine":340,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"calcDimensionalHash","argumentNames":["this"]} -function game_popScene_inline__P177831_mk(s) { +function Sprite_calcDimensionalHash__P168919_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_popScene_inline__P177831, depth: s.depth + 1, + parent: s, fn: Sprite_calcDimensionalHash__P168919, depth: s.depth + 1, pc: 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, } } @@ -7141,7 +8565,7 @@ function game_popScene_inline__P177831_mk(s) { -function particles_enableAll__P169710(s) { +function Fx_toIntShifted__P166683(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7151,46 +8575,36 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sources___177835 = undefined; - s.tmp_0 = particles_particleSources__P172807_mk(s); - s.callLocIdx = 1619; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.sources___177835 = (r0); - r0 = pxsim_numops_toBoolDecr(s.sources___177835); - if (!r0) { step = 1; continue; } - s.tmp_0 = helpers_arrayForEach__P166636_mk(s); - s.tmp_0.arg0 = s.sources___177835; - s.tmp_0.arg1 = particles_enableAll_inline__P177841; - s.callLocIdx = 1621; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - s.tmp_0 = particles_pruneParticles__P172803_mk(s); - s.callLocIdx = 1622; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - case 1: - case 2: - r0 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg1 + 8); + s.tmp_1 = r0; + r0 = (s.tmp_0 >> s.tmp_1); return leave(s, r0) default: oops() } } } -particles_enableAll__P169710.info = {"start":12649,"length":193,"line":413,"column":4,"endLine":419,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"enableAll","argumentNames":[]} +Fx_toIntShifted__P166683.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 particles_enableAll__P169710_mk(s) { +function Fx_toIntShifted__P166683_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_enableAll__P169710, depth: s.depth + 1, + parent: s, fn: Fx_toIntShifted__P166683, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - sources___177835: undefined, + tmp_1: undefined, + arg0: undefined, + arg1: undefined, } } -function particles_enableAll_inline__P177841(s) { +function game_Hitbox_constructor__P168742(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7202,34 +8616,55 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); + s.arg5 = (s.lambdaArgs[5]); s.lambdaArgs = null; } - s.tmp_0 = particles_ParticleSource_enabled__P169691_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = true; - s.callLocIdx = 1620; s.pc = 1; return s.tmp_0; + r0 = s.arg0; + if (!checkSubtype(r0, game_Hitbox__C168735_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = Sprite_calcDimensionalHash__P168919_mk(s); + s.tmp_2.arg0 = s.arg1; + s.callLocIdx = 317; s.pc = 1; return s.tmp_2; case 1: r0 = s.retval; - r0 = true; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["hash"] = (s.tmp_1); + r0 = (s.arg0).fields["parent"] = (s.arg1); + r0 = (s.arg0).fields["width"] = (s.arg2); + r0 = (s.arg0).fields["height"] = (s.arg3); + r0 = (s.arg0).fields["ox"] = (s.arg4); + r0 = (s.arg0).fields["oy"] = (s.arg5); + r0 = undefined; return leave(s, r0) default: oops() } } } -particles_enableAll_inline__P177841.info = {"start":12773,"length":21,"line":416,"column":28,"endLine":416,"endColumn":49,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["s"]} +game_Hitbox_constructor__P168742.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 particles_enableAll_inline__P177841_mk(s) { +function game_Hitbox_constructor__P168742_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_enableAll_inline__P177841, depth: s.depth + 1, + parent: s, fn: game_Hitbox_constructor__P168742, 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 particles_particleSources__P172807(s) { +function Fx_floor__P166695(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7239,33 +8674,29 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sources___178009 = undefined; - s.tmp_0 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1623; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = r0.fields["particleSources"]; - s.sources___178009 = (r0); - r0 = s.sources___178009; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = (s.arg0 & -256); return leave(s, r0) default: oops() } } } -particles_particleSources__P172807.info = {"start":12848,"length":119,"line":421,"column":4,"endLine":424,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"particleSources","argumentNames":[]} +Fx_floor__P166695.info = {"start":1919,"length":103,"line":62,"column":4,"endLine":64,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"floor","argumentNames":["v"]} -function particles_particleSources__P172807_mk(s) { +function Fx_floor__P166695_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_particleSources__P172807, depth: s.depth + 1, + parent: s, fn: Fx_floor__P166695, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - sources___178009: undefined, + arg0: undefined, } } -function particles_pruneParticles__P172803(s) { +function Fx_max__P166694(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7275,51 +8706,44 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sources___177846 = undefined; - s.tmp_0 = particles_particleSources__P172807_mk(s); - s.callLocIdx = 1606; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.sources___177846 = (r0); - r0 = pxsim_numops_toBoolDecr(s.sources___177846); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = (s.arg0 > s.arg1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - s.tmp_0 = helpers_arrayForEach__P166636_mk(s); - s.tmp_1 = helpers_arraySlice__P166642_mk(s); - s.tmp_1.arg0 = s.sources___177846; - s.tmp_1.arg1 = 0; - r0 = pxsim_Array__length(s.sources___177846); - s.tmp_1.arg2 = r0; - s.callLocIdx = 1607; s.pc = 5; return s.tmp_1; - case 5: - r0 = s.retval; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = particles_pruneParticles_inline__P177855; - s.callLocIdx = 1609; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; + r0 = s.arg0; + { step = 3; continue; } + { step = 2; continue; } case 1: + r0 = s.arg1; + { step = 3; continue; } case 2: r0 = undefined; + case 3: return leave(s, r0) default: oops() } } } -particles_pruneParticles__P172803.info = {"start":9864,"length":156,"line":327,"column":4,"endLine":330,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"pruneParticles","argumentNames":[]} +Fx_max__P166694.info = {"start":1797,"length":117,"line":56,"column":4,"endLine":61,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"max","argumentNames":["a","b"]} -function particles_pruneParticles__P172803_mk(s) { +function Fx_max__P166694_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_pruneParticles__P172803, depth: s.depth + 1, + parent: s, fn: Fx_max__P166694, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - sources___177846: undefined, + arg0: undefined, + arg1: undefined, } } -function particles_pruneParticles_inline__P177855(s) { +function Fx_min__P166693(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7331,33 +8755,42 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = particles_ParticleSource__prune__P169686_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1608; s.pc = 1; return s.tmp_0; + r0 = (s.arg0 < s.arg1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.arg0; + { step = 3; continue; } + { step = 2; continue; } case 1: - r0 = s.retval; + r0 = s.arg1; + { step = 3; continue; } + case 2: r0 = undefined; + case 3: return leave(s, r0) default: oops() } } } -particles_pruneParticles_inline__P177855.info = {"start":9997,"length":15,"line":329,"column":62,"endLine":329,"endColumn":77,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["s"]} +Fx_min__P166693.info = {"start":1675,"length":117,"line":50,"column":4,"endLine":55,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"min","argumentNames":["a","b"]} -function particles_pruneParticles_inline__P177855_mk(s) { +function Fx_min__P166693_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_pruneParticles_inline__P177855, depth: s.depth + 1, + parent: s, fn: Fx_min__P166693, 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__P169686(s) { +function Fx_mul__P166687(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7367,155 +8800,34 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___177885 = undefined; - s.sources___177893 = undefined; - s.current___177907 = 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__C169678_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 = (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__P169526_mk(s); - s.callLocIdx = 1581; s.pc = 21; return s.tmp_5; - case 21: - r0 = s.retval; - s.scene___177885 = (r0); - r0 = pxsim_numops_toBoolDecr(s.scene___177885); - if (!r0) { step = 7; continue; } - r0 = s.scene___177885.fields["allSprites"]; - s.tmp_0 = r0; - r0 = pxsim_Array_.removeElement(s.tmp_0, s.arg0); - case 7: - case 8: - s.tmp_0 = particles_particleSources__P172807_mk(s); - s.callLocIdx = 1582; s.pc = 22; return s.tmp_0; - case 22: - r0 = s.retval; - s.sources___177893 = (r0); - s.tmp_0 = r0 = s.sources___177893; - 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___177893); - 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___177893, s.arg0); - case 11: - case 12: - r0 = s.arg0.fields["anchor"]; + r0 = pxsim.Math_.imul(s.arg0, s.arg1); s.tmp_0 = r0; - r0 = (s.tmp_0 == undefined); - case 13: - case 14: - r0 = s.arg0.fields["head"]; - s.current___177907 = (r0); - case 15: - s.tmp_0 = r0 = s.current___177907; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 16; continue; } - r0 = s.tmp_0; - { step = 17; continue; } - case 16: - r0 = s.current___177907.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___177907.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___177907.fields["next"]; - r0 = r0.fields["next"]; - s.tmp_4 = r0; - r0 = (s.current___177907).fields["next"] = (s.tmp_4); - { step = 19; continue; } - case 18: - r0 = s.current___177907.fields["next"]; - s.current___177907 = (r0); - case 19: - { step = 15; continue; } - case 20: - r0 = undefined; + r0 = (s.tmp_0 >> 8); return leave(s, r0) default: oops() } } } -particles_ParticleSource__prune__P169686.info = {"start":5104,"length":830,"line":166,"column":8,"endLine":189,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"_prune","argumentNames":["this"]} +Fx_mul__P166687.info = {"start":872,"length":133,"line":29,"column":4,"endLine":31,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"mul","argumentNames":["a","b"]} -function particles_ParticleSource__prune__P169686_mk(s) { +function Fx_mul__P166687_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource__prune__P169686, depth: s.depth + 1, + parent: s, fn: Fx_mul__P166687, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - scene___177885: undefined, - sources___177893: undefined, - current___177907: undefined, arg0: undefined, + arg1: undefined, } } -function helpers_arraySlice__P166642(s) { +function Fx_sub__P166686(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7525,114 +8837,31 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.res___177930 = undefined; - s.len___177932 = undefined; - s.i___177966 = 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___177930 = (r0); - r0 = pxsim_Array__length(s.arg0); - s.len___177932 = (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__P166657_mk(s); - r0 = (s.len___177932 + s.arg1); - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 0; - s.callLocIdx = 10; 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___177932); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - r0 = s.res___177930; - { 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___177932); - { 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___177932 + s.arg2); - s.arg2 = (r0); - case 8: - case 9: - case 10: - r0 = (s.arg2 > s.len___177932); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 11; continue; } - s.arg2 = (s.len___177932); - case 11: - case 12: - s.i___177966 = (s.arg1); - case 13: - r0 = (s.i___177966 < s.arg2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 14; continue; } - s.tmp_1 = r0 = s.res___177930; - r0 = pxsim_Array__getAt(s.arg0, s.i___177966); - s.tmp_2 = r0; - r0 = pxsim_Array__push(s.tmp_1, s.tmp_2); - r0 = (s.i___177966 + 1); - s.i___177966 = (r0); - { step = 13; continue; } - case 14: - r0 = s.res___177930; - case 15: + r0 = (s.arg0 - s.arg1); return leave(s, r0) default: oops() } } } -helpers_arraySlice__P166642.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"]} +Fx_sub__P166686.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 helpers_arraySlice__P166642_mk(s) { +function Fx_sub__P166686_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arraySlice__P166642, depth: s.depth + 1, + parent: s, fn: Fx_sub__P166686, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - res___177930: undefined, - len___177932: undefined, - i___177966: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function particles_ParticleSource_enabled__P169691(s) { +function Fx_add__P166684(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7647,54 +8876,17 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C169678_VT)) failedCast(r0); - s.tmp_1 = r0 = s.arg1; - s.tmp_3 = particles_ParticleSource_enabled__P169690_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 1585; 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: - r0 = undefined; + r0 = (s.arg0 + s.arg1); return leave(s, r0) default: oops() } } } -particles_ParticleSource_enabled__P169691.info = {"start":6816,"length":214,"line":223,"column":8,"endLine":228,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"enabled","argumentNames":["this","v"]} +Fx_add__P166684.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 particles_ParticleSource_enabled__P169691_mk(s) { +function Fx_add__P166684_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_enabled__P169691, depth: s.depth + 1, + parent: s, fn: Fx_add__P166684, depth: s.depth + 1, pc: 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, } } @@ -7703,7 +8895,7 @@ function particles_ParticleSource_enabled__P169691_mk(s) { -function particles_ParticleSource_enabled__P169690(s) { +function game_Hitbox_updateIfInvalid__P168749(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7713,39 +8905,147 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.newHitBox___177108 = undefined; + s.oMinX___177113 = undefined; + s.oMinY___177116 = undefined; + s.oMaxX___177119 = undefined; + s.oMaxY___177125 = undefined; + s.nMinX___177131 = undefined; + s.nMinY___177134 = undefined; + s.nMaxX___177137 = undefined; + s.nMaxY___177143 = undefined; + s.xDiff___177149 = undefined; + s.yDiff___177160 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C169678_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); + if (!checkSubtype(r0, game_Hitbox__C168735_VT)) failedCast(r0); + s.tmp_1 = game_Hitbox_isValid__P168747_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 331; s.pc = 8; return s.tmp_1; + case 8: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + { step = 7; continue; } + case 1: + case 2: + s.tmp_2 = game_calculateHitBox__P168751_mk(s); + r0 = s.arg0.fields["parent"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 332; s.pc = 9; return s.tmp_2; + case 9: + r0 = s.retval; + s.newHitBox___177108 = (r0); + r0 = s.arg0.fields["ox"]; + s.oMinX___177113 = (r0); + r0 = s.arg0.fields["oy"]; + s.oMinY___177116 = (r0); + r0 = s.arg0.fields["width"]; + s.tmp_0 = r0; + r0 = (s.oMinX___177113 + s.tmp_0); + s.oMaxX___177119 = (r0); + r0 = s.arg0.fields["height"]; + s.tmp_0 = r0; + r0 = (s.oMinY___177116 + s.tmp_0); + s.oMaxY___177125 = (r0); + r0 = s.newHitBox___177108.fields["ox"]; + s.nMinX___177131 = (r0); + r0 = s.newHitBox___177108.fields["oy"]; + s.nMinY___177134 = (r0); + r0 = s.newHitBox___177108.fields["width"]; + s.tmp_0 = r0; + r0 = (s.nMinX___177131 + s.tmp_0); + s.nMaxX___177137 = (r0); + r0 = s.newHitBox___177108.fields["height"]; + s.tmp_0 = r0; + r0 = (s.nMinY___177134 + s.tmp_0); + s.nMaxY___177143 = (r0); + s.tmp_1 = Fx_abs__P166692_mk(s); + r0 = (s.oMinX___177113 - s.nMinX___177131); + s.tmp_1.arg0 = r0; + s.callLocIdx = 338; s.pc = 10; return s.tmp_1; + case 10: + r0 = s.retval; + s.tmp_0 = r0; + s.tmp_3 = Fx_abs__P166692_mk(s); + r0 = (s.oMaxX___177119 - s.nMaxX___177137); + s.tmp_3.arg0 = r0; + s.callLocIdx = 340; s.pc = 11; return s.tmp_3; + case 11: + r0 = s.retval; s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); + r0 = (s.tmp_0 + s.tmp_2); + s.xDiff___177149 = (r0); + s.tmp_1 = Fx_abs__P166692_mk(s); + r0 = (s.oMinY___177116 - s.nMinY___177134); + s.tmp_1.arg0 = r0; + s.callLocIdx = 343; s.pc = 12; return s.tmp_1; + case 12: + r0 = s.retval; s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); - return leaveAccessor(s, r0) + s.tmp_3 = Fx_abs__P166692_mk(s); + r0 = (s.oMaxY___177125 - s.nMaxY___177143); + s.tmp_3.arg0 = r0; + s.callLocIdx = 345; s.pc = 13; return s.tmp_3; + case 13: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_0 + s.tmp_2); + s.yDiff___177160 = (r0); + r0 = (s.xDiff___177149 > 512); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = (s.arg0).fields["ox"] = (s.nMinX___177131); + r0 = s.newHitBox___177108.fields["width"]; + s.tmp_0 = r0; + r0 = (s.arg0).fields["width"] = (s.tmp_0); + case 3: + case 4: + r0 = (s.yDiff___177160 > 512); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + r0 = (s.arg0).fields["oy"] = (s.nMinY___177134); + r0 = s.newHitBox___177108.fields["height"]; + s.tmp_0 = r0; + r0 = (s.arg0).fields["height"] = (s.tmp_0); + case 5: + case 6: + r0 = s.newHitBox___177108.fields["hash"]; + s.tmp_0 = r0; + r0 = (s.arg0).fields["hash"] = (s.tmp_0); + case 7: + r0 = undefined; + return leave(s, r0) default: oops() } } } -particles_ParticleSource_enabled__P169690.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__P169690.isGetter = true; +game_Hitbox_updateIfInvalid__P168749.info = {"start":1188,"length":1317,"line":48,"column":8,"endLine":85,"endColumn":9,"fileName":"pxt_modules/game/hitbox.ts","functionName":"updateIfInvalid","argumentNames":["this"]} -function particles_ParticleSource_enabled__P169690_mk(s) { +function game_Hitbox_updateIfInvalid__P168749_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_enabled__P169690, depth: s.depth + 1, + parent: s, fn: game_Hitbox_updateIfInvalid__P168749, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - tmp_4: undefined, + newHitBox___177108: undefined, + oMinX___177113: undefined, + oMinY___177116: undefined, + oMaxX___177119: undefined, + oMaxY___177125: undefined, + nMinX___177131: undefined, + nMinY___177134: undefined, + nMaxX___177137: undefined, + nMaxY___177143: undefined, + xDiff___177149: undefined, + yDiff___177160: undefined, arg0: undefined, } } @@ -7753,7 +9053,7 @@ function particles_ParticleSource_enabled__P169690_mk(s) { -function control_popEventContext__P166937(s) { +function Fx_abs__P166692(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7763,75 +9063,42 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ctx___178016 = undefined; - s.context___178024 = undefined; - r0 = pxsim_numops_toBoolDecr(globals.eventContexts___171957); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = (s.arg0 < 0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - { step = 7; continue; } + r0 = (0 - s.arg0); + { step = 3; continue; } + { step = 2; continue; } case 1: + r0 = s.arg0; + { step = 3; continue; } case 2: - r0 = pxsim_Array_.pop(globals.eventContexts___171957); - s.ctx___178016 = (r0); - r0 = pxsim_numops_toBoolDecr(s.ctx___178016); - 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__P166929_mk(s); - s.tmp_2.arg0 = s.ctx___178016; - s.callLocIdx = 78; s.pc = 8; return s.tmp_2; - case 8: - r0 = s.retval; - s.tmp_0 = r0 = globals.eventContexts___171957; - r0 = pxsim_Array__length(globals.eventContexts___171957); - 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___178024 = (r0); - r0 = pxsim_numops_toBoolDecr(s.context___178024); - if (!r0) { step = 5; continue; } - s.tmp_0 = control_EventContext_register__P166928_mk(s); - s.tmp_0.arg0 = s.context___178024; - s.callLocIdx = 79; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; - { step = 6; continue; } - case 5: - globals.eventContexts___171957 = (undefined); - case 6: - case 7: r0 = undefined; + case 3: return leave(s, r0) default: oops() } } } -control_popEventContext__P166937.info = {"start":7755,"length":413,"line":236,"column":4,"endLine":250,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"popEventContext","argumentNames":[]} +Fx_abs__P166692.info = {"start":1506,"length":164,"line":44,"column":4,"endLine":49,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"abs","argumentNames":["a"]} -function control_popEventContext__P166937_mk(s) { +function Fx_abs__P166692_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_popEventContext__P166937, depth: s.depth + 1, + parent: s, fn: Fx_abs__P166692, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - ctx___178016: undefined, - context___178024: undefined, + arg0: undefined, } } -function control_EventContext_unregister__P166929(s) { +function Sprite_sy__P168899(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7841,60 +9108,27 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.h___178045 = undefined; - s.unnamed796___U1 = undefined; - s.unnamed797___U2 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, control_EventContext__C166922_VT)) failedCast(r0); - s.h___178045 = (undefined); - r0 = s.arg0.fields["handlers"]; - s.unnamed796___U1 = (r0); - s.unnamed797___U2 = (0); - case 1: - s.tmp_0 = r0 = s.unnamed797___U2; - r0 = pxsim_Array__length(s.unnamed796___U1); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 2; continue; } - r0 = pxsim_Array__getAt(s.unnamed796___U1, s.unnamed797___U2); - s.h___178045 = (r0); - s.tmp_2 = control_EventHandler_unregister__P171951_mk(s); - s.tmp_2.arg0 = s.h___178045; - s.callLocIdx = 70; s.pc = 3; return s.tmp_2; - case 3: - r0 = s.retval; - r0 = (s.unnamed797___U2 + 1); - s.unnamed797___U2 = (r0); - { step = 1; continue; } - case 2: - s.unnamed796___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) + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + r0 = s.arg0.fields["_sy"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -control_EventContext_unregister__P166929.info = {"start":4721,"length":131,"line":141,"column":8,"endLine":145,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"unregister","argumentNames":["this"]} +Sprite_sy__P168899.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__P168899.isGetter = true; -function control_EventContext_unregister__P166929_mk(s) { +function Sprite_sy__P168899_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_unregister__P166929, depth: s.depth + 1, + parent: s, fn: Sprite_sy__P168899, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - h___178045: undefined, - unnamed796___U1: undefined, - unnamed797___U2: undefined, arg0: undefined, } } @@ -7902,7 +9136,7 @@ function control_EventContext_unregister__P166929_mk(s) { -function control_EventHandler_unregister__P171951(s) { +function Fx_toFloat__P166700(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7916,29 +9150,17 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, control_EventHandler__C171949_VT)) failedCast(r0); - r0 = s.arg0.fields["src"]; - s.tmp_0 = r0; - r0 = s.arg0.fields["value"]; - s.tmp_1 = r0; - r0 = s.arg0.fields["flags"]; - s.tmp_2 = r0; - r0 = pxsim.control.internalOnEvent(s.tmp_0, s.tmp_1, control_doNothing__P171953, s.tmp_2); - r0 = undefined; + r0 = (s.arg0 / 256); return leave(s, r0) default: oops() } } } -control_EventHandler_unregister__P171951.info = {"start":1136,"length":106,"line":36,"column":8,"endLine":38,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"unregister","argumentNames":["this"]} +Fx_toFloat__P166700.info = {"start":2470,"length":81,"line":77,"column":4,"endLine":79,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"toFloat","argumentNames":["v"]} -function control_EventHandler_unregister__P171951_mk(s) { +function Fx_toFloat__P166700_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventHandler_unregister__P171951, depth: s.depth + 1, + parent: s, fn: Fx_toFloat__P166700, 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, } } @@ -7946,7 +9168,7 @@ function control_EventHandler_unregister__P171951_mk(s) { -function control_doNothing__P171953(s) { +function Sprite_sx__P168897(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7956,24 +9178,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = undefined; - return leave(s, r0) + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + r0 = s.arg0.fields["_sx"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -control_doNothing__P171953.info = {"start":1254,"length":24,"line":41,"column":4,"endLine":41,"endColumn":28,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"doNothing","argumentNames":[]} +Sprite_sx__P168897.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__P168897.isGetter = true; -function control_doNothing__P171953_mk(s) { +function Sprite_sx__P168897_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_doNothing__P171953, depth: s.depth + 1, + parent: s, fn: Sprite_sx__P168897, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, } } -function control_EventContext_register__P166928(s) { +function Sprite_y__P168883(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7983,59 +9216,39 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.h___178037 = undefined; - s.unnamed794___U1 = undefined; - s.unnamed795___U2 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, control_EventContext__C166922_VT)) failedCast(r0); - s.h___178037 = (undefined); - r0 = s.arg0.fields["handlers"]; - s.unnamed794___U1 = (r0); - s.unnamed795___U2 = (0); - case 1: - s.tmp_0 = r0 = s.unnamed795___U2; - r0 = pxsim_Array__length(s.unnamed794___U1); + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + r0 = s.arg0.fields["_y"]; s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 2; continue; } - r0 = pxsim_Array__getAt(s.unnamed794___U1, s.unnamed795___U2); - s.h___178037 = (r0); - s.tmp_2 = control_EventHandler_register__P171950_mk(s); - s.tmp_2.arg0 = s.h___178037; - s.callLocIdx = 68; s.pc = 3; return s.tmp_2; - case 3: - r0 = s.retval; - r0 = (s.unnamed795___U2 + 1); - s.unnamed795___U2 = (r0); - { step = 1; continue; } - case 2: - s.unnamed794___U1 = (undefined); - s.tmp_0 = control_EventContext_registerFrameCallbacks__P171955_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 69; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - r0 = undefined; - return leave(s, 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() } } } -control_EventContext_register__P166928.info = {"start":4573,"length":138,"line":135,"column":8,"endLine":139,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"register","argumentNames":["this"]} +Sprite_y__P168883.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__P168883.isGetter = true; -function control_EventContext_register__P166928_mk(s) { +function Sprite_y__P168883_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_register__P166928, depth: s.depth + 1, + parent: s, fn: Sprite_y__P168883, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - h___178037: undefined, - unnamed794___U1: undefined, - unnamed795___U2: undefined, + tmp_3: undefined, + tmp_4: undefined, arg0: undefined, } } @@ -8043,7 +9256,7 @@ function control_EventContext_register__P166928_mk(s) { -function game_pushScene__P169530(s) { +function Fx_div__P166689(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8053,70 +9266,34 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.oldScene___178924 = undefined; - s.tmp_0 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1336; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - s.oldScene___178924 = (r0); - s.tmp_0 = particles_clearAll__P169708_mk(s); - s.callLocIdx = 1337; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.tmp_0 = particles_disableAll__P169709_mk(s); - s.callLocIdx = 1338; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - r0 = pxsim_numops_toBoolDecr(globals._sceneStack___172458); - 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___172458 = (r0); - case 1: - case 2: - r0 = pxsim_Array__push(globals._sceneStack___172458, globals._scene___172457); - s.tmp_0 = game_init__P172465_mk(s); - s.tmp_0.arg0 = true; - s.callLocIdx = 1339; s.pc = 8; return s.tmp_0; - case 8: - r0 = s.retval; - r0 = pxsim_numops_toBoolDecr(globals._scenePushHandlers___172459); - if (!r0) { step = 3; continue; } - r0 = pxsim_pxtcore_mkAction(1, game_pushScene_inline__P178941); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = (s.arg0 << 8); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.oldScene___178924); - s.tmp_1 = helpers_arrayForEach__P166636_mk(s); - s.tmp_1.arg0 = globals._scenePushHandlers___172459; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 1341; s.pc = 9; return s.tmp_1; - case 9: - r0 = s.retval; - case 3: - case 4: - r0 = undefined; + r0 = pxsim.Math_.idiv(s.tmp_0, s.arg1); return leave(s, r0) default: oops() } } } -game_pushScene__P169530.info = {"start":4760,"length":367,"line":148,"column":4,"endLine":159,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"pushScene","argumentNames":[]} +Fx_div__P166689.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 game_pushScene__P169530_mk(s) { +function Fx_div__P166689_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_pushScene__P169530, depth: s.depth + 1, + parent: s, fn: Fx_div__P166689, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - oldScene___178924: undefined, + arg0: undefined, + arg1: undefined, } } -function game_pushScene_inline__P178941(s) { +function Sprite_x__P168881(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8130,25 +9307,35 @@ 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 = 1340; 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__C168868_VT)) failedCast(r0); + r0 = s.arg0.fields["_x"]; + s.tmp_1 = r0; + r0 = s.arg0.fields["_width"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 << 8); + s.tmp_4 = r0; + r0 = pxsim.Math_.idiv(s.tmp_4, 512); + s.tmp_2 = r0; + r0 = (s.tmp_1 + s.tmp_2); + s.tmp_0 = r0; + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -game_pushScene_inline__P178941.info = {"start":5091,"length":18,"line":157,"column":39,"endLine":157,"endColumn":57,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":["cb"]} +Sprite_x__P168881.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__P168881.isGetter = true; -function game_pushScene_inline__P178941_mk(s) { +function Sprite_x__P168881_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_pushScene_inline__P178941, depth: s.depth + 1, + parent: s, fn: Sprite_x__P168881, depth: s.depth + 1, pc: 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, } } @@ -8156,7 +9343,7 @@ function game_pushScene_inline__P178941_mk(s) { -function game_init__P172465(s) { +function characterAnimations_CharacterState_constructor__P174572(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8168,69 +9355,61 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(globals._scene___172457); + r0 = s.arg0; + if (!checkSubtype(r0, characterAnimations_CharacterState__C174562_VT)) failedCast(r0); + r0 = (s.arg0).fields["sprite"] = (s.arg1); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); 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 = (s.tmp_0).fields["animations"] = (s.tmp_1); + r0 = (s.arg0).fields["timer"] = (0); + r0 = (s.arg0).fields["frame"] = (0); + r0 = (s.arg0).fields["lastState"] = (8); + r0 = (s.arg0).fields["possibleFacingDirections"] = (0); + r0 = (s.arg0).fields["enabled"] = (true); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = Sprite_x__P168881_mk(s); + s.tmp_2.arg0 = s.arg1; + s.callLocIdx = 1845; s.pc = 1; return s.tmp_2; case 1: - r0 = s.arg0; - case 2: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 3; continue; } - r0 = pxsim_pxtcore_mkClassInstance(scene_Scene__C169370_VT); - s.tmp_3 = r0; - s.tmp_4 = scene_Scene_constructor__P169393_mk(s); - s.tmp_4.arg0 = s.tmp_3; - s.tmp_5 = control_pushEventContext__P166936_mk(s); - s.callLocIdx = 1333; s.pc = 6; return s.tmp_5; - case 6: - r0 = s.retval; - s.tmp_4.arg1 = r0; - s.tmp_4.arg2 = globals._scene___172457; - s.callLocIdx = 1334; s.pc = 5; return s.tmp_4; - case 5: r0 = s.retval; - globals._scene___172457 = (s.tmp_3); - case 3: - case 4: - s.tmp_0 = scene_Scene_init__P169394_mk(s); - s.tmp_0.arg0 = globals._scene___172457; - s.callLocIdx = 1335; s.pc = 7; return s.tmp_0; - case 7: + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["lastX"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = Sprite_y__P168883_mk(s); + s.tmp_2.arg0 = s.arg1; + s.callLocIdx = 1846; s.pc = 2; return s.tmp_2; + case 2: r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["lastY"] = (s.tmp_1); + r0 = (s.arg0).fields["manualFlags"] = (0); r0 = undefined; return leave(s, r0) default: oops() } } } -game_init__P172465.info = {"start":4560,"length":194,"line":141,"column":4,"endLine":146,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"init","argumentNames":["forceNewScene"]} +characterAnimations_CharacterState_constructor__P174572.info = {"start":2805,"length":372,"line":98,"column":8,"endLine":108,"endColumn":9,"fileName":"pxt_modules/arcade-character-animations/main.ts","functionName":"inline","argumentNames":["this","sprite"]} -function game_init__P172465_mk(s) { +function characterAnimations_CharacterState_constructor__P174572_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_init__P172465, depth: s.depth + 1, + parent: s, fn: characterAnimations_CharacterState_constructor__P174572, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, arg0: undefined, + arg1: undefined, } } -function scene_Scene_init__P169394(s) { +function characterAnimations_CharacterState_matchesRule__P174567(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8242,136 +9421,53 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_Scene__C169370_VT)) failedCast(r0); - r0 = s.arg0.fields["allSprites"]; + if (!checkSubtype(r0, characterAnimations_CharacterState__C174562_VT)) failedCast(r0); + r0 = s.arg0.fields["manualFlags"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + 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 = s.arg0.fields["lastState"]; case 2: - s.tmp_1 = power_poke__P168456_mk(s); - s.callLocIdx = 1137; s.pc = 4; return s.tmp_1; - case 4: - r0 = s.retval; - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); + // jmp value (already in r0) 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__P178971); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = control_EventContext_registerFrameHandler__P166930_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 = 1140; s.pc = 5; return s.tmp_1; - case 5: - r0 = s.retval; - s.tmp_0 = control_EventContext_registerFrameHandler__P166930_mk(s); - r0 = s.arg0.fields["eventContext"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = 13; - s.tmp_0.arg2 = controller__moveSprites__P168660; - s.callLocIdx = 1141; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P178994); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = control_EventContext_registerFrameHandler__P166930_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 = 1143; s.pc = 7; return s.tmp_1; - case 7: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P179007); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = control_EventContext_registerFrameHandler__P166930_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 = 1147; s.pc = 8; return s.tmp_1; - case 8: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P179028); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = control_EventContext_registerFrameHandler__P166930_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 = 1149; s.pc = 9; return s.tmp_1; - case 9: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P179036); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = control_EventContext_registerFrameHandler__P166930_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 = 1153; s.pc = 10; return s.tmp_1; - case 10: - r0 = s.retval; - s.tmp_0 = control_EventContext_registerFrameHandler__P166930_mk(s); - r0 = s.arg0.fields["eventContext"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = 200; - s.tmp_0.arg2 = control___screen_update__P168520; - s.callLocIdx = 1154; s.pc = 11; return s.tmp_0; - case 11: - r0 = s.retval; - s.tmp_0 = multiplayer_initServer__P169915_mk(s); - s.callLocIdx = 1155; s.pc = 12; return s.tmp_0; - case 12: - r0 = s.retval; - s.tmp_0 = multiplayer_initPlayerConnectionListeners__P169916_mk(s); - s.callLocIdx = 1156; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P179067); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = helpers_arrayForEach__P166636_mk(s); - s.tmp_1.arg0 = globals.scene_Scene_initializers___169392; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 1158; s.pc = 14; return s.tmp_1; - case 14: - r0 = s.retval; - case 3: - r0 = undefined; + r0 = (s.tmp_1 & s.arg1); + s.tmp_4 = r0; + r0 = (s.tmp_4 ^ s.arg1); + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); return leave(s, r0) default: oops() } } } -scene_Scene_init__P169394.info = {"start":4432,"length":2572,"line":127,"column":8,"endLine":187,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"init","argumentNames":["this"]} +characterAnimations_CharacterState_matchesRule__P174567.info = {"start":9102,"length":111,"line":267,"column":8,"endLine":269,"endColumn":9,"fileName":"pxt_modules/arcade-character-animations/main.ts","functionName":"matchesRule","argumentNames":["this","rule"]} -function scene_Scene_init__P169394_mk(s) { +function characterAnimations_CharacterState_matchesRule__P174567_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_init__P169394, depth: s.depth + 1, + parent: s, fn: characterAnimations_CharacterState_matchesRule__P174567, depth: s.depth + 1, pc: 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_Scene_init_inline__P178971(s) { +function Sprite_isHittingTile__P168948(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8381,47 +9477,61 @@ 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"]; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + r0 = s.arg0.fields["_obstacles"]; + 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["_obstacles"]; + s.tmp_5 = r0; + r0 = pxsim_Array__getAt(s.tmp_5, s.arg1); + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); 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__P168692_mk(s); - r0 = s.caps[0].fields["eventContext"]; - s.tmp_1 = r0; - r0 = s.tmp_1.fields["deltaTimeMillis"]; + r0 = pxsim_Boolean__bang(s.tmp_3); s.tmp_2 = r0; - r0 = (s.tmp_2 / 1000); - s.tmp_0.arg0 = r0; - s.callLocIdx = 1139; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; + 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_6 = r0; + r0 = s.tmp_6; return leave(s, r0) default: oops() } } } -scene_Scene_init_inline__P178971.info = {"start":4722,"length":217,"line":134,"column":72,"endLine":138,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} +Sprite_isHittingTile__P168948.info = {"start":22665,"length":125,"line":748,"column":4,"endLine":750,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"isHittingTile","argumentNames":["this","direction"]} -function scene_Scene_init_inline__P178971_mk(s) { +function Sprite_isHittingTile__P168948_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_init_inline__P178971, depth: s.depth + 1, + parent: s, fn: Sprite_isHittingTile__P168948, depth: s.depth + 1, pc: 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 scene_Scene_init_inline__P178994(s) { +function Sprite_vy__P168887(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8431,41 +9541,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = PhysicsEngine__C169038_v4_2_mk(s); - r0 = s.caps[0].fields["physicsEngine"]; - s.tmp_0.arg0 = r0; - r0 = s.caps[0].fields["eventContext"]; - s.tmp_1 = r0; - r0 = s.tmp_1.fields["deltaTimeMillis"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 / 1000); - s.tmp_0.arg1 = r0; - if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C169038_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) + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C168868_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__P178994.info = {"start":5234,"length":159,"line":143,"column":69,"endLine":146,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} +Sprite_vy__P168887.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__P168887.isGetter = true; -function scene_Scene_init_inline__P178994_mk(s) { +function Sprite_vy__P168887_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_init_inline__P178994, depth: s.depth + 1, + parent: s, fn: Sprite_vy__P168887, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, + arg0: undefined, } } -function scene_Scene_init_inline__P179007(s) { +function Sprite_vx__P168885(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8475,80 +9579,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.dt___179008 = undefined; - s.s___179016 = undefined; - s.unnamed832___U2 = undefined; - s.unnamed833___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___179008 = (r0); - s.tmp_0 = scene_Camera_update__P169325_mk(s); - r0 = s.caps[0].fields["camera"]; - s.tmp_0.arg0 = r0; - s.callLocIdx = 1145; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.s___179016 = (undefined); - r0 = s.caps[0].fields["allSprites"]; - s.unnamed832___U2 = (r0); - s.unnamed833___U3 = (0); - case 1: - s.tmp_0 = r0 = s.unnamed833___U3; - r0 = pxsim_Array__length(s.unnamed832___U2); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 2; continue; } - r0 = pxsim_Array__getAt(s.unnamed832___U2, s.unnamed833___U3); - s.s___179016 = (r0); - s.tmp_2 = if___update_3_mk(s); - s.tmp_2.arg0 = s.s___179016; - r0 = s.caps[0].fields["camera"]; - s.tmp_2.arg1 = r0; - s.tmp_2.arg2 = s.dt___179008; - if (!s.tmp_2.arg0.vtable.iface) { - setupLambda(s.tmp_2, pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "__update"), 3); - s.callLocIdx = 1146; 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 = 1146; s.pc = 4; return s.tmp_2; } - else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 1146; s.pc = 4; return s.tmp_2;; } - else { s.callLocIdx = 1146; 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.unnamed833___U3 + 1); - s.unnamed833___U3 = (r0); - { step = 1; continue; } - case 2: - s.unnamed832___U2 = (undefined); - r0 = undefined; - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C168868_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__P179007.info = {"start":5582,"length":214,"line":152,"column":79,"endLine":158,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} +Sprite_vx__P168885.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__P168885.isGetter = true; -function scene_Scene_init_inline__P179007_mk(s) { +function Sprite_vx__P168885_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_init_inline__P179007, depth: s.depth + 1, + parent: s, fn: Sprite_vx__P168885, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - dt___179008: undefined, - s___179016: undefined, - unnamed832___U2: undefined, - unnamed833___U3: undefined, + arg0: undefined, } } -function scene_Scene_init_inline__P179028(s) { +function game_onUpdateInterval__P169551(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8558,30 +9617,74 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = scene_Scene_render__P169399_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.callLocIdx = 1148; s.pc = 1; return s.tmp_0; + s.timer___177285 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = pxsim_numops_toBoolDecr(s.arg1); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: + r0 = (s.arg0 < 0); + case 2: + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 3; continue; } + { step = 5; continue; } + case 3: + case 4: + r0 = pxsim_pxtrt.mklocRef(); + s.timer___177285 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.timer___177285, 0); + r0 = pxsim_pxtcore_mkAction(3, game_onUpdateInterval_inline__P177289); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.timer___177285); + 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__P166930_mk(s); + s.tmp_2 = game_eventContext__P169529_mk(s); + s.callLocIdx = 1385; 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 = 1389; s.pc = 6; return s.tmp_1; + case 6: r0 = s.retval; + case 5: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_Scene_init_inline__P179028.info = {"start":5937,"length":109,"line":163,"column":76,"endLine":166,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} +game_onUpdateInterval__P169551.info = {"start":813,"length":401,"line":26,"column":4,"endLine":36,"endColumn":5,"fileName":"pxt_modules/game/gameutil.ts","functionName":"onUpdateInterval","argumentNames":["period","a"]} -function scene_Scene_init_inline__P179028_mk(s) { +function game_onUpdateInterval__P169551_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_init_inline__P179028, depth: s.depth + 1, + parent: s, fn: game_onUpdateInterval__P169551, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + timer___177285: undefined, + arg0: undefined, + arg1: undefined, } } -function scene_Scene_init_inline__P179036(s) { +function game_onUpdateInterval_inline__P177289(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8591,108 +9694,55 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = r0 = globals.stats___169495; - 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___166925; - case 2: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 3; continue; } - s.tmp_2 = lambda_2_mk(s); - s.tmp_2.argL = globals.control_EventContext_onStats___166925; - if ((globals.control_EventContext_lastStats___166924) && (globals.control_EventContext_lastStats___166924).vtable) { - setupResume(s, 8); - pxsim_String__stringConv(globals.control_EventContext_lastStats___166924); - checkResumeConsumed(); - return; - } else { s.retval = (globals.control_EventContext_lastStats___166924) + ""; } - case 8: + s.time___177290 = undefined; + s.tmp_1 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1386; s.pc = 3; return s.tmp_1; + case 3: r0 = s.retval; + s.tmp_0 = r0; + r0 = s.tmp_0.fields["_millis"]; + s.time___177290 = (r0); + r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); + s.tmp_1 = r0; + r0 = (s.tmp_1 <= s.time___177290); + 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___177290 + s.caps[1]); s.tmp_3 = r0; - r0 = s.caps[0].fields["allSprites"]; - s.tmp_8 = r0; - r0 = pxsim_Array__length(s.tmp_8); - s.tmp_7 = r0; - if ((s.tmp_7) && (s.tmp_7).vtable) { - setupResume(s, 9); - pxsim_String__stringConv(s.tmp_7); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_7) + ""; } - case 9: - r0 = s.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 = 1150; s.pc = 7; return s.tmp_2; - case 7: - r0 = s.retval; - case 3: + 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 = 1388; s.pc = 4; return s.tmp_0; case 4: - r0 = pxsim_numops_toBoolDecr(globals.debug___169494); - if (!r0) { step = 5; continue; } - s.tmp_0 = PhysicsEngine__C169038_v3_1_mk(s); - r0 = s.caps[0].fields["physicsEngine"]; - s.tmp_0.arg0 = r0; - if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C169038_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__P169654_mk(s); - s.callLocIdx = 1151; s.pc = 12; return s.tmp_0; - case 12: - r0 = s.retval; - s.tmp_0 = power_checkDeepSleep__P168457_mk(s); - s.callLocIdx = 1152; s.pc = 13; return s.tmp_0; - case 13: r0 = s.retval; + case 1: + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_Scene_init_inline__P179036.info = {"start":6163,"length":504,"line":168,"column":80,"endLine":180,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} +game_onUpdateInterval_inline__P177289.info = {"start":1027,"length":179,"line":29,"column":81,"endLine":35,"endColumn":9,"fileName":"pxt_modules/game/gameutil.ts","functionName":"inline","argumentNames":[]} -function scene_Scene_init_inline__P179036_mk(s) { +function game_onUpdateInterval_inline__P177289_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_init_inline__P179036, depth: s.depth + 1, + parent: s, fn: game_onUpdateInterval_inline__P177289, depth: s.depth + 1, pc: 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, + time___177290: undefined, } } -function scene_Scene_init_inline__P179067(s) { +function scene_Scene_millis__P169396(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8706,25 +9756,19 @@ 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 = 1157; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; + r0 = s.arg0; + if (!checkSubtype(r0, scene_Scene__C169370_VT)) failedCast(r0); + r0 = s.arg0.fields["_millis"]; return leave(s, r0) default: oops() } } } -scene_Scene_init_inline__P179067.info = {"start":6980,"length":12,"line":186,"column":39,"endLine":186,"endColumn":51,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":["f"]} +scene_Scene_millis__P169396.info = {"start":7147,"length":61,"line":196,"column":8,"endLine":198,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"millis","argumentNames":["this"]} -function scene_Scene_init_inline__P179067_mk(s) { +function scene_Scene_millis__P169396_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_init_inline__P179067, depth: s.depth + 1, + parent: s, fn: scene_Scene_millis__P169396, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, } } @@ -8732,7 +9776,7 @@ function scene_Scene_init_inline__P179067_mk(s) { -function multiplayer_initPlayerConnectionListeners__P169916(s) { +function game_runtime__P169552(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8742,43 +9786,31 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.p___179070 = undefined; - s.p___179070 = (1); + s.tmp_1 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1390; s.pc = 1; return s.tmp_1; case 1: - r0 = (s.p___179070 <= 4); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.tmp_1 = multiplayer_registerPlayerConnectionListeners__P172913_mk(s); - s.tmp_1.arg0 = s.p___179070; - s.callLocIdx = 1787; s.pc = 3; return s.tmp_1; - case 3: r0 = s.retval; - r0 = (s.p___179070 + 1); - s.p___179070 = (r0); - { step = 1; continue; } - case 2: - r0 = undefined; + s.tmp_0 = r0; + r0 = s.tmp_0.fields["_millis"]; return leave(s, r0) default: oops() } } } -multiplayer_initPlayerConnectionListeners__P169916.info = {"start":1324,"length":154,"line":39,"column":4,"endLine":43,"endColumn":5,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"initPlayerConnectionListeners","argumentNames":[]} +game_runtime__P169552.info = {"start":1426,"length":81,"line":44,"column":4,"endLine":46,"endColumn":5,"fileName":"pxt_modules/game/gameutil.ts","functionName":"runtime","argumentNames":[]} -function multiplayer_initPlayerConnectionListeners__P169916_mk(s) { +function game_runtime__P169552_mk(s) { checkStack(s.depth); return { - parent: s, fn: multiplayer_initPlayerConnectionListeners__P169916, depth: s.depth + 1, + parent: s, fn: game_runtime__P169552, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - p___179070: undefined, } } -function multiplayer_registerPlayerConnectionListeners__P172913(s) { +function game_onUpdate__P169550(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8792,41 +9824,42 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = pxsim_pxtcore_mkAction(1, multiplayer_registerPlayerConnectionListeners_inline__P179082); + 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.arg0); - s.tmp_1 = control_onEvent__P166918_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 = 1789; s.pc = 1; return s.tmp_1; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + { step = 3; continue; } case 1: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, multiplayer_registerPlayerConnectionListeners_inline__P179088); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = control_onEvent__P166918_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 = 1791; s.pc = 2; return s.tmp_1; case 2: + s.tmp_2 = control_EventContext_registerFrameHandler__P166930_mk(s); + s.tmp_3 = game_eventContext__P169529_mk(s); + s.callLocIdx = 1383; 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 = 1384; s.pc = 4; return s.tmp_2; + case 4: r0 = s.retval; + case 3: r0 = undefined; return leave(s, r0) default: oops() } } } -multiplayer_registerPlayerConnectionListeners__P172913.info = {"start":1484,"length":415,"line":45,"column":4,"endLine":56,"endColumn":5,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"registerPlayerConnectionListeners","argumentNames":["playerNumber"]} +game_onUpdate__P169550.info = {"start":327,"length":153,"line":13,"column":4,"endLine":16,"endColumn":5,"fileName":"pxt_modules/game/gameutil.ts","functionName":"onUpdate","argumentNames":["a"]} -function multiplayer_registerPlayerConnectionListeners__P172913_mk(s) { +function game_onUpdate__P169550_mk(s) { checkStack(s.depth); return { - parent: s, fn: multiplayer_registerPlayerConnectionListeners__P172913, depth: s.depth + 1, + parent: s, fn: game_onUpdate__P169550, depth: s.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, } } @@ -8834,7 +9867,7 @@ function multiplayer_registerPlayerConnectionListeners__P172913_mk(s) { -function multiplayer_registerPlayerConnectionListeners_inline__P179082(s) { +function Render_setViewAngleInDegree__P171824(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8844,31 +9877,40 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = multiplayer_receiveConnectionChangedEvent__P172914_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_0.arg1 = true; - s.callLocIdx = 1788; s.pc = 1; return s.tmp_0; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + s.tmp_0 = Render_RayCastingRender_viewAngle__P171770_mk(s); + s.tmp_0.arg0 = globals.raycastingRender___171795; + r0 = (s.arg0 * 3.141592653589793); + s.tmp_1 = r0; + r0 = (s.tmp_1 / 180); + s.tmp_0.arg1 = r0; + s.callLocIdx = 2078; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -multiplayer_registerPlayerConnectionListeners_inline__P179082.info = {"start":1656,"length":55,"line":49,"column":12,"endLine":49,"endColumn":67,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"inline","argumentNames":[]} +Render_setViewAngleInDegree__P171824.info = {"start":8045,"length":118,"line":230,"column":4,"endLine":232,"endColumn":5,"fileName":"pxt_modules/pxt-raycasting/render_blocks.ts","functionName":"setViewAngleInDegree","argumentNames":["angle"]} -function multiplayer_registerPlayerConnectionListeners_inline__P179082_mk(s) { +function Render_setViewAngleInDegree__P171824_mk(s) { checkStack(s.depth); return { - parent: s, fn: multiplayer_registerPlayerConnectionListeners_inline__P179082, depth: s.depth + 1, + parent: s, fn: Render_setViewAngleInDegree__P171824, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + arg0: undefined, } } -function multiplayer_registerPlayerConnectionListeners_inline__P179088(s) { +function Render_RayCastingRender_viewAngle__P171770(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8878,31 +9920,45 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = multiplayer_receiveConnectionChangedEvent__P172914_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_0.arg1 = false; - s.callLocIdx = 1790; s.pc = 1; return s.tmp_0; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); + r0 = (s.arg0).fields["_angle"] = (s.arg1); + s.tmp_0 = Render_RayCastingRender_setVectors__P174847_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1943; s.pc = 1; return s.tmp_0; case 1: + r0 = s.retval; + s.tmp_0 = Render_RayCastingRender_updateSelfImage__P171788_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1944; s.pc = 2; return s.tmp_0; + case 2: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -multiplayer_registerPlayerConnectionListeners_inline__P179088.info = {"start":1826,"length":56,"line":54,"column":12,"endLine":54,"endColumn":68,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"inline","argumentNames":[]} +Render_RayCastingRender_viewAngle__P171770.info = {"start":4629,"length":137,"line":149,"column":8,"endLine":153,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"viewAngle","argumentNames":["this","angle"]} -function multiplayer_registerPlayerConnectionListeners_inline__P179088_mk(s) { +function Render_RayCastingRender_viewAngle__P171770_mk(s) { checkStack(s.depth); return { - parent: s, fn: multiplayer_registerPlayerConnectionListeners_inline__P179088, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_viewAngle__P171770, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + arg0: undefined, + arg1: undefined, } } -function multiplayer_receiveConnectionChangedEvent__P172914(s) { +function Render_RayCastingRender_setVectors__P174847(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8912,67 +9968,85 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.c___179093 = undefined; + s.sin___177440 = undefined; + s.cos___177445 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } + r0 = s.arg0; + if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); + r0 = s.arg0.fields["_angle"]; + s.tmp_0 = r0; + r0 = pxsim.Math_.sin(s.tmp_0); + s.sin___177440 = (r0); + r0 = s.arg0.fields["_angle"]; + s.tmp_0 = r0; + r0 = pxsim.Math_.cos(s.tmp_0); + s.cos___177445 = (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(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___179093 = (globals.player1___168650); - { step = 5; continue; } - case 2: - s.c___179093 = (globals.player2___168647); - { step = 5; continue; } - case 3: - s.c___179093 = (globals.player3___168648); - { step = 5; continue; } - case 4: - s.c___179093 = (globals.player4___168649); - case 5: - r0 = pxsim_numops_toBoolDecr(s.c___179093); - if (!r0) { step = 6; continue; } - s.tmp_0 = controller_Controller_connected__P168683_mk(s); - s.tmp_0.arg0 = s.c___179093; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 1792; s.pc = 8; return s.tmp_0; - case 8: - r0 = s.retval; - case 6: - case 7: + r0 = (s.cos___177445 * 256); + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["dirXFpx"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = (s.sin___177440 * 256); + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["dirYFpx"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["_fov"]; + s.tmp_3 = r0; + r0 = (s.sin___177440 * s.tmp_3); + 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["planeX"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + s.tmp_3 = r0 = s.cos___177445; + r0 = s.arg0.fields["_fov"]; + s.tmp_5 = r0; + r0 = (0 - s.tmp_5); + s.tmp_4 = r0; + r0 = (s.tmp_3 * s.tmp_4); + 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["planeY"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -multiplayer_receiveConnectionChangedEvent__P172914.info = {"start":1905,"length":552,"line":58,"column":4,"endLine":76,"endColumn":5,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"receiveConnectionChangedEvent","argumentNames":["playerNumber","connected"]} +Render_RayCastingRender_setVectors__P174847.info = {"start":15316,"length":299,"line":410,"column":8,"endLine":417,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"setVectors","argumentNames":["this"]} -function multiplayer_receiveConnectionChangedEvent__P172914_mk(s) { +function Render_RayCastingRender_setVectors__P174847_mk(s) { checkStack(s.depth); return { - parent: s, fn: multiplayer_receiveConnectionChangedEvent__P172914, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_setVectors__P174847, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - c___179093: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + sin___177440: undefined, + cos___177445: undefined, arg0: undefined, - arg1: undefined, } } -function controller_Controller_connected__P168683(s) { +function Render_tofpx__P171736(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8984,57 +10058,30 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, controller_Controller__C168661_VT)) failedCast(r0); - r0 = s.arg0.fields["_connected"]; - s.tmp_1 = r0; - r0 = (s.arg1 != s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = (s.arg0).fields["_connected"] = (s.arg1); - r0 = s.arg0.fields["_connected"]; + r0 = (s.arg0 * 256); 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; + r0 = (s.tmp_0 | 0); return leave(s, r0) default: oops() } } } -controller_Controller_connected__P168683.info = {"start":7796,"length":261,"line":254,"column":8,"endLine":259,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"connected","argumentNames":["this","value"]} +Render_tofpx__P171736.info = {"start":402,"length":63,"line":17,"column":4,"endLine":17,"endColumn":67,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"tofpx","argumentNames":["n"]} -function controller_Controller_connected__P168683_mk(s) { +function Render_tofpx__P171736_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller_connected__P168683, depth: s.depth + 1, + parent: s, fn: Render_tofpx__P171736, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, arg0: undefined, - arg1: undefined, } } -function controller__player1__P168655(s) { +function Render_RayCastingRender_updateSelfImage__P171788(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9044,55 +10091,71 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals._players___172173); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + s.img___177331 = undefined; + s.arrowLength___177338 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); + r0 = s.arg0.fields["sprSelf"]; 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__getAt(globals._players___172173, 0); + r0 = s.tmp_0.fields["_image"]; + s.img___177331 = (r0); + r0 = pxsim_ImageMethods.fill(s.img___177331, 6); + r0 = pxsim_ImageMethods.width(s.img___177331); + s.tmp_0 = r0; + r0 = (s.tmp_0 / 2); + s.arrowLength___177338 = (r0); + s.tmp_0 = helpers_imageDrawLine__P168485_mk(s); + s.tmp_0.arg0 = s.img___177331; + s.tmp_0.arg1 = s.arrowLength___177338; + s.tmp_0.arg2 = s.arrowLength___177338; + s.tmp_1 = r0 = s.arrowLength___177338; + r0 = s.arg0.fields["dirXFpx"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 / 256); s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); + r0 = (s.tmp_3 * s.arrowLength___177338); s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); - case 2: - // jmp value (already in r0) - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - if (!r0) { step = 3; continue; } - r0 = pxsim_pxtcore_mkClassInstance(controller_Controller__C168661_VT); - s.tmp_5 = r0; - r0 = pxsim_Array__mk(); + r0 = (s.tmp_1 + s.tmp_2); + s.tmp_0.arg3 = r0; + s.tmp_5 = r0 = s.arrowLength___177338; + r0 = s.arg0.fields["dirYFpx"]; + s.tmp_8 = r0; + r0 = (s.tmp_8 / 256); + s.tmp_7 = r0; + r0 = (s.tmp_7 * s.arrowLength___177338); s.tmp_6 = r0; - r0 = pxsim_Array__push(s.tmp_6, globals.left___168642); - r0 = pxsim_Array__push(s.tmp_6, globals.up___168643); - r0 = pxsim_Array__push(s.tmp_6, globals.right___168644); - r0 = pxsim_Array__push(s.tmp_6, globals.down___168645); - r0 = pxsim_Array__push(s.tmp_6, globals.A___168640); - r0 = pxsim_Array__push(s.tmp_6, globals.B___168641); - r0 = pxsim_Array__push(s.tmp_6, globals.menu___168646); - s.tmp_7 = controller_Controller_constructor__P168665_mk(s); - s.tmp_7.arg0 = s.tmp_5; - s.tmp_7.arg1 = 1; - s.tmp_7.arg2 = s.tmp_6; - s.callLocIdx = 223; s.pc = 5; return s.tmp_7; - case 5: + r0 = (s.tmp_5 + s.tmp_6); + s.tmp_0.arg4 = r0; + s.tmp_0.arg5 = 2; + s.callLocIdx = 2022; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - case 3: - case 4: - r0 = pxsim_Array__getAt(globals._players___172173, 0); + s.tmp_0 = helpers_imageFillRect__P168483_mk(s); + s.tmp_0.arg0 = s.img___177331; + r0 = (s.arrowLength___177338 - 1); + s.tmp_0.arg1 = r0; + r0 = (s.arrowLength___177338 - 1); + s.tmp_0.arg2 = r0; + s.tmp_0.arg3 = 2; + s.tmp_0.arg4 = 2; + s.tmp_0.arg5 = 2; + s.callLocIdx = 2023; s.pc = 2; return s.tmp_0; + case 2: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -controller__player1__P168655.info = {"start":1381,"length":258,"line":47,"column":4,"endLine":51,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"_player1","argumentNames":[]} +Render_RayCastingRender_updateSelfImage__P171788.info = {"start":15668,"length":349,"line":420,"column":8,"endLine":426,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"updateSelfImage","argumentNames":["this"]} -function controller__player1__P168655_mk(s) { +function Render_RayCastingRender_updateSelfImage__P171788_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller__player1__P168655, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_updateSelfImage__P171788, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -9102,13 +10165,93 @@ function controller__player1__P168655_mk(s) { tmp_5: undefined, tmp_6: undefined, tmp_7: undefined, + tmp_8: undefined, + img___177331: undefined, + arrowLength___177338: undefined, + arg0: undefined, } } -function controller_Controller_constructor__P168665(s) { +function Render_RayCastingRender_dirY__P171762(s) { +let r0 = s.r0, 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, Render_RayCastingRender__C171738_VT)) failedCast(r0); + r0 = s.arg0.fields["dirYFpx"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) + default: oops() +} } } +Render_RayCastingRender_dirY__P171762.info = {"start":3556,"length":74,"line":113,"column":8,"endLine":115,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"dirY","argumentNames":["this"]} +Render_RayCastingRender_dirY__P171762.isGetter = true; + +function Render_RayCastingRender_dirY__P171762_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Render_RayCastingRender_dirY__P171762, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function Render_RayCastingRender_dirX__P171761(s) { +let r0 = s.r0, 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, Render_RayCastingRender__C171738_VT)) failedCast(r0); + r0 = s.arg0.fields["dirXFpx"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) + default: oops() +} } } +Render_RayCastingRender_dirX__P171761.info = {"start":3472,"length":74,"line":109,"column":8,"endLine":111,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"dirX","argumentNames":["this"]} +Render_RayCastingRender_dirX__P171761.isGetter = true; + +function Render_RayCastingRender_dirX__P171761_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Render_RayCastingRender_dirX__P171761, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function helpers_imageDrawLine__P168485(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9118,120 +10261,60 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.leftId___179149 = undefined; - s.i___179157 = undefined; - s.i___179175 = 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, controller_Controller__C168661_VT)) failedCast(r0); s.tmp_0 = r0 = s.arg0; - r0 = pxsim.control.allocateNotifyEvent(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_id"] = (s.tmp_1); - r0 = (s.arg0).fields["_connected"] = (false); - r0 = (s.arg0).fields["playerIndex"] = (s.arg1); - r0 = (s.arg0).fields["analog"] = (false); - r0 = pxsim_numops_toBoolDecr(s.arg2); - if (!r0) { step = 1; continue; } - r0 = (s.arg0).fields["buttons"] = (s.arg2); - { step = 4; continue; } + s.tmp_2 = helpers_pack__P172094_mk(s); + s.tmp_2.arg0 = s.arg1; + s.tmp_2.arg1 = s.arg2; + s.callLocIdx = 151; s.pc = 1; return s.tmp_2; case 1: - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["buttons"] = (s.tmp_1); - r0 = s.arg0.fields["playerIndex"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 - 1); + r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_1 * 7); - s.tmp_0 = r0; - r0 = (1 + s.tmp_0); - s.leftId___179149 = (r0); - s.i___179157 = (0); + s.tmp_4 = helpers_pack__P172094_mk(s); + s.tmp_4.arg0 = s.arg3; + s.tmp_4.arg1 = s.arg4; + s.callLocIdx = 152; s.pc = 2; return s.tmp_4; case 2: - r0 = (s.i___179157 < 7); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C168716_VT); - s.tmp_1 = r0; - s.tmp_2 = controller_Button_constructor__P168722_mk(s); - s.tmp_2.arg0 = s.tmp_1; - r0 = (s.leftId___179149 + s.i___179157); - s.tmp_2.arg1 = r0; - s.tmp_2.arg2 = -1; - s.callLocIdx = 229; s.pc = 7; return s.tmp_2; - case 7: r0 = s.retval; - r0 = s.arg0.fields["buttons"]; - s.tmp_3 = r0; - r0 = pxsim_Array__push(s.tmp_3, s.tmp_1); - r0 = (s.i___179157 + 1); - s.i___179157 = (r0); - { step = 2; continue; } - case 3: - case 4: - s.i___179175 = (0); - case 5: - s.tmp_1 = r0 = s.i___179175; - r0 = s.arg0.fields["buttons"]; s.tmp_3 = r0; - r0 = pxsim_Array__length(s.tmp_3); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 6; continue; } - r0 = s.arg0.fields["buttons"]; - s.tmp_5 = r0; - r0 = pxsim_Array__getAt(s.tmp_5, s.i___179175); - s.tmp_4 = r0; - r0 = (s.tmp_4).fields["_owner"] = (s.arg0); - r0 = (s.i___179175 + 1); - s.i___179175 = (r0); - { step = 5; continue; } - case 6: - s.tmp_0 = controller_addController__P172237_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 230; s.pc = 8; return s.tmp_0; - case 8: - r0 = s.retval; + r0 = pxsim_ImageMethods._drawLine(s.tmp_0, s.tmp_1, s.tmp_3, s.arg5); r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Controller_constructor__P168665.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"]} +helpers_imageDrawLine__P168485.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 controller_Controller_constructor__P168665_mk(s) { +function helpers_imageDrawLine__P168485_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller_constructor__P168665, depth: s.depth + 1, + parent: s, fn: helpers_imageDrawLine__P168485, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, - tmp_5: undefined, - leftId___179149: undefined, - i___179157: undefined, - i___179175: undefined, arg0: undefined, arg1: undefined, arg2: undefined, + arg3: undefined, + arg4: undefined, + arg5: undefined, } } -function controller_addController__P172237(s) { +function helpers_pack__P172094(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9243,46 +10326,57 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(globals._players___172173); + s.tmp_2 = Math_clamp__P166654_mk(s); + s.tmp_2.arg0 = -30000; + s.tmp_2.arg1 = 30000; + r0 = (s.arg0 | 0); + s.tmp_2.arg2 = r0; + s.callLocIdx = 144; s.pc = 1; return s.tmp_2; + case 1: + r0 = s.retval; s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = (s.tmp_1 & 65535); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = pxsim_Array__mk(); - globals._players___172173 = (r0); - case 1: + s.tmp_5 = Math_clamp__P166654_mk(s); + s.tmp_5.arg0 = -30000; + s.tmp_5.arg1 = 30000; + r0 = (s.arg1 | 0); + s.tmp_5.arg2 = r0; + s.callLocIdx = 145; s.pc = 2; return s.tmp_5; case 2: - s.tmp_0 = r0 = globals._players___172173; - r0 = s.arg0.fields["playerIndex"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 - 1); - s.tmp_1 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_1, s.arg0); - r0 = undefined; + r0 = s.retval; + 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() } } } -controller_addController__P172237.info = {"start":1218,"length":157,"line":40,"column":4,"endLine":45,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"addController","argumentNames":["ctrl"]} +helpers_pack__P172094.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 controller_addController__P172237_mk(s) { +function helpers_pack__P172094_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_addController__P172237, depth: s.depth + 1, + parent: s, fn: helpers_pack__P172094, depth: s.depth + 1, pc: 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 multiplayer_initServer__P169915(s) { +function Math_clamp__P166654(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9292,47 +10386,46 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim.multiplayer.getOrigin(); - s.tmp_1 = r0; - r0 = (s.tmp_1 === "server"); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_2 = control_EventContext_registerFrameHandler__P166930_mk(s); - s.tmp_3 = game_eventContext__P169529_mk(s); - s.callLocIdx = 1785; 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__P179235; - s.callLocIdx = 1786; s.pc = 3; return s.tmp_2; - case 3: + 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__P166658_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_1 = Math_max__P166657_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_1.arg1 = s.arg2; + s.callLocIdx = 26; s.pc = 2; return s.tmp_1; + case 2: r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 27; s.pc = 1; return s.tmp_0; case 1: - case 2: - r0 = undefined; + r0 = s.retval; return leave(s, r0) default: oops() } } } -multiplayer_initServer__P169915.info = {"start":1011,"length":307,"line":29,"column":4,"endLine":37,"endColumn":5,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"initServer","argumentNames":[]} +Math_clamp__P166654.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 multiplayer_initServer__P169915_mk(s) { +function Math_clamp__P166654_mk(s) { checkStack(s.depth); return { - parent: s, fn: multiplayer_initServer__P169915, depth: s.depth + 1, + parent: s, fn: Math_clamp__P166654, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function multiplayer_initServer_inline__P179235(s) { +function Math_min__P166658(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9342,35 +10435,41 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim.multiplayer.getOrigin(); - s.tmp_1 = r0; - r0 = (s.tmp_1 === "server"); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.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 = pxsim.multiplayer.postImage(globals.screen___168559); + r0 = s.arg0; + { step = 3; continue; } case 1: case 2: - r0 = undefined; + r0 = s.arg1; + case 3: return leave(s, r0) default: oops() } } } -multiplayer_initServer_inline__P179235.info = {"start":1175,"length":126,"line":31,"column":93,"endLine":35,"endColumn":13,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"inline","argumentNames":[]} +Math_min__P166658.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 multiplayer_initServer_inline__P179235_mk(s) { +function Math_min__P166658_mk(s) { checkStack(s.depth); return { - parent: s, fn: multiplayer_initServer_inline__P179235, depth: s.depth + 1, + parent: s, fn: Math_min__P166658, 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_consoleOverlay_draw__P169654(s) { +function helpers_imageFillRect__P168483(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9380,216 +10479,60 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.height___179288 = undefined; - s.top___179293 = undefined; - s.i___179299 = undefined; - s.t___179312 = undefined; - s.tOff___179319 = undefined; - s.tab___179321 = undefined; - s.unnamed836___U6 = undefined; - s.unnamed837___U7 = undefined; - s.padding___179323 = undefined; - r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___172756); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + if (s.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__P172094_mk(s); + s.tmp_2.arg0 = s.arg1; + s.tmp_2.arg1 = s.arg2; + s.callLocIdx = 149; s.pc = 1; return s.tmp_2; case 1: - r0 = pxsim_numops_toBoolDecr(globals.instance___172710); - 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); + r0 = s.retval; + s.tmp_1 = r0; + s.tmp_4 = helpers_pack__P172094_mk(s); + s.tmp_4.arg0 = s.arg3; + s.tmp_4.arg1 = s.arg4; + s.callLocIdx = 150; s.pc = 2; return s.tmp_4; 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___172764; - 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 = 1554; s.pc = 14; return s.tmp_7; } - } - case 14: r0 = s.retval; - s.tmp_6 = r0; - r0 = (s.tmp_6 + 2); - s.height___179288 = (r0); - r0 = pxsim_numops_toBoolDecr(globals.stats___169495); - if (!r0) { step = 5; continue; } - r0 = s.height___179288; - { 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___179293 = (r0); - s.i___179299 = (0); - case 7: - s.tmp_1 = r0 = s.i___179299; - r0 = pxsim_Array__length(globals.consoleStrings___172756); - 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___172756, s.i___179299); - 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__P166649_mk(s); - r0 = pxsim_Array__getAt(globals.consoleStrings___172756, s.i___179299); - s.tmp_6.arg0 = r0; - s.tmp_6.arg1 = "\t"; - s.tmp_6.arg2 = undefined; - s.callLocIdx = 1555; s.pc = 15; return s.tmp_6; - case 15: - r0 = s.retval; - s.t___179312 = (r0); - s.tOff___179319 = (0); - s.tab___179321 = (undefined); - s.unnamed836___U6 = (s.t___179312); - s.unnamed837___U7 = (0); - case 8: - s.tmp_0 = r0 = s.unnamed837___U7; - r0 = pxsim_Array__length(s.unnamed836___U6); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 9; continue; } - r0 = pxsim_Array__getAt(s.unnamed836___U6, s.unnamed837___U7); - s.tab___179321 = (r0); - s.tmp_2 = r0 = globals.tabSize___172758; - s.tmp_5 = r0 = s.tOff___179319; - r0 = pxsim_String_.length(s.tab___179321); - s.tmp_6 = r0; - r0 = (s.tmp_5 + s.tmp_6); - s.tmp_4 = r0; - r0 = (s.tmp_4 % globals.tabSize___172758); - s.tmp_3 = r0; - r0 = (s.tmp_2 - s.tmp_3); - s.padding___179323 = (r0); - s.tmp_0 = helpers_imagePrint__P168517_mk(s); - s.tmp_0.arg0 = globals.screen___168559; - s.tmp_0.arg1 = s.tab___179321; - s.tmp_2 = r0 = s.tOff___179319; - s.tmp_4 = if_charWidth_1_mk(s); - s.tmp_4.arg0 = globals.consoleFont___172764; - 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 = 1556; 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___179293; - r0 = (s.i___179299 * s.height___179288); - s.tmp_6 = r0; - r0 = (s.tmp_5 + s.tmp_6); - s.tmp_0.arg3 = r0; - s.tmp_0.arg4 = globals.consoleColor___172755; - s.tmp_0.arg5 = globals.consoleFont___172764; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 1557; s.pc = 16; return s.tmp_0; - case 16: - r0 = s.retval; - s.tmp_0 = r0 = s.tOff___179319; - r0 = pxsim_String_.length(s.tab___179321); - s.tmp_2 = r0; - r0 = (s.tmp_2 + s.padding___179323); - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.tOff___179319 = (r0); - r0 = (s.unnamed837___U7 + 1); - s.unnamed837___U7 = (r0); - { step = 8; continue; } - case 9: - s.unnamed836___U6 = (undefined); - { step = 11; continue; } - case 10: - s.tmp_0 = helpers_imagePrint__P168517_mk(s); - s.tmp_0.arg0 = globals.screen___168559; - r0 = pxsim_Array__getAt(globals.consoleStrings___172756, s.i___179299); - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = 4; - s.tmp_1 = r0 = s.top___179293; - r0 = (s.i___179299 * s.height___179288); - s.tmp_2 = r0; - r0 = (s.tmp_1 + s.tmp_2); - s.tmp_0.arg3 = r0; - s.tmp_0.arg4 = globals.consoleColor___172755; - s.tmp_0.arg5 = globals.consoleFont___172764; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 1558; s.pc = 18; return s.tmp_0; - case 18: - r0 = s.retval; - case 11: - r0 = (s.i___179299 + 1); - s.i___179299 = (r0); - { step = 7; continue; } - case 12: - case 13: + r0 = pxsim_ImageMethods._fillRect(s.tmp_0, s.tmp_1, s.tmp_3, s.arg5); r0 = undefined; return leave(s, r0) default: oops() } } } -game_consoleOverlay_draw__P169654.info = {"start":1364,"length":859,"line":44,"column":4,"endLine":61,"endColumn":5,"fileName":"pxt_modules/game/console.ts","functionName":"draw","argumentNames":[]} +helpers_imageFillRect__P168483.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 game_consoleOverlay_draw__P169654_mk(s) { +function helpers_imageFillRect__P168483_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_consoleOverlay_draw__P169654, depth: s.depth + 1, + parent: s, fn: helpers_imageFillRect__P168483, depth: s.depth + 1, pc: 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___179288: undefined, - top___179293: undefined, - i___179299: undefined, - t___179312: undefined, - tOff___179319: undefined, - tab___179321: undefined, - unnamed836___U6: undefined, - unnamed837___U7: undefined, - padding___179323: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, + arg5: undefined, } } -function scene_systemMenu_isVisible__P169635(s) { +function Render_RayCastingRender_viewAngle__P171769(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9599,33 +10542,83 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.instance___172710); - 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, Render_RayCastingRender__C171738_VT)) failedCast(r0); + r0 = s.arg0.fields["_angle"]; + return leaveAccessor(s, r0) + default: oops() +} } } +Render_RayCastingRender_viewAngle__P171769.info = {"start":4554,"length":66,"line":146,"column":8,"endLine":148,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"viewAngle","argumentNames":["this"]} +Render_RayCastingRender_viewAngle__P171769.isGetter = true; + +function Render_RayCastingRender_viewAngle__P171769_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Render_RayCastingRender_viewAngle__P171769, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function Render_moveWithController__P171833(s) { +let r0 = s.r0, 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 = (globals.raycastingRender___171795).fields["velocity"] = (s.arg0); + r0 = (globals.raycastingRender___171795).fields["velocityAngle"] = (s.arg1); + r0 = (s.arg2 != undefined); s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_1 = r0 = globals.raycastingRender___171795; + r0 = (s.arg2 | 0); + s.tmp_2 = r0; + r0 = (s.tmp_1).fields["cameraSway"] = (s.tmp_2); + case 1: + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_isVisible__P169635.info = {"start":13170,"length":62,"line":395,"column":4,"endLine":397,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"isVisible","argumentNames":[]} +Render_moveWithController__P171833.info = {"start":14881,"length":262,"line":397,"column":4,"endLine":402,"endColumn":5,"fileName":"pxt_modules/pxt-raycasting/render_blocks.ts","functionName":"moveWithController","argumentNames":["v","va","cameraSway"]} -function scene_systemMenu_isVisible__P169635_mk(s) { +function Render_moveWithController__P171833_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_isVisible__P169635, depth: s.depth + 1, + parent: s, fn: Render_moveWithController__P171833, 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_imagePrint__P168517(s) { +function Render_getRenderSpriteVariable__P171816(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9635,506 +10628,489 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.x0___179395 = undefined; - s.cp___179397 = undefined; - s.mult___179398 = undefined; - s.dataW___179403 = undefined; - s.dataH___179409 = undefined; - s.byteHeight___179415 = undefined; - s.charSize___179421 = undefined; - s.dataSize___179425 = undefined; - s.fontdata___179429 = undefined; - s.lastchar___179432 = undefined; - s.imgBuf___179439 = undefined; - s.xOffset___179463 = undefined; - s.yOffset___179464 = undefined; - s.ch___179479 = undefined; - s.l___179498 = undefined; - s.r___179499 = undefined; - s.off___179501 = undefined; - s.guess___179502 = undefined; - s.m___179521 = undefined; - s.v___179530 = undefined; - s.i___179586 = undefined; - s.j___179591 = undefined; - s.mask___179592 = undefined; - s.c___179593 = undefined; - s.n___179610 = undefined; + r0 = globals.raycastingRender___171795.fields["sprSelf"]; + return leave(s, r0) + default: oops() +} } } +Render_getRenderSpriteVariable__P171816.info = {"start":4005,"length":97,"line":102,"column":4,"endLine":104,"endColumn":5,"fileName":"pxt_modules/pxt-raycasting/render_blocks.ts","functionName":"getRenderSpriteVariable","argumentNames":[]} + +function Render_getRenderSpriteVariable__P171816_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Render_getRenderSpriteVariable__P171816, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, +} } + + + + + +function game_showLongText__P169487(s) { +let r0 = s.r0, 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.width___177600 = undefined; + s.height___177601 = undefined; + s.top___177602 = undefined; + s.left___177603 = undefined; + s.dialog___177714 = undefined; + s.s___177722 = undefined; + s.pressed___177738 = undefined; + s.done___177739 = undefined; + s.upPressed___177740 = 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__P168504_mk(s); - s.tmp_2.arg0 = s.arg1; - s.callLocIdx = 167; s.pc = 39; return s.tmp_2; - case 39: + s.tmp_0 = console_inspect__P166909_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 20; + s.callLocIdx = 1292; s.pc = 8; return s.tmp_0; + case 8: r0 = s.retval; - s.arg5 = (r0); + s.arg0 = (r0); + s.tmp_0 = controller__setUserEventsEnabled__P168733_mk(s); + s.tmp_0.arg0 = false; + s.callLocIdx = 1293; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; + s.tmp_0 = game_pushScene__P169530_mk(s); + s.callLocIdx = 1294; s.pc = 10; return s.tmp_0; + case 10: + r0 = s.retval; + s.tmp_1 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1295; s.pc = 11; return s.tmp_1; + case 11: + r0 = s.retval; + s.tmp_0 = r0; + r0 = s.tmp_0.fields["flags"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 | 2); + s.tmp_2 = r0; + r0 = (s.tmp_0).fields["flags"] = (s.tmp_2); + s.tmp_0 = r0 = s.arg1; + r0 = pxsim_pxtcore.switch_eq(0, s.tmp_0); + if (r0) { step = 1; continue; } + r0 = pxsim_pxtcore.switch_eq(3, s.tmp_0); + if (r0) { step = 2; continue; } + r0 = pxsim_pxtcore.switch_eq(1, s.tmp_0); + if (r0) { step = 3; continue; } + r0 = pxsim_pxtcore.switch_eq(2, s.tmp_0); + if (r0) { step = 4; continue; } + r0 = pxsim_pxtcore.switch_eq(4, 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 1: + r0 = pxsim_ImageMethods.width(globals.screen___168559); + s.tmp_1 = r0; + r0 = (s.tmp_1 - 4); + s.width___177600 = (r0); + r0 = pxsim_ImageMethods.height(globals.screen___168559); + s.tmp_1 = r0; + r0 = pxsim.Math_.idiv(s.tmp_1, 3); + s.tmp_0 = r0; + r0 = (s.tmp_0 + 5); + s.height___177601 = (r0); + r0 = pxsim_ImageMethods.height(globals.screen___168559); + s.tmp_0 = r0; + r0 = (s.tmp_0 - s.height___177601); + s.top___177602 = (r0); + r0 = pxsim_ImageMethods.width(globals.screen___168559); + s.tmp_1 = r0; + r0 = (s.tmp_1 - s.width___177600); + s.tmp_0 = r0; + r0 = (s.tmp_0 >> 1); + s.left___177603 = (r0); + { step = 7; continue; } case 2: - r0 = pxsim_numops_toBoolDecr(s.arg4); + r0 = pxsim_ImageMethods.width(globals.screen___168559); + s.tmp_0 = r0; + r0 = (s.tmp_0 - 4); + s.width___177600 = (r0); + r0 = pxsim_ImageMethods.height(globals.screen___168559); s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = pxsim.Math_.idiv(s.tmp_1, 3); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.arg4 = (1); + r0 = (s.tmp_0 + 5); + s.height___177601 = (r0); + s.top___177602 = (0); + r0 = pxsim_ImageMethods.width(globals.screen___168559); + s.tmp_1 = r0; + r0 = (s.tmp_1 - s.width___177600); + s.tmp_0 = r0; + r0 = (s.tmp_0 >> 1); + s.left___177603 = (r0); + { step = 7; continue; } case 3: - case 4: - s.x0___179395 = (s.arg2); - s.cp___179397 = (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 = 168; s.pc = 40; return s.tmp_1; } - } - case 40: - r0 = s.retval; + r0 = pxsim_ImageMethods.width(globals.screen___168559); + s.tmp_1 = r0; + r0 = pxsim.Math_.idiv(s.tmp_1, 3); 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 = 169; 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___179398 = (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 = 170; s.pc = 42; return s.tmp_1; } - } - case 42: - r0 = s.retval; + r0 = (s.tmp_0 + 5); + s.width___177600 = (r0); + r0 = pxsim_ImageMethods.height(globals.screen___168559); + s.height___177601 = (r0); + s.top___177602 = (0); + s.left___177603 = (0); + { step = 7; continue; } + case 4: + r0 = pxsim_ImageMethods.width(globals.screen___168559); + s.tmp_1 = r0; + r0 = pxsim.Math_.idiv(s.tmp_1, 3); s.tmp_0 = r0; - r0 = pxsim.Math_.idiv(s.tmp_0, s.mult___179398); - s.dataW___179403 = (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 = 171; s.pc = 43; return s.tmp_1; } - } - case 43: - r0 = s.retval; + r0 = (s.tmp_0 + 5); + s.width___177600 = (r0); + r0 = pxsim_ImageMethods.height(globals.screen___168559); + s.height___177601 = (r0); + s.top___177602 = (0); + r0 = pxsim_ImageMethods.width(globals.screen___168559); s.tmp_0 = r0; - r0 = pxsim.Math_.idiv(s.tmp_0, s.mult___179398); - s.dataH___179409 = (r0); - r0 = (s.dataH___179409 + 7); + r0 = (s.tmp_0 - s.width___177600); + s.left___177603 = (r0); + { step = 7; continue; } + case 5: + r0 = pxsim_ImageMethods.width(globals.screen___168559); + s.tmp_1 = r0; + r0 = (s.tmp_1 << 1); s.tmp_0 = r0; - r0 = (s.tmp_0 >> 3); - s.byteHeight___179415 = (r0); - r0 = (s.byteHeight___179415 * s.dataW___179403); - s.charSize___179421 = (r0); - r0 = (2 + s.charSize___179421); - s.dataSize___179425 = (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 = 172; s.pc = 44; return s.tmp_0; } - } - case 44: - r0 = s.retval; - s.fontdata___179429 = (r0); - r0 = pxsim.BufferMethods.length(s.fontdata___179429); + r0 = pxsim.Math_.idiv(s.tmp_0, 3); + s.width___177600 = (r0); + r0 = pxsim_ImageMethods.width(globals.screen___168559); s.tmp_1 = r0; - r0 = pxsim.Math_.idiv(s.tmp_1, s.dataSize___179425); + r0 = (s.tmp_1 << 1); s.tmp_0 = r0; - r0 = (s.tmp_0 - 1); - s.lastchar___179432 = (r0); - r0 = (s.mult___179398 == 1); + r0 = pxsim.Math_.idiv(s.tmp_0, 3); + s.height___177601 = (r0); + r0 = pxsim_ImageMethods.height(globals.screen___168559); + s.tmp_1 = r0; + r0 = (s.tmp_1 - s.height___177601); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - r0 = (8 + s.charSize___179421); + r0 = (s.tmp_0 >> 1); + s.top___177602 = (r0); + r0 = pxsim_ImageMethods.width(globals.screen___168559); s.tmp_1 = r0; - r0 = pxsim.control.createBuffer(s.tmp_1); - s.imgBuf___179439 = (r0); - r0 = pxsim.BufferMethods.setByte(s.imgBuf___179439, 0, 135); - r0 = pxsim.BufferMethods.setByte(s.imgBuf___179439, 1, 1); - r0 = pxsim.BufferMethods.setByte(s.imgBuf___179439, 2, s.dataW___179403); - r0 = pxsim.BufferMethods.setByte(s.imgBuf___179439, 4, s.dataH___179409); + r0 = (s.tmp_1 - s.width___177600); + s.tmp_0 = r0; + r0 = (s.tmp_0 >> 1); + s.left___177603 = (r0); + { step = 7; continue; } + case 6: + r0 = pxsim_ImageMethods.width(globals.screen___168559); + s.width___177600 = (r0); + r0 = pxsim_ImageMethods.height(globals.screen___168559); + s.height___177601 = (r0); + s.top___177602 = (0); + s.left___177603 = (0); case 7: - case 8: - case 9: - s.tmp_1 = r0 = s.cp___179397; - r0 = pxsim_String_.length(s.arg1); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); + r0 = pxsim_pxtcore_mkClassInstance(game_Dialog__C169448_VT); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 38; continue; } - s.xOffset___179463 = (0); - s.yOffset___179464 = (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___179397; - 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___179397); - 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 = 173; s.pc = 45; return s.tmp_4; } - } - case 45: + s.tmp_1 = game_Dialog_constructor__P169451_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = s.width___177600; + s.tmp_1.arg2 = s.height___177601; + s.tmp_1.arg3 = undefined; + s.tmp_1.arg4 = undefined; + s.tmp_1.arg5 = undefined; + s.callLocIdx = 1296; s.pc = 12; return s.tmp_1; + case 12: r0 = s.retval; - s.xOffset___179463 = (r0); - s.tmp_0 = if_yOffset_1_mk(s); - r0 = pxsim_Array__getAt(s.arg6, s.cp___179397); + s.dialog___177714 = (s.tmp_0); + s.tmp_0 = sprites_create__P168802_mk(s); + r0 = s.dialog___177714.fields["image"]; 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 = 174; s.pc = 46; return s.tmp_0; } - } - case 46: - r0 = s.retval; - s.yOffset___179464 = (r0); - case 12: + s.tmp_0.arg1 = -1; + s.callLocIdx = 1297; s.pc = 13; return s.tmp_0; case 13: - s.tmp_0 = r0 = s.cp___179397; - r0 = (s.tmp_0 + 1); - s.cp___179397 = (r0); - r0 = pxsim_String_.charCodeAt(s.arg1, s.tmp_0); - s.ch___179479 = (r0); - r0 = (s.ch___179479 == 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 = 175; 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___179395); + s.s___177722 = (r0); + s.tmp_0 = Sprite_top__P168931_mk(s); + s.tmp_0.arg0 = s.s___177722; + s.tmp_0.arg1 = s.top___177602; + s.callLocIdx = 1298; s.pc = 14; return s.tmp_0; case 14: + r0 = s.retval; + s.tmp_0 = Sprite_left__P168927_mk(s); + s.tmp_0.arg0 = s.s___177722; + s.tmp_0.arg1 = s.left___177603; + s.callLocIdx = 1299; s.pc = 15; return s.tmp_0; case 15: - r0 = (s.ch___179479 < 32); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 16; continue; } - { step = 9; continue; } + r0 = s.retval; + s.tmp_0 = game_Dialog__C169448_v1_2_mk(s); + s.tmp_0.arg0 = s.dialog___177714; + s.tmp_0.arg1 = s.arg0; + if (!checkSubtype(s.tmp_0.arg0, game_Dialog__C169448_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.setText; + s.pc = 16; return s.tmp_0; case 16: - case 17: - s.l___179498 = (0); - s.r___179499 = (s.lastchar___179432); - s.off___179501 = (0); - r0 = (s.ch___179479 - 32); + r0 = s.retval; + r0 = pxsim_pxtrt.mklocRef(); + s.pressed___177738 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.pressed___177738, true); + r0 = pxsim_pxtrt.mklocRef(); + s.done___177739 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.done___177739, false); + r0 = pxsim_pxtrt.mklocRef(); + s.upPressed___177740 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.upPressed___177740, true); + r0 = pxsim_pxtcore_mkAction(4, game_showLongText_inline__P177742); s.tmp_0 = r0; - r0 = (s.tmp_0 * s.dataSize___179425); - s.guess___179502 = (r0); - r0 = pxsim.BufferMethods.getNumber(s.fontdata___179429, 4, s.guess___179502); - s.tmp_1 = r0; - r0 = (s.tmp_1 == s.ch___179479); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.dialog___177714); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.pressed___177738); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.done___177739); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 3, s.upPressed___177740); + s.tmp_1 = game_onUpdate__P169550_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 1306; s.pc = 17; return s.tmp_1; + case 17: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, game_showLongText_inline__P177790); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 18; continue; } - s.off___179501 = (s.guess___179502); - { step = 25; continue; } + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.done___177739); + s.tmp_1 = pauseUntil__P166894_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = undefined; + s.callLocIdx = 1307; s.pc = 18; return s.tmp_1; case 18: + r0 = s.retval; + s.tmp_0 = controller__setUserEventsEnabled__P168733_mk(s); + s.tmp_0.arg0 = true; + s.callLocIdx = 1308; s.pc = 19; return s.tmp_0; case 19: - r0 = (s.l___179498 <= s.r___179499); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 24; continue; } - s.tmp_1 = r0 = s.l___179498; - r0 = (s.r___179499 - s.l___179498); - s.tmp_3 = r0; - r0 = (s.tmp_3 >> 1); - s.tmp_2 = r0; - r0 = (s.tmp_1 + s.tmp_2); - s.m___179521 = (r0); - s.tmp_0 = r0 = s.fontdata___179429; - r0 = (s.m___179521 * s.dataSize___179425); - s.tmp_1 = r0; - r0 = pxsim.BufferMethods.getNumber(s.tmp_0, 4, s.tmp_1); - s.v___179530 = (r0); - r0 = (s.v___179530 == s.ch___179479); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 20; continue; } - r0 = (s.m___179521 * s.dataSize___179425); - s.off___179501 = (r0); - { step = 24; continue; } - case 20: - case 21: - r0 = (s.v___179530 < s.ch___179479); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 22; continue; } - r0 = (s.m___179521 + 1); - s.l___179498 = (r0); - { step = 23; continue; } - case 22: - r0 = (s.m___179521 - 1); - s.r___179499 = (r0); + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +game_showLongText__P169487.info = {"start":24237,"length":3072,"line":649,"column":4,"endLine":742,"endColumn":5,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"showLongText","argumentNames":["str","layout"]} + +function game_showLongText__P169487_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: game_showLongText__P169487, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + width___177600: undefined, + height___177601: undefined, + top___177602: undefined, + left___177603: undefined, + dialog___177714: undefined, + s___177722: undefined, + pressed___177738: undefined, + done___177739: undefined, + upPressed___177740: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function game_showLongText_inline__P177742(s) { +let r0 = s.r0, 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.currentState___177745 = undefined; + s.moveBack___177770 = undefined; + s.tmp_0 = game_BaseDialog__C169430_v0_1_mk(s); + s.tmp_0.arg0 = s.caps[0]; + if (!checkSubtype(s.tmp_0.arg0, game_BaseDialog__C169430_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.update; + s.pc = 23; return s.tmp_0; case 23: - { step = 19; continue; } + r0 = s.retval; + s.tmp_1 = controller_Button__C168716_v0_1_mk(s); + s.tmp_1.arg0 = globals.A___168640; + if (!checkSubtype(s.tmp_1.arg0, controller_Button__C168716_VT)) failedCast(s.tmp_1.arg0); + s.tmp_1.fn = s.tmp_1.arg0.vtable.methods.isPressed; + s.pc = 24; return s.tmp_1; case 24: - case 25: - r0 = (s.mult___179398 == 1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 26; continue; } - s.tmp_1 = r0 = s.imgBuf___179439; - s.tmp_3 = r0 = s.fontdata___179429; - r0 = (s.off___179501 + 2); - s.tmp_4 = r0; - r0 = pxsim.BufferMethods.slice(s.tmp_3, s.tmp_4, s.charSize___179421); - s.tmp_2 = r0; - r0 = pxsim.BufferMethods.write(s.tmp_1, 8, s.tmp_2); - s.tmp_0 = helpers_imageDrawIcon__P168482_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.imgBuf___179439; - r0 = (s.arg2 + s.xOffset___179463); - s.tmp_0.arg2 = r0; - r0 = (s.arg3 + s.yOffset___179464); - s.tmp_0.arg3 = r0; - s.tmp_0.arg4 = s.arg4; - s.callLocIdx = 176; 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 = 177; s.pc = 49; return s.tmp_2; } - } - case 49: + 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 = controller_Button__C168716_v0_1_mk(s); + s.tmp_2.arg0 = globals.down___168645; + if (!checkSubtype(s.tmp_2.arg0, controller_Button__C168716_VT)) failedCast(s.tmp_2.arg0); + s.tmp_2.fn = s.tmp_2.arg0.vtable.methods.isPressed; + s.pc = 25; return s.tmp_2; + case 25: r0 = s.retval; + case 2: + // jmp value (already in r0) + s.tmp_3 = r0; + s.currentState___177745 = (s.tmp_3); + s.tmp_0 = r0 = s.currentState___177745; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 3; continue; } + r0 = s.tmp_0; + { step = 4; continue; } + case 3: + r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.arg2 = (r0); - { step = 37; continue; } + r0 = pxsim_Boolean__bang(s.tmp_1); + case 4: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 7; continue; } + r0 = pxsim_pxtrt_stlocRef(s.caps[1], true); + s.tmp_1 = game_Dialog_hasNext__P169452_mk(s); + s.tmp_1.arg0 = s.caps[0]; + s.callLocIdx = 1300; s.pc = 26; return s.tmp_1; case 26: - r0 = (s.off___179501 + 2); - s.off___179501 = (r0); - s.i___179586 = (0); - case 27: - r0 = (s.i___179586 < s.dataW___179403); + r0 = s.retval; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 36; continue; } - s.j___179591 = (0); - s.mask___179592 = (1); - s.tmp_0 = r0 = s.off___179501; - r0 = (s.tmp_0 + 1); - s.off___179501 = (r0); - r0 = pxsim.BufferMethods.getByte(s.fontdata___179429, s.tmp_0); - s.c___179593 = (r0); + if (!r0) { step = 5; continue; } + s.tmp_2 = game_Dialog_nextPage__P169454_mk(s); + s.tmp_2.arg0 = s.caps[0]; + s.callLocIdx = 1301; s.pc = 27; return s.tmp_2; + case 27: + r0 = s.retval; + { step = 6; continue; } + case 5: + s.tmp_0 = scene_setBackgroundImage__P169412_mk(s); + s.tmp_0.arg0 = null; + s.callLocIdx = 1302; s.pc = 28; return s.tmp_0; case 28: - r0 = (s.j___179591 < s.dataH___179409); + r0 = s.retval; + s.tmp_0 = game_popScene__P169531_mk(s); + s.callLocIdx = 1303; s.pc = 29; return s.tmp_0; + case 29: + r0 = s.retval; + r0 = pxsim_pxtrt_stlocRef(s.caps[2], true); + case 6: + { step = 12; continue; } + case 7: + r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 35; continue; } - r0 = (s.mask___179592 == 256); + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 8; continue; } + r0 = s.tmp_0; + { step = 9; continue; } + case 8: + r0 = pxsim_numops_toBoolDecr(s.currentState___177745); s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 29; continue; } - s.tmp_2 = r0 = s.off___179501; - r0 = (s.tmp_2 + 1); - s.off___179501 = (r0); - r0 = pxsim.BufferMethods.getByte(s.fontdata___179429, s.tmp_2); - s.c___179593 = (r0); - s.mask___179592 = (1); - case 29: + r0 = pxsim_Boolean__bang(s.tmp_1); + case 9: + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 10; continue; } + r0 = pxsim_pxtrt_stlocRef(s.caps[1], false); + case 10: + case 11: + case 12: + s.tmp_0 = controller_Button__C168716_v0_1_mk(s); + s.tmp_0.arg0 = globals.up___168643; + if (!checkSubtype(s.tmp_0.arg0, controller_Button__C168716_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.isPressed; + s.pc = 30; return s.tmp_0; case 30: - s.n___179610 = (0); + r0 = s.retval; + s.moveBack___177770 = (r0); + s.tmp_0 = r0 = s.moveBack___177770; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 13; continue; } + r0 = s.tmp_0; + { step = 14; continue; } + case 13: + r0 = pxsim_pxtrt_ldlocRef(s.caps[3]); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + case 14: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 17; continue; } + r0 = pxsim_pxtrt_stlocRef(s.caps[3], true); + s.tmp_1 = game_Dialog_hasPrev__P169453_mk(s); + s.tmp_1.arg0 = s.caps[0]; + s.callLocIdx = 1304; s.pc = 31; return s.tmp_1; case 31: - r0 = (s.c___179593 & s.mask___179592); + r0 = s.retval; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 32; continue; } - r0 = (s.n___179610 + 1); - s.n___179610 = (r0); - r0 = (s.mask___179592 << 1); - s.mask___179592 = (r0); - { step = 31; continue; } + if (!r0) { step = 15; continue; } + s.tmp_2 = game_Dialog_prevPage__P169455_mk(s); + s.tmp_2.arg0 = s.caps[0]; + s.callLocIdx = 1305; s.pc = 32; return s.tmp_2; case 32: - r0 = pxsim_numops_toBoolDecr(s.n___179610); - if (!r0) { step = 33; continue; } - s.tmp_0 = helpers_imageFillRect__P168483_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_1 = r0 = s.arg2; - r0 = (s.xOffset___179463 * s.mult___179398); - 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___179591 + s.yOffset___179464); - s.tmp_5 = r0; - r0 = (s.tmp_5 * s.mult___179398); - s.tmp_4 = r0; - r0 = (s.tmp_3 + s.tmp_4); - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = s.mult___179398; - r0 = (s.mult___179398 * s.n___179610); - s.tmp_0.arg4 = r0; - s.tmp_0.arg5 = s.arg4; - s.callLocIdx = 178; s.pc = 50; return s.tmp_0; - case 50: r0 = s.retval; - r0 = (s.j___179591 + s.n___179610); - s.j___179591 = (r0); - { step = 34; continue; } - case 33: - r0 = (s.mask___179592 << 1); - s.mask___179592 = (r0); - r0 = (s.j___179591 + 1); - s.j___179591 = (r0); - case 34: - { step = 28; continue; } - case 35: - r0 = (s.arg2 + s.mult___179398); - s.arg2 = (r0); - r0 = (s.i___179586 + 1); - s.i___179586 = (r0); - { step = 27; continue; } - case 36: - case 37: - { step = 9; continue; } - case 38: + case 15: + case 16: + { step = 22; continue; } + case 17: + r0 = pxsim_pxtrt_ldlocRef(s.caps[3]); + 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 = pxsim_numops_toBoolDecr(s.moveBack___177770); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + case 19: + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 20; continue; } + r0 = pxsim_pxtrt_stlocRef(s.caps[3], false); + case 20: + case 21: + case 22: r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_imagePrint__P168517.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"]} +game_showLongText_inline__P177742.info = {"start":26290,"length":931,"line":710,"column":22,"endLine":738,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"inline","argumentNames":[]} -function helpers_imagePrint__P168517_mk(s) { +function game_showLongText_inline__P177742_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_imagePrint__P168517, depth: s.depth + 1, + parent: s, fn: game_showLongText_inline__P177742, depth: s.depth + 1, pc: 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___179395: undefined, - cp___179397: undefined, - mult___179398: undefined, - dataW___179403: undefined, - dataH___179409: undefined, - byteHeight___179415: undefined, - charSize___179421: undefined, - dataSize___179425: undefined, - fontdata___179429: undefined, - lastchar___179432: undefined, - imgBuf___179439: undefined, - xOffset___179463: undefined, - yOffset___179464: undefined, - ch___179479: undefined, - l___179498: undefined, - r___179499: undefined, - off___179501: undefined, - guess___179502: undefined, - m___179521: undefined, - v___179530: undefined, - i___179586: undefined, - j___179591: undefined, - mask___179592: undefined, - c___179593: undefined, - n___179610: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, - arg5: undefined, - arg6: undefined, + currentState___177745: undefined, + moveBack___177770: undefined, } } -function image_getFontForText__P168504(s) { +function game_showLongText_inline__P177790(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10144,60 +11120,111 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.i___178641 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - s.i___178641 = (0); + r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); + return leave(s, r0) + default: oops() +} } } +game_showLongText_inline__P177790.info = {"start":27243,"length":10,"line":740,"column":19,"endLine":740,"endColumn":29,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"inline","argumentNames":[]} + +function game_showLongText_inline__P177790_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: game_showLongText_inline__P177790, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, +} } + + + + + +function game_popScene__P169531(s) { +let r0 = s.r0, 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.oldScene___177810 = undefined; + s.tmp_0 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1342; s.pc = 11; return s.tmp_0; + case 11: + r0 = s.retval; + s.oldScene___177810 = (r0); + s.tmp_0 = r0 = globals._sceneStack___172458; + 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___178641; - 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___178641); - 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___168503; - { step = 5; continue; } + r0 = pxsim_Array__length(globals._sceneStack___172458); 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___172458); + globals._scene___172457 = (r0); + s.tmp_0 = control_popEventContext__P166937_mk(s); + s.callLocIdx = 1343; s.pc = 12; return s.tmp_0; + case 12: + r0 = s.retval; + { step = 6; continue; } case 3: - r0 = (s.i___178641 + 1); - s.i___178641 = (r0); - { step = 1; continue; } + r0 = pxsim_numops_toBoolDecr(globals._scene___172457); + if (!r0) { step = 4; continue; } + s.tmp_0 = control_popEventContext__P166937_mk(s); + s.callLocIdx = 1344; s.pc = 13; return s.tmp_0; + case 13: + r0 = s.retval; + globals._scene___172457 = (undefined); case 4: - r0 = globals.font8___168502; case 5: + case 6: + r0 = pxsim_numops_toBoolDecr(globals._scene___172457); + if (!r0) { step = 7; continue; } + s.tmp_0 = particles_enableAll__P169710_mk(s); + s.callLocIdx = 1345; s.pc = 14; return s.tmp_0; + case 14: + r0 = s.retval; + case 7: + case 8: + r0 = pxsim_numops_toBoolDecr(globals._scenePopHandlers___172460); + if (!r0) { step = 9; continue; } + r0 = pxsim_pxtcore_mkAction(1, game_popScene_inline__P177831); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.oldScene___177810); + s.tmp_1 = helpers_arrayForEach__P166636_mk(s); + s.tmp_1.arg0 = globals._scenePopHandlers___172460; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 1347; s.pc = 15; return s.tmp_1; + case 15: + r0 = s.retval; + case 9: + case 10: + r0 = undefined; return leave(s, r0) default: oops() } } } -image_getFontForText__P168504.info = {"start":11713,"length":259,"line":136,"column":4,"endLine":143,"endColumn":5,"fileName":"pxt_modules/screen/text.ts","functionName":"getFontForText","argumentNames":["text"]} +game_popScene__P169531.info = {"start":5133,"length":548,"line":161,"column":4,"endLine":179,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"popScene","argumentNames":[]} -function image_getFontForText__P168504_mk(s) { +function game_popScene__P169531_mk(s) { checkStack(s.depth); return { - parent: s, fn: image_getFontForText__P168504, depth: s.depth + 1, + parent: s, fn: game_popScene__P169531, depth: s.depth + 1, pc: 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___178641: undefined, - arg0: undefined, + oldScene___177810: undefined, } } -function helpers_imageDrawIcon__P168482(s) { +function game_popScene_inline__P177831(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10209,49 +11236,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.arg4 = (s.lambdaArgs[4]); s.lambdaArgs = null; } - s.tmp_0 = r0 = s.arg0; - s.tmp_1 = r0 = s.arg1; - s.tmp_3 = helpers_pack__P172094_mk(s); - s.tmp_3.arg0 = s.arg2; - s.tmp_3.arg1 = s.arg3; - s.callLocIdx = 148; s.pc = 1; return s.tmp_3; + 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 = 1346; s.pc = 1; return s.tmp_0; 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() } } } -helpers_imageDrawIcon__P168482.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"]} +game_popScene_inline__P177831.info = {"start":5645,"length":18,"line":177,"column":38,"endLine":177,"endColumn":56,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":["cb"]} -function helpers_imageDrawIcon__P168482_mk(s) { +function game_popScene_inline__P177831_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_imageDrawIcon__P168482, depth: s.depth + 1, + parent: s, fn: game_popScene_inline__P177831, depth: s.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 helpers_stringSplit__P166649(s) { +function particles_enableAll__P169710(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10261,186 +11274,46 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.A___179673 = undefined; - s.lim___179675 = undefined; - s.s___179691 = undefined; - s.p___179694 = undefined; - s.R___179695 = undefined; - s.z___179709 = undefined; - s.T___179722 = undefined; - s.q___179723 = undefined; - s.e___179729 = 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___179673 = (r0); - s.lim___179675 = (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___179675 = (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___179675 = (0); - { step = 3; continue; } - case 2: - r0 = (s.arg2 | 0); - s.lim___179675 = (r0); + s.sources___177835 = undefined; + s.tmp_0 = particles_particleSources__P172807_mk(s); + s.callLocIdx = 1619; s.pc = 3; return s.tmp_0; case 3: - case 4: - r0 = pxsim_String_.length(s.arg0); - s.s___179691 = (r0); - s.p___179694 = (0); - s.R___179695 = (s.arg1); - r0 = (s.lim___179675 == 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - r0 = s.A___179673; - { 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___179673, 0, s.arg0); - r0 = s.A___179673; - { step = 21; continue; } - case 7: - case 8: - r0 = (s.s___179691 == 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 11; continue; } - s.tmp_1 = helpers_splitMatch__P171880_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_1.arg1 = 0; - s.tmp_1.arg2 = s.R___179695; - s.callLocIdx = 19; s.pc = 22; return s.tmp_1; - case 22: - r0 = s.retval; - s.z___179709 = (r0); - r0 = (s.z___179709 > -1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 9; continue; } - r0 = s.A___179673; - { step = 21; continue; } - case 9: - case 10: - r0 = pxsim_Array_.setAt(s.A___179673, 0, s.arg0); - r0 = s.A___179673; - { step = 21; continue; } - case 11: - case 12: - s.q___179723 = (s.p___179694); - case 13: - r0 = (s.q___179723 != s.s___179691); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 20; continue; } - s.tmp_1 = helpers_splitMatch__P171880_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_1.arg1 = s.q___179723; - s.tmp_1.arg2 = s.R___179695; - s.callLocIdx = 20; s.pc = 23; return s.tmp_1; - case 23: r0 = s.retval; - s.e___179729 = (r0); - r0 = (s.e___179729 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 14; continue; } - r0 = (s.q___179723 + 1); - s.q___179723 = (r0); - { step = 19; continue; } - case 14: - r0 = (s.e___179729 == s.p___179694); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 15; continue; } - r0 = (s.q___179723 + 1); - s.q___179723 = (r0); - { step = 18; continue; } - case 15: - s.tmp_0 = helpers_stringSlice__P166646_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.p___179694; - s.tmp_0.arg2 = s.q___179723; - s.callLocIdx = 21; s.pc = 24; return s.tmp_0; - case 24: + s.sources___177835 = (r0); + r0 = pxsim_numops_toBoolDecr(s.sources___177835); + if (!r0) { step = 1; continue; } + s.tmp_0 = helpers_arrayForEach__P166636_mk(s); + s.tmp_0.arg0 = s.sources___177835; + s.tmp_0.arg1 = particles_enableAll_inline__P177841; + s.callLocIdx = 1621; s.pc = 4; return s.tmp_0; + case 4: r0 = s.retval; - s.T___179722 = (r0); - r0 = pxsim_Array__push(s.A___179673, s.T___179722); - r0 = pxsim_Array__length(s.A___179673); - s.tmp_1 = r0; - r0 = (s.tmp_1 == s.lim___179675); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 16; continue; } - r0 = s.A___179673; - { step = 21; continue; } - case 16: - case 17: - s.p___179694 = (s.e___179729); - s.q___179723 = (s.p___179694); - case 18: - case 19: - { step = 13; continue; } - case 20: - s.tmp_0 = helpers_stringSlice__P166646_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.p___179694; - s.tmp_0.arg2 = s.q___179723; - s.callLocIdx = 22; s.pc = 25; return s.tmp_0; - case 25: + s.tmp_0 = particles_pruneParticles__P172803_mk(s); + s.callLocIdx = 1622; s.pc = 5; return s.tmp_0; + case 5: r0 = s.retval; - s.T___179722 = (r0); - r0 = pxsim_Array__push(s.A___179673, s.T___179722); - r0 = s.A___179673; - case 21: + case 1: + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_stringSplit__P166649.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"]} +particles_enableAll__P169710.info = {"start":12649,"length":193,"line":413,"column":4,"endLine":419,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"enableAll","argumentNames":[]} -function helpers_stringSplit__P166649_mk(s) { +function particles_enableAll__P169710_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_stringSplit__P166649, depth: s.depth + 1, + parent: s, fn: particles_enableAll__P169710, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - A___179673: undefined, - lim___179675: undefined, - s___179691: undefined, - p___179694: undefined, - R___179695: undefined, - z___179709: undefined, - T___179722: undefined, - q___179723: undefined, - e___179729: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, + sources___177835: undefined, } } -function helpers_splitMatch__P171880(s) { +function particles_enableAll_inline__P177841(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10450,85 +11323,36 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.r___179809 = undefined; - s.s___179812 = undefined; - s.i___179822 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = pxsim_String_.length(s.arg2); - s.r___179809 = (r0); - r0 = pxsim_String_.length(s.arg0); - s.s___179812 = (r0); - r0 = (s.arg1 + s.r___179809); - s.tmp_1 = r0; - r0 = (s.tmp_1 > s.s___179812); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = -1; - { step = 7; continue; } + s.tmp_0 = particles_ParticleSource_enabled__P169691_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = true; + s.callLocIdx = 1620; s.pc = 1; return s.tmp_0; case 1: - case 2: - s.i___179822 = (0); - case 3: - r0 = (s.i___179822 < s.r___179809); - 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___179822); - 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___179822); - 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___179822 + 1); - s.i___179822 = (r0); - { step = 3; continue; } - case 6: - r0 = (s.arg1 + s.r___179809); - case 7: + r0 = s.retval; + r0 = true; return leave(s, r0) default: oops() } } } -helpers_splitMatch__P171880.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"]} +particles_enableAll_inline__P177841.info = {"start":12773,"length":21,"line":416,"column":28,"endLine":416,"endColumn":49,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["s"]} -function helpers_splitMatch__P171880_mk(s) { +function particles_enableAll_inline__P177841_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_splitMatch__P171880, depth: s.depth + 1, + parent: s, fn: particles_enableAll_inline__P177841, depth: s.depth + 1, pc: 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___179809: undefined, - s___179812: undefined, - i___179822: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function helpers_stringSlice__P166646(s) { +function particles_particleSources__P172807(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10538,81 +11362,33 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.len___179774 = 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___179774 = (r0); - r0 = (s.arg1 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_1 = Math_max__P166657_mk(s); - r0 = (s.len___179774 + s.arg1); - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 0; - s.callLocIdx = 18; s.pc = 9; return s.tmp_1; - case 9: - r0 = s.retval; - s.arg1 = (r0); + s.sources___178009 = undefined; + s.tmp_0 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1623; s.pc = 1; return s.tmp_0; case 1: - 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___179774); - { 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___179774 + 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); + r0 = s.retval; + r0 = r0.fields["particleSources"]; + s.sources___178009 = (r0); + r0 = s.sources___178009; return leave(s, r0) default: oops() } } } -helpers_stringSlice__P166646.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"]} +particles_particleSources__P172807.info = {"start":12848,"length":119,"line":421,"column":4,"endLine":424,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"particleSources","argumentNames":[]} -function helpers_stringSlice__P166646_mk(s) { +function particles_particleSources__P172807_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_stringSlice__P166646, depth: s.depth + 1, + parent: s, fn: particles_particleSources__P172807, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - len___179774: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, + sources___178009: undefined, } } -function scene_Scene_render__P169399(s) { +function particles_pruneParticles__P172803(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10622,139 +11398,81 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.s___179906 = undefined; - s.unnamed834___U1 = undefined; - s.unnamed835___U2 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, scene_Scene__C169370_VT)) failedCast(r0); - r0 = s.arg0.fields["flags"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 4); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + s.sources___177846 = undefined; + s.tmp_0 = particles_particleSources__P172807_mk(s); + s.callLocIdx = 1606; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.sources___177846 = (r0); + r0 = pxsim_numops_toBoolDecr(s.sources___177846); if (!r0) { step = 1; continue; } - { step = 11; continue; } + s.tmp_0 = helpers_arrayForEach__P166636_mk(s); + s.tmp_1 = helpers_arraySlice__P166642_mk(s); + s.tmp_1.arg0 = s.sources___177846; + s.tmp_1.arg1 = 0; + r0 = pxsim_Array__length(s.sources___177846); + s.tmp_1.arg2 = r0; + s.callLocIdx = 1607; s.pc = 5; return s.tmp_1; + case 5: + r0 = s.retval; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = particles_pruneParticles_inline__P177855; + s.callLocIdx = 1609; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; case 1: case 2: - s.tmp_2 = r0 = s.arg0; - r0 = s.tmp_2.fields["flags"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 | 4); - s.tmp_3 = r0; - r0 = (s.tmp_2).fields["flags"] = (s.tmp_3); - r0 = s.arg0.fields["flags"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 3; continue; } - r0 = s.tmp_0; - { step = 4; continue; } - case 3: - r0 = s.arg0.fields["previousScene"]; - case 4: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 5; continue; } - s.tmp_3 = scene_Scene_render__P169399_mk(s); - r0 = s.arg0.fields["previousScene"]; - s.tmp_3.arg0 = r0; - s.callLocIdx = 1160; s.pc = 12; return s.tmp_3; - case 12: - r0 = s.retval; - { step = 6; continue; } - case 5: - s.tmp_0 = scene_Background_draw__P169205_mk(s); - r0 = s.arg0.fields["background"]; - s.tmp_0.arg0 = r0; - s.callLocIdx = 1161; 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__P166632_mk(s); - r0 = s.arg0.fields["allSprites"]; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = scene_Scene_render_inline__P179883; - s.callLocIdx = 1166; 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___179906 = (undefined); - r0 = s.arg0.fields["allSprites"]; - s.unnamed834___U1 = (r0); - s.unnamed835___U2 = (0); - case 9: - s.tmp_0 = r0 = s.unnamed835___U2; - r0 = pxsim_Array__length(s.unnamed834___U1); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 10; continue; } - r0 = pxsim_Array__getAt(s.unnamed834___U1, s.unnamed835___U2); - s.s___179906 = (r0); - s.tmp_2 = if___draw_2_mk(s); - s.tmp_2.arg0 = s.s___179906; - 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 = 1167; 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 = 1167; s.pc = 15; return s.tmp_2; } - else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 1167; s.pc = 15; return s.tmp_2;; } - else { s.callLocIdx = 1167; s.pc = 15; return s.tmp_2; } + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +particles_pruneParticles__P172803.info = {"start":9864,"length":156,"line":327,"column":4,"endLine":330,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"pruneParticles","argumentNames":[]} + +function particles_pruneParticles__P172803_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_pruneParticles__P172803, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + sources___177846: undefined, +} } + + + + + +function particles_pruneParticles_inline__P177855(s) { +let r0 = s.r0, 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; } - case 15: + s.tmp_0 = particles_ParticleSource__prune__P169686_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1608; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - r0 = (s.unnamed835___U2 + 1); - s.unnamed835___U2 = (r0); - { step = 9; continue; } - case 10: - s.unnamed834___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() } } } -scene_Scene_render__P169399.info = {"start":8203,"length":917,"line":228,"column":8,"endLine":252,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"render","argumentNames":["this"]} +particles_pruneParticles_inline__P177855.info = {"start":9997,"length":15,"line":329,"column":62,"endLine":329,"endColumn":77,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["s"]} -function scene_Scene_render__P169399_mk(s) { +function particles_pruneParticles_inline__P177855_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_render__P169399, depth: s.depth + 1, + parent: s, fn: particles_pruneParticles_inline__P177855, depth: s.depth + 1, pc: 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___179906: undefined, - unnamed834___U1: undefined, - unnamed835___U2: undefined, arg0: undefined, } } @@ -10762,7 +11480,7 @@ function scene_Scene_render__P169399_mk(s) { -function scene_Scene_render_inline__P179883(s) { +function particles_ParticleSource__prune__P169686(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10772,84 +11490,137 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.scene___177885 = undefined; + s.sources___177893 = undefined; + s.current___177907 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - 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 = 1162; s.pc = 3; return s.tmp_2; } - } - case 3: - r0 = s.retval; + r0 = s.arg0; + if (!checkSubtype(r0, particles_ParticleSource__C169678_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; - 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 = 1163; s.pc = 4; return s.tmp_4; } - } - case 4: - r0 = s.retval; + 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.tmp_1 - s.tmp_3); + 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 = 1; continue; } + if (r0) { step = 5; 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 = 1164; s.pc = 5; return s.tmp_6; } - } + { step = 6; continue; } 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 = 1165; s.pc = 6; return s.tmp_8; } - } + 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__P169526_mk(s); + s.callLocIdx = 1581; s.pc = 21; return s.tmp_5; + case 21: r0 = s.retval; - s.tmp_7 = r0; - r0 = (s.tmp_5 - s.tmp_7); - case 2: + s.scene___177885 = (r0); + r0 = pxsim_numops_toBoolDecr(s.scene___177885); + if (!r0) { step = 7; continue; } + r0 = s.scene___177885.fields["allSprites"]; + s.tmp_0 = r0; + r0 = pxsim_Array_.removeElement(s.tmp_0, s.arg0); + case 7: + case 8: + s.tmp_0 = particles_particleSources__P172807_mk(s); + s.callLocIdx = 1582; s.pc = 22; return s.tmp_0; + case 22: + r0 = s.retval; + s.sources___177893 = (r0); + s.tmp_0 = r0 = s.sources___177893; + 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___177893); + case 10: // jmp value (already in r0) - s.tmp_9 = r0; - r0 = s.tmp_9; + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 11; continue; } + r0 = pxsim_Array_.removeElement(s.sources___177893, s.arg0); + case 11: + case 12: + r0 = s.arg0.fields["anchor"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 == undefined); + case 13: + case 14: + r0 = s.arg0.fields["head"]; + s.current___177907 = (r0); + case 15: + s.tmp_0 = r0 = s.current___177907; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 16; continue; } + r0 = s.tmp_0; + { step = 17; continue; } + case 16: + r0 = s.current___177907.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___177907.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___177907.fields["next"]; + r0 = r0.fields["next"]; + s.tmp_4 = r0; + r0 = (s.current___177907).fields["next"] = (s.tmp_4); + { step = 19; continue; } + case 18: + r0 = s.current___177907.fields["next"]; + s.current___177907 = (r0); + case 19: + { step = 15; continue; } + case 20: + r0 = undefined; return leave(s, r0) default: oops() } } } -scene_Scene_render_inline__P179883.info = {"start":8781,"length":52,"line":242,"column":37,"endLine":242,"endColumn":89,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":["a","b"]} +particles_ParticleSource__prune__P169686.info = {"start":5104,"length":830,"line":166,"column":8,"endLine":189,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"_prune","argumentNames":["this"]} -function scene_Scene_render_inline__P179883_mk(s) { +function particles_ParticleSource__prune__P169686_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_render_inline__P179883, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource__prune__P169686, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -10857,19 +11628,17 @@ function scene_Scene_render_inline__P179883_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, + scene___177885: undefined, + sources___177893: undefined, + current___177907: undefined, arg0: undefined, - arg1: undefined, } } -function scene_Background_draw__P169205(s) { +function helpers_arraySlice__P166642(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10879,62 +11648,114 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.res___177930 = undefined; + s.len___177932 = undefined; + s.i___177966 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, scene_Background__C169196_VT)) failedCast(r0); - r0 = s.arg0.fields["color"]; - s.tmp_0 = r0; - r0 = pxsim_ImageMethods.fill(globals.screen___168559, s.tmp_0); - r0 = s.arg0.fields["_image"]; + r0 = pxsim_Array__mk(); + s.res___177930 = (r0); + r0 = pxsim_Array__length(s.arg0); + s.len___177932 = (r0); + r0 = (s.arg1 === undefined); 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___168559, s.tmp_1, 0, 0); + s.arg1 = (0); + { step = 4; continue; } case 1: - case 2: - r0 = s.arg0.fields["_layers"]; + r0 = (s.arg1 < 0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = pxsim_pxtcore_mkAction(1, scene_Background_draw_inline__P180054); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.arg0); - s.tmp_2 = helpers_arrayForEach__P166636_mk(s); - r0 = s.arg0.fields["_layers"]; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = s.tmp_1; - s.callLocIdx = 1010; s.pc = 5; return s.tmp_2; - case 5: + if (!r0) { step = 2; continue; } + s.tmp_1 = Math_max__P166657_mk(s); + r0 = (s.len___177932 + s.arg1); + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 0; + s.callLocIdx = 10; s.pc = 16; return s.tmp_1; + case 16: r0 = s.retval; + s.arg1 = (r0); + case 2: case 3: case 4: - r0 = undefined; + r0 = (s.arg1 > s.len___177932); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + r0 = s.res___177930; + { 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___177932); + { 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___177932 + s.arg2); + s.arg2 = (r0); + case 8: + case 9: + case 10: + r0 = (s.arg2 > s.len___177932); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 11; continue; } + s.arg2 = (s.len___177932); + case 11: + case 12: + s.i___177966 = (s.arg1); + case 13: + r0 = (s.i___177966 < s.arg2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 14; continue; } + s.tmp_1 = r0 = s.res___177930; + r0 = pxsim_Array__getAt(s.arg0, s.i___177966); + s.tmp_2 = r0; + r0 = pxsim_Array__push(s.tmp_1, s.tmp_2); + r0 = (s.i___177966 + 1); + s.i___177966 = (r0); + { step = 13; continue; } + case 14: + r0 = s.res___177930; + case 15: return leave(s, r0) default: oops() } } } -scene_Background_draw__P169205.info = {"start":1166,"length":545,"line":48,"column":8,"endLine":60,"endColumn":9,"fileName":"pxt_modules/game/background.ts","functionName":"draw","argumentNames":["this"]} +helpers_arraySlice__P166642.info = {"start":9027,"length":690,"line":303,"column":4,"endLine":328,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arraySlice","argumentNames":["arr","start","end"]} -function scene_Background_draw__P169205_mk(s) { +function helpers_arraySlice__P166642_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Background_draw__P169205, depth: s.depth + 1, + parent: s, fn: helpers_arraySlice__P166642, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, + res___177930: undefined, + len___177932: undefined, + i___177966: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function scene_Background_draw_inline__P180054(s) { +function particles_ParticleSource_enabled__P169691(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10944,66 +11765,68 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ox___180056 = undefined; - s.oy___180067 = 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___180056 = (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); + r0 = s.arg0; + if (!checkSubtype(r0, particles_ParticleSource__C169678_VT)) failedCast(r0); + s.tmp_1 = r0 = s.arg1; + s.tmp_3 = particles_ParticleSource_enabled__P169690_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 1585; s.pc = 5; return s.tmp_3; + case 5: + r0 = s.retval; s.tmp_2 = r0; - r0 = (s.tmp_1 / s.tmp_2); + r0 = (s.tmp_1 !== s.tmp_2); s.tmp_0 = r0; - r0 = pxsim.Math_.round(s.tmp_0); - s.oy___180067 = (r0); - s.tmp_0 = scene_BackgroundLayer_draw__P169214_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.ox___180056; - s.tmp_0.arg2 = s.oy___180067; - s.callLocIdx = 1009; s.pc = 1; return 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.retval; + 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() } } } -scene_Background_draw_inline__P180054.info = {"start":1373,"length":312,"line":53,"column":37,"endLine":58,"endColumn":17,"fileName":"pxt_modules/game/background.ts","functionName":"inline","argumentNames":["layer"]} +particles_ParticleSource_enabled__P169691.info = {"start":6816,"length":214,"line":223,"column":8,"endLine":228,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"enabled","argumentNames":["this","v"]} -function scene_Background_draw_inline__P180054_mk(s) { +function particles_ParticleSource_enabled__P169691_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Background_draw_inline__P180054, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_enabled__P169691, depth: s.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___180056: undefined, - oy___180067: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, arg0: undefined, + arg1: undefined, } } -function scene_BackgroundLayer_draw__P169214(s) { +function particles_ParticleSource_enabled__P169690(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11013,251 +11836,125 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.w___180085 = undefined; - s.h___180088 = undefined; - s.pw___180091 = undefined; - s.ph___180095 = undefined; - s.rx___180104 = undefined; - s.ry___180107 = undefined; - s.y___180176 = undefined; - s.py___180177 = undefined; - s.dh___180186 = undefined; - s.x___180194 = undefined; - s.rxl___180195 = undefined; - s.px___180201 = undefined; - s.dw___180205 = 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__C169206_VT)) failedCast(r0); - r0 = pxsim_ImageMethods.width(globals.screen___168559); - s.w___180085 = (r0); - r0 = pxsim_ImageMethods.height(globals.screen___168559); - s.h___180088 = (r0); - r0 = s.arg0.fields["img"]; - s.tmp_0 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_0); - s.pw___180091 = (r0); - r0 = s.arg0.fields["img"]; + if (!checkSubtype(r0, particles_ParticleSource__C169678_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_ImageMethods.height(s.tmp_0); - s.ph___180095 = (r0); - r0 = pxsim_numops_toBoolDecr(s.pw___180091); + r0 = pxsim_Boolean__bang(s.tmp_0); + return leaveAccessor(s, r0) + default: oops() +} } } +particles_ParticleSource_enabled__P169690.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__P169690.isGetter = true; + +function particles_ParticleSource_enabled__P169690_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_ParticleSource_enabled__P169690, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + arg0: undefined, +} } + + + + + +function control_popEventContext__P166937(s) { +let r0 = s.r0, 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.ctx___178016 = undefined; + s.context___178024 = undefined; + r0 = pxsim_numops_toBoolDecr(globals.eventContexts___171957); 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 = pxsim_numops_toBoolDecr(s.ph___180095); - 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); + r0 = pxsim_Array_.pop(globals.eventContexts___171957); + s.ctx___178016 = (r0); + r0 = pxsim_numops_toBoolDecr(s.ctx___178016); + 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 = 23; continue; } + { step = 7; continue; } case 3: case 4: - r0 = (0 - s.arg1); - s.rx___180104 = (r0); - r0 = (0 - s.arg2); - s.ry___180107 = (r0); - r0 = s.arg0.fields["alignX"]; - 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___180104; - r0 = (s.w___180085 + s.pw___180091); - s.tmp_2 = r0; - r0 = (s.tmp_1 - s.tmp_2); - s.rx___180104 = (r0); - { step = 7; continue; } - case 6: - s.tmp_0 = r0 = s.rx___180104; - r0 = (s.w___180085 + s.pw___180091); - s.tmp_2 = r0; - r0 = (s.tmp_2 >> 1); - s.tmp_1 = r0; - r0 = (s.tmp_0 - s.tmp_1); - s.rx___180104 = (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; } + s.tmp_2 = control_EventContext_unregister__P166929_mk(s); + s.tmp_2.arg0 = s.ctx___178016; + s.callLocIdx = 78; s.pc = 8; return s.tmp_2; case 8: - s.tmp_1 = r0 = s.ry___180107; - r0 = (s.h___180088 + s.ph___180095); - s.tmp_2 = r0; - r0 = (s.tmp_1 - s.tmp_2); - s.ry___180107 = (r0); - { step = 10; continue; } - case 9: - s.tmp_0 = r0 = s.ry___180107; - r0 = (s.h___180088 + s.ph___180095); + r0 = s.retval; + s.tmp_0 = r0 = globals.eventContexts___171957; + r0 = pxsim_Array__length(globals.eventContexts___171957); s.tmp_2 = r0; - r0 = (s.tmp_2 >> 1); + r0 = (s.tmp_2 - 1); s.tmp_1 = r0; - r0 = (s.tmp_0 - s.tmp_1); - s.ry___180107 = (r0); - case 10: - r0 = (s.rx___180104 % s.w___180085); - s.rx___180104 = (r0); - r0 = (s.rx___180104 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 11; continue; } - r0 = (s.rx___180104 + s.w___180085); - s.rx___180104 = (r0); - case 11: - case 12: - r0 = (s.ry___180107 % s.h___180088); - s.ry___180107 = (r0); - r0 = (s.ry___180107 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 13; continue; } - r0 = (s.ry___180107 + s.h___180088); - s.ry___180107 = (r0); - case 13: - case 14: - r0 = pxsim.Math_.floor(s.rx___180104); - s.rx___180104 = (r0); - r0 = pxsim.Math_.floor(s.ry___180107); - s.ry___180107 = (r0); - s.y___180176 = (0); - s.py___180177 = (0); - case 15: - r0 = (s.y___180176 < s.h___180088); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 22; continue; } - r0 = (s.y___180176 % s.ph___180095); - s.py___180177 = (r0); - s.tmp_0 = Math_min__P166658_mk(s); - r0 = (s.ph___180095 - s.py___180177); - s.tmp_0.arg0 = r0; - r0 = (s.h___180088 - s.ry___180107); - s.tmp_0.arg1 = r0; - s.callLocIdx = 1012; s.pc = 24; return s.tmp_0; - case 24: - r0 = s.retval; - s.dh___180186 = (r0); - s.x___180194 = (0); - s.rxl___180195 = (s.rx___180104); - case 16: - r0 = (s.x___180194 < s.w___180085); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 19; continue; } - r0 = (s.x___180194 % s.pw___180091); - s.px___180201 = (r0); - s.tmp_0 = Math_min__P166658_mk(s); - r0 = (s.pw___180091 - s.px___180201); - s.tmp_0.arg0 = r0; - r0 = (s.w___180085 - s.rxl___180195); - s.tmp_0.arg1 = r0; - s.callLocIdx = 1013; s.pc = 25; return s.tmp_0; - case 25: + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); + s.context___178024 = (r0); + r0 = pxsim_numops_toBoolDecr(s.context___178024); + if (!r0) { step = 5; continue; } + s.tmp_0 = control_EventContext_register__P166928_mk(s); + s.tmp_0.arg0 = s.context___178024; + s.callLocIdx = 79; s.pc = 9; return s.tmp_0; + case 9: r0 = s.retval; - s.dw___180205 = (r0); - r0 = s.arg0.fields["img"]; - s.tmp_0 = r0; - r0 = pxsim_ImageMethods.drawImage(globals.screen___168559, s.tmp_0, s.rxl___180195, s.ry___180107); - r0 = (s.rxl___180195 + s.dw___180205); - s.tmp_0 = r0; - r0 = (s.tmp_0 % s.w___180085); - s.rxl___180195 = (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___180205; - { step = 18; continue; } - case 17: - r0 = s.w___180085; - case 18: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = (s.x___180194 + s.tmp_1); - s.x___180194 = (r0); - { step = 16; continue; } - case 19: - r0 = (s.ry___180107 + s.dh___180186); - s.tmp_0 = r0; - r0 = (s.tmp_0 % s.h___180088); - s.ry___180107 = (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___180186; - { step = 21; continue; } - case 20: - r0 = s.h___180088; - case 21: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = (s.y___180176 + s.tmp_1); - s.y___180176 = (r0); - { step = 15; continue; } - case 22: - case 23: + { step = 6; continue; } + case 5: + globals.eventContexts___171957 = (undefined); + case 6: + case 7: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_BackgroundLayer_draw__P169214.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"]} +control_popEventContext__P166937.info = {"start":7755,"length":413,"line":236,"column":4,"endLine":250,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"popEventContext","argumentNames":[]} -function scene_BackgroundLayer_draw__P169214_mk(s) { +function control_popEventContext__P166937_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_BackgroundLayer_draw__P169214, depth: s.depth + 1, + parent: s, fn: control_popEventContext__P166937, depth: s.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___180085: undefined, - h___180088: undefined, - pw___180091: undefined, - ph___180095: undefined, - rx___180104: undefined, - ry___180107: undefined, - y___180176: undefined, - py___180177: undefined, - dh___180186: undefined, - x___180194: undefined, - rxl___180195: undefined, - px___180201: undefined, - dw___180205: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, + ctx___178016: undefined, + context___178024: undefined, } } -function helpers_arraySort__P166632(s) { +function control_EventContext_unregister__P166929(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11267,60 +11964,68 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.h___178045 = undefined; + s.unnamed796___U1 = undefined; + s.unnamed797___U2 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(s.arg1); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + r0 = s.arg0; + if (!checkSubtype(r0, control_EventContext__C166922_VT)) failedCast(r0); + s.h___178045 = (undefined); + r0 = s.arg0.fields["handlers"]; + s.unnamed796___U1 = (r0); + s.unnamed797___U2 = (0); case 1: - r0 = pxsim_Array__length(s.arg0); - s.tmp_2 = r0; - r0 = (s.tmp_2 > 1); - case 2: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 3; continue; } - s.arg1 = (helpers_arraySort_inline__P179928); + s.tmp_0 = r0 = s.unnamed797___U2; + r0 = pxsim_Array__length(s.unnamed796___U1); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 2; continue; } + r0 = pxsim_Array__getAt(s.unnamed796___U1, s.unnamed797___U2); + s.h___178045 = (r0); + s.tmp_2 = control_EventHandler_unregister__P171951_mk(s); + s.tmp_2.arg0 = s.h___178045; + s.callLocIdx = 70; s.pc = 3; return s.tmp_2; case 3: - case 4: - s.tmp_0 = helpers_sortHelper__P171878_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 3; s.pc = 5; return s.tmp_0; - case 5: r0 = s.retval; + r0 = (s.unnamed797___U2 + 1); + s.unnamed797___U2 = (r0); + { step = 1; continue; } + case 2: + s.unnamed796___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() } } } -helpers_arraySort__P166632.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"]} +control_EventContext_unregister__P166929.info = {"start":4721,"length":131,"line":141,"column":8,"endLine":145,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"unregister","argumentNames":["this"]} -function helpers_arraySort__P166632_mk(s) { +function control_EventContext_unregister__P166929_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arraySort__P166632, depth: s.depth + 1, + parent: s, fn: control_EventContext_unregister__P166929, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, + h___178045: undefined, + unnamed796___U1: undefined, + unnamed797___U2: undefined, arg0: undefined, - arg1: undefined, } } -function helpers_arraySort_inline__P179928(s) { +function control_EventHandler_unregister__P171951(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11330,142 +12035,41 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.aIsUndef___179931 = undefined; - s.bIsUndef___179935 = undefined; - s.aIsNull___179946 = undefined; - s.bIsNull___179950 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg0 === undefined); - s.aIsUndef___179931 = (r0); - r0 = (s.arg1 === undefined); - s.bIsUndef___179935 = (r0); - s.tmp_0 = r0 = s.aIsUndef___179931; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } - case 1: - r0 = s.bIsUndef___179935; - 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___179931); - if (!r0) { step = 4; continue; } - r0 = 1; - { step = 17; continue; } - { step = 7; continue; } - case 4: - r0 = pxsim_numops_toBoolDecr(s.bIsUndef___179935); - if (!r0) { step = 5; continue; } - r0 = -1; - { step = 17; continue; } - case 5: - case 6: - case 7: - case 8: - r0 = (s.arg0 === null); - s.aIsNull___179946 = (r0); - r0 = (s.arg1 === null); - s.bIsNull___179950 = (r0); - s.tmp_0 = r0 = s.aIsNull___179946; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 9; continue; } - r0 = s.tmp_0; - { step = 10; continue; } - case 9: - r0 = s.bIsNull___179950; - case 10: - // jmp value (already in r0) + r0 = s.arg0; + if (!checkSubtype(r0, control_EventHandler__C171949_VT)) failedCast(r0); + r0 = s.arg0.fields["src"]; + s.tmp_0 = r0; + r0 = s.arg0.fields["value"]; 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___179946); - if (!r0) { step = 12; continue; } - r0 = 1; - { step = 17; continue; } - { step = 15; continue; } - case 12: - r0 = pxsim_numops_toBoolDecr(s.bIsNull___179950); - 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); + r0 = s.arg0.fields["flags"]; 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: + r0 = pxsim.control.internalOnEvent(s.tmp_0, s.tmp_1, control_doNothing__P171953, s.tmp_2); + r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_arraySort_inline__P179928.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"]} +control_EventHandler_unregister__P171951.info = {"start":1136,"length":106,"line":36,"column":8,"endLine":38,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"unregister","argumentNames":["this"]} -function helpers_arraySort_inline__P179928_mk(s) { +function control_EventHandler_unregister__P171951_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arraySort_inline__P179928, depth: s.depth + 1, + parent: s, fn: control_EventHandler_unregister__P171951, depth: s.depth + 1, pc: 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___179931: undefined, - bIsUndef___179935: undefined, - aIsNull___179946: undefined, - bIsNull___179950: undefined, arg0: undefined, - arg1: undefined, } } -function helpers_sortHelper__P171878(s) { +function control_doNothing__P171953(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11475,114 +12079,94 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.len___179985 = undefined; - s.i___179988 = undefined; - s.j___179994 = undefined; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +control_doNothing__P171953.info = {"start":1254,"length":24,"line":41,"column":4,"endLine":41,"endColumn":28,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"doNothing","argumentNames":[]} + +function control_doNothing__P171953_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: control_doNothing__P171953, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, +} } + + + + + +function control_EventContext_register__P166928(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + s.h___178037 = undefined; + s.unnamed794___U1 = undefined; + s.unnamed795___U2 = 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 = 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; } + if (!checkSubtype(r0, control_EventContext__C166922_VT)) failedCast(r0); + s.h___178037 = (undefined); + r0 = s.arg0.fields["handlers"]; + s.unnamed794___U1 = (r0); + s.unnamed795___U2 = (0); + case 1: + s.tmp_0 = r0 = s.unnamed795___U2; + r0 = pxsim_Array__length(s.unnamed794___U1); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 2; continue; } + r0 = pxsim_Array__getAt(s.unnamed794___U1, s.unnamed795___U2); + s.h___178037 = (r0); + s.tmp_2 = control_EventHandler_register__P171950_mk(s); + s.tmp_2.arg0 = s.h___178037; + s.callLocIdx = 68; s.pc = 3; return s.tmp_2; case 3: - case 4: - r0 = pxsim_Array__length(s.arg0); - s.len___179985 = (r0); - s.i___179988 = (0); - case 5: - s.tmp_1 = r0 = s.i___179988; - r0 = (s.len___179985 - 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___179988 + 1); - s.j___179994 = (r0); - case 6: - r0 = (s.j___179994 < s.len___179985); - 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___179988); - s.tmp_3.arg0 = r0; - r0 = pxsim_Array__getAt(s.arg0, s.j___179994); - s.tmp_3.arg1 = r0; - setupLambda(s.tmp_3, s.tmp_3.argL); - s.callLocIdx = 1; 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__P171877_mk(s); - s.tmp_4.arg0 = s.arg0; - s.tmp_4.arg1 = s.i___179988; - s.tmp_4.arg2 = s.j___179994; - s.callLocIdx = 2; s.pc = 13; return s.tmp_4; - case 13: + r0 = (s.unnamed795___U2 + 1); + s.unnamed795___U2 = (r0); + { step = 1; continue; } + case 2: + s.unnamed794___U1 = (undefined); + s.tmp_0 = control_EventContext_registerFrameCallbacks__P171955_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 69; s.pc = 4; return s.tmp_0; + case 4: r0 = s.retval; - case 7: - case 8: - r0 = (s.j___179994 + 1); - s.j___179994 = (r0); - { step = 6; continue; } - case 9: - r0 = (s.i___179988 + 1); - s.i___179988 = (r0); - { step = 5; continue; } - case 10: - r0 = s.arg0; - case 11: + r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_sortHelper__P171878.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"]} +control_EventContext_register__P166928.info = {"start":4573,"length":138,"line":135,"column":8,"endLine":139,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"register","argumentNames":["this"]} -function helpers_sortHelper__P171878_mk(s) { +function control_EventContext_register__P166928_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_sortHelper__P171878, depth: s.depth + 1, + parent: s, fn: control_EventContext_register__P166928, depth: s.depth + 1, pc: 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___179985: undefined, - i___179988: undefined, - j___179994: undefined, + h___178037: undefined, + unnamed794___U1: undefined, + unnamed795___U2: undefined, arg0: undefined, - arg1: undefined, } } -function helpers_swap__P171877(s) { +function game_pushScene__P169530(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11592,46 +12176,70 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.temp___180023 = 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___180023 = (r0); - s.tmp_0 = r0 = s.arg0; - s.tmp_1 = r0 = s.arg1; - r0 = pxsim_Array__getAt(s.arg0, s.arg2); - s.tmp_2 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_1, s.tmp_2); - r0 = pxsim_Array_.setAt(s.arg0, s.arg2, s.temp___180023); + s.oldScene___178924 = undefined; + s.tmp_0 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1336; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.oldScene___178924 = (r0); + s.tmp_0 = particles_clearAll__P169708_mk(s); + s.callLocIdx = 1337; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + s.tmp_0 = particles_disableAll__P169709_mk(s); + s.callLocIdx = 1338; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + r0 = pxsim_numops_toBoolDecr(globals._sceneStack___172458); + 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___172458 = (r0); + case 1: + case 2: + r0 = pxsim_Array__push(globals._sceneStack___172458, globals._scene___172457); + s.tmp_0 = game_init__P172465_mk(s); + s.tmp_0.arg0 = true; + s.callLocIdx = 1339; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + r0 = pxsim_numops_toBoolDecr(globals._scenePushHandlers___172459); + if (!r0) { step = 3; continue; } + r0 = pxsim_pxtcore_mkAction(1, game_pushScene_inline__P178941); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.oldScene___178924); + s.tmp_1 = helpers_arrayForEach__P166636_mk(s); + s.tmp_1.arg0 = globals._scenePushHandlers___172459; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 1341; s.pc = 9; return s.tmp_1; + case 9: + r0 = s.retval; + case 3: + case 4: r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_swap__P171877.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"]} +game_pushScene__P169530.info = {"start":4760,"length":367,"line":148,"column":4,"endLine":159,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"pushScene","argumentNames":[]} -function helpers_swap__P171877_mk(s) { +function game_pushScene__P169530_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_swap__P171877, depth: s.depth + 1, + parent: s, fn: game_pushScene__P169530, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - temp___180023: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, + oldScene___178924: undefined, } } -function scene_Camera_update__P169325(s) { +function game_pushScene_inline__P178941(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11641,179 +12249,29 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.elapsed___180292 = undefined; - s.percentComplete___180306 = undefined; - s.damp___180313 = undefined; - s.f___180322 = undefined; - s.x___180328 = undefined; - s.y___180335 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, scene_Camera__C169308_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__P168881_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_3.arg0 = r0; - s.callLocIdx = 1121; 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__P168883_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 1122; 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__P169314_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_2 = Sprite_x__P168881_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 1123; s.pc = 12; return s.tmp_2; - case 12: - r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_ImageMethods.width(globals.screen___168559); - 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 = 1124; s.pc = 11; return s.tmp_0; - case 11: - r0 = s.retval; - s.tmp_0 = scene_Camera_offsetY__P169316_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_2 = Sprite_y__P168883_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 1125; s.pc = 14; return s.tmp_2; - case 14: - r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_ImageMethods.height(globals.screen___168559); - 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 = 1126; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; + 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 = 1340; s.pc = 1; return s.tmp_0; 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___180292 = (r0); - r0 = s.arg0.fields["shakeDuration"]; - s.tmp_1 = r0; - r0 = (s.elapsed___180292 >= 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___180292 / s.tmp_0); - s.percentComplete___180306 = (r0); - s.damp___180313 = (1); - r0 = (s.percentComplete___180306 >= 0.75); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - s.tmp_1 = Math_max__P166657_mk(s); - s.tmp_1.arg0 = 0; - r0 = (1 - s.percentComplete___180306); - s.tmp_1.arg1 = r0; - s.callLocIdx = 1129; s.pc = 15; return s.tmp_1; - case 15: r0 = s.retval; - s.damp___180313 = (r0); - case 4: - case 5: - r0 = s.arg0.fields["shakeAmplitude"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 * s.damp___180313); - s.f___180322 = (r0); - r0 = pxsim.Math_.random(); - s.tmp_1 = r0; - r0 = (s.tmp_1 * s.f___180322); - s.tmp_0 = r0; - r0 = (s.tmp_0 >> 0); - s.x___180328 = (r0); - r0 = pxsim.Math_.random(); - s.tmp_1 = r0; - r0 = (s.tmp_1 * s.f___180322); - s.tmp_0 = r0; - r0 = (s.tmp_0 >> 0); - s.y___180335 = (r0); - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["drawOffsetX"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 + s.x___180328); - 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___180335); - 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__P169325.info = {"start":2563,"length":1418,"line":83,"column":8,"endLine":116,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"update","argumentNames":["this"]} +game_pushScene_inline__P178941.info = {"start":5091,"length":18,"line":157,"column":39,"endLine":157,"endColumn":57,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":["cb"]} -function scene_Camera_update__P169325_mk(s) { +function game_pushScene_inline__P178941_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Camera_update__P169325, depth: s.depth + 1, + parent: s, fn: game_pushScene_inline__P178941, depth: s.depth + 1, pc: 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___180292: undefined, - percentComplete___180306: undefined, - damp___180313: undefined, - f___180322: undefined, - x___180328: undefined, - y___180335: undefined, arg0: undefined, } } @@ -11821,7 +12279,7 @@ function scene_Camera_update__P169325_mk(s) { -function scene_Camera_offsetY__P169316(s) { +function game_init__P172465(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11831,71 +12289,56 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___180354 = 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__C169308_VT)) failedCast(r0); - s.tmp_0 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1112; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - s.scene___180354 = (r0); - r0 = s.scene___180354.fields["tileMap"]; + r0 = pxsim_numops_toBoolDecr(globals._scene___172457); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 1; continue; } + if (!r0) { step = 1; continue; } r0 = s.tmp_0; { step = 2; continue; } case 1: - r0 = s.scene___180354.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); + r0 = s.arg0; case 2: // jmp value (already in r0) - s.tmp_6 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_6); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); if (!r0) { step = 3; continue; } - s.tmp_7 = r0 = s.arg0; - s.tmp_10 = tiles_TileMap_offsetY__P169269_mk(s); - r0 = s.scene___180354.fields["tileMap"]; - s.tmp_10.arg0 = r0; - s.tmp_10.arg1 = s.arg1; - s.callLocIdx = 1114; s.pc = 6; return s.tmp_10; + r0 = pxsim_pxtcore_mkClassInstance(scene_Scene__C169370_VT); + s.tmp_3 = r0; + s.tmp_4 = scene_Scene_constructor__P169393_mk(s); + s.tmp_4.arg0 = s.tmp_3; + s.tmp_5 = control_pushEventContext__P166936_mk(s); + s.callLocIdx = 1333; s.pc = 6; return s.tmp_5; 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; } + s.tmp_4.arg1 = r0; + s.tmp_4.arg2 = globals._scene___172457; + s.callLocIdx = 1334; s.pc = 5; return s.tmp_4; + case 5: + r0 = s.retval; + globals._scene___172457 = (s.tmp_3); 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: + s.tmp_0 = scene_Scene_init__P169394_mk(s); + s.tmp_0.arg0 = globals._scene___172457; + s.callLocIdx = 1335; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -scene_Camera_offsetY__P169316.info = {"start":1152,"length":291,"line":39,"column":8,"endLine":46,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"offsetY","argumentNames":["this","v"]} +game_init__P172465.info = {"start":4560,"length":194,"line":141,"column":4,"endLine":146,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"init","argumentNames":["forceNewScene"]} -function scene_Camera_offsetY__P169316_mk(s) { +function game_init__P172465_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Camera_offsetY__P169316, depth: s.depth + 1, + parent: s, fn: game_init__P172465, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -11903,21 +12346,14 @@ function scene_Camera_offsetY__P169316_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, - scene___180354: undefined, arg0: undefined, - arg1: undefined, } } -function tiles_TileMap_enabled__P169274(s) { +function scene_Scene_init__P169394(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11932,101 +12368,133 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C169262_VT)) failedCast(r0); - r0 = s.arg0.fields["_map"]; - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!checkSubtype(r0, scene_Scene__C169370_VT)) failedCast(r0); + r0 = s.arg0.fields["allSprites"]; s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); - return leaveAccessor(s, r0) - default: oops() -} } } -tiles_TileMap_enabled__P169274.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__P169274.isGetter = true; - -function tiles_TileMap_enabled__P169274_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_TileMap_enabled__P169274, depth: s.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__P169269(s) { -let r0 = s.r0, 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__C169262_VT)) failedCast(r0); - s.tmp_0 = Math_clamp__P166654_mk(s); - s.tmp_0.arg0 = 0; - s.tmp_1 = Math_max__P166657_mk(s); - s.tmp_3 = tiles_TileMap_areaHeight__P169271_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 1041; s.pc = 3; return s.tmp_3; - case 3: + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + { step = 3; continue; } + case 1: + case 2: + s.tmp_1 = power_poke__P168456_mk(s); + s.callLocIdx = 1137; s.pc = 4; return s.tmp_1; + case 4: r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_ImageMethods.height(globals.screen___168559); - s.tmp_4 = r0; - r0 = (s.tmp_2 - s.tmp_4); + 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__P178971); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = control_EventContext_registerFrameHandler__P166930_mk(s); + r0 = s.arg0.fields["eventContext"]; s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 0; - s.callLocIdx = 1042; s.pc = 2; return s.tmp_1; - case 2: + s.tmp_1.arg1 = 8; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 1140; s.pc = 5; return s.tmp_1; + case 5: r0 = s.retval; - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = s.arg1; - s.callLocIdx = 1043; s.pc = 1; return s.tmp_0; - case 1: + s.tmp_0 = control_EventContext_registerFrameHandler__P166930_mk(s); + r0 = s.arg0.fields["eventContext"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = 13; + s.tmp_0.arg2 = controller__moveSprites__P168660; + s.callLocIdx = 1141; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P178994); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = control_EventContext_registerFrameHandler__P166930_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 = 1143; s.pc = 7; return s.tmp_1; + case 7: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P179007); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = control_EventContext_registerFrameHandler__P166930_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 = 1147; s.pc = 8; return s.tmp_1; + case 8: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P179028); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = control_EventContext_registerFrameHandler__P166930_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 = 1149; s.pc = 9; return s.tmp_1; + case 9: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P179036); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = control_EventContext_registerFrameHandler__P166930_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 = 1153; s.pc = 10; return s.tmp_1; + case 10: + r0 = s.retval; + s.tmp_0 = control_EventContext_registerFrameHandler__P166930_mk(s); + r0 = s.arg0.fields["eventContext"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = 200; + s.tmp_0.arg2 = control___screen_update__P168520; + s.callLocIdx = 1154; s.pc = 11; return s.tmp_0; + case 11: + r0 = s.retval; + s.tmp_0 = multiplayer_initServer__P169915_mk(s); + s.callLocIdx = 1155; s.pc = 12; return s.tmp_0; + case 12: r0 = s.retval; + s.tmp_0 = multiplayer_initPlayerConnectionListeners__P169916_mk(s); + s.callLocIdx = 1156; s.pc = 13; return s.tmp_0; + case 13: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P179067); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = helpers_arrayForEach__P166636_mk(s); + s.tmp_1.arg0 = globals.scene_Scene_initializers___169392; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 1158; s.pc = 14; return s.tmp_1; + case 14: + r0 = s.retval; + case 3: + r0 = undefined; return leave(s, r0) default: oops() } } } -tiles_TileMap_offsetY__P169269.info = {"start":9630,"length":123,"line":329,"column":8,"endLine":331,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"offsetY","argumentNames":["this","value"]} +scene_Scene_init__P169394.info = {"start":4432,"length":2572,"line":127,"column":8,"endLine":187,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"init","argumentNames":["this"]} -function tiles_TileMap_offsetY__P169269_mk(s) { +function scene_Scene_init__P169394_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_offsetY__P169269, depth: s.depth + 1, + parent: s, fn: scene_Scene_init__P169394, depth: s.depth + 1, pc: 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__P169271(s) { +function scene_Scene_init_inline__P178971(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12036,53 +12504,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, tiles_TileMap__C169262_VT)) failedCast(r0); - r0 = s.arg0.fields["_map"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.arg0.fields["_map"]; + s.tmp_0 = r0 = s.caps[0]; + r0 = s.tmp_0.fields["_millis"]; s.tmp_2 = r0; - r0 = s.tmp_2.fields["_height"]; - s.tmp_1 = r0; - r0 = s.arg0.fields["_scale"]; + r0 = s.caps[0].fields["eventContext"]; + r0 = r0.fields["deltaTimeMillis"]; s.tmp_3 = r0; - r0 = (s.tmp_1 << s.tmp_3); - { step = 2; continue; } + 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__P168692_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 = 1139; s.pc = 1; return s.tmp_0; case 1: - r0 = 0; - case 2: - // jmp value (already in r0) - s.tmp_4 = r0; - r0 = s.tmp_4; + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -tiles_TileMap_areaHeight__P169271.info = {"start":9864,"length":93,"line":337,"column":8,"endLine":339,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"areaHeight","argumentNames":["this"]} +scene_Scene_init_inline__P178971.info = {"start":4722,"length":217,"line":134,"column":72,"endLine":138,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} -function tiles_TileMap_areaHeight__P169271_mk(s) { +function scene_Scene_init_inline__P178971_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_areaHeight__P169271, depth: s.depth + 1, + parent: s, fn: scene_Scene_init_inline__P178971, depth: s.depth + 1, pc: 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 tiles_TileMap_scale__P169265(s) { +function scene_Scene_init_inline__P178994(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12092,32 +12554,41 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C169262_VT)) failedCast(r0); - r0 = s.arg0.fields["_scale"]; - return leaveAccessor(s, r0) + s.tmp_0 = PhysicsEngine__C169038_v4_2_mk(s); + r0 = s.caps[0].fields["physicsEngine"]; + s.tmp_0.arg0 = r0; + r0 = s.caps[0].fields["eventContext"]; + s.tmp_1 = r0; + r0 = s.tmp_1.fields["deltaTimeMillis"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 / 1000); + s.tmp_0.arg1 = r0; + if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C169038_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() } } } -tiles_TileMap_scale__P169265.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__P169265.isGetter = true; +scene_Scene_init_inline__P178994.info = {"start":5234,"length":159,"line":143,"column":69,"endLine":146,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} -function tiles_TileMap_scale__P169265_mk(s) { +function scene_Scene_init_inline__P178994_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_scale__P169265, depth: s.depth + 1, + parent: s, fn: scene_Scene_init_inline__P178994, 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 tiles_TileMapData_height__P169247(s) { +function scene_Scene_init_inline__P179007(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12127,32 +12598,80 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; + s.dt___179008 = undefined; + s.s___179016 = undefined; + s.unnamed832___U2 = undefined; + s.unnamed833___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___179008 = (r0); + s.tmp_0 = scene_Camera_update__P169325_mk(s); + r0 = s.caps[0].fields["camera"]; + s.tmp_0.arg0 = r0; + s.callLocIdx = 1145; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.s___179016 = (undefined); + r0 = s.caps[0].fields["allSprites"]; + s.unnamed832___U2 = (r0); + s.unnamed833___U3 = (0); + case 1: + s.tmp_0 = r0 = s.unnamed833___U3; + r0 = pxsim_Array__length(s.unnamed832___U2); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 2; continue; } + r0 = pxsim_Array__getAt(s.unnamed832___U2, s.unnamed833___U3); + s.s___179016 = (r0); + s.tmp_2 = if___update_3_mk(s); + s.tmp_2.arg0 = s.s___179016; + r0 = s.caps[0].fields["camera"]; + s.tmp_2.arg1 = r0; + s.tmp_2.arg2 = s.dt___179008; + if (!s.tmp_2.arg0.vtable.iface) { + setupLambda(s.tmp_2, pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "__update"), 3); + s.callLocIdx = 1146; 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 = 1146; s.pc = 4; return s.tmp_2; } + else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 1146; s.pc = 4; return s.tmp_2;; } + else { s.callLocIdx = 1146; s.pc = 4; return s.tmp_2; } } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMapData__C169244_VT)) failedCast(r0); - r0 = s.arg0.fields["_height"]; - return leaveAccessor(s, r0) + case 4: + r0 = s.retval; + r0 = (s.unnamed833___U3 + 1); + s.unnamed833___U3 = (r0); + { step = 1; continue; } + case 2: + s.unnamed832___U2 = (undefined); + r0 = undefined; + return leave(s, r0) default: oops() } } } -tiles_TileMapData_height__P169247.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__P169247.isGetter = true; +scene_Scene_init_inline__P179007.info = {"start":5582,"length":214,"line":152,"column":79,"endLine":158,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} -function tiles_TileMapData_height__P169247_mk(s) { +function scene_Scene_init_inline__P179007_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMapData_height__P169247, depth: s.depth + 1, + parent: s, fn: scene_Scene_init_inline__P179007, 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, + dt___179008: undefined, + s___179016: undefined, + unnamed832___U2: undefined, + unnamed833___U3: undefined, } } -function scene_Camera_offsetY__P169315(s) { +function scene_Scene_init_inline__P179028(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12162,32 +12681,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, scene_Camera__C169308_VT)) failedCast(r0); - r0 = s.arg0.fields["_offsetY"]; - return leaveAccessor(s, r0) + s.tmp_0 = scene_Scene_render__P169399_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.callLocIdx = 1148; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) default: oops() } } } -scene_Camera_offsetY__P169315.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__P169315.isGetter = true; +scene_Scene_init_inline__P179028.info = {"start":5937,"length":109,"line":163,"column":76,"endLine":166,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} -function scene_Camera_offsetY__P169315_mk(s) { +function scene_Scene_init_inline__P179028_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Camera_offsetY__P169315, depth: s.depth + 1, + parent: s, fn: scene_Scene_init_inline__P179028, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, + tmp_0: undefined, } } -function scene_Camera_offsetX__P169314(s) { +function scene_Scene_init_inline__P179036(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12197,71 +12714,91 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___180414 = 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__C169308_VT)) failedCast(r0); - s.tmp_0 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1109; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - s.scene___180414 = (r0); - r0 = s.scene___180414.fields["tileMap"]; - s.tmp_0 = r0; + s.tmp_0 = r0 = globals.stats___169495; r0 = pxsim_numops_toBool(s.tmp_0); if (r0) { step = 1; continue; } r0 = s.tmp_0; { step = 2; continue; } case 1: - r0 = s.scene___180414.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); + r0 = globals.control_EventContext_onStats___166925; case 2: // jmp value (already in r0) - s.tmp_6 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_6); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); if (!r0) { step = 3; continue; } - s.tmp_7 = r0 = s.arg0; - s.tmp_10 = tiles_TileMap_offsetX__P169268_mk(s); - r0 = s.scene___180414.fields["tileMap"]; - s.tmp_10.arg0 = r0; - s.tmp_10.arg1 = s.arg1; - s.callLocIdx = 1111; s.pc = 6; return s.tmp_10; - case 6: + s.tmp_2 = lambda_2_mk(s); + s.tmp_2.argL = globals.control_EventContext_onStats___166925; + if ((globals.control_EventContext_lastStats___166924) && (globals.control_EventContext_lastStats___166924).vtable) { + setupResume(s, 8); + pxsim_String__stringConv(globals.control_EventContext_lastStats___166924); + checkResumeConsumed(); + return; + } else { s.retval = (globals.control_EventContext_lastStats___166924) + ""; } + case 8: r0 = s.retval; - s.tmp_9 = r0; - r0 = pxsim.Math_.floor(s.tmp_9); + s.tmp_3 = r0; + r0 = s.caps[0].fields["allSprites"]; s.tmp_8 = r0; - r0 = (s.tmp_7).fields["_offsetX"] = (s.tmp_8); - { step = 4; continue; } + 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 = 1150; s.pc = 7; return s.tmp_2; + case 7: + r0 = s.retval; case 3: - s.tmp_0 = r0 = s.arg0; - r0 = pxsim.Math_.floor(s.arg1); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_offsetX"] = (s.tmp_1); case 4: + r0 = pxsim_numops_toBoolDecr(globals.debug___169494); + if (!r0) { step = 5; continue; } + s.tmp_0 = PhysicsEngine__C169038_v3_1_mk(s); + r0 = s.caps[0].fields["physicsEngine"]; + s.tmp_0.arg0 = r0; + if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C169038_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__P169654_mk(s); + s.callLocIdx = 1151; s.pc = 12; return s.tmp_0; + case 12: + r0 = s.retval; + s.tmp_0 = power_checkDeepSleep__P168457_mk(s); + s.callLocIdx = 1152; s.pc = 13; return s.tmp_0; + case 13: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -scene_Camera_offsetX__P169314.info = {"start":784,"length":291,"line":28,"column":8,"endLine":35,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"offsetX","argumentNames":["this","v"]} +scene_Scene_init_inline__P179036.info = {"start":6163,"length":504,"line":168,"column":80,"endLine":180,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} -function scene_Camera_offsetX__P169314_mk(s) { +function scene_Scene_init_inline__P179036_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Camera_offsetX__P169314, depth: s.depth + 1, + parent: s, fn: scene_Scene_init_inline__P179036, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -12272,18 +12809,13 @@ function scene_Camera_offsetX__P169314_mk(s) { tmp_6: undefined, tmp_7: undefined, tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - scene___180414: undefined, - arg0: undefined, - arg1: undefined, } } -function tiles_TileMap_offsetX__P169268(s) { +function scene_Scene_init_inline__P179067(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12295,57 +12827,35 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C169262_VT)) failedCast(r0); - s.tmp_0 = Math_clamp__P166654_mk(s); - s.tmp_0.arg0 = 0; - s.tmp_1 = Math_max__P166657_mk(s); - s.tmp_3 = tiles_TileMap_areaWidth__P169270_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 1038; s.pc = 3; return s.tmp_3; - case 3: - r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_ImageMethods.width(globals.screen___168559); - s.tmp_4 = r0; - r0 = (s.tmp_2 - s.tmp_4); - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 0; - s.callLocIdx = 1039; 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 = 1040; s.pc = 1; return s.tmp_0; + s.tmp_0 = lambda_2_mk(s); + s.tmp_0.argL = s.arg0; + s.tmp_0.arg0 = s.caps[0]; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 1157; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -tiles_TileMap_offsetX__P169268.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_init_inline__P179067.info = {"start":6980,"length":12,"line":186,"column":39,"endLine":186,"endColumn":51,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":["f"]} -function tiles_TileMap_offsetX__P169268_mk(s) { +function scene_Scene_init_inline__P179067_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_offsetX__P169268, depth: s.depth + 1, + parent: s, fn: scene_Scene_init_inline__P179067, depth: s.depth + 1, pc: 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_areaWidth__P169270(s) { +function multiplayer_initPlayerConnectionListeners__P169916(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12355,53 +12865,43 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C169262_VT)) failedCast(r0); - r0 = s.arg0.fields["_map"]; + s.p___179070 = undefined; + s.p___179070 = (1); + case 1: + r0 = (s.p___179070 <= 4); 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"]; - s.tmp_3 = r0; - r0 = (s.tmp_1 << s.tmp_3); - { step = 2; continue; } - case 1: - r0 = 0; + if (!r0) { step = 2; continue; } + s.tmp_1 = multiplayer_registerPlayerConnectionListeners__P172913_mk(s); + s.tmp_1.arg0 = s.p___179070; + s.callLocIdx = 1787; s.pc = 3; return s.tmp_1; + case 3: + r0 = s.retval; + r0 = (s.p___179070 + 1); + s.p___179070 = (r0); + { step = 1; continue; } 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__P169270.info = {"start":9763,"length":91,"line":333,"column":8,"endLine":335,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"areaWidth","argumentNames":["this"]} +multiplayer_initPlayerConnectionListeners__P169916.info = {"start":1324,"length":154,"line":39,"column":4,"endLine":43,"endColumn":5,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"initPlayerConnectionListeners","argumentNames":[]} -function tiles_TileMap_areaWidth__P169270_mk(s) { +function multiplayer_initPlayerConnectionListeners__P169916_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_areaWidth__P169270, depth: s.depth + 1, + parent: s, fn: multiplayer_initPlayerConnectionListeners__P169916, depth: s.depth + 1, pc: 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, + p___179070: undefined, } } -function tiles_TileMapData_width__P169246(s) { +function multiplayer_registerPlayerConnectionListeners__P172913(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12415,55 +12915,41 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMapData__C169244_VT)) failedCast(r0); - r0 = s.arg0.fields["_width"]; - return leaveAccessor(s, r0) - default: oops() -} } } -tiles_TileMapData_width__P169246.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__P169246.isGetter = true; - -function tiles_TileMapData_width__P169246_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_TileMapData_width__P169246, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function scene_Camera_offsetX__P169313(s) { -let r0 = s.r0, 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__C169308_VT)) failedCast(r0); - r0 = s.arg0.fields["_offsetX"]; - return leaveAccessor(s, r0) + r0 = pxsim_pxtcore_mkAction(1, multiplayer_registerPlayerConnectionListeners_inline__P179082); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = control_onEvent__P166918_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 = 1789; s.pc = 1; return s.tmp_1; + case 1: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, multiplayer_registerPlayerConnectionListeners_inline__P179088); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = control_onEvent__P166918_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 = 1791; s.pc = 2; return s.tmp_1; + case 2: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) default: oops() } } } -scene_Camera_offsetX__P169313.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__P169313.isGetter = true; +multiplayer_registerPlayerConnectionListeners__P172913.info = {"start":1484,"length":415,"line":45,"column":4,"endLine":56,"endColumn":5,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"registerPlayerConnectionListeners","argumentNames":["playerNumber"]} -function scene_Camera_offsetX__P169313_mk(s) { +function multiplayer_registerPlayerConnectionListeners__P172913_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Camera_offsetX__P169313, depth: s.depth + 1, + parent: s, fn: multiplayer_registerPlayerConnectionListeners__P172913, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, arg0: undefined, } } @@ -12471,7 +12957,7 @@ function scene_Camera_offsetX__P169313_mk(s) { -function Sprite_y__P168883(s) { +function multiplayer_registerPlayerConnectionListeners_inline__P179082(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12481,47 +12967,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, Sprite__C168868_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) + s.tmp_0 = multiplayer_receiveConnectionChangedEvent__P172914_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_0.arg1 = true; + s.callLocIdx = 1788; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_y__P168883.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__P168883.isGetter = true; +multiplayer_registerPlayerConnectionListeners_inline__P179082.info = {"start":1656,"length":55,"line":49,"column":12,"endLine":49,"endColumn":67,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"inline","argumentNames":[]} -function Sprite_y__P168883_mk(s) { +function multiplayer_registerPlayerConnectionListeners_inline__P179082_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_y__P168883, depth: s.depth + 1, + parent: s, fn: multiplayer_registerPlayerConnectionListeners_inline__P179082, depth: s.depth + 1, pc: 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__P166700(s) { +function multiplayer_registerPlayerConnectionListeners_inline__P179088(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12531,29 +13001,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 / 256); + s.tmp_0 = multiplayer_receiveConnectionChangedEvent__P172914_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_0.arg1 = false; + s.callLocIdx = 1790; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -Fx_toFloat__P166700.info = {"start":2470,"length":81,"line":77,"column":4,"endLine":79,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"toFloat","argumentNames":["v"]} +multiplayer_registerPlayerConnectionListeners_inline__P179088.info = {"start":1826,"length":56,"line":54,"column":12,"endLine":54,"endColumn":68,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"inline","argumentNames":[]} -function Fx_toFloat__P166700_mk(s) { +function multiplayer_registerPlayerConnectionListeners_inline__P179088_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_toFloat__P166700, depth: s.depth + 1, + parent: s, fn: multiplayer_registerPlayerConnectionListeners_inline__P179088, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, + tmp_0: undefined, } } -function Fx_div__P166689(s) { +function multiplayer_receiveConnectionChangedEvent__P172914(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12563,25 +13035,58 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.c___179093 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg0 << 8); - s.tmp_0 = r0; - r0 = pxsim.Math_.idiv(s.tmp_0, s.arg1); + 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___179093 = (globals.player1___168650); + { step = 5; continue; } + case 2: + s.c___179093 = (globals.player2___168647); + { step = 5; continue; } + case 3: + s.c___179093 = (globals.player3___168648); + { step = 5; continue; } + case 4: + s.c___179093 = (globals.player4___168649); + case 5: + r0 = pxsim_numops_toBoolDecr(s.c___179093); + if (!r0) { step = 6; continue; } + s.tmp_0 = controller_Controller_connected__P168683_mk(s); + s.tmp_0.arg0 = s.c___179093; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 1792; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + case 6: + case 7: + r0 = undefined; return leave(s, r0) default: oops() } } } -Fx_div__P166689.info = {"start":1145,"length":129,"line":35,"column":4,"endLine":37,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"div","argumentNames":["a","b"]} +multiplayer_receiveConnectionChangedEvent__P172914.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 Fx_div__P166689_mk(s) { +function multiplayer_receiveConnectionChangedEvent__P172914_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_div__P166689, depth: s.depth + 1, + parent: s, fn: multiplayer_receiveConnectionChangedEvent__P172914, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + c___179093: undefined, arg0: undefined, arg1: undefined, } } @@ -12590,7 +13095,7 @@ function Fx_div__P166689_mk(s) { -function Fx_add__P166684(s) { +function controller_Controller_connected__P168683(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12605,17 +13110,45 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg0 + s.arg1); + r0 = s.arg0; + if (!checkSubtype(r0, controller_Controller__C168661_VT)) failedCast(r0); + r0 = s.arg0.fields["_connected"]; + s.tmp_1 = r0; + r0 = (s.arg1 != s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = (s.arg0).fields["_connected"] = (s.arg1); + r0 = s.arg0.fields["_connected"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = 1; + { step = 2; continue; } + case 1: + r0 = 2; + case 2: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = s.arg0.fields["_id"]; + s.tmp_2 = r0; + r0 = pxsim.control.raiseEvent(s.tmp_2, s.tmp_1); + case 3: + case 4: + r0 = undefined; return leave(s, r0) default: oops() } } } -Fx_add__P166684.info = {"start":511,"length":118,"line":20,"column":4,"endLine":22,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"add","argumentNames":["a","b"]} +controller_Controller_connected__P168683.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 Fx_add__P166684_mk(s) { +function controller_Controller_connected__P168683_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_add__P166684, depth: s.depth + 1, + parent: s, fn: controller_Controller_connected__P168683, 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, } } @@ -12624,7 +13157,7 @@ function Fx_add__P166684_mk(s) { -function Sprite_x__P168881(s) { +function controller__player1__P168655(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12634,47 +13167,71 @@ 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__C168868_VT)) failedCast(r0); - r0 = s.arg0.fields["_x"]; + r0 = pxsim_numops_toBoolDecr(globals._players___172173); s.tmp_1 = r0; - r0 = s.arg0.fields["_width"]; + 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__getAt(globals._players___172173, 0); s.tmp_3 = r0; - r0 = (s.tmp_3 << 8); - s.tmp_4 = r0; - r0 = pxsim.Math_.idiv(s.tmp_4, 512); + r0 = pxsim_numops_toBoolDecr(s.tmp_3); 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 = pxsim_Boolean__bang(s.tmp_2); + case 2: + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + if (!r0) { step = 3; continue; } + r0 = pxsim_pxtcore_mkClassInstance(controller_Controller__C168661_VT); + s.tmp_5 = r0; + r0 = pxsim_Array__mk(); + s.tmp_6 = r0; + r0 = pxsim_Array__push(s.tmp_6, globals.left___168642); + r0 = pxsim_Array__push(s.tmp_6, globals.up___168643); + r0 = pxsim_Array__push(s.tmp_6, globals.right___168644); + r0 = pxsim_Array__push(s.tmp_6, globals.down___168645); + r0 = pxsim_Array__push(s.tmp_6, globals.A___168640); + r0 = pxsim_Array__push(s.tmp_6, globals.B___168641); + r0 = pxsim_Array__push(s.tmp_6, globals.menu___168646); + s.tmp_7 = controller_Controller_constructor__P168665_mk(s); + s.tmp_7.arg0 = s.tmp_5; + s.tmp_7.arg1 = 1; + s.tmp_7.arg2 = s.tmp_6; + s.callLocIdx = 223; s.pc = 5; return s.tmp_7; + case 5: + r0 = s.retval; + case 3: + case 4: + r0 = pxsim_Array__getAt(globals._players___172173, 0); + return leave(s, r0) default: oops() } } } -Sprite_x__P168881.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__P168881.isGetter = true; +controller__player1__P168655.info = {"start":1381,"length":258,"line":47,"column":4,"endLine":51,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"_player1","argumentNames":[]} -function Sprite_x__P168881_mk(s) { +function controller__player1__P168655_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_x__P168881, depth: s.depth + 1, + parent: s, fn: controller__player1__P168655, depth: s.depth + 1, pc: 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, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, } } -function PhysicsEngine_move__P169044(s) { +function controller_Controller_constructor__P168665(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12684,33 +13241,120 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.leftId___179149 = undefined; + s.i___179157 = undefined; + s.i___179175 = 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, PhysicsEngine__C169038_VT)) failedCast(r0); + if (!checkSubtype(r0, controller_Controller__C168661_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim.control.allocateNotifyEvent(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_id"] = (s.tmp_1); + r0 = (s.arg0).fields["_connected"] = (false); + r0 = (s.arg0).fields["playerIndex"] = (s.arg1); + r0 = (s.arg0).fields["analog"] = (false); + r0 = pxsim_numops_toBoolDecr(s.arg2); + if (!r0) { step = 1; continue; } + r0 = (s.arg0).fields["buttons"] = (s.arg2); + { step = 4; continue; } + case 1: + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["buttons"] = (s.tmp_1); + r0 = s.arg0.fields["playerIndex"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 - 1); + s.tmp_1 = r0; + r0 = (s.tmp_1 * 7); + s.tmp_0 = r0; + r0 = (1 + s.tmp_0); + s.leftId___179149 = (r0); + s.i___179157 = (0); + case 2: + r0 = (s.i___179157 < 7); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C168716_VT); + s.tmp_1 = r0; + s.tmp_2 = controller_Button_constructor__P168722_mk(s); + s.tmp_2.arg0 = s.tmp_1; + r0 = (s.leftId___179149 + s.i___179157); + s.tmp_2.arg1 = r0; + s.tmp_2.arg2 = -1; + s.callLocIdx = 229; s.pc = 7; return s.tmp_2; + case 7: + r0 = s.retval; + r0 = s.arg0.fields["buttons"]; + s.tmp_3 = r0; + r0 = pxsim_Array__push(s.tmp_3, s.tmp_1); + r0 = (s.i___179157 + 1); + s.i___179157 = (r0); + { step = 2; continue; } + case 3: + case 4: + s.i___179175 = (0); + case 5: + s.tmp_1 = r0 = s.i___179175; + r0 = s.arg0.fields["buttons"]; + s.tmp_3 = r0; + r0 = pxsim_Array__length(s.tmp_3); + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 6; continue; } + r0 = s.arg0.fields["buttons"]; + s.tmp_5 = r0; + r0 = pxsim_Array__getAt(s.tmp_5, s.i___179175); + s.tmp_4 = r0; + r0 = (s.tmp_4).fields["_owner"] = (s.arg0); + r0 = (s.i___179175 + 1); + s.i___179175 = (r0); + { step = 5; continue; } + case 6: + s.tmp_0 = controller_addController__P172237_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 230; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -PhysicsEngine_move__P169044.info = {"start":351,"length":20,"line":18,"column":4,"endLine":18,"endColumn":24,"fileName":"pxt_modules/game/physics.ts","functionName":"move","argumentNames":["this","dt"]} +controller_Controller_constructor__P168665.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 PhysicsEngine_move__P169044_mk(s) { +function controller_Controller_constructor__P168665_mk(s) { checkStack(s.depth); return { - parent: s, fn: PhysicsEngine_move__P169044, depth: s.depth + 1, + parent: s, fn: controller_Controller_constructor__P168665, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + leftId___179149: undefined, + i___179157: undefined, + i___179175: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function PhysicsEngine_draw__P169043(s) { +function controller_addController__P172237(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12724,19 +13368,36 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, PhysicsEngine__C169038_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(globals._players___172173); + 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___172173 = (r0); + case 1: + case 2: + s.tmp_0 = r0 = globals._players___172173; + r0 = s.arg0.fields["playerIndex"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 - 1); + s.tmp_1 = r0; + r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_1, s.arg0); r0 = undefined; return leave(s, r0) default: oops() } } } -PhysicsEngine_draw__P169043.info = {"start":279,"length":10,"line":15,"column":4,"endLine":15,"endColumn":14,"fileName":"pxt_modules/game/physics.ts","functionName":"draw","argumentNames":["this"]} +controller_addController__P172237.info = {"start":1218,"length":157,"line":40,"column":4,"endLine":45,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"addController","argumentNames":["ctrl"]} -function PhysicsEngine_draw__P169043_mk(s) { +function controller_addController__P172237_mk(s) { checkStack(s.depth); return { - parent: s, fn: PhysicsEngine_draw__P169043, depth: s.depth + 1, + parent: s, fn: controller_addController__P172237, 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, } } @@ -12744,7 +13405,7 @@ function PhysicsEngine_draw__P169043_mk(s) { -function controller___update__P168692(s) { +function multiplayer_initServer__P169915(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12754,51 +13415,47 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.dtms___180679 = 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___180679 = (r0); - r0 = pxsim_pxtcore_mkAction(1, controller___update_inline__P180686); + r0 = pxsim.multiplayer.getOrigin(); + s.tmp_1 = r0; + r0 = (s.tmp_1 === "server"); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.dtms___180679); - s.tmp_1 = helpers_arrayForEach__P166636_mk(s); - s.tmp_2 = controller_players__P168656_mk(s); - s.callLocIdx = 287; s.pc = 2; return s.tmp_2; - case 2: + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_2 = control_EventContext_registerFrameHandler__P166930_mk(s); + s.tmp_3 = game_eventContext__P169529_mk(s); + s.callLocIdx = 1785; s.pc = 4; return s.tmp_3; + case 4: r0 = s.retval; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 289; s.pc = 1; return s.tmp_1; - case 1: + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = 210; + s.tmp_2.arg2 = multiplayer_initServer_inline__P179235; + s.callLocIdx = 1786; s.pc = 3; return s.tmp_2; + case 3: r0 = s.retval; + case 1: + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -controller___update__P168692.info = {"start":13733,"length":137,"line":414,"column":4,"endLine":417,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"__update","argumentNames":["dt"]} +multiplayer_initServer__P169915.info = {"start":1011,"length":307,"line":29,"column":4,"endLine":37,"endColumn":5,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"initServer","argumentNames":[]} -function controller___update__P168692_mk(s) { +function multiplayer_initServer__P169915_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller___update__P168692, depth: s.depth + 1, + parent: s, fn: multiplayer_initServer__P169915, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - dtms___180679: undefined, - arg0: undefined, + tmp_3: undefined, } } -function controller___update_inline__P180686(s) { +function multiplayer_initServer_inline__P179235(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12808,36 +13465,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - s.tmp_0 = controller_Controller___update__P168690_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.caps[0]; - s.callLocIdx = 288; s.pc = 1; return s.tmp_0; + r0 = pxsim.multiplayer.getOrigin(); + s.tmp_1 = r0; + r0 = (s.tmp_1 === "server"); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = pxsim.multiplayer.postImage(globals.screen___168559); case 1: - r0 = s.retval; + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -controller___update_inline__P180686.info = {"start":13835,"length":27,"line":416,"column":26,"endLine":416,"endColumn":53,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["ctrl"]} +multiplayer_initServer_inline__P179235.info = {"start":1175,"length":126,"line":31,"column":93,"endLine":35,"endColumn":13,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"inline","argumentNames":[]} -function controller___update_inline__P180686_mk(s) { +function multiplayer_initServer_inline__P179235_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller___update_inline__P180686, depth: s.depth + 1, + parent: s, fn: multiplayer_initServer_inline__P179235, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - arg0: undefined, + tmp_1: undefined, } } -function controller_Controller___update__P168690(s) { +function game_consoleOverlay_draw__P169654(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12847,205 +13503,191 @@ 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__C168661_VT)) failedCast(r0); - r0 = pxsim_pxtrt.mklocRef(); + s.height___179288 = undefined; + s.top___179293 = undefined; + s.i___179299 = undefined; + s.t___179312 = undefined; + s.tOff___179319 = undefined; + s.tab___179321 = undefined; + s.unnamed836___U6 = undefined; + s.unnamed837___U7 = undefined; + s.padding___179323 = undefined; + r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___172756); + 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_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + r0 = pxsim_numops_toBoolDecr(globals.instance___172710); + s.tmp_4 = r0; + r0 = pxsim_Boolean__bang(s.tmp_4); s.tmp_3 = r0; - r0 = (s.tmp_3 | 0); + r0 = pxsim_numops_toBoolDecr(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__P180699); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); - s.tmp_1 = helpers_arrayForEach__P166636_mk(s); - r0 = s.arg0.fields["buttons"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 286; s.pc = 1; return s.tmp_1; - case 1: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -controller_Controller___update__P168690.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 controller_Controller___update__P168690_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: controller_Controller___update__P168690, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function controller_Controller___update_inline__P180699(s) { -let r0 = s.r0, 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_Button___update__P168730_mk(s); - s.tmp_0.arg0 = s.arg0; - r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); - s.tmp_0.arg1 = r0; - s.callLocIdx = 285; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -controller_Controller___update_inline__P180699.info = {"start":13298,"length":25,"line":398,"column":33,"endLine":398,"endColumn":58,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["btn"]} - -function controller_Controller___update_inline__P180699_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: controller_Controller___update_inline__P180699, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, -} } - - - - - -function controller_Button___update__P168730(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.delay___180715 = undefined; - s.interval___180724 = undefined; - s.count___180737 = 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__C168716_VT)) failedCast(r0); - r0 = s.arg0.fields["_pressed"]; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 11; continue; } - case 1: + r0 = pxsim_Boolean__bang(s.tmp_2); case 2: - s.tmp_3 = r0 = s.arg0; - r0 = s.tmp_3.fields["_pressedElasped"]; + // jmp value (already in r0) s.tmp_5 = r0; - r0 = (s.tmp_5 + s.arg1); - s.tmp_4 = r0; - r0 = (s.tmp_3).fields["_pressedElasped"] = (s.tmp_4); - r0 = s.arg0.fields["repeatDelay"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 === undefined); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.tmp_5); if (!r0) { step = 3; continue; } - r0 = globals.defaultRepeatDelay___172255; - { step = 4; continue; } + { step = 13; continue; } case 3: - r0 = s.arg0.fields["repeatDelay"]; case 4: - // jmp value (already in r0) - s.tmp_2 = r0; - s.delay___180715 = (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); + s.tmp_7 = if_charHeight_1_mk(s); + s.tmp_7.arg0 = globals.consoleFont___172764; + 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 = 1554; s.pc = 14; return s.tmp_7; } + } + case 14: + r0 = s.retval; + s.tmp_6 = r0; + r0 = (s.tmp_6 + 2); + s.height___179288 = (r0); + r0 = pxsim_numops_toBoolDecr(globals.stats___169495); if (!r0) { step = 5; continue; } - r0 = globals.defaultRepeatInterval___172257; + r0 = s.height___179288; { step = 6; continue; } case 5: - r0 = s.arg0.fields["repeatInterval"]; + r0 = 0; case 6: // jmp value (already in r0) + s.tmp_0 = r0; + r0 = (2 + s.tmp_0); + s.top___179293 = (r0); + s.i___179299 = (0); + case 7: + s.tmp_1 = r0 = s.i___179299; + r0 = pxsim_Array__length(globals.consoleStrings___172756); s.tmp_2 = r0; - s.interval___180724 = (s.tmp_2); - r0 = s.arg0.fields["_pressedElasped"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 < s.delay___180715); + r0 = (s.tmp_1 < s.tmp_2); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - { step = 11; continue; } - case 7: - case 8: - r0 = s.arg0.fields["_pressedElasped"]; + if (!r0) { step = 12; continue; } + r0 = pxsim_Array__getAt(globals.consoleStrings___172756, s.i___179299); s.tmp_5 = r0; - r0 = (s.tmp_5 - s.delay___180715); + r0 = pxsim_String_.indexOf(s.tmp_5, "\t", undefined); s.tmp_4 = r0; - r0 = (s.tmp_4 - s.interval___180724); + r0 = (s.tmp_4 >= 0); s.tmp_3 = r0; - r0 = (s.tmp_3 / s.interval___180724); - s.tmp_2 = r0; - r0 = pxsim.Math_.floor(s.tmp_2); - s.count___180737 = (r0); - r0 = s.arg0.fields["_repeatCount"]; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 10; continue; } + s.tmp_6 = helpers_stringSplit__P166649_mk(s); + r0 = pxsim_Array__getAt(globals.consoleStrings___172756, s.i___179299); + s.tmp_6.arg0 = r0; + s.tmp_6.arg1 = "\t"; + s.tmp_6.arg2 = undefined; + s.callLocIdx = 1555; s.pc = 15; return s.tmp_6; + case 15: + r0 = s.retval; + s.t___179312 = (r0); + s.tOff___179319 = (0); + s.tab___179321 = (undefined); + s.unnamed836___U6 = (s.t___179312); + s.unnamed837___U7 = (0); + case 8: + s.tmp_0 = r0 = s.unnamed837___U7; + r0 = pxsim_Array__length(s.unnamed836___U6); s.tmp_1 = r0; - r0 = (s.count___180737 != s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + r0 = (s.tmp_0 < s.tmp_1); if (!r0) { step = 9; continue; } - s.tmp_2 = controller_Button_raiseButtonRepeat__P172244_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 305; s.pc = 12; return s.tmp_2; - case 12: + r0 = pxsim_Array__getAt(s.unnamed836___U6, s.unnamed837___U7); + s.tab___179321 = (r0); + s.tmp_2 = r0 = globals.tabSize___172758; + s.tmp_5 = r0 = s.tOff___179319; + r0 = pxsim_String_.length(s.tab___179321); + s.tmp_6 = r0; + r0 = (s.tmp_5 + s.tmp_6); + s.tmp_4 = r0; + r0 = (s.tmp_4 % globals.tabSize___172758); + s.tmp_3 = r0; + r0 = (s.tmp_2 - s.tmp_3); + s.padding___179323 = (r0); + s.tmp_0 = helpers_imagePrint__P168517_mk(s); + s.tmp_0.arg0 = globals.screen___168559; + s.tmp_0.arg1 = s.tab___179321; + s.tmp_2 = r0 = s.tOff___179319; + s.tmp_4 = if_charWidth_1_mk(s); + s.tmp_4.arg0 = globals.consoleFont___172764; + 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 = 1556; s.pc = 17; return s.tmp_4; } + } + case 17: r0 = s.retval; - r0 = (s.arg0).fields["_repeatCount"] = (s.count___180737); + 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___179293; + r0 = (s.i___179299 * s.height___179288); + s.tmp_6 = r0; + r0 = (s.tmp_5 + s.tmp_6); + s.tmp_0.arg3 = r0; + s.tmp_0.arg4 = globals.consoleColor___172755; + s.tmp_0.arg5 = globals.consoleFont___172764; + s.tmp_0.arg6 = undefined; + s.callLocIdx = 1557; s.pc = 16; return s.tmp_0; + case 16: + r0 = s.retval; + s.tmp_0 = r0 = s.tOff___179319; + r0 = pxsim_String_.length(s.tab___179321); + s.tmp_2 = r0; + r0 = (s.tmp_2 + s.padding___179323); + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); + s.tOff___179319 = (r0); + r0 = (s.unnamed837___U7 + 1); + s.unnamed837___U7 = (r0); + { step = 8; continue; } case 9: + s.unnamed836___U6 = (undefined); + { step = 11; continue; } case 10: + s.tmp_0 = helpers_imagePrint__P168517_mk(s); + s.tmp_0.arg0 = globals.screen___168559; + r0 = pxsim_Array__getAt(globals.consoleStrings___172756, s.i___179299); + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = 4; + s.tmp_1 = r0 = s.top___179293; + r0 = (s.i___179299 * s.height___179288); + s.tmp_2 = r0; + r0 = (s.tmp_1 + s.tmp_2); + s.tmp_0.arg3 = r0; + s.tmp_0.arg4 = globals.consoleColor___172755; + s.tmp_0.arg5 = globals.consoleFont___172764; + s.tmp_0.arg6 = undefined; + s.callLocIdx = 1558; s.pc = 18; return s.tmp_0; + case 18: + r0 = s.retval; case 11: + r0 = (s.i___179299 + 1); + s.i___179299 = (r0); + { step = 7; continue; } + case 12: + case 13: r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Button___update__P168730.info = {"start":7291,"length":704,"line":217,"column":8,"endLine":234,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"__update","argumentNames":["this","dtms"]} +game_consoleOverlay_draw__P169654.info = {"start":1364,"length":859,"line":44,"column":4,"endLine":61,"endColumn":5,"fileName":"pxt_modules/game/console.ts","functionName":"draw","argumentNames":[]} -function controller_Button___update__P168730_mk(s) { +function game_consoleOverlay_draw__P169654_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button___update__P168730, depth: s.depth + 1, + parent: s, fn: game_consoleOverlay_draw__P169654, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -13053,101 +13695,24 @@ function controller_Button___update__P168730_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - delay___180715: undefined, - interval___180724: undefined, - count___180737: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function controller_Button_raiseButtonRepeat__P172244(s) { -let r0 = s.r0, 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__C168716_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(globals._userEventsEnabled___172253); - if (!r0) { step = 1; continue; } - r0 = s.arg0.fields["id"]; - s.tmp_0 = r0; - r0 = pxsim.control.raiseEvent(2054, s.tmp_0); - { step = 2; continue; } - case 1: - r0 = s.arg0.fields["id"]; - s.tmp_0 = r0; - r0 = pxsim.control.raiseEvent(2055, s.tmp_0); - case 2: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -controller_Button_raiseButtonRepeat__P172244.info = {"start":3303,"length":211,"line":110,"column":8,"endLine":115,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"raiseButtonRepeat","argumentNames":["this"]} - -function controller_Button_raiseButtonRepeat__P172244_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: controller_Button_raiseButtonRepeat__P172244, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, -} } - - - - - -function controller_players__P168656(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.tmp_0 = controller__player1__P168655_mk(s); - s.callLocIdx = 224; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.tmp_0 = helpers_arrayFilter__P166637_mk(s); - s.tmp_0.arg0 = globals._players___172173; - s.tmp_0.arg1 = controller_players_inline__P180669; - s.callLocIdx = 225; s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; - return leave(s, r0) - default: oops() -} } } -controller_players__P168656.info = {"start":1645,"length":144,"line":53,"column":4,"endLine":56,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"players","argumentNames":[]} - -function controller_players__P168656_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: controller_players__P168656, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, + tmp_6: undefined, + tmp_7: undefined, + height___179288: undefined, + top___179293: undefined, + i___179299: undefined, + t___179312: undefined, + tOff___179319: undefined, + tab___179321: undefined, + unnamed836___U6: undefined, + unnamed837___U7: undefined, + padding___179323: undefined, } } -function controller_players_inline__P180669(s) { +function scene_systemMenu_isVisible__P169635(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13157,11 +13722,7 @@ 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); + r0 = pxsim_numops_toBoolDecr(globals.instance___172710); s.tmp_2 = r0; r0 = pxsim_Boolean__bang(s.tmp_2); s.tmp_1 = r0; @@ -13171,24 +13732,23 @@ switch (step) { return leave(s, r0) default: oops() } } } -controller_players_inline__P180669.info = {"start":1767,"length":14,"line":55,"column":31,"endLine":55,"endColumn":45,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["ctrl"]} +scene_systemMenu_isVisible__P169635.info = {"start":13170,"length":62,"line":395,"column":4,"endLine":397,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"isVisible","argumentNames":[]} -function controller_players_inline__P180669_mk(s) { +function scene_systemMenu_isVisible__P169635_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_players_inline__P180669, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_isVisible__P169635, 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_arrayFilter__P166637(s) { +function helpers_imagePrint__P168517(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13198,110 +13758,506 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.res___175552 = undefined; - s.len___175554 = undefined; - s.i___175557 = undefined; - s.v___175562 = undefined; + s.x0___179395 = undefined; + s.cp___179397 = undefined; + s.mult___179398 = undefined; + s.dataW___179403 = undefined; + s.dataH___179409 = undefined; + s.byteHeight___179415 = undefined; + s.charSize___179421 = undefined; + s.dataSize___179425 = undefined; + s.fontdata___179429 = undefined; + s.lastchar___179432 = undefined; + s.imgBuf___179439 = undefined; + s.xOffset___179463 = undefined; + s.yOffset___179464 = undefined; + s.ch___179479 = undefined; + s.l___179498 = undefined; + s.r___179499 = undefined; + s.off___179501 = undefined; + s.guess___179502 = undefined; + s.m___179521 = undefined; + s.v___179530 = undefined; + s.i___179586 = undefined; + s.j___179591 = undefined; + s.mask___179592 = undefined; + s.c___179593 = undefined; + s.n___179610 = 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 = pxsim_Array__mk(); - s.res___175552 = (r0); - r0 = pxsim_Array__length(s.arg0); - s.len___175554 = (r0); - s.i___175557 = (0); - case 1: - r0 = (s.i___175557 < s.len___175554); + 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 = 4; continue; } - r0 = pxsim_Array__getAt(s.arg0, s.i___175557); - s.v___175562 = (r0); - s.tmp_1 = lambda_3_mk(s); - s.tmp_1.argL = s.arg1; - s.tmp_1.arg0 = s.v___175562; - s.tmp_1.arg1 = s.i___175557; - setupLambda(s.tmp_1, s.tmp_1.argL); - s.callLocIdx = 7; s.pc = 5; return s.tmp_1; - case 5: + if (!r0) { step = 1; continue; } + s.tmp_2 = image_getFontForText__P168504_mk(s); + s.tmp_2.arg0 = s.arg1; + s.callLocIdx = 167; 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 = 2; continue; } - r0 = pxsim_Array__push(s.res___175552, s.v___175562); - case 2: + if (!r0) { step = 3; continue; } + s.arg4 = (1); case 3: - r0 = (s.i___175557 + 1); - s.i___175557 = (r0); - { step = 1; continue; } case 4: - r0 = s.res___175552; - return leave(s, r0) - default: oops() -} } } -helpers_arrayFilter__P166637.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 helpers_arrayFilter__P166637_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: helpers_arrayFilter__P166637, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - res___175552: undefined, - len___175554: undefined, - i___175557: undefined, - v___175562: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function controller__moveSprites__P168660(s) { -let r0 = s.r0, 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 = helpers_arrayForEach__P166636_mk(s); - s.tmp_1 = controller_players__P168656_mk(s); - s.callLocIdx = 226; s.pc = 2; return s.tmp_1; - case 2: + s.x0___179395 = (s.arg2); + s.cp___179397 = (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 = 168; 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 = 169; 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___179398 = (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 = 170; 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___179398); + s.dataW___179403 = (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 = 171; 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___179398); + s.dataH___179409 = (r0); + r0 = (s.dataH___179409 + 7); + s.tmp_0 = r0; + r0 = (s.tmp_0 >> 3); + s.byteHeight___179415 = (r0); + r0 = (s.byteHeight___179415 * s.dataW___179403); + s.charSize___179421 = (r0); + r0 = (2 + s.charSize___179421); + s.dataSize___179425 = (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 = 172; s.pc = 44; return s.tmp_0; } + } + case 44: + r0 = s.retval; + s.fontdata___179429 = (r0); + r0 = pxsim.BufferMethods.length(s.fontdata___179429); + s.tmp_1 = r0; + r0 = pxsim.Math_.idiv(s.tmp_1, s.dataSize___179425); + s.tmp_0 = r0; + r0 = (s.tmp_0 - 1); + s.lastchar___179432 = (r0); + r0 = (s.mult___179398 == 1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; continue; } + r0 = (8 + s.charSize___179421); + s.tmp_1 = r0; + r0 = pxsim.control.createBuffer(s.tmp_1); + s.imgBuf___179439 = (r0); + r0 = pxsim.BufferMethods.setByte(s.imgBuf___179439, 0, 135); + r0 = pxsim.BufferMethods.setByte(s.imgBuf___179439, 1, 1); + r0 = pxsim.BufferMethods.setByte(s.imgBuf___179439, 2, s.dataW___179403); + r0 = pxsim.BufferMethods.setByte(s.imgBuf___179439, 4, s.dataH___179409); + case 7: + case 8: + case 9: + s.tmp_1 = r0 = s.cp___179397; + 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___179463 = (0); + s.yOffset___179464 = (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___179397; + 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___179397); + 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 = 173; s.pc = 45; return s.tmp_4; } + } + case 45: + r0 = s.retval; + s.xOffset___179463 = (r0); + s.tmp_0 = if_yOffset_1_mk(s); + r0 = pxsim_Array__getAt(s.arg6, s.cp___179397); s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = controller__moveSprites_inline__P180468; - s.callLocIdx = 228; s.pc = 1; return s.tmp_0; - case 1: + 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 = 174; s.pc = 46; return s.tmp_0; } + } + case 46: + r0 = s.retval; + s.yOffset___179464 = (r0); + case 12: + case 13: + s.tmp_0 = r0 = s.cp___179397; + r0 = (s.tmp_0 + 1); + s.cp___179397 = (r0); + r0 = pxsim_String_.charCodeAt(s.arg1, s.tmp_0); + s.ch___179479 = (r0); + r0 = (s.ch___179479 == 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 = 175; 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___179395); + case 14: + case 15: + r0 = (s.ch___179479 < 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___179498 = (0); + s.r___179499 = (s.lastchar___179432); + s.off___179501 = (0); + r0 = (s.ch___179479 - 32); + s.tmp_0 = r0; + r0 = (s.tmp_0 * s.dataSize___179425); + s.guess___179502 = (r0); + r0 = pxsim.BufferMethods.getNumber(s.fontdata___179429, 4, s.guess___179502); + s.tmp_1 = r0; + r0 = (s.tmp_1 == s.ch___179479); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 18; continue; } + s.off___179501 = (s.guess___179502); + { step = 25; continue; } + case 18: + case 19: + r0 = (s.l___179498 <= s.r___179499); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 24; continue; } + s.tmp_1 = r0 = s.l___179498; + r0 = (s.r___179499 - s.l___179498); + s.tmp_3 = r0; + r0 = (s.tmp_3 >> 1); + s.tmp_2 = r0; + r0 = (s.tmp_1 + s.tmp_2); + s.m___179521 = (r0); + s.tmp_0 = r0 = s.fontdata___179429; + r0 = (s.m___179521 * s.dataSize___179425); + s.tmp_1 = r0; + r0 = pxsim.BufferMethods.getNumber(s.tmp_0, 4, s.tmp_1); + s.v___179530 = (r0); + r0 = (s.v___179530 == s.ch___179479); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 20; continue; } + r0 = (s.m___179521 * s.dataSize___179425); + s.off___179501 = (r0); + { step = 24; continue; } + case 20: + case 21: + r0 = (s.v___179530 < s.ch___179479); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 22; continue; } + r0 = (s.m___179521 + 1); + s.l___179498 = (r0); + { step = 23; continue; } + case 22: + r0 = (s.m___179521 - 1); + s.r___179499 = (r0); + case 23: + { step = 19; continue; } + case 24: + case 25: + r0 = (s.mult___179398 == 1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 26; continue; } + s.tmp_1 = r0 = s.imgBuf___179439; + s.tmp_3 = r0 = s.fontdata___179429; + r0 = (s.off___179501 + 2); + s.tmp_4 = r0; + r0 = pxsim.BufferMethods.slice(s.tmp_3, s.tmp_4, s.charSize___179421); + s.tmp_2 = r0; + r0 = pxsim.BufferMethods.write(s.tmp_1, 8, s.tmp_2); + s.tmp_0 = helpers_imageDrawIcon__P168482_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.imgBuf___179439; + r0 = (s.arg2 + s.xOffset___179463); + s.tmp_0.arg2 = r0; + r0 = (s.arg3 + s.yOffset___179464); + s.tmp_0.arg3 = r0; + s.tmp_0.arg4 = s.arg4; + s.callLocIdx = 176; 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 = 177; 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___179501 + 2); + s.off___179501 = (r0); + s.i___179586 = (0); + case 27: + r0 = (s.i___179586 < s.dataW___179403); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 36; continue; } + s.j___179591 = (0); + s.mask___179592 = (1); + s.tmp_0 = r0 = s.off___179501; + r0 = (s.tmp_0 + 1); + s.off___179501 = (r0); + r0 = pxsim.BufferMethods.getByte(s.fontdata___179429, s.tmp_0); + s.c___179593 = (r0); + case 28: + r0 = (s.j___179591 < s.dataH___179409); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 35; continue; } + r0 = (s.mask___179592 == 256); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 29; continue; } + s.tmp_2 = r0 = s.off___179501; + r0 = (s.tmp_2 + 1); + s.off___179501 = (r0); + r0 = pxsim.BufferMethods.getByte(s.fontdata___179429, s.tmp_2); + s.c___179593 = (r0); + s.mask___179592 = (1); + case 29: + case 30: + s.n___179610 = (0); + case 31: + r0 = (s.c___179593 & s.mask___179592); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 32; continue; } + r0 = (s.n___179610 + 1); + s.n___179610 = (r0); + r0 = (s.mask___179592 << 1); + s.mask___179592 = (r0); + { step = 31; continue; } + case 32: + r0 = pxsim_numops_toBoolDecr(s.n___179610); + if (!r0) { step = 33; continue; } + s.tmp_0 = helpers_imageFillRect__P168483_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = r0 = s.arg2; + r0 = (s.xOffset___179463 * s.mult___179398); + 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___179591 + s.yOffset___179464); + s.tmp_5 = r0; + r0 = (s.tmp_5 * s.mult___179398); + s.tmp_4 = r0; + r0 = (s.tmp_3 + s.tmp_4); + s.tmp_0.arg2 = r0; + s.tmp_0.arg3 = s.mult___179398; + r0 = (s.mult___179398 * s.n___179610); + s.tmp_0.arg4 = r0; + s.tmp_0.arg5 = s.arg4; + s.callLocIdx = 178; s.pc = 50; return s.tmp_0; + case 50: r0 = s.retval; + r0 = (s.j___179591 + s.n___179610); + s.j___179591 = (r0); + { step = 34; continue; } + case 33: + r0 = (s.mask___179592 << 1); + s.mask___179592 = (r0); + r0 = (s.j___179591 + 1); + s.j___179591 = (r0); + case 34: + { step = 28; continue; } + case 35: + r0 = (s.arg2 + s.mult___179398); + s.arg2 = (r0); + r0 = (s.i___179586 + 1); + s.i___179586 = (r0); + { step = 27; continue; } + case 36: + case 37: + { step = 9; continue; } + case 38: r0 = undefined; return leave(s, r0) default: oops() } } } -controller__moveSprites__P168660.info = {"start":2005,"length":180,"line":67,"column":4,"endLine":71,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"_moveSprites","argumentNames":[]} +helpers_imagePrint__P168517.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 controller__moveSprites__P168660_mk(s) { +function helpers_imagePrint__P168517_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller__moveSprites__P168660, depth: s.depth + 1, + parent: s, fn: helpers_imagePrint__P168517, depth: s.depth + 1, pc: 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___179395: undefined, + cp___179397: undefined, + mult___179398: undefined, + dataW___179403: undefined, + dataH___179409: undefined, + byteHeight___179415: undefined, + charSize___179421: undefined, + dataSize___179425: undefined, + fontdata___179429: undefined, + lastchar___179432: undefined, + imgBuf___179439: undefined, + xOffset___179463: undefined, + yOffset___179464: undefined, + ch___179479: undefined, + l___179498: undefined, + r___179499: undefined, + off___179501: undefined, + guess___179502: undefined, + m___179521: undefined, + v___179530: undefined, + i___179586: undefined, + j___179591: undefined, + mask___179592: undefined, + c___179593: undefined, + n___179610: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, + arg5: undefined, + arg6: undefined, } } -function controller__moveSprites_inline__P180468(s) { +function image_getFontForText__P168504(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13311,27 +14267,52 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.i___178641 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = controller_Controller___preUpdate__P168689_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 227; s.pc = 1; return s.tmp_0; + s.i___178641 = (0); case 1: - r0 = s.retval; - r0 = undefined; + s.tmp_1 = r0 = s.i___178641; + 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___178641); + 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___168503; + { step = 5; continue; } + case 2: + case 3: + r0 = (s.i___178641 + 1); + s.i___178641 = (r0); + { step = 1; continue; } + case 4: + r0 = globals.font8___168502; + case 5: return leave(s, r0) default: oops() } } } -controller__moveSprites_inline__P180468.info = {"start":2151,"length":26,"line":70,"column":26,"endLine":70,"endColumn":52,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["ctrl"]} +image_getFontForText__P168504.info = {"start":11713,"length":259,"line":136,"column":4,"endLine":143,"endColumn":5,"fileName":"pxt_modules/screen/text.ts","functionName":"getFontForText","argumentNames":["text"]} -function controller__moveSprites_inline__P180468_mk(s) { +function image_getFontForText__P168504_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller__moveSprites_inline__P180468, depth: s.depth + 1, + parent: s, fn: image_getFontForText__P168504, depth: s.depth + 1, pc: 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___178641: undefined, arg0: undefined, } } @@ -13339,7 +14320,7 @@ function controller__moveSprites_inline__P180468_mk(s) { -function controller_Controller___preUpdate__P168689(s) { +function helpers_imageDrawIcon__P168482(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13349,334 +14330,51 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.deadSprites___180475 = undefined; - s.svx___180476 = undefined; - s.svy___180477 = undefined; - s.svxInCricle___180512 = undefined; - s.svyInCircle___180514 = undefined; - s.sq___180516 = undefined; - s.scale___180531 = 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_Controller__C168661_VT)) failedCast(r0); - s.tmp_3 = controller_Controller__controlledSprites__P168666_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 260; s.pc = 18; return s.tmp_3; - case 18: - 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; } - { step = 17; continue; } + s.tmp_0 = r0 = s.arg0; + s.tmp_1 = r0 = s.arg1; + s.tmp_3 = helpers_pack__P172094_mk(s); + s.tmp_3.arg0 = s.arg2; + s.tmp_3.arg1 = s.arg3; + s.callLocIdx = 148; s.pc = 1; return s.tmp_3; case 1: - case 2: - r0 = pxsim_pxtrt.mklocRef(); - s.deadSprites___180475 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.deadSprites___180475, false); - r0 = pxsim_pxtrt.mklocRef(); - s.svx___180476 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.svx___180476, 0); - r0 = pxsim_pxtrt.mklocRef(); - s.svy___180477 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.svy___180477, 0); - r0 = s.arg0.fields["analog"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_1 = r0 = s.svx___180476; - s.tmp_5 = controller_Button_pressureLevel__P168728_mk(s); - s.tmp_6 = controller_Controller_right__P168671_mk(s); - s.tmp_6.arg0 = s.arg0; - s.callLocIdx = 261; s.pc = 20; return s.tmp_6; - case 20: - r0 = s.retval; - s.tmp_5.arg0 = r0; - s.callLocIdx = 262; s.pc = 19; return s.tmp_5; - case 19: r0 = s.retval; - s.tmp_4 = r0; - s.tmp_8 = controller_Button_pressureLevel__P168728_mk(s); - s.tmp_9 = controller_Controller_left__P168670_mk(s); - s.tmp_9.arg0 = s.arg0; - s.callLocIdx = 263; s.pc = 22; return s.tmp_9; - case 22: - r0 = s.retval; - s.tmp_8.arg0 = r0; - s.callLocIdx = 264; 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___180477; - s.tmp_4 = controller_Button_pressureLevel__P168728_mk(s); - s.tmp_5 = controller_Controller_down__P168673_mk(s); - s.tmp_5.arg0 = s.arg0; - s.callLocIdx = 265; s.pc = 24; return s.tmp_5; - case 24: - r0 = s.retval; - s.tmp_4.arg0 = r0; - s.callLocIdx = 266; s.pc = 23; return s.tmp_4; - case 23: - r0 = s.retval; - s.tmp_3 = r0; - s.tmp_7 = controller_Button_pressureLevel__P168728_mk(s); - s.tmp_8 = controller_Controller_up__P168672_mk(s); - s.tmp_8.arg0 = s.arg0; - s.callLocIdx = 267; s.pc = 26; return s.tmp_8; - case 26: - r0 = s.retval; - s.tmp_7.arg0 = r0; - s.callLocIdx = 268; s.pc = 25; return s.tmp_7; - case 25: - r0 = s.retval; - s.tmp_6 = r0; - r0 = (s.tmp_3 - s.tmp_6); - s.tmp_2 = r0; - r0 = (s.tmp_2 >> 1); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); - { step = 12; continue; } - case 3: - s.tmp_1 = controller_Button__C168716_v0_1_mk(s); - s.tmp_2 = controller_Controller_right__P168671_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 269; 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__C168716_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__C168716_v0_1_mk(s); - s.tmp_6 = controller_Controller_left__P168670_mk(s); - s.tmp_6.arg0 = s.arg0; - s.callLocIdx = 270; 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__C168716_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___180476; - 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__C168716_v0_1_mk(s); - s.tmp_2 = controller_Controller_down__P168673_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 271; 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__C168716_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__C168716_v0_1_mk(s); - s.tmp_6 = controller_Controller_up__P168672_mk(s); - s.tmp_6.arg0 = s.arg0; - s.callLocIdx = 272; 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__C168716_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___180477; - 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___180512 = (r0); - s.tmp_0 = r0 = s.svxInCricle___180512; - r0 = pxsim_pxtrt_ldlocRef(s.svx___180476); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); - r0 = pxsim_pxtrt.mklocRef(); - s.svyInCircle___180514 = (r0); - s.tmp_0 = r0 = s.svyInCircle___180514; - r0 = pxsim_pxtrt_ldlocRef(s.svy___180477); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); - r0 = pxsim_pxtrt_ldlocRef(s.svx___180476); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_ldlocRef(s.svx___180476); - s.tmp_2 = r0; - r0 = (s.tmp_1 * s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_ldlocRef(s.svy___180477); - s.tmp_4 = r0; - r0 = pxsim_pxtrt_ldlocRef(s.svy___180477); - s.tmp_5 = r0; - r0 = (s.tmp_4 * s.tmp_5); - s.tmp_3 = r0; - r0 = (s.tmp_0 + s.tmp_3); - s.sq___180516 = (r0); - r0 = (s.sq___180516 > 65536); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 13; continue; } - r0 = (65536 / s.sq___180516); - s.tmp_1 = r0; - r0 = pxsim.Math_.sqrt(s.tmp_1); - s.scale___180531 = (r0); - s.tmp_0 = r0 = s.svxInCricle___180512; - s.tmp_3 = r0 = s.scale___180531; - r0 = pxsim_pxtrt_ldlocRef(s.svx___180476); - 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___180514; - s.tmp_3 = r0 = s.scale___180531; - r0 = pxsim_pxtrt_ldlocRef(s.svy___180477); - s.tmp_4 = r0; - r0 = (s.tmp_3 * s.tmp_4); s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); - case 13: - case 14: - r0 = pxsim_pxtcore_mkAction(5, controller_Controller___preUpdate_inline__P180549); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.deadSprites___180475); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.svx___180476); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.svy___180477); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 3, s.svxInCricle___180512); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 4, s.svyInCircle___180514); - s.tmp_1 = helpers_arrayForEach__P166636_mk(s); - s.tmp_2 = controller_Controller__controlledSprites__P168666_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 273; 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 = 281; s.pc = 35; return s.tmp_1; - case 35: - r0 = s.retval; - r0 = pxsim_pxtrt_ldlocRef(s.deadSprites___180475); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 15; continue; } - s.tmp_1 = controller_Controller__controlledSprites__P168667_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_2 = helpers_arrayFilter__P166637_mk(s); - s.tmp_3 = controller_Controller__controlledSprites__P168666_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 282; 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__P180606; - s.callLocIdx = 283; s.pc = 38; return s.tmp_2; - case 38: - r0 = s.retval; - s.tmp_1.arg1 = r0; - s.callLocIdx = 284; s.pc = 37; return s.tmp_1; - case 37: - r0 = s.retval; - case 15: - case 16: - case 17: + r0 = pxsim_ImageMethods._drawIcon(s.tmp_0, s.tmp_1, s.tmp_2, s.arg4); r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Controller___preUpdate__P168689.info = {"start":10666,"length":2535,"line":330,"column":8,"endLine":394,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"__preUpdate","argumentNames":["this"]} +helpers_imageDrawIcon__P168482.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 controller_Controller___preUpdate__P168689_mk(s) { +function helpers_imageDrawIcon__P168482_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller___preUpdate__P168689, depth: s.depth + 1, + parent: s, fn: helpers_imageDrawIcon__P168482, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - deadSprites___180475: undefined, - svx___180476: undefined, - svy___180477: undefined, - svxInCricle___180512: undefined, - svyInCircle___180514: undefined, - sq___180516: undefined, - scale___180531: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, } } -function controller_Controller___preUpdate_inline__P180549(s) { +function helpers_stringSplit__P166649(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13686,175 +14384,186 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.s___180552 = undefined; - s.vx___180553 = undefined; - s.vy___180554 = undefined; + s.A___179673 = undefined; + s.lim___179675 = undefined; + s.s___179691 = undefined; + s.p___179694 = undefined; + s.R___179695 = undefined; + s.z___179709 = undefined; + s.T___179722 = undefined; + s.q___179723 = undefined; + s.e___179729 = 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 = 274; s.pc = 22; return s.tmp_0; } - } - case 22: - r0 = s.retval; - s.s___180552 = (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 = 275; s.pc = 23; return s.tmp_2; } - } - case 23: - r0 = s.retval; - s.vx___180553 = (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 = 276; s.pc = 24; return s.tmp_3; } - } - case 24: - r0 = s.retval; - s.vy___180554 = (r0); - r0 = s.s___180552.fields["flags"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 2); + r0 = pxsim_Array__mk(); + s.A___179673 = (r0); + s.lim___179675 = (0); + r0 = (s.arg2 === 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; } + r0 = (536870912 - 1); + s.lim___179675 = (r0); + { step = 4; continue; } case 1: - case 2: - r0 = s.arg0.fields["_inputLastFrame"]; + r0 = (s.arg2 < 0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - r0 = pxsim_numops_toBoolDecr(s.vx___180553); - if (!r0) { step = 3; continue; } - r0 = (s.s___180552).fields["_vx"] = (0); + if (!r0) { step = 2; continue; } + s.lim___179675 = (0); + { step = 3; continue; } + case 2: + r0 = (s.arg2 | 0); + s.lim___179675 = (r0); case 3: case 4: - r0 = pxsim_numops_toBoolDecr(s.vy___180554); + r0 = pxsim_String_.length(s.arg0); + s.s___179691 = (r0); + s.p___179694 = (0); + s.R___179695 = (s.arg1); + r0 = (s.lim___179675 == 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 5; continue; } - r0 = (s.s___180552).fields["_vy"] = (0); + r0 = s.A___179673; + { 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___179673, 0, s.arg0); + r0 = s.A___179673; + { step = 21; continue; } case 7: case 8: - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + r0 = (s.s___179691 == 0); s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 11; continue; } + s.tmp_1 = helpers_splitMatch__P171880_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_1.arg1 = 0; + s.tmp_1.arg2 = s.R___179695; + s.callLocIdx = 19; s.pc = 22; return s.tmp_1; + case 22: + r0 = s.retval; + s.z___179709 = (r0); + r0 = (s.z___179709 > -1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 9; continue; } - r0 = s.tmp_0; - { step = 10; continue; } + r0 = s.A___179673; + { step = 21; 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___180553; - r0 = pxsim_numops_toBool(s.tmp_2); - if (r0) { step = 11; continue; } - r0 = s.tmp_2; - { step = 12; continue; } + r0 = pxsim_Array_.setAt(s.A___179673, 0, s.arg0); + r0 = s.A___179673; + { step = 21; continue; } case 11: - r0 = s.vy___180554; 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___180552; - r0 = pxsim_pxtrt_ldlocRef(s.caps[3]); - s.tmp_6 = r0; - r0 = pxsim.Math_.imul(s.tmp_6, s.vx___180553); - s.tmp_5 = r0; - r0 = (s.tmp_4).fields["_vx"] = (s.tmp_5); - s.tmp_0 = r0 = s.s___180552; - r0 = pxsim_pxtrt_ldlocRef(s.caps[4]); - s.tmp_2 = r0; - r0 = pxsim.Math_.imul(s.tmp_2, s.vy___180554); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_vy"] = (s.tmp_1); - { step = 18; continue; } + s.q___179723 = (s.p___179694); case 13: - r0 = pxsim_numops_toBoolDecr(s.vx___180553); + r0 = (s.q___179723 != s.s___179691); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 20; continue; } + s.tmp_1 = helpers_splitMatch__P171880_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_1.arg1 = s.q___179723; + s.tmp_1.arg2 = s.R___179695; + s.callLocIdx = 20; s.pc = 23; return s.tmp_1; + case 23: + r0 = s.retval; + s.e___179729 = (r0); + r0 = (s.e___179729 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 14; continue; } - s.tmp_0 = r0 = s.s___180552; - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); - s.tmp_2 = r0; - r0 = pxsim.Math_.imul(s.tmp_2, s.vx___180553); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_vx"] = (s.tmp_1); - { step = 17; continue; } + r0 = (s.q___179723 + 1); + s.q___179723 = (r0); + { step = 19; continue; } case 14: - r0 = pxsim_numops_toBoolDecr(s.vy___180554); + r0 = (s.e___179729 == s.p___179694); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 15; continue; } - s.tmp_0 = r0 = s.s___180552; - r0 = pxsim_pxtrt_ldlocRef(s.caps[2]); - s.tmp_2 = r0; - r0 = pxsim.Math_.imul(s.tmp_2, s.vy___180554); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_vy"] = (s.tmp_1); + r0 = (s.q___179723 + 1); + s.q___179723 = (r0); + { step = 18; continue; } case 15: + s.tmp_0 = helpers_stringSlice__P166646_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.p___179694; + s.tmp_0.arg2 = s.q___179723; + s.callLocIdx = 21; s.pc = 24; return s.tmp_0; + case 24: + r0 = s.retval; + s.T___179722 = (r0); + r0 = pxsim_Array__push(s.A___179673, s.T___179722); + r0 = pxsim_Array__length(s.A___179673); + s.tmp_1 = r0; + r0 = (s.tmp_1 == s.lim___179675); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 16; continue; } + r0 = s.A___179673; + { step = 21; continue; } case 16: case 17: + s.p___179694 = (s.e___179729); + s.q___179723 = (s.p___179694); case 18: - r0 = (s.arg0).fields["_inputLastFrame"] = (true); - { step = 20; continue; } case 19: - r0 = (s.arg0).fields["_inputLastFrame"] = (false); + { step = 13; continue; } case 20: + s.tmp_0 = helpers_stringSlice__P166646_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.p___179694; + s.tmp_0.arg2 = s.q___179723; + s.callLocIdx = 22; s.pc = 25; return s.tmp_0; + case 25: + r0 = s.retval; + s.T___179722 = (r0); + r0 = pxsim_Array__push(s.A___179673, s.T___179722); + r0 = s.A___179673; case 21: - r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Controller___preUpdate_inline__P180549.info = {"start":11849,"length":1171,"line":361,"column":44,"endLine":389,"endColumn":13,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["controlledSprite"]} +helpers_stringSplit__P166649.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_Controller___preUpdate_inline__P180549_mk(s) { +function helpers_stringSplit__P166649_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller___preUpdate_inline__P180549, depth: s.depth + 1, + parent: s, fn: helpers_stringSplit__P166649, depth: s.depth + 1, pc: 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___180552: undefined, - vx___180553: undefined, - vy___180554: undefined, + A___179673: undefined, + lim___179675: undefined, + s___179691: undefined, + p___179694: undefined, + R___179695: undefined, + z___179709: undefined, + T___179722: undefined, + q___179723: undefined, + e___179729: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function controller_Controller___preUpdate_inline__P180606(s) { +function helpers_splitMatch__P171880(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13864,39 +14573,85 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.r___179809 = undefined; + s.s___179812 = undefined; + s.i___179822 = 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["s"]; - r0 = r0.fields["flags"]; + r0 = pxsim_String_.length(s.arg2); + s.r___179809 = (r0); + r0 = pxsim_String_.length(s.arg0); + s.s___179812 = (r0); + r0 = (s.arg1 + s.r___179809); + s.tmp_1 = r0; + r0 = (s.tmp_1 > s.s___179812); + 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___179822 = (0); + case 3: + r0 = (s.i___179822 < s.r___179809); + 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___179822); + s.tmp_4 = r0; + r0 = pxsim_String_.charAt(s.tmp_3, s.tmp_4); s.tmp_2 = r0; - r0 = (s.tmp_2 & 2); + r0 = pxsim_String_.charAt(s.arg2, s.i___179822); + s.tmp_5 = r0; + r0 = (s.tmp_2 != s.tmp_5); 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 = 4; continue; } + r0 = -1; + { step = 7; continue; } + case 4: + case 5: + r0 = (s.i___179822 + 1); + s.i___179822 = (r0); + { step = 3; continue; } + case 6: + r0 = (s.arg1 + s.r___179809); + case 7: return leave(s, r0) default: oops() } } } -controller_Controller___preUpdate_inline__P180606.info = {"start":13147,"length":42,"line":393,"column":28,"endLine":393,"endColumn":70,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["s"]} +helpers_splitMatch__P171880.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 controller_Controller___preUpdate_inline__P180606_mk(s) { +function helpers_splitMatch__P171880_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller___preUpdate_inline__P180606, depth: s.depth + 1, + parent: s, fn: helpers_splitMatch__P171880, depth: s.depth + 1, pc: 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___179809: undefined, + s___179812: undefined, + i___179822: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function controller_Button_pressureLevel__P168728(s) { +function helpers_stringSlice__P166646(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13906,70 +14661,81 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.len___179774 = 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__C168716_VT)) failedCast(r0); - r0 = pxsim.control.deviceDalVersion(); - s.tmp_1 = r0; - r0 = (s.tmp_1 == "sim"); + r0 = pxsim_String_.length(s.arg0); + s.len___179774 = (r0); + r0 = (s.arg1 < 0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_3 = controller_Button__C168716_v0_1_mk(s); - s.tmp_3.arg0 = s.arg0; - if (!checkSubtype(s.tmp_3.arg0, controller_Button__C168716_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; } + s.tmp_1 = Math_max__P166657_mk(s); + r0 = (s.len___179774 + s.arg1); + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 0; + s.callLocIdx = 18; s.pc = 9; return s.tmp_1; + case 9: + r0 = s.retval; + s.arg1 = (r0); 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; } + r0 = (s.arg2 === undefined); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + s.arg2 = (s.len___179774); + { step = 6; continue; } case 3: - r0 = s.arg0.fields["id"]; - s.tmp_5 = r0; - r0 = pxsim_pxtcore.pressureLevelByButtonId(s.tmp_5, -1); - { step = 5; continue; } + 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: - r0 = undefined; case 5: + case 6: + r0 = (s.arg2 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; continue; } + r0 = (s.len___179774 + 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() } } } -controller_Button_pressureLevel__P168728.info = {"start":6453,"length":311,"line":192,"column":8,"endLine":199,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"pressureLevel","argumentNames":["this"]} +helpers_stringSlice__P166646.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 controller_Button_pressureLevel__P168728_mk(s) { +function helpers_stringSlice__P166646_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_pressureLevel__P168728, depth: s.depth + 1, + parent: s, fn: helpers_stringSlice__P166646, depth: s.depth + 1, pc: 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, + len___179774: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function controller_Controller_down__P168673(s) { +function scene_Scene_render__P169399(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13979,30 +14745,139 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.s___179906 = undefined; + s.unnamed834___U1 = undefined; + s.unnamed835___U2 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, controller_Controller__C168661_VT)) failedCast(r0); - r0 = s.arg0.fields["buttons"]; + if (!checkSubtype(r0, scene_Scene__C169370_VT)) failedCast(r0); + r0 = s.arg0.fields["flags"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 & 4); s.tmp_0 = r0; - r0 = (4 - 1); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + { step = 11; continue; } + case 1: + case 2: + s.tmp_2 = r0 = s.arg0; + r0 = s.tmp_2.fields["flags"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 | 4); + s.tmp_3 = r0; + r0 = (s.tmp_2).fields["flags"] = (s.tmp_3); + r0 = s.arg0.fields["flags"]; s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); - return leaveAccessor(s, 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__P169399_mk(s); + r0 = s.arg0.fields["previousScene"]; + s.tmp_3.arg0 = r0; + s.callLocIdx = 1160; s.pc = 12; return s.tmp_3; + case 12: + r0 = s.retval; + { step = 6; continue; } + case 5: + s.tmp_0 = scene_Background_draw__P169205_mk(s); + r0 = s.arg0.fields["background"]; + s.tmp_0.arg0 = r0; + s.callLocIdx = 1161; 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__P166632_mk(s); + r0 = s.arg0.fields["allSprites"]; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = scene_Scene_render_inline__P179883; + s.callLocIdx = 1166; 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___179906 = (undefined); + r0 = s.arg0.fields["allSprites"]; + s.unnamed834___U1 = (r0); + s.unnamed835___U2 = (0); + case 9: + s.tmp_0 = r0 = s.unnamed835___U2; + r0 = pxsim_Array__length(s.unnamed834___U1); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 10; continue; } + r0 = pxsim_Array__getAt(s.unnamed834___U1, s.unnamed835___U2); + s.s___179906 = (r0); + s.tmp_2 = if___draw_2_mk(s); + s.tmp_2.arg0 = s.s___179906; + 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 = 1167; 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 = 1167; s.pc = 15; return s.tmp_2; } + else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 1167; s.pc = 15; return s.tmp_2;; } + else { s.callLocIdx = 1167; s.pc = 15; return s.tmp_2; } + } + case 15: + r0 = s.retval; + r0 = (s.unnamed835___U2 + 1); + s.unnamed835___U2 = (r0); + { step = 9; continue; } + case 10: + s.unnamed834___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() } } } -controller_Controller_down__P168673.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__P168673.isGetter = true; +scene_Scene_render__P169399.info = {"start":8203,"length":917,"line":228,"column":8,"endLine":252,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"render","argumentNames":["this"]} -function controller_Controller_down__P168673_mk(s) { +function scene_Scene_render__P169399_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller_down__P168673, depth: s.depth + 1, + parent: s, fn: scene_Scene_render__P169399, depth: s.depth + 1, pc: 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___179906: undefined, + unnamed834___U1: undefined, + unnamed835___U2: undefined, arg0: undefined, } } @@ -14010,7 +14885,7 @@ function controller_Controller_down__P168673_mk(s) { -function controller_Controller_button__P172238(s) { +function scene_Scene_render_inline__P179883(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14025,25 +14900,90 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, controller_Controller__C168661_VT)) failedCast(r0); - r0 = s.arg0.fields["buttons"]; - s.tmp_0 = r0; - r0 = (s.arg1 - 1); + 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 = 1162; s.pc = 3; return s.tmp_2; } + } + case 3: + r0 = s.retval; s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, 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 = 1163; 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_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 = 1164; 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 = 1165; 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() } } } -controller_Controller_button__P172238.info = {"start":6666,"length":105,"line":220,"column":8,"endLine":222,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"button","argumentNames":["this","button"]} +scene_Scene_render_inline__P179883.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 controller_Controller_button__P172238_mk(s) { +function scene_Scene_render_inline__P179883_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller_button__P172238, depth: s.depth + 1, + parent: s, fn: scene_Scene_render_inline__P179883, depth: s.depth + 1, pc: 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, } } @@ -14052,7 +14992,7 @@ function controller_Controller_button__P172238_mk(s) { -function controller_Controller_up__P168672(s) { +function scene_Background_draw__P169205(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14067,66 +15007,49 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, controller_Controller__C168661_VT)) failedCast(r0); - r0 = s.arg0.fields["buttons"]; + if (!checkSubtype(r0, scene_Background__C169196_VT)) failedCast(r0); + r0 = s.arg0.fields["color"]; s.tmp_0 = r0; - r0 = (2 - 1); + r0 = pxsim_ImageMethods.fill(globals.screen___168559, 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_Array__getAt(s.tmp_0, s.tmp_1); - return leaveAccessor(s, r0) - default: oops() -} } } -controller_Controller_up__P168672.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__P168672.isGetter = true; - -function controller_Controller_up__P168672_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: controller_Controller_up__P168672, 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__P168671(s) { -let r0 = s.r0, 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__C168661_VT)) failedCast(r0); - r0 = s.arg0.fields["buttons"]; + r0 = pxsim_ImageMethods.drawTransparentImage(globals.screen___168559, s.tmp_1, 0, 0); + case 1: + case 2: + r0 = s.arg0.fields["_layers"]; s.tmp_0 = r0; - r0 = (3 - 1); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = pxsim_pxtcore_mkAction(1, scene_Background_draw_inline__P180054); s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); - return leaveAccessor(s, r0) + r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.arg0); + s.tmp_2 = helpers_arrayForEach__P166636_mk(s); + r0 = s.arg0.fields["_layers"]; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = s.tmp_1; + s.callLocIdx = 1010; s.pc = 5; return s.tmp_2; + case 5: + r0 = s.retval; + case 3: + case 4: + r0 = undefined; + return leave(s, r0) default: oops() } } } -controller_Controller_right__P168671.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__P168671.isGetter = true; +scene_Background_draw__P169205.info = {"start":1166,"length":545,"line":48,"column":8,"endLine":60,"endColumn":9,"fileName":"pxt_modules/game/background.ts","functionName":"draw","argumentNames":["this"]} -function controller_Controller_right__P168671_mk(s) { +function scene_Background_draw__P169205_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller_right__P168671, depth: s.depth + 1, + parent: s, fn: scene_Background_draw__P169205, 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, } } @@ -14134,7 +15057,7 @@ function controller_Controller_right__P168671_mk(s) { -function controller_Controller_left__P168670(s) { +function scene_Background_draw_inline__P180054(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14144,30 +15067,58 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.ox___180056 = undefined; + s.oy___180067 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, controller_Controller__C168661_VT)) failedCast(r0); - r0 = s.arg0.fields["buttons"]; + 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 = (1 - 1); + r0 = pxsim.Math_.round(s.tmp_0); + s.ox___180056 = (r0); + r0 = s.caps[0].fields["camera"]; + r0 = r0.fields["drawOffsetY"]; s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); - return leaveAccessor(s, 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___180067 = (r0); + s.tmp_0 = scene_BackgroundLayer_draw__P169214_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.ox___180056; + s.tmp_0.arg2 = s.oy___180067; + s.callLocIdx = 1009; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) default: oops() } } } -controller_Controller_left__P168670.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__P168670.isGetter = true; +scene_Background_draw_inline__P180054.info = {"start":1373,"length":312,"line":53,"column":37,"endLine":58,"endColumn":17,"fileName":"pxt_modules/game/background.ts","functionName":"inline","argumentNames":["layer"]} -function controller_Controller_left__P168670_mk(s) { +function scene_Background_draw_inline__P180054_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller_left__P168670, depth: s.depth + 1, + parent: s, fn: scene_Background_draw_inline__P180054, depth: s.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___180056: undefined, + oy___180067: undefined, arg0: undefined, } } @@ -14175,7 +15126,7 @@ function controller_Controller_left__P168670_mk(s) { -function controller_Controller__controlledSprites__P168667(s) { +function scene_BackgroundLayer_draw__P169214(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14185,45 +15136,251 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.w___180085 = undefined; + s.h___180088 = undefined; + s.pw___180091 = undefined; + s.ph___180095 = undefined; + s.rx___180104 = undefined; + s.ry___180107 = undefined; + s.y___180176 = undefined; + s.py___180177 = undefined; + s.dh___180186 = undefined; + s.x___180194 = undefined; + s.rxl___180195 = undefined; + s.px___180201 = undefined; + s.dw___180205 = 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__C168661_VT)) failedCast(r0); - s.tmp_1 = game_currentScene__P169526_mk(s); - s.callLocIdx = 232; s.pc = 1; return s.tmp_1; - case 1: - r0 = s.retval; - r0 = r0.fields["controlledSprites"]; + if (!checkSubtype(r0, scene_BackgroundLayer__C169206_VT)) failedCast(r0); + r0 = pxsim_ImageMethods.width(globals.screen___168559); + s.w___180085 = (r0); + r0 = pxsim_ImageMethods.height(globals.screen___168559); + s.h___180088 = (r0); + r0 = s.arg0.fields["img"]; s.tmp_0 = r0; - r0 = s.arg0.fields["playerIndex"]; + r0 = pxsim_ImageMethods.width(s.tmp_0); + s.pw___180091 = (r0); + r0 = s.arg0.fields["img"]; + s.tmp_0 = r0; + r0 = pxsim_ImageMethods.height(s.tmp_0); + s.ph___180095 = (r0); + r0 = pxsim_numops_toBoolDecr(s.pw___180091); + 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(s.ph___180095); s.tmp_2 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_2, s.arg1); + 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___180104 = (r0); + r0 = (0 - s.arg2); + s.ry___180107 = (r0); + r0 = s.arg0.fields["alignX"]; + 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___180104; + r0 = (s.w___180085 + s.pw___180091); + s.tmp_2 = r0; + r0 = (s.tmp_1 - s.tmp_2); + s.rx___180104 = (r0); + { step = 7; continue; } + case 6: + s.tmp_0 = r0 = s.rx___180104; + r0 = (s.w___180085 + s.pw___180091); + s.tmp_2 = r0; + r0 = (s.tmp_2 >> 1); + s.tmp_1 = r0; + r0 = (s.tmp_0 - s.tmp_1); + s.rx___180104 = (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___180107; + r0 = (s.h___180088 + s.ph___180095); + s.tmp_2 = r0; + r0 = (s.tmp_1 - s.tmp_2); + s.ry___180107 = (r0); + { step = 10; continue; } + case 9: + s.tmp_0 = r0 = s.ry___180107; + r0 = (s.h___180088 + s.ph___180095); + s.tmp_2 = r0; + r0 = (s.tmp_2 >> 1); + s.tmp_1 = r0; + r0 = (s.tmp_0 - s.tmp_1); + s.ry___180107 = (r0); + case 10: + r0 = (s.rx___180104 % s.w___180085); + s.rx___180104 = (r0); + r0 = (s.rx___180104 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 11; continue; } + r0 = (s.rx___180104 + s.w___180085); + s.rx___180104 = (r0); + case 11: + case 12: + r0 = (s.ry___180107 % s.h___180088); + s.ry___180107 = (r0); + r0 = (s.ry___180107 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 13; continue; } + r0 = (s.ry___180107 + s.h___180088); + s.ry___180107 = (r0); + case 13: + case 14: + r0 = pxsim.Math_.floor(s.rx___180104); + s.rx___180104 = (r0); + r0 = pxsim.Math_.floor(s.ry___180107); + s.ry___180107 = (r0); + s.y___180176 = (0); + s.py___180177 = (0); + case 15: + r0 = (s.y___180176 < s.h___180088); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 22; continue; } + r0 = (s.y___180176 % s.ph___180095); + s.py___180177 = (r0); + s.tmp_0 = Math_min__P166658_mk(s); + r0 = (s.ph___180095 - s.py___180177); + s.tmp_0.arg0 = r0; + r0 = (s.h___180088 - s.ry___180107); + s.tmp_0.arg1 = r0; + s.callLocIdx = 1012; s.pc = 24; return s.tmp_0; + case 24: + r0 = s.retval; + s.dh___180186 = (r0); + s.x___180194 = (0); + s.rxl___180195 = (s.rx___180104); + case 16: + r0 = (s.x___180194 < s.w___180085); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 19; continue; } + r0 = (s.x___180194 % s.pw___180091); + s.px___180201 = (r0); + s.tmp_0 = Math_min__P166658_mk(s); + r0 = (s.pw___180091 - s.px___180201); + s.tmp_0.arg0 = r0; + r0 = (s.w___180085 - s.rxl___180195); + s.tmp_0.arg1 = r0; + s.callLocIdx = 1013; s.pc = 25; return s.tmp_0; + case 25: + r0 = s.retval; + s.dw___180205 = (r0); + r0 = s.arg0.fields["img"]; + s.tmp_0 = r0; + r0 = pxsim_ImageMethods.drawImage(globals.screen___168559, s.tmp_0, s.rxl___180195, s.ry___180107); + r0 = (s.rxl___180195 + s.dw___180205); + s.tmp_0 = r0; + r0 = (s.tmp_0 % s.w___180085); + s.rxl___180195 = (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___180205; + { step = 18; continue; } + case 17: + r0 = s.w___180085; + case 18: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = (s.x___180194 + s.tmp_1); + s.x___180194 = (r0); + { step = 16; continue; } + case 19: + r0 = (s.ry___180107 + s.dh___180186); + s.tmp_0 = r0; + r0 = (s.tmp_0 % s.h___180088); + s.ry___180107 = (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___180186; + { step = 21; continue; } + case 20: + r0 = s.h___180088; + case 21: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = (s.y___180176 + s.tmp_1); + s.y___180176 = (r0); + { step = 15; continue; } + case 22: + case 23: r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Controller__controlledSprites__P168667.info = {"start":3300,"length":134,"line":105,"column":8,"endLine":107,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"_controlledSprites","argumentNames":["this","cps"]} +scene_BackgroundLayer_draw__P169214.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 controller_Controller__controlledSprites__P168667_mk(s) { +function scene_BackgroundLayer_draw__P169214_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller__controlledSprites__P168667, depth: s.depth + 1, + parent: s, fn: scene_BackgroundLayer_draw__P169214, depth: s.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___180085: undefined, + h___180088: undefined, + pw___180091: undefined, + ph___180095: undefined, + rx___180104: undefined, + ry___180107: undefined, + y___180176: undefined, + py___180177: undefined, + dh___180186: undefined, + x___180194: undefined, + rxl___180195: undefined, + px___180201: undefined, + dw___180205: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function controller_Controller__controlledSprites__P168666(s) { +function helpers_arraySort__P166632(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14235,41 +15392,58 @@ 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__C168661_VT)) failedCast(r0); - s.tmp_1 = game_currentScene__P169526_mk(s); - s.callLocIdx = 231; s.pc = 1; return s.tmp_1; - case 1: - r0 = s.retval; - r0 = r0.fields["controlledSprites"]; + r0 = pxsim_numops_toBoolDecr(s.arg1); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = s.arg0.fields["playerIndex"]; + 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 = pxsim_Array__getAt(s.tmp_0, s.tmp_2); - return leaveAccessor(s, r0) + r0 = (s.tmp_2 > 1); + case 2: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 3; continue; } + s.arg1 = (helpers_arraySort_inline__P179928); + case 3: + case 4: + s.tmp_0 = helpers_sortHelper__P171878_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 3; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + return leave(s, r0) default: oops() } } } -controller_Controller__controlledSprites__P168666.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__P168666.isGetter = true; +helpers_arraySort__P166632.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 controller_Controller__controlledSprites__P168666_mk(s) { +function helpers_arraySort__P166632_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller__controlledSprites__P168666, depth: s.depth + 1, + parent: s, fn: helpers_arraySort__P166632, depth: s.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 Fx_imul__P166688(s) { +function helpers_arraySort_inline__P179928(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14279,22 +15453,133 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.aIsUndef___179931 = undefined; + s.bIsUndef___179935 = undefined; + s.aIsNull___179946 = undefined; + s.bIsNull___179950 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim.Math_.imul(s.arg0, s.arg1); + r0 = (s.arg0 === undefined); + s.aIsUndef___179931 = (r0); + r0 = (s.arg1 === undefined); + s.bIsUndef___179935 = (r0); + s.tmp_0 = r0 = s.aIsUndef___179931; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + r0 = s.bIsUndef___179935; + 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___179931); + if (!r0) { step = 4; continue; } + r0 = 1; + { step = 17; continue; } + { step = 7; continue; } + case 4: + r0 = pxsim_numops_toBoolDecr(s.bIsUndef___179935); + if (!r0) { step = 5; continue; } + r0 = -1; + { step = 17; continue; } + case 5: + case 6: + case 7: + case 8: + r0 = (s.arg0 === null); + s.aIsNull___179946 = (r0); + r0 = (s.arg1 === null); + s.bIsNull___179950 = (r0); + s.tmp_0 = r0 = s.aIsNull___179946; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 9; continue; } + r0 = s.tmp_0; + { step = 10; continue; } + case 9: + r0 = s.bIsNull___179950; + 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___179946); + if (!r0) { step = 12; continue; } + r0 = 1; + { step = 17; continue; } + { step = 15; continue; } + case 12: + r0 = pxsim_numops_toBoolDecr(s.bIsNull___179950); + 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) default: oops() } } } -Fx_imul__P166688.info = {"start":1010,"length":130,"line":32,"column":4,"endLine":34,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"imul","argumentNames":["a","b"]} +helpers_arraySort_inline__P179928.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 Fx_imul__P166688_mk(s) { +function helpers_arraySort_inline__P179928_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_imul__P166688, depth: s.depth + 1, + parent: s, fn: helpers_arraySort_inline__P179928, depth: s.depth + 1, pc: 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___179931: undefined, + bIsUndef___179935: undefined, + aIsNull___179946: undefined, + bIsNull___179950: undefined, arg0: undefined, arg1: undefined, } } @@ -14303,7 +15588,7 @@ function Fx_imul__P166688_mk(s) { -function power_checkDeepSleep__P168457(s) { +function helpers_sortHelper__P171878(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14313,94 +15598,114 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.p___179243 = undefined; - s.to___179246 = undefined; - s.tmp_0 = power_init__P172082_mk(s); - s.callLocIdx = 143; s.pc = 11; return s.tmp_0; - case 11: - r0 = s.retval; - s.tmp_0 = r0 = globals._poked___172080; + s.len___179985 = undefined; + s.i___179988 = undefined; + s.j___179994 = 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 = 0; + 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_1 = r0; - s.p___179243 = (s.tmp_1); - s.tmp_0 = r0 = globals._timeout___172081; - r0 = pxsim_numops_toBool(s.tmp_0); + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); if (!r0) { step = 3; continue; } - r0 = s.tmp_0; - { step = 4; continue; } + r0 = s.arg0; + { step = 11; continue; } case 3: - r0 = 0; case 4: - // jmp value (already in r0) - s.tmp_1 = r0; - s.to___179246 = (s.tmp_1); - r0 = (s.to___179246 > 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 5; continue; } - r0 = s.tmp_0; - { step = 6; continue; } + r0 = pxsim_Array__length(s.arg0); + s.len___179985 = (r0); + s.i___179988 = (0); case 5: - r0 = pxsim.control.millis(); + s.tmp_1 = r0 = s.i___179988; + r0 = (s.len___179985 - 1); s.tmp_2 = r0; - r0 = (s.tmp_2 - s.p___179243); - s.tmp_1 = r0; - r0 = (s.tmp_1 > s.to___179246); + 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___179988 + 1); + s.j___179994 = (r0); 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; } + r0 = (s.j___179994 < s.len___179985); + 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___179988); + s.tmp_3.arg0 = r0; + r0 = pxsim_Array__getAt(s.arg0, s.j___179994); + s.tmp_3.arg1 = r0; + setupLambda(s.tmp_3, s.tmp_3.argL); + s.callLocIdx = 1; 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__P171877_mk(s); + s.tmp_4.arg0 = s.arg0; + s.tmp_4.arg1 = s.i___179988; + s.tmp_4.arg2 = s.j___179994; + s.callLocIdx = 2; s.pc = 13; return s.tmp_4; + case 13: + r0 = s.retval; 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(); + r0 = (s.j___179994 + 1); + s.j___179994 = (r0); + { step = 6; continue; } case 9: + r0 = (s.i___179988 + 1); + s.i___179988 = (r0); + { step = 5; continue; } case 10: - r0 = undefined; + r0 = s.arg0; + case 11: return leave(s, r0) default: oops() } } } -power_checkDeepSleep__P168457.info = {"start":1087,"length":298,"line":36,"column":4,"endLine":46,"endColumn":5,"fileName":"pxt_modules/power/power.ts","functionName":"checkDeepSleep","argumentNames":[]} +helpers_sortHelper__P171878.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 power_checkDeepSleep__P168457_mk(s) { +function helpers_sortHelper__P171878_mk(s) { checkStack(s.depth); return { - parent: s, fn: power_checkDeepSleep__P168457, depth: s.depth + 1, + parent: s, fn: helpers_sortHelper__P171878, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - p___179243: undefined, - to___179246: undefined, + len___179985: undefined, + i___179988: undefined, + j___179994: undefined, + arg0: undefined, + arg1: undefined, } } -function power_init__P172082(s) { +function helpers_swap__P171877(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14410,54 +15715,236 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = (globals._timeout___172081 !== undefined); - 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_pxtcore.getConfig(212, -1); + s.temp___180023 = 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___180023 = (r0); + s.tmp_0 = r0 = s.arg0; + s.tmp_1 = r0 = s.arg1; + r0 = pxsim_Array__getAt(s.arg0, s.arg2); + s.tmp_2 = r0; + r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_1, s.tmp_2); + r0 = pxsim_Array_.setAt(s.arg0, s.arg2, s.temp___180023); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +helpers_swap__P171877.info = {"start":5030,"length":140,"line":185,"column":4,"endLine":189,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"swap","argumentNames":["arr","i","j"]} + +function helpers_swap__P171877_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: helpers_swap__P171877, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + temp___180023: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, +} } + + + + + +function scene_Camera_update__P169325(s) { +let r0 = s.r0, 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.elapsed___180292 = undefined; + s.percentComplete___180306 = undefined; + s.damp___180313 = undefined; + s.f___180322 = undefined; + s.x___180328 = undefined; + s.y___180335 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, scene_Camera__C169308_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__P168881_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_3.arg0 = r0; + s.callLocIdx = 1121; 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__P168883_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 1122; s.pc = 10; return s.tmp_2; + case 10: + r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_1 * 1000); - globals._timeout___172081 = (r0); - r0 = (globals._timeout___172081 > 0); + r0 = (s.tmp_0).fields["_lastUpdatedSpriteY"] = (s.tmp_1); + s.tmp_0 = scene_Camera_offsetX__P169314_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_2 = Sprite_x__P168881_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 1123; s.pc = 12; return s.tmp_2; + case 12: + r0 = s.retval; + s.tmp_1 = r0; + r0 = pxsim_ImageMethods.width(globals.screen___168559); + 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 = 1124; s.pc = 11; return s.tmp_0; + case 11: + r0 = s.retval; + s.tmp_0 = scene_Camera_offsetY__P169316_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_2 = Sprite_y__P168883_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 1125; s.pc = 14; return s.tmp_2; + case 14: + r0 = s.retval; + s.tmp_1 = r0; + r0 = pxsim_ImageMethods.height(globals.screen___168559); + 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 = 1126; 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_toBool(s.tmp_0); - if (r0) { step = 3; continue; } - r0 = s.tmp_0; - { step = 4; continue; } + 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___180292 = (r0); + r0 = s.arg0.fields["shakeDuration"]; + s.tmp_1 = r0; + r0 = (s.elapsed___180292 >= 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 = (globals._timeout___172081 < 300000); + r0 = s.arg0.fields["shakeDuration"]; + s.tmp_0 = r0; + r0 = (s.elapsed___180292 / s.tmp_0); + s.percentComplete___180306 = (r0); + s.damp___180313 = (1); + r0 = (s.percentComplete___180306 >= 0.75); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + s.tmp_1 = Math_max__P166657_mk(s); + s.tmp_1.arg0 = 0; + r0 = (1 - s.percentComplete___180306); + s.tmp_1.arg1 = r0; + s.callLocIdx = 1129; s.pc = 15; return s.tmp_1; + case 15: + r0 = s.retval; + s.damp___180313 = (r0); 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___172081 = (300000); case 5: + r0 = s.arg0.fields["shakeAmplitude"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 * s.damp___180313); + s.f___180322 = (r0); + r0 = pxsim.Math_.random(); + s.tmp_1 = r0; + r0 = (s.tmp_1 * s.f___180322); + s.tmp_0 = r0; + r0 = (s.tmp_0 >> 0); + s.x___180328 = (r0); + r0 = pxsim.Math_.random(); + s.tmp_1 = r0; + r0 = (s.tmp_1 * s.f___180322); + s.tmp_0 = r0; + r0 = (s.tmp_0 >> 0); + s.y___180335 = (r0); + s.tmp_0 = r0 = s.arg0; + r0 = s.tmp_0.fields["drawOffsetX"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + s.x___180328); + 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___180335); + 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() } } } -power_init__P172082.info = {"start":1610,"length":376,"line":57,"column":4,"endLine":66,"endColumn":5,"fileName":"pxt_modules/power/power.ts","functionName":"init","argumentNames":[]} +scene_Camera_update__P169325.info = {"start":2563,"length":1418,"line":83,"column":8,"endLine":116,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"update","argumentNames":["this"]} -function power_init__P172082_mk(s) { +function scene_Camera_update__P169325_mk(s) { checkStack(s.depth); return { - parent: s, fn: power_init__P172082, depth: s.depth + 1, + parent: s, fn: scene_Camera_update__P169325, depth: s.depth + 1, pc: 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___180292: undefined, + percentComplete___180306: undefined, + damp___180313: undefined, + f___180322: undefined, + x___180328: undefined, + y___180335: undefined, + arg0: undefined, } } -function power_poke__P168456(s) { +function scene_Camera_offsetY__P169316(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14467,31 +15954,93 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = power_init__P172082_mk(s); - s.callLocIdx = 142; s.pc = 1; return s.tmp_0; + s.scene___180354 = 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__C169308_VT)) failedCast(r0); + s.tmp_0 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1112; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.scene___180354 = (r0); + r0 = s.scene___180354.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___180354.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__P169269_mk(s); + r0 = s.scene___180354.fields["tileMap"]; + s.tmp_10.arg0 = r0; + s.tmp_10.arg1 = s.arg1; + s.callLocIdx = 1114; s.pc = 6; return s.tmp_10; + case 6: r0 = s.retval; - r0 = pxsim.control.millis(); - globals._poked___172080 = (r0); + 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() } } } -power_poke__P168456.info = {"start":795,"length":81,"line":26,"column":4,"endLine":29,"endColumn":5,"fileName":"pxt_modules/power/power.ts","functionName":"poke","argumentNames":[]} +scene_Camera_offsetY__P169316.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 power_poke__P168456_mk(s) { +function scene_Camera_offsetY__P169316_mk(s) { checkStack(s.depth); return { - parent: s, fn: power_poke__P168456, depth: s.depth + 1, + parent: s, fn: scene_Camera_offsetY__P169316, depth: s.depth + 1, pc: 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___180354: undefined, + arg0: undefined, + arg1: undefined, } } -function control_EventContext_deltaTime__P166927(s) { +function tiles_TileMap_enabled__P169274(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14506,22 +16055,31 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, control_EventContext__C166922_VT)) failedCast(r0); - r0 = s.arg0.fields["deltaTimeMillis"]; + if (!checkSubtype(r0, tiles_TileMap__C169262_VT)) failedCast(r0); + r0 = s.arg0.fields["_map"]; + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); s.tmp_0 = r0; - r0 = (s.tmp_0 / 1000); + r0 = pxsim_Boolean__bang(s.tmp_0); return leaveAccessor(s, r0) default: oops() } } } -control_EventContext_deltaTime__P166927.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__P166927.isGetter = true; +tiles_TileMap_enabled__P169274.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__P169274.isGetter = true; -function control_EventContext_deltaTime__P166927_mk(s) { +function tiles_TileMap_enabled__P169274_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_deltaTime__P166927, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_enabled__P169274, depth: s.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, } } @@ -14529,7 +16087,7 @@ function control_EventContext_deltaTime__P166927_mk(s) { -function scene_Scene_constructor__P169393(s) { +function tiles_TileMap_offsetY__P169269(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14542,115 +16100,56 @@ 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__C169370_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__C169054_VT); - s.tmp_0 = r0; - s.tmp_1 = ArcadePhysicsEngine_constructor__P169055_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 = 1134; s.pc = 1; return s.tmp_1; - case 1: + if (!checkSubtype(r0, tiles_TileMap__C169262_VT)) failedCast(r0); + s.tmp_0 = Math_clamp__P166654_mk(s); + s.tmp_0.arg0 = 0; + s.tmp_1 = Math_max__P166657_mk(s); + s.tmp_3 = tiles_TileMap_areaHeight__P169271_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 1041; s.pc = 3; return s.tmp_3; + case 3: r0 = s.retval; - r0 = (s.arg0).fields["physicsEngine"] = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(scene_Camera__C169308_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_Camera_constructor__P169312_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 1135; s.pc = 2; return s.tmp_1; + s.tmp_2 = r0; + r0 = pxsim_ImageMethods.height(globals.screen___168559); + s.tmp_4 = r0; + r0 = (s.tmp_2 - s.tmp_4); + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 0; + s.callLocIdx = 1042; 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__C169196_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_Background_constructor__P169200_mk(s); - s.tmp_1.arg0 = s.tmp_0; - r0 = s.arg0.fields["camera"]; - s.tmp_1.arg1 = r0; - s.callLocIdx = 1136; s.pc = 3; return s.tmp_1; - case 3: + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = s.arg1; + s.callLocIdx = 1043; s.pc = 1; return s.tmp_0; + case 1: 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__P169393.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"]} +tiles_TileMap_offsetY__P169269.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 scene_Scene_constructor__P169393_mk(s) { +function tiles_TileMap_offsetY__P169269_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_constructor__P169393, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_offsetY__P169269, depth: s.depth + 1, pc: 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 scene_Camera_constructor__P169312(s) { +function tiles_TileMap_areaHeight__P169271(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14665,22 +16164,40 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_Camera__C169308_VT)) failedCast(r0); - r0 = (s.arg0).fields["_offsetX"] = (0); - r0 = (s.arg0).fields["_offsetY"] = (0); - r0 = (s.arg0).fields["drawOffsetX"] = (0); - r0 = (s.arg0).fields["drawOffsetY"] = (0); - r0 = undefined; + if (!checkSubtype(r0, tiles_TileMap__C169262_VT)) failedCast(r0); + r0 = s.arg0.fields["_map"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.arg0.fields["_map"]; + s.tmp_2 = r0; + r0 = s.tmp_2.fields["_height"]; + s.tmp_1 = r0; + r0 = s.arg0.fields["_scale"]; + s.tmp_3 = r0; + r0 = (s.tmp_1 << s.tmp_3); + { step = 2; continue; } + case 1: + r0 = 0; + case 2: + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = s.tmp_4; return leave(s, r0) default: oops() } } } -scene_Camera_constructor__P169312.info = {"start":550,"length":156,"line":17,"column":8,"endLine":23,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"inline","argumentNames":["this"]} +tiles_TileMap_areaHeight__P169271.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_Camera_constructor__P169312_mk(s) { +function tiles_TileMap_areaHeight__P169271_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Camera_constructor__P169312, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_areaHeight__P169271, depth: s.depth + 1, pc: 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, } } @@ -14688,7 +16205,7 @@ function scene_Camera_constructor__P169312_mk(s) { -function scene_Background_constructor__P169200(s) { +function tiles_TileMap_scale__P169265(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14700,39 +16217,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, scene_Background__C169196_VT)) failedCast(r0); - r0 = (s.arg0).fields["color"] = (0); - r0 = (s.arg0).fields["camera"] = (s.arg1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_layers"] = (s.tmp_1); - r0 = undefined; - return leave(s, r0) + if (!checkSubtype(r0, tiles_TileMap__C169262_VT)) failedCast(r0); + r0 = s.arg0.fields["_scale"]; + return leaveAccessor(s, r0) default: oops() } } } -scene_Background_constructor__P169200.info = {"start":367,"length":132,"line":20,"column":8,"endLine":24,"endColumn":9,"fileName":"pxt_modules/game/background.ts","functionName":"inline","argumentNames":["this","camera"]} +tiles_TileMap_scale__P169265.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__P169265.isGetter = true; -function scene_Background_constructor__P169200_mk(s) { +function tiles_TileMap_scale__P169265_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Background_constructor__P169200, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_scale__P169265, 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 ArcadePhysicsEngine_constructor__P169055(s) { +function tiles_TileMapData_height__P169247(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14744,68 +16252,30 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C169054_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__C168973_VT); - s.tmp_0 = r0; - s.tmp_1 = sprites_SpriteMap_constructor__P168974_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 633; 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__P169057_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 634; s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; - s.tmp_0 = ArcadePhysicsEngine_maxStep__P169061_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg3; - s.callLocIdx = 635; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.tmp_0 = ArcadePhysicsEngine_minStep__P169059_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg2; - s.callLocIdx = 636; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) + if (!checkSubtype(r0, tiles_TileMapData__C169244_VT)) failedCast(r0); + r0 = s.arg0.fields["_height"]; + return leaveAccessor(s, r0) default: oops() } } } -ArcadePhysicsEngine_constructor__P169055.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"]} +tiles_TileMapData_height__P169247.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__P169247.isGetter = true; -function ArcadePhysicsEngine_constructor__P169055_mk(s) { +function tiles_TileMapData_height__P169247_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_constructor__P169055, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_height__P169247, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function ArcadePhysicsEngine_maxStep__P169061(s) { +function scene_Camera_offsetY__P169315(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14817,40 +16287,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, ArcadePhysicsEngine__C169054_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) + if (!checkSubtype(r0, scene_Camera__C169308_VT)) failedCast(r0); + r0 = s.arg0.fields["_offsetY"]; + return leaveAccessor(s, r0) default: oops() } } } -ArcadePhysicsEngine_maxStep__P169061.info = {"start":2329,"length":67,"line":88,"column":4,"endLine":90,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"maxStep","argumentNames":["this","v"]} +scene_Camera_offsetY__P169315.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__P169315.isGetter = true; -function ArcadePhysicsEngine_maxStep__P169061_mk(s) { +function scene_Camera_offsetY__P169315_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_maxStep__P169061, depth: s.depth + 1, + parent: s, fn: scene_Camera_offsetY__P169315, 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_maxStep__P169060(s) { +function scene_Camera_offsetX__P169314(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14860,73 +16320,93 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.scene___180414 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C169054_VT)) failedCast(r0); - r0 = s.arg0.fields["maxSingleStep"]; + if (!checkSubtype(r0, scene_Camera__C169308_VT)) failedCast(r0); + s.tmp_0 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1109; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.scene___180414 = (r0); + r0 = s.scene___180414.fields["tileMap"]; s.tmp_0 = r0; - r0 = (s.tmp_0 + 128); + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + r0 = s.scene___180414.fields["tileMap"]; s.tmp_1 = r0; - r0 = (s.tmp_1 >> 8); - return leaveAccessor(s, r0) - default: oops() -} } } -ArcadePhysicsEngine_maxStep__P169060.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__P169060.isGetter = true; - -function ArcadePhysicsEngine_maxStep__P169060_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: ArcadePhysicsEngine_maxStep__P169060, 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__P166699(s) { -let r0 = s.r0, 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); - s.tmp_0 = r0; - r0 = (s.tmp_0 >> 8); + 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__P169268_mk(s); + r0 = s.scene___180414.fields["tileMap"]; + s.tmp_10.arg0 = r0; + s.tmp_10.arg1 = s.arg1; + s.callLocIdx = 1111; 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() } } } -Fx_toInt__P166699.info = {"start":2379,"length":86,"line":74,"column":4,"endLine":76,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"toInt","argumentNames":["v"]} +scene_Camera_offsetX__P169314.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 Fx_toInt__P166699_mk(s) { +function scene_Camera_offsetX__P169314_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_toInt__P166699, depth: s.depth + 1, + parent: s, fn: scene_Camera_offsetX__P169314, depth: s.depth + 1, pc: 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___180414: undefined, arg0: undefined, + arg1: undefined, } } -function ArcadePhysicsEngine_minStep__P169059(s) { +function tiles_TileMap_offsetX__P169268(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14942,27 +16422,44 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C169054_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 * 256); + if (!checkSubtype(r0, tiles_TileMap__C169262_VT)) failedCast(r0); + s.tmp_0 = Math_clamp__P166654_mk(s); + s.tmp_0.arg0 = 0; + s.tmp_1 = Math_max__P166657_mk(s); + s.tmp_3 = tiles_TileMap_areaWidth__P169270_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 1038; s.pc = 3; return s.tmp_3; + case 3: + r0 = s.retval; s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["minSingleStep"] = (s.tmp_1); - r0 = undefined; + r0 = pxsim_ImageMethods.width(globals.screen___168559); + s.tmp_4 = r0; + r0 = (s.tmp_2 - s.tmp_4); + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 0; + s.callLocIdx = 1039; 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 = 1040; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_minStep__P169059.info = {"start":2176,"length":67,"line":80,"column":4,"endLine":82,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"minStep","argumentNames":["this","v"]} +tiles_TileMap_offsetX__P169268.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 ArcadePhysicsEngine_minStep__P169059_mk(s) { +function tiles_TileMap_offsetX__P169268_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_minStep__P169059, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_offsetX__P169268, depth: s.depth + 1, pc: 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, } } @@ -14971,7 +16468,7 @@ function ArcadePhysicsEngine_minStep__P169059_mk(s) { -function ArcadePhysicsEngine_minStep__P169058(s) { +function tiles_TileMap_areaWidth__P169270(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14986,25 +16483,40 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C169054_VT)) failedCast(r0); - r0 = s.arg0.fields["minSingleStep"]; + if (!checkSubtype(r0, tiles_TileMap__C169262_VT)) failedCast(r0); + r0 = s.arg0.fields["_map"]; s.tmp_0 = r0; - r0 = (s.tmp_0 + 128); + 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.tmp_1 >> 8); - return leaveAccessor(s, 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; + return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_minStep__P169058.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__P169058.isGetter = true; +tiles_TileMap_areaWidth__P169270.info = {"start":9763,"length":91,"line":333,"column":8,"endLine":335,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"areaWidth","argumentNames":["this"]} -function ArcadePhysicsEngine_minStep__P169058_mk(s) { +function tiles_TileMap_areaWidth__P169270_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_minStep__P169058, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_areaWidth__P169270, depth: s.depth + 1, pc: 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, } } @@ -15012,7 +16524,7 @@ function ArcadePhysicsEngine_minStep__P169058_mk(s) { -function ArcadePhysicsEngine_maxSpeed__P169057(s) { +function tiles_TileMapData_width__P169246(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15024,46 +16536,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, ArcadePhysicsEngine__C169054_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) + if (!checkSubtype(r0, tiles_TileMapData__C169244_VT)) failedCast(r0); + r0 = s.arg0.fields["_width"]; + return leaveAccessor(s, r0) default: oops() } } } -ArcadePhysicsEngine_maxSpeed__P169057.info = {"start":1963,"length":127,"line":71,"column":4,"endLine":74,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"maxSpeed","argumentNames":["this","v"]} +tiles_TileMapData_width__P169246.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__P169246.isGetter = true; -function ArcadePhysicsEngine_maxSpeed__P169057_mk(s) { +function tiles_TileMapData_width__P169246_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_maxSpeed__P169057, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_width__P169246, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, arg0: undefined, - arg1: undefined, } } -function Fx_neg__P166682(s) { +function scene_Camera_offsetX__P169313(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15077,16 +16573,19 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = (0 - s.arg0); - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, scene_Camera__C169308_VT)) failedCast(r0); + r0 = s.arg0.fields["_offsetX"]; + return leaveAccessor(s, r0) default: oops() } } } -Fx_neg__P166682.info = {"start":311,"length":88,"line":14,"column":4,"endLine":16,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"neg","argumentNames":["a"]} +scene_Camera_offsetX__P169313.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__P169313.isGetter = true; -function Fx_neg__P166682_mk(s) { +function scene_Camera_offsetX__P169313_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_neg__P166682, depth: s.depth + 1, + parent: s, fn: scene_Camera_offsetX__P169313, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, } } @@ -15095,7 +16594,7 @@ function Fx_neg__P166682_mk(s) { -function ArcadePhysicsEngine_maxSpeed__P169056(s) { +function PhysicsEngine_move__P169044(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15107,36 +16606,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, ArcadePhysicsEngine__C169054_VT)) failedCast(r0); - r0 = s.arg0.fields["maxVelocity"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 + 128); - s.tmp_1 = r0; - r0 = (s.tmp_1 >> 8); - return leaveAccessor(s, r0) + if (!checkSubtype(r0, PhysicsEngine__C169038_VT)) failedCast(r0); + r0 = undefined; + return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_maxSpeed__P169056.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__P169056.isGetter = true; +PhysicsEngine_move__P169044.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 ArcadePhysicsEngine_maxSpeed__P169056_mk(s) { +function PhysicsEngine_move__P169044_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_maxSpeed__P169056, depth: s.depth + 1, + parent: s, fn: PhysicsEngine_move__P169044, 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 PhysicsEngine_constructor__P169039(s) { +function PhysicsEngine_draw__P169043(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15156,12 +16650,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -PhysicsEngine_constructor__P169039.info = {"start":26,"length":21,"line":1,"column":4,"endLine":2,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["this"]} +PhysicsEngine_draw__P169043.info = {"start":279,"length":10,"line":15,"column":4,"endLine":15,"endColumn":14,"fileName":"pxt_modules/game/physics.ts","functionName":"draw","argumentNames":["this"]} -function PhysicsEngine_constructor__P169039_mk(s) { +function PhysicsEngine_draw__P169043_mk(s) { checkStack(s.depth); return { - parent: s, fn: PhysicsEngine_constructor__P169039, depth: s.depth + 1, + parent: s, fn: PhysicsEngine_draw__P169043, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, } } @@ -15170,7 +16664,7 @@ function PhysicsEngine_constructor__P169039_mk(s) { -function sprites_SpriteMap_constructor__P168974(s) { +function controller___update__P168692(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15180,29 +16674,43 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.dtms___180679 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, sprites_SpriteMap__C168973_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 = (s.arg0 * 1000); + s.tmp_0 = r0; + r0 = (s.tmp_0 | 0); + s.dtms___180679 = (r0); + r0 = pxsim_pxtcore_mkAction(1, controller___update_inline__P180686); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.dtms___180679); + s.tmp_1 = helpers_arrayForEach__P166636_mk(s); + s.tmp_2 = controller_players__P168656_mk(s); + s.callLocIdx = 287; s.pc = 2; return s.tmp_2; + case 2: + r0 = s.retval; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 289; s.pc = 1; return s.tmp_1; + case 1: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_SpriteMap_constructor__P168974.info = {"start":237,"length":56,"line":8,"column":8,"endLine":10,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"inline","argumentNames":["this"]} +controller___update__P168692.info = {"start":13733,"length":137,"line":414,"column":4,"endLine":417,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"__update","argumentNames":["dt"]} -function sprites_SpriteMap_constructor__P168974_mk(s) { +function controller___update__P168692_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_constructor__P168974, depth: s.depth + 1, + parent: s, fn: controller___update__P168692, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + dtms___180679: undefined, arg0: undefined, } } @@ -15210,7 +16718,7 @@ function sprites_SpriteMap_constructor__P168974_mk(s) { -function control_pushEventContext__P166936(s) { +function controller___update_inline__P180686(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15220,63 +16728,36 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ctx___180778 = undefined; - s.n___180784 = undefined; - r0 = pxsim_numops_toBoolDecr(globals.eventContexts___171957); - 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___171957 = (r0); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + s.tmp_0 = controller_Controller___update__P168690_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.caps[0]; + s.callLocIdx = 288; s.pc = 1; return s.tmp_0; case 1: - case 2: - s.tmp_0 = control_eventContext__P166935_mk(s); - s.callLocIdx = 75; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - s.ctx___180778 = (r0); - r0 = pxsim_numops_toBoolDecr(s.ctx___180778); - if (!r0) { step = 3; continue; } - s.tmp_0 = control_EventContext_unregister__P166929_mk(s); - s.tmp_0.arg0 = s.ctx___180778; - s.callLocIdx = 76; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - case 3: - case 4: - r0 = pxsim_pxtcore_mkClassInstance(control_EventContext__C166922_VT); - s.tmp_0 = r0; - s.tmp_1 = control_EventContext_constructor__P166926_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 77; s.pc = 7; return s.tmp_1; - case 7: r0 = s.retval; - s.n___180784 = (s.tmp_0); - r0 = pxsim_Array__push(globals.eventContexts___171957, s.n___180784); - r0 = s.n___180784; + r0 = undefined; return leave(s, r0) default: oops() } } } -control_pushEventContext__P166936.info = {"start":7310,"length":340,"line":220,"column":4,"endLine":231,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"pushEventContext","argumentNames":[]} +controller___update_inline__P180686.info = {"start":13835,"length":27,"line":416,"column":26,"endLine":416,"endColumn":53,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["ctrl"]} -function control_pushEventContext__P166936_mk(s) { +function controller___update_inline__P180686_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_pushEventContext__P166936, depth: s.depth + 1, + parent: s, fn: controller___update_inline__P180686, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - ctx___180778: undefined, - n___180784: undefined, + arg0: undefined, } } -function control_EventContext_constructor__P166926(s) { +function controller_Controller___update__P168690(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15288,50 +16769,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, control_EventContext__C166922_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___166924); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + if (!checkSubtype(r0, controller_Controller__C168661_VT)) failedCast(r0); + r0 = pxsim_pxtrt.mklocRef(); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = pxsim_String_.mkEmpty(); - globals.control_EventContext_lastStats___166924 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.arg1); + s.arg1 = (s.tmp_0); + s.tmp_1 = r0 = s.arg1; + r0 = pxsim_pxtrt_ldlocRef(s.arg1); + s.tmp_3 = r0; + r0 = (s.tmp_3 | 0); + s.tmp_2 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_1, s.tmp_2); + r0 = pxsim_pxtcore_mkAction(1, controller_Controller___update_inline__P180699); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); + s.tmp_1 = helpers_arrayForEach__P166636_mk(s); + r0 = s.arg0.fields["buttons"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 286; s.pc = 1; return s.tmp_1; case 1: - case 2: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -control_EventContext_constructor__P166926.info = {"start":1778,"length":347,"line":59,"column":8,"endLine":69,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":["this"]} +controller_Controller___update__P168690.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 control_EventContext_constructor__P166926_mk(s) { +function controller_Controller___update__P168690_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_constructor__P166926, depth: s.depth + 1, + parent: s, fn: controller_Controller___update__P168690, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, arg0: undefined, + arg1: undefined, } } -function particles_disableAll__P169709(s) { +function controller_Controller___update_inline__P180699(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15341,46 +16827,37 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sources___180962 = undefined; - s.tmp_0 = particles_particleSources__P172807_mk(s); - s.callLocIdx = 1615; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.sources___180962 = (r0); - r0 = pxsim_numops_toBoolDecr(s.sources___180962); - if (!r0) { step = 1; continue; } - s.tmp_0 = helpers_arrayForEach__P166636_mk(s); - s.tmp_0.arg0 = s.sources___180962; - s.tmp_0.arg1 = particles_disableAll_inline__P180968; - s.callLocIdx = 1617; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - s.tmp_0 = particles_pruneParticles__P172803_mk(s); - s.callLocIdx = 1618; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + s.tmp_0 = controller_Button___update__P168730_mk(s); + s.tmp_0.arg0 = s.arg0; + r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); + s.tmp_0.arg1 = r0; + s.callLocIdx = 285; s.pc = 1; return s.tmp_0; case 1: - case 2: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -particles_disableAll__P169709.info = {"start":12370,"length":195,"line":402,"column":4,"endLine":408,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"disableAll","argumentNames":[]} +controller_Controller___update_inline__P180699.info = {"start":13298,"length":25,"line":398,"column":33,"endLine":398,"endColumn":58,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["btn"]} -function particles_disableAll__P169709_mk(s) { +function controller_Controller___update_inline__P180699_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_disableAll__P169709, depth: s.depth + 1, + parent: s, fn: controller_Controller___update_inline__P180699, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - sources___180962: undefined, + arg0: undefined, } } -function particles_disableAll_inline__P180968(s) { +function controller_Button___update__P168730(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15390,36 +16867,124 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.delay___180715 = undefined; + s.interval___180724 = undefined; + s.count___180737 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = particles_ParticleSource_enabled__P169691_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = false; - s.callLocIdx = 1616; s.pc = 1; return s.tmp_0; + r0 = s.arg0; + if (!checkSubtype(r0, controller_Button__C168716_VT)) failedCast(r0); + r0 = s.arg0.fields["_pressed"]; + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + { step = 11; continue; } 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"]; + 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___172255; + { step = 4; continue; } + case 3: + r0 = s.arg0.fields["repeatDelay"]; + case 4: + // jmp value (already in r0) + s.tmp_2 = r0; + s.delay___180715 = (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 = globals.defaultRepeatInterval___172257; + { step = 6; continue; } + case 5: + r0 = s.arg0.fields["repeatInterval"]; + case 6: + // jmp value (already in r0) + s.tmp_2 = r0; + s.interval___180724 = (s.tmp_2); + r0 = s.arg0.fields["_pressedElasped"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 < s.delay___180715); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; continue; } + { step = 11; continue; } + case 7: + case 8: + r0 = s.arg0.fields["_pressedElasped"]; + s.tmp_5 = r0; + r0 = (s.tmp_5 - s.delay___180715); + s.tmp_4 = r0; + r0 = (s.tmp_4 - s.interval___180724); + s.tmp_3 = r0; + r0 = (s.tmp_3 / s.interval___180724); + s.tmp_2 = r0; + r0 = pxsim.Math_.floor(s.tmp_2); + s.count___180737 = (r0); + r0 = s.arg0.fields["_repeatCount"]; + s.tmp_1 = r0; + r0 = (s.count___180737 != 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__P172244_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 305; s.pc = 12; return s.tmp_2; + case 12: r0 = s.retval; - r0 = false; + r0 = (s.arg0).fields["_repeatCount"] = (s.count___180737); + case 9: + case 10: + case 11: + r0 = undefined; return leave(s, r0) default: oops() } } } -particles_disableAll_inline__P180968.info = {"start":12495,"length":22,"line":405,"column":28,"endLine":405,"endColumn":50,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["s"]} +controller_Button___update__P168730.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 particles_disableAll_inline__P180968_mk(s) { +function controller_Button___update__P168730_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_disableAll_inline__P180968, depth: s.depth + 1, + parent: s, fn: controller_Button___update__P168730, depth: s.depth + 1, pc: 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___180715: undefined, + interval___180724: undefined, + count___180737: undefined, arg0: undefined, + arg1: undefined, } } -function particles_clearAll__P169708(s) { +function controller_Button_raiseButtonRepeat__P172244(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15429,46 +16994,43 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sources___180973 = undefined; - s.tmp_0 = particles_particleSources__P172807_mk(s); - s.callLocIdx = 1611; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.sources___180973 = (r0); - r0 = pxsim_numops_toBoolDecr(s.sources___180973); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, controller_Button__C168716_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(globals._userEventsEnabled___172253); if (!r0) { step = 1; continue; } - s.tmp_0 = helpers_arrayForEach__P166636_mk(s); - s.tmp_0.arg0 = s.sources___180973; - s.tmp_0.arg1 = particles_clearAll_inline__P180979; - s.callLocIdx = 1613; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - s.tmp_0 = particles_pruneParticles__P172803_mk(s); - s.callLocIdx = 1614; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; + r0 = s.arg0.fields["id"]; + s.tmp_0 = r0; + r0 = pxsim.control.raiseEvent(2054, s.tmp_0); + { step = 2; continue; } case 1: + r0 = s.arg0.fields["id"]; + s.tmp_0 = r0; + r0 = pxsim.control.raiseEvent(2055, s.tmp_0); case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -particles_clearAll__P169708.info = {"start":12098,"length":185,"line":391,"column":4,"endLine":397,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"clearAll","argumentNames":[]} +controller_Button_raiseButtonRepeat__P172244.info = {"start":3303,"length":211,"line":110,"column":8,"endLine":115,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"raiseButtonRepeat","argumentNames":["this"]} -function particles_clearAll__P169708_mk(s) { +function controller_Button_raiseButtonRepeat__P172244_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_clearAll__P169708, depth: s.depth + 1, + parent: s, fn: controller_Button_raiseButtonRepeat__P172244, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - sources___180973: undefined, + arg0: undefined, } } -function particles_clearAll_inline__P180979(s) { +function controller_players__P168656(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15478,35 +17040,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 = particles_ParticleSource_clear__P169693_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1612; s.pc = 1; return s.tmp_0; + s.tmp_0 = controller__player1__P168655_mk(s); + s.callLocIdx = 224; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - r0 = undefined; + s.tmp_0 = helpers_arrayFilter__P166637_mk(s); + s.tmp_0.arg0 = globals._players___172173; + s.tmp_0.arg1 = controller_players_inline__P180669; + s.callLocIdx = 225; s.pc = 2; return s.tmp_0; + case 2: + r0 = s.retval; return leave(s, r0) default: oops() } } } -particles_clearAll_inline__P180979.info = {"start":12221,"length":14,"line":394,"column":28,"endLine":394,"endColumn":42,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["s"]} +controller_players__P168656.info = {"start":1645,"length":144,"line":53,"column":4,"endLine":56,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"players","argumentNames":[]} -function particles_clearAll_inline__P180979_mk(s) { +function controller_players__P168656_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_clearAll_inline__P180979, depth: s.depth + 1, + parent: s, fn: controller_players__P168656, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - arg0: undefined, } } -function particles_ParticleSource_clear__P169693(s) { +function controller_players_inline__P180669(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15520,20 +17081,26 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C169678_VT)) failedCast(r0); - r0 = (s.arg0).fields["head"] = (undefined); - r0 = undefined; + 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() } } } -particles_ParticleSource_clear__P169693.info = {"start":7424,"length":54,"line":243,"column":8,"endLine":245,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"clear","argumentNames":["this"]} +controller_players_inline__P180669.info = {"start":1767,"length":14,"line":55,"column":31,"endLine":55,"endColumn":45,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["ctrl"]} -function particles_ParticleSource_clear__P169693_mk(s) { +function controller_players_inline__P180669_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_clear__P169693, depth: s.depth + 1, + parent: s, fn: controller_players_inline__P180669, 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, } } @@ -15541,7 +17108,7 @@ function particles_ParticleSource_clear__P169693_mk(s) { -function game_Dialog_setText__P169457(s) { +function controller__moveSprites__P168660(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15551,57 +17118,36 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, game_Dialog__C169448_VT)) failedCast(r0); - s.tmp_0 = game_BaseDialog_setFont__P172427_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_1 = image_getFontForText__P168504_mk(s); - s.tmp_1.arg0 = s.arg1; - s.callLocIdx = 1222; s.pc = 2; return s.tmp_1; + s.tmp_0 = helpers_arrayForEach__P166636_mk(s); + s.tmp_1 = controller_players__P168656_mk(s); + s.callLocIdx = 226; s.pc = 2; return s.tmp_1; case 2: r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1223; s.pc = 1; return s.tmp_0; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = controller__moveSprites_inline__P180468; + s.callLocIdx = 228; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = game_Dialog_chunkText__P169456_mk(s); - s.tmp_2.arg0 = s.arg0; - s.tmp_2.arg1 = s.arg1; - s.callLocIdx = 1224; s.pc = 3; return s.tmp_2; - case 3: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["chunks"] = (s.tmp_1); - r0 = (s.arg0).fields["chunkIndex"] = (0); r0 = undefined; return leave(s, r0) default: oops() } } } -game_Dialog_setText__P169457.info = {"start":7674,"length":183,"line":241,"column":8,"endLine":245,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"setText","argumentNames":["this","rawString"]} +controller__moveSprites__P168660.info = {"start":2005,"length":180,"line":67,"column":4,"endLine":71,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"_moveSprites","argumentNames":[]} -function game_Dialog_setText__P169457_mk(s) { +function controller__moveSprites__P168660_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_Dialog_setText__P169457, depth: s.depth + 1, + parent: s, fn: controller__moveSprites__P168660, 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 game_BaseDialog_setFont__P172427(s) { +function controller__moveSprites_inline__P180468(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15613,32 +17159,33 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, game_BaseDialog__C169430_VT)) failedCast(r0); - r0 = (s.arg0).fields["font"] = (s.arg1); + s.tmp_0 = controller_Controller___preUpdate__P168689_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 227; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -game_BaseDialog_setFont__P172427.info = {"start":5994,"length":77,"line":190,"column":8,"endLine":192,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"setFont","argumentNames":["this","font"]} +controller__moveSprites_inline__P180468.info = {"start":2151,"length":26,"line":70,"column":26,"endLine":70,"endColumn":52,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["ctrl"]} -function game_BaseDialog_setFont__P172427_mk(s) { +function controller__moveSprites_inline__P180468_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_BaseDialog_setFont__P172427, depth: s.depth + 1, + parent: s, fn: controller__moveSprites_inline__P180468, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, - arg1: undefined, } } -function game_Dialog_chunkText__P169456(s) { +function controller_Controller___preUpdate__P168689(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15648,461 +17195,308 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.charactersPerRow___178349 = undefined; - s.charactersPerCursorRow___178358 = undefined; - s.rowsOfCharacters___178370 = undefined; - s.rowsWithCursor___178377 = undefined; - s.lineLengths___178385 = undefined; - s.i___178387 = undefined; - s.i___178400 = undefined; + s.deadSprites___180475 = undefined; + s.svx___180476 = undefined; + s.svy___180477 = undefined; + s.svxInCricle___180512 = undefined; + s.svyInCircle___180514 = undefined; + s.sq___180516 = undefined; + s.scale___180531 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_Dialog__C169448_VT)) failedCast(r0); - s.tmp_2 = game_BaseDialog_textAreaWidth__P172425_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 1215; s.pc = 5; return s.tmp_2; - case 5: + if (!checkSubtype(r0, controller_Controller__C168661_VT)) failedCast(r0); + s.tmp_3 = controller_Controller__controlledSprites__P168666_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 260; s.pc = 18; return s.tmp_3; + case 18: r0 = s.retval; + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; - s.tmp_4 = if_charWidth_1_mk(s); - r0 = s.arg0.fields["font"]; - s.tmp_4.arg0 = r0; - 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 = 1216; s.pc = 6; return s.tmp_4; } - } - case 6: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_1 / s.tmp_3); + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim.Math_.floor(s.tmp_0); - s.charactersPerRow___178349 = (r0); - s.tmp_1 = r0 = s.charactersPerRow___178349; - r0 = s.arg0.fields["cursor"]; - s.tmp_4 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_4); - s.tmp_3 = 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 = 1217; s.pc = 7; return s.tmp_6; } - } - case 7: - r0 = s.retval; - s.tmp_5 = r0; - r0 = (s.tmp_3 / s.tmp_5); - s.tmp_2 = r0; - r0 = (s.tmp_1 - s.tmp_2); + 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___180475 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.deadSprites___180475, false); + r0 = pxsim_pxtrt.mklocRef(); + s.svx___180476 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.svx___180476, 0); + r0 = pxsim_pxtrt.mklocRef(); + s.svy___180477 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.svy___180477, 0); + r0 = s.arg0.fields["analog"]; s.tmp_0 = r0; - r0 = pxsim.Math_.floor(s.tmp_0); - s.charactersPerCursorRow___178358 = (r0); - s.tmp_2 = game_BaseDialog_textAreaHeight__P172426_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 1218; s.pc = 8; return s.tmp_2; - case 8: + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + s.tmp_1 = r0 = s.svx___180476; + s.tmp_5 = controller_Button_pressureLevel__P168728_mk(s); + s.tmp_6 = controller_Controller_right__P168671_mk(s); + s.tmp_6.arg0 = s.arg0; + s.callLocIdx = 261; s.pc = 20; return s.tmp_6; + case 20: r0 = s.retval; - s.tmp_1 = r0; - s.tmp_4 = game_BaseDialog_rowHeight__P172424_mk(s); - s.tmp_4.arg0 = s.arg0; - s.callLocIdx = 1219; s.pc = 9; return s.tmp_4; - case 9: + s.tmp_5.arg0 = r0; + s.callLocIdx = 262; s.pc = 19; return s.tmp_5; + case 19: + r0 = s.retval; + s.tmp_4 = r0; + s.tmp_8 = controller_Button_pressureLevel__P168728_mk(s); + s.tmp_9 = controller_Controller_left__P168670_mk(s); + s.tmp_9.arg0 = s.arg0; + s.callLocIdx = 263; s.pc = 22; return s.tmp_9; + case 22: + r0 = s.retval; + s.tmp_8.arg0 = r0; + s.callLocIdx = 264; 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_1 / s.tmp_3); - s.tmp_0 = r0; - r0 = pxsim.Math_.floor(s.tmp_0); - s.rowsOfCharacters___178370 = (r0); - r0 = s.arg0.fields["cursor"]; + r0 = (s.tmp_3 >> 1); s.tmp_2 = r0; - r0 = pxsim_ImageMethods.height(s.tmp_2); - s.tmp_1 = r0; - s.tmp_4 = game_BaseDialog_rowHeight__P172424_mk(s); - s.tmp_4.arg0 = s.arg0; - s.callLocIdx = 1220; s.pc = 10; return s.tmp_4; - case 10: + r0 = pxsim_pxtrt_stlocRef(s.tmp_1, s.tmp_2); + s.tmp_0 = r0 = s.svy___180477; + s.tmp_4 = controller_Button_pressureLevel__P168728_mk(s); + s.tmp_5 = controller_Controller_down__P168673_mk(s); + s.tmp_5.arg0 = s.arg0; + s.callLocIdx = 265; s.pc = 24; return s.tmp_5; + case 24: + r0 = s.retval; + s.tmp_4.arg0 = r0; + s.callLocIdx = 266; s.pc = 23; return s.tmp_4; + case 23: r0 = s.retval; s.tmp_3 = r0; - r0 = (s.tmp_1 / s.tmp_3); - s.tmp_0 = r0; - r0 = pxsim.Math_.ceil(s.tmp_0); - s.rowsWithCursor___178377 = (r0); - r0 = pxsim_Array__mk(); - s.lineLengths___178385 = (r0); - s.i___178387 = (0); - case 1: - s.tmp_1 = r0 = s.i___178387; - r0 = (s.rowsOfCharacters___178370 - s.rowsWithCursor___178377); + s.tmp_7 = controller_Button_pressureLevel__P168728_mk(s); + s.tmp_8 = controller_Controller_up__P168672_mk(s); + s.tmp_8.arg0 = s.arg0; + s.callLocIdx = 267; s.pc = 26; return s.tmp_8; + case 26: + r0 = s.retval; + s.tmp_7.arg0 = r0; + s.callLocIdx = 268; 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_1 < s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - r0 = pxsim_Array__push(s.lineLengths___178385, s.charactersPerRow___178349); - r0 = (s.i___178387 + 1); - s.i___178387 = (r0); - { step = 1; continue; } - case 2: - s.i___178400 = (0); + r0 = (s.tmp_2 >> 1); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + { step = 12; continue; } case 3: - r0 = (s.i___178400 < s.rowsWithCursor___178377); + s.tmp_1 = controller_Button__C168716_v0_1_mk(s); + s.tmp_2 = controller_Controller_right__P168671_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 269; 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__C168716_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 = pxsim_Array__push(s.lineLengths___178385, s.charactersPerCursorRow___178358); - r0 = (s.i___178400 + 1); - s.i___178400 = (r0); - { step = 3; continue; } + r0 = 256; + { step = 5; continue; } case 4: - s.tmp_0 = game_breakIntoPages__P172445_mk(s); - s.tmp_0.arg0 = s.arg1; - s.tmp_0.arg1 = s.lineLengths___178385; - s.callLocIdx = 1221; s.pc = 11; return s.tmp_0; - case 11: + r0 = 0; + case 5: + // jmp value (already in r0) + s.tmp_3 = r0; + s.tmp_5 = controller_Button__C168716_v0_1_mk(s); + s.tmp_6 = controller_Controller_left__P168670_mk(s); + s.tmp_6.arg0 = s.arg0; + s.callLocIdx = 270; s.pc = 30; return s.tmp_6; + case 30: r0 = s.retval; - return leave(s, r0) - default: oops() -} } } -game_Dialog_chunkText__P169456.info = {"start":6929,"length":735,"line":227,"column":8,"endLine":239,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"chunkText","argumentNames":["this","str"]} - -function game_Dialog_chunkText__P169456_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: game_Dialog_chunkText__P169456, depth: s.depth + 1, - pc: 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, - charactersPerRow___178349: undefined, - charactersPerCursorRow___178358: undefined, - rowsOfCharacters___178370: undefined, - rowsWithCursor___178377: undefined, - lineLengths___178385: undefined, - i___178387: undefined, - i___178400: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function game_breakIntoPages__P172445(s) { -let r0 = s.r0, 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.result___178416 = undefined; - s.currentPage___178418 = undefined; - s.lastBreakLocation___178420 = undefined; - s.lastBreak___178421 = undefined; - s.line___178422 = undefined; - s.lineLength___178423 = undefined; - s.nextLine___178426 = undefined; - s.index___178432 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = pxsim_Array__mk(); - s.result___178416 = (r0); - r0 = pxsim_Array__mk(); - s.currentPage___178418 = (r0); - s.lastBreakLocation___178420 = (0); - s.lastBreak___178421 = (0); - r0 = pxsim_pxtrt.mklocRef(); - s.line___178422 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.line___178422, 0); - r0 = pxsim_pxtrt.mklocRef(); - s.lineLength___178423 = (r0); - s.tmp_0 = r0 = s.lineLength___178423; - s.tmp_2 = r0 = s.arg1; - r0 = pxsim_pxtrt_ldlocRef(s.line___178422); - s.tmp_3 = r0; - r0 = pxsim_Array__getAt(s.tmp_2, s.tmp_3); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); - r0 = pxsim_pxtcore_mkAction(3, nextLine__P178426); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.line___178422); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.lineLength___178423); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.arg1); - s.nextLine___178426 = (s.tmp_0); - s.index___178432 = (0); - case 1: - s.tmp_1 = r0 = s.index___178432; - 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 = 18; continue; } - r0 = pxsim_String_.charAt(s.arg0, s.index___178432); - s.tmp_4 = r0; - r0 = (s.tmp_4 === "\n"); - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 2; continue; } - s.tmp_5 = r0 = s.currentPage___178418; - s.tmp_7 = game_formatLine__P172446_mk(s); - s.tmp_8 = helpers_stringSubstr__P166645_mk(s); - s.tmp_8.arg0 = s.arg0; - s.tmp_8.arg1 = s.lastBreak___178421; - r0 = (s.index___178432 - s.lastBreak___178421); - s.tmp_8.arg2 = r0; - s.callLocIdx = 1309; s.pc = 24; return s.tmp_8; - case 24: - r0 = s.retval; - s.tmp_7.arg0 = r0; - s.callLocIdx = 1310; s.pc = 23; return s.tmp_7; - case 23: - r0 = s.retval; - s.tmp_6 = r0; - r0 = pxsim_Array__push(s.tmp_5, s.tmp_6); - r0 = (s.index___178432 + 1); - s.index___178432 = (r0); - s.lastBreak___178421 = (s.index___178432); - s.tmp_0 = lambda_1_mk(s); - s.tmp_0.argL = s.nextLine___178426; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 1311; s.pc = 25; return s.tmp_0; - case 25: + s.tmp_5.arg0 = r0; + if (!checkSubtype(s.tmp_5.arg0, controller_Button__C168716_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; - { step = 9; continue; } - case 2: - r0 = pxsim_String_.charAt(s.arg0, s.index___178432); - s.tmp_1 = r0; - r0 = (s.tmp_1 === "\\"); - 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_3 = r0 = s.arg0; - r0 = (s.index___178432 + 1); s.tmp_4 = r0; - r0 = pxsim_String_.charAt(s.tmp_3, s.tmp_4); - s.tmp_2 = r0; - r0 = (s.tmp_2 === "n"); - case 4: + 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_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); - if (!r0) { step = 5; continue; } - s.tmp_6 = r0 = s.currentPage___178418; - s.tmp_8 = game_formatLine__P172446_mk(s); - s.tmp_9 = helpers_stringSubstr__P166645_mk(s); - s.tmp_9.arg0 = s.arg0; - s.tmp_9.arg1 = s.lastBreak___178421; - r0 = (s.index___178432 - s.lastBreak___178421); - s.tmp_9.arg2 = r0; - s.callLocIdx = 1312; s.pc = 27; return s.tmp_9; - case 27: - r0 = s.retval; - s.tmp_8.arg0 = r0; - s.callLocIdx = 1313; s.pc = 26; return s.tmp_8; - case 26: - r0 = s.retval; s.tmp_7 = r0; - r0 = pxsim_Array__push(s.tmp_6, s.tmp_7); - r0 = (s.index___178432 + 2); - s.index___178432 = (r0); - s.lastBreak___178421 = (s.index___178432); - s.tmp_0 = lambda_1_mk(s); - s.tmp_0.argL = s.nextLine___178426; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 1314; s.pc = 28; return s.tmp_0; - case 28: + s.tmp_8 = r0 = s.svx___180476; + 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__C168716_v0_1_mk(s); + s.tmp_2 = controller_Controller_down__P168673_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 271; s.pc = 32; return s.tmp_2; + case 32: r0 = s.retval; - { step = 8; continue; } - case 5: - s.tmp_1 = game_isBreakCharacter__P172444_mk(s); - r0 = pxsim_String_.charCodeAt(s.arg0, s.index___178432); s.tmp_1.arg0 = r0; - s.callLocIdx = 1315; s.pc = 29; return s.tmp_1; - case 29: + if (!checkSubtype(s.tmp_1.arg0, controller_Button__C168716_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 = 6; continue; } - s.lastBreakLocation___178420 = (s.index___178432); - case 6: - case 7: + if (!r0) { step = 8; continue; } + r0 = 256; + { step = 9; continue; } case 8: + r0 = 0; case 9: - r0 = (s.index___178432 - s.lastBreak___178421); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_ldlocRef(s.lineLength___178423); - s.tmp_2 = r0; - r0 = (s.tmp_1 === s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 14; continue; } - r0 = (s.lastBreakLocation___178420 === s.index___178432); + // jmp value (already in r0) s.tmp_3 = r0; - r0 = pxsim_numops_toBool(s.tmp_3); + s.tmp_5 = controller_Button__C168716_v0_1_mk(s); + s.tmp_6 = controller_Controller_up__P168672_mk(s); + s.tmp_6.arg0 = s.arg0; + s.callLocIdx = 272; 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__C168716_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 = s.tmp_3; + r0 = 256; { step = 11; continue; } case 10: - r0 = (s.lastBreakLocation___178420 < s.lastBreak___178421); + r0 = 0; case 11: // jmp value (already in r0) - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - if (!r0) { step = 12; continue; } - s.tmp_5 = r0 = s.currentPage___178418; - s.tmp_7 = game_formatLine__P172446_mk(s); - s.tmp_8 = helpers_stringSubstr__P166645_mk(s); - s.tmp_8.arg0 = s.arg0; - s.tmp_8.arg1 = s.lastBreak___178421; - r0 = pxsim_pxtrt_ldlocRef(s.lineLength___178423); - s.tmp_8.arg2 = r0; - s.callLocIdx = 1316; s.pc = 31; return s.tmp_8; - case 31: - r0 = s.retval; - s.tmp_7.arg0 = r0; - s.callLocIdx = 1317; s.pc = 30; return s.tmp_7; - case 30: - r0 = s.retval; - s.tmp_6 = r0; - r0 = pxsim_Array__push(s.tmp_5, s.tmp_6); - s.lastBreak___178421 = (s.index___178432); - s.tmp_0 = lambda_1_mk(s); - s.tmp_0.argL = s.nextLine___178426; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 1318; s.pc = 32; return s.tmp_0; - case 32: - r0 = s.retval; - { step = 13; continue; } + s.tmp_7 = r0; + s.tmp_8 = r0 = s.svy___180477; + r0 = (s.tmp_3 - s.tmp_7); + s.tmp_9 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_8, s.tmp_9); case 12: - s.tmp_0 = r0 = s.currentPage___178418; - s.tmp_2 = game_formatLine__P172446_mk(s); - s.tmp_3 = helpers_stringSubstr__P166645_mk(s); - s.tmp_3.arg0 = s.arg0; - s.tmp_3.arg1 = s.lastBreak___178421; - r0 = (s.lastBreakLocation___178420 - s.lastBreak___178421); - s.tmp_3.arg2 = r0; - s.callLocIdx = 1319; s.pc = 34; return s.tmp_3; - case 34: - r0 = s.retval; - s.tmp_2.arg0 = r0; - s.callLocIdx = 1320; s.pc = 33; return s.tmp_2; - case 33: - r0 = s.retval; + r0 = pxsim_pxtrt.mklocRef(); + s.svxInCricle___180512 = (r0); + s.tmp_0 = r0 = s.svxInCricle___180512; + r0 = pxsim_pxtrt_ldlocRef(s.svx___180476); s.tmp_1 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); - s.lastBreak___178421 = (s.lastBreakLocation___178420); - s.tmp_0 = lambda_1_mk(s); - s.tmp_0.argL = s.nextLine___178426; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 1321; s.pc = 35; return s.tmp_0; - case 35: - r0 = s.retval; - case 13: - case 14: - case 15: - r0 = pxsim_pxtrt_ldlocRef(s.line___178422); + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + r0 = pxsim_pxtrt.mklocRef(); + s.svyInCircle___180514 = (r0); + s.tmp_0 = r0 = s.svyInCircle___180514; + r0 = pxsim_pxtrt_ldlocRef(s.svy___180477); s.tmp_1 = r0; - r0 = pxsim_Array__length(s.arg1); + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + r0 = pxsim_pxtrt_ldlocRef(s.svx___180476); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_ldlocRef(s.svx___180476); 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 = 16; continue; } - r0 = pxsim_pxtrt_stlocRef(s.line___178422, 0); - s.tmp_0 = r0 = s.lineLength___178423; - s.tmp_2 = r0 = s.arg1; - r0 = pxsim_pxtrt_ldlocRef(s.line___178422); + r0 = pxsim_pxtrt_ldlocRef(s.svy___180477); + s.tmp_4 = r0; + r0 = pxsim_pxtrt_ldlocRef(s.svy___180477); + s.tmp_5 = r0; + r0 = (s.tmp_4 * s.tmp_5); s.tmp_3 = r0; - r0 = pxsim_Array__getAt(s.tmp_2, s.tmp_3); + r0 = (s.tmp_0 + s.tmp_3); + s.sq___180516 = (r0); + r0 = (s.sq___180516 > 65536); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 13; continue; } + r0 = (65536 / s.sq___180516); + s.tmp_1 = r0; + r0 = pxsim.Math_.sqrt(s.tmp_1); + s.scale___180531 = (r0); + s.tmp_0 = r0 = s.svxInCricle___180512; + s.tmp_3 = r0 = s.scale___180531; + r0 = pxsim_pxtrt_ldlocRef(s.svx___180476); + 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 = pxsim_Array__push(s.result___178416, s.currentPage___178418); - r0 = pxsim_Array__mk(); - s.currentPage___178418 = (r0); - case 16: - case 17: - r0 = (s.index___178432 + 1); - s.index___178432 = (r0); - { step = 1; continue; } - case 18: - s.tmp_0 = r0 = s.currentPage___178418; - s.tmp_2 = game_formatLine__P172446_mk(s); - s.tmp_3 = helpers_stringSubstr__P166645_mk(s); - s.tmp_3.arg0 = s.arg0; - s.tmp_3.arg1 = s.lastBreak___178421; - r0 = pxsim_String_.length(s.arg0); + s.tmp_0 = r0 = s.svyInCircle___180514; + s.tmp_3 = r0 = s.scale___180531; + r0 = pxsim_pxtrt_ldlocRef(s.svy___180477); s.tmp_4 = r0; - r0 = (s.tmp_4 - s.lastBreak___178421); - s.tmp_3.arg2 = r0; - s.callLocIdx = 1322; s.pc = 37; return s.tmp_3; - case 37: - r0 = s.retval; - s.tmp_2.arg0 = r0; - s.callLocIdx = 1323; s.pc = 36; return s.tmp_2; + r0 = (s.tmp_3 * s.tmp_4); + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + case 13: + case 14: + r0 = pxsim_pxtcore_mkAction(5, controller_Controller___preUpdate_inline__P180549); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.deadSprites___180475); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.svx___180476); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.svy___180477); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 3, s.svxInCricle___180512); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 4, s.svyInCircle___180514); + s.tmp_1 = helpers_arrayForEach__P166636_mk(s); + s.tmp_2 = controller_Controller__controlledSprites__P168666_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 273; s.pc = 36; return s.tmp_2; case 36: r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); - r0 = pxsim_Array__length(s.currentPage___178418); - s.tmp_1 = r0; - r0 = (s.tmp_1 > 1); + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 281; s.pc = 35; return s.tmp_1; + case 35: + r0 = s.retval; + r0 = pxsim_pxtrt_ldlocRef(s.deadSprites___180475); s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 19; continue; } - r0 = s.tmp_0; - { step = 20; continue; } - case 19: - r0 = pxsim_Array__getAt(s.currentPage___178418, 0); - s.tmp_2 = r0; - r0 = pxsim_String_.mkEmpty(); - s.tmp_3 = r0; - r0 = (s.tmp_2 !== s.tmp_3); - case 20: - // jmp value (already in r0) - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - if (!r0) { step = 21; continue; } - r0 = pxsim_Array__push(s.result___178416, s.currentPage___178418); - case 21: - case 22: - r0 = s.result___178416; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 15; continue; } + s.tmp_1 = controller_Controller__controlledSprites__P168667_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_2 = helpers_arrayFilter__P166637_mk(s); + s.tmp_3 = controller_Controller__controlledSprites__P168666_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 282; 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__P180606; + s.callLocIdx = 283; s.pc = 38; return s.tmp_2; + case 38: + r0 = s.retval; + s.tmp_1.arg1 = r0; + s.callLocIdx = 284; s.pc = 37; return s.tmp_1; + case 37: + r0 = s.retval; + case 15: + case 16: + case 17: + r0 = undefined; return leave(s, r0) default: oops() } } } -game_breakIntoPages__P172445.info = {"start":32043,"length":2187,"line":908,"column":4,"endLine":969,"endColumn":5,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"breakIntoPages","argumentNames":["text","lineLengths"]} +controller_Controller___preUpdate__P168689.info = {"start":10666,"length":2535,"line":330,"column":8,"endLine":394,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"__preUpdate","argumentNames":["this"]} -function game_breakIntoPages__P172445_mk(s) { +function controller_Controller___preUpdate__P168689_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_breakIntoPages__P172445, depth: s.depth + 1, + parent: s, fn: controller_Controller___preUpdate__P168689, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -16114,67 +17508,21 @@ function game_breakIntoPages__P172445_mk(s) { tmp_7: undefined, tmp_8: undefined, tmp_9: undefined, - result___178416: undefined, - currentPage___178418: undefined, - lastBreakLocation___178420: undefined, - lastBreak___178421: undefined, - line___178422: undefined, - lineLength___178423: undefined, - nextLine___178426: undefined, - index___178432: undefined, + deadSprites___180475: undefined, + svx___180476: undefined, + svy___180477: undefined, + svxInCricle___180512: undefined, + svyInCircle___180514: undefined, + sq___180516: undefined, + scale___180531: undefined, arg0: undefined, - arg1: undefined, -} } - - - - - -function nextLine__P178426(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.tmp_0 = r0 = s.caps[0]; - r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); - s.tmp_2 = r0; - r0 = (s.tmp_2 + 1); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); - s.tmp_0 = r0 = s.caps[1]; - s.tmp_2 = r0 = s.caps[2]; - r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); - s.tmp_3 = r0; - r0 = pxsim_Array__getAt(s.tmp_2, s.tmp_3); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -nextLine__P178426.info = {"start":32336,"length":95,"line":918,"column":8,"endLine":921,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"nextLine","argumentNames":[]} - -function nextLine__P178426_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: nextLine__P178426, depth: s.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 game_formatLine__P172446(s) { +function controller_Controller___preUpdate_inline__P180549(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16184,175 +17532,156 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.i___178620 = undefined; + s.s___180552 = undefined; + s.vx___180553 = undefined; + s.vy___180554 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.i___178620 = (0); - case 1: - r0 = pxsim_String_.charAt(s.arg0, s.i___178620); + 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 = 274; s.pc = 22; return s.tmp_0; } + } + case 22: + r0 = s.retval; + s.s___180552 = (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 = 275; s.pc = 23; return s.tmp_2; } + } + case 23: + r0 = s.retval; + s.vx___180553 = (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 = 276; s.pc = 24; return s.tmp_3; } + } + case 24: + r0 = s.retval; + s.vy___180554 = (r0); + r0 = s.s___180552.fields["flags"]; s.tmp_1 = r0; - r0 = (s.tmp_1 === " "); + r0 = (s.tmp_1 & 2); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - r0 = (s.i___178620 + 1); - s.i___178620 = (r0); - { step = 1; continue; } + if (!r0) { step = 1; continue; } + r0 = pxsim_pxtrt_stlocRef(s.caps[0], true); + { step = 21; continue; } + case 1: case 2: - s.tmp_0 = helpers_stringSubstr__P166645_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.i___178620; - r0 = pxsim_String_.length(s.arg0); - s.tmp_0.arg2 = r0; - s.callLocIdx = 1324; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - return leave(s, r0) - default: oops() -} } } -game_formatLine__P172446.info = {"start":34236,"length":148,"line":971,"column":4,"endLine":975,"endColumn":5,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"formatLine","argumentNames":["text"]} - -function game_formatLine__P172446_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: game_formatLine__P172446, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - i___178620: undefined, - arg0: undefined, -} } - - - - - -function game_isBreakCharacter__P172444(s) { -let r0 = s.r0, 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 <= 32); + r0 = s.arg0.fields["_inputLastFrame"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 4; continue; } - case 1: - r0 = (s.arg0 >= 58); - s.tmp_1 = r0; - r0 = pxsim_numops_toBool(s.tmp_1); - if (r0) { step = 2; continue; } - r0 = s.tmp_1; - { step = 3; continue; } - case 2: - r0 = (s.arg0 <= 64); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; continue; } + r0 = pxsim_numops_toBoolDecr(s.vx___180553); + if (!r0) { step = 3; continue; } + r0 = (s.s___180552).fields["_vx"] = (0); case 3: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = s.tmp_2; case 4: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBool(s.tmp_3); + r0 = pxsim_numops_toBoolDecr(s.vy___180554); if (!r0) { step = 5; continue; } - r0 = s.tmp_3; - { step = 8; continue; } + r0 = (s.s___180552).fields["_vy"] = (0); case 5: - r0 = (s.arg0 >= 91); - s.tmp_4 = r0; - r0 = pxsim_numops_toBool(s.tmp_4); - if (r0) { step = 6; continue; } - r0 = s.tmp_4; - { step = 7; continue; } case 6: - r0 = (s.arg0 <= 96); case 7: - // jmp value (already in r0) - s.tmp_5 = r0; - r0 = s.tmp_5; case 8: - // jmp value (already in r0) - s.tmp_6 = r0; - r0 = pxsim_numops_toBool(s.tmp_6); + 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_6; - { step = 12; continue; } + r0 = s.tmp_0; + { step = 10; continue; } case 9: - r0 = (s.arg0 >= 123); - s.tmp_7 = r0; - r0 = pxsim_numops_toBool(s.tmp_7); - if (r0) { step = 10; continue; } - r0 = s.tmp_7; - { step = 11; continue; } + r0 = pxsim_pxtrt_ldlocRef(s.caps[2]); case 10: - r0 = (s.arg0 <= 126); - case 11: // jmp value (already in r0) - s.tmp_8 = r0; - r0 = s.tmp_8; + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 19; continue; } + s.tmp_2 = r0 = s.vx___180553; + r0 = pxsim_numops_toBool(s.tmp_2); + if (r0) { step = 11; continue; } + r0 = s.tmp_2; + { step = 12; continue; } + case 11: + r0 = s.vy___180554; case 12: // jmp value (already in r0) - s.tmp_9 = r0; - r0 = pxsim_numops_toBool(s.tmp_9); + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); if (!r0) { step = 13; continue; } - r0 = s.tmp_9; - { step = 16; continue; } + s.tmp_4 = r0 = s.s___180552; + r0 = pxsim_pxtrt_ldlocRef(s.caps[3]); + s.tmp_6 = r0; + r0 = pxsim.Math_.imul(s.tmp_6, s.vx___180553); + s.tmp_5 = r0; + r0 = (s.tmp_4).fields["_vx"] = (s.tmp_5); + s.tmp_0 = r0 = s.s___180552; + r0 = pxsim_pxtrt_ldlocRef(s.caps[4]); + s.tmp_2 = r0; + r0 = pxsim.Math_.imul(s.tmp_2, s.vy___180554); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_vy"] = (s.tmp_1); + { step = 18; continue; } case 13: - r0 = (s.arg0 >= 19968); - s.tmp_10 = r0; - r0 = pxsim_numops_toBool(s.tmp_10); - if (r0) { step = 14; continue; } - r0 = s.tmp_10; - { step = 15; continue; } + r0 = pxsim_numops_toBoolDecr(s.vx___180553); + if (!r0) { step = 14; continue; } + s.tmp_0 = r0 = s.s___180552; + r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + s.tmp_2 = r0; + r0 = pxsim.Math_.imul(s.tmp_2, s.vx___180553); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_vx"] = (s.tmp_1); + { step = 17; continue; } case 14: - r0 = (s.arg0 <= 40869); + r0 = pxsim_numops_toBoolDecr(s.vy___180554); + if (!r0) { step = 15; continue; } + s.tmp_0 = r0 = s.s___180552; + r0 = pxsim_pxtrt_ldlocRef(s.caps[2]); + s.tmp_2 = r0; + r0 = pxsim.Math_.imul(s.tmp_2, s.vy___180554); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_vy"] = (s.tmp_1); case 15: - // jmp value (already in r0) - s.tmp_11 = r0; - r0 = s.tmp_11; case 16: - // jmp value (already in r0) - s.tmp_12 = r0; - r0 = pxsim_numops_toBool(s.tmp_12); - if (!r0) { step = 17; continue; } - r0 = s.tmp_12; - { step = 18; continue; } case 17: - r0 = (s.arg0 == 12290); case 18: - // jmp value (already in r0) - s.tmp_13 = r0; - r0 = pxsim_numops_toBool(s.tmp_13); - if (!r0) { step = 19; continue; } - r0 = s.tmp_13; + r0 = (s.arg0).fields["_inputLastFrame"] = (true); { step = 20; continue; } case 19: - r0 = (s.arg0 == 65292); + r0 = (s.arg0).fields["_inputLastFrame"] = (false); case 20: - // jmp value (already in r0) - s.tmp_14 = r0; - r0 = s.tmp_14; + case 21: + r0 = undefined; return leave(s, r0) default: oops() } } } -game_isBreakCharacter__P172444.info = {"start":31679,"length":358,"line":898,"column":4,"endLine":906,"endColumn":5,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"isBreakCharacter","argumentNames":["charCode"]} +controller_Controller___preUpdate_inline__P180549.info = {"start":11849,"length":1171,"line":361,"column":44,"endLine":389,"endColumn":13,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["controlledSprite"]} -function game_isBreakCharacter__P172444_mk(s) { +function controller_Controller___preUpdate_inline__P180549_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_isBreakCharacter__P172444, depth: s.depth + 1, + parent: s, fn: controller_Controller___preUpdate_inline__P180549, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -16361,14 +17690,9 @@ function game_isBreakCharacter__P172444_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, + s___180552: undefined, + vx___180553: undefined, + vy___180554: undefined, arg0: undefined, } } @@ -16376,7 +17700,7 @@ function game_isBreakCharacter__P172444_mk(s) { -function helpers_stringSubstr__P166645(s) { +function controller_Controller___preUpdate_inline__P180606(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16388,57 +17712,37 @@ 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.arg2 === undefined); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = pxsim_String_.length(s.arg0); - { step = 4; continue; } - case 1: - s.tmp_1 = r0 = s.arg2; - r0 = pxsim_numops_toBool(s.tmp_1); - if (!r0) { step = 2; continue; } - r0 = s.tmp_1; - { step = 3; continue; } - case 2: - r0 = 0; - case 3: - // jmp value (already in r0) + r0 = s.arg0.fields["s"]; + r0 = r0.fields["flags"]; s.tmp_2 = r0; - r0 = s.tmp_2; - case 4: - // jmp value (already in r0) - s.tmp_3 = r0; - s.arg2 = (s.tmp_3); - r0 = pxsim_String_.substr(s.arg0, s.arg1, s.arg2); + r0 = (s.tmp_2 & 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() } } } -helpers_stringSubstr__P166645.info = {"start":11286,"length":204,"line":379,"column":4,"endLine":382,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"stringSubstr","argumentNames":["s","start","length"]} +controller_Controller___preUpdate_inline__P180606.info = {"start":13147,"length":42,"line":393,"column":28,"endLine":393,"endColumn":70,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["s"]} -function helpers_stringSubstr__P166645_mk(s) { +function controller_Controller___preUpdate_inline__P180606_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_stringSubstr__P166645, depth: s.depth + 1, + parent: s, fn: controller_Controller___preUpdate_inline__P180606, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function game_BaseDialog_textAreaHeight__P172426(s) { +function controller_Button_pressureLevel__P168728(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16453,37 +17757,50 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_BaseDialog__C169430_VT)) failedCast(r0); - r0 = s.arg0.fields["image"]; - s.tmp_2 = r0; - r0 = pxsim_ImageMethods.height(s.tmp_2); + if (!checkSubtype(r0, controller_Button__C168716_VT)) failedCast(r0); + r0 = pxsim.control.deviceDalVersion(); s.tmp_1 = r0; - r0 = s.arg0.fields["innerTop"]; - s.tmp_5 = r0; - s.tmp_7 = Math_min__P166658_mk(s); - r0 = s.arg0.fields["unit"]; - s.tmp_7.arg0 = r0; - s.tmp_7.arg1 = 12; - s.callLocIdx = 1211; s.pc = 1; return s.tmp_7; - case 1: + 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__C168716_v0_1_mk(s); + s.tmp_3.arg0 = s.arg0; + if (!checkSubtype(s.tmp_3.arg0, controller_Button__C168716_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_6 = r0; - r0 = (s.tmp_5 + s.tmp_6); + 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 << 1); - s.tmp_3 = r0; - r0 = (s.tmp_1 - s.tmp_3); - s.tmp_0 = r0; - r0 = (s.tmp_0 - 1); + 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() } } } -game_BaseDialog_textAreaHeight__P172426.info = {"start":5841,"length":143,"line":186,"column":8,"endLine":188,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"textAreaHeight","argumentNames":["this"]} +controller_Button_pressureLevel__P168728.info = {"start":6453,"length":311,"line":192,"column":8,"endLine":199,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"pressureLevel","argumentNames":["this"]} -function game_BaseDialog_textAreaHeight__P172426_mk(s) { +function controller_Button_pressureLevel__P168728_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_BaseDialog_textAreaHeight__P172426, depth: s.depth + 1, + parent: s, fn: controller_Button_pressureLevel__P168728, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -16491,8 +17808,6 @@ function game_BaseDialog_textAreaHeight__P172426_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, arg0: undefined, } } @@ -16500,7 +17815,7 @@ function game_BaseDialog_textAreaHeight__P172426_mk(s) { -function game_BaseDialog_textAreaWidth__P172425(s) { +function controller_Controller_down__P168673(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16515,46 +17830,25 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_BaseDialog__C169430_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__P166658_mk(s); - r0 = s.arg0.fields["unit"]; - s.tmp_7.arg0 = r0; - s.tmp_7.arg1 = 12; - s.callLocIdx = 1210; s.pc = 1; return s.tmp_7; - case 1: - r0 = s.retval; - s.tmp_6 = r0; - r0 = (s.tmp_5 + s.tmp_6); - s.tmp_4 = r0; - r0 = (s.tmp_4 << 1); - s.tmp_3 = r0; - r0 = (s.tmp_1 - s.tmp_3); + if (!checkSubtype(r0, controller_Controller__C168661_VT)) failedCast(r0); + r0 = s.arg0.fields["buttons"]; s.tmp_0 = r0; - r0 = (s.tmp_0 - 2); - return leave(s, r0) + r0 = (4 - 1); + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); + return leaveAccessor(s, r0) default: oops() } } } -game_BaseDialog_textAreaWidth__P172425.info = {"start":5689,"length":142,"line":182,"column":8,"endLine":184,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"textAreaWidth","argumentNames":["this"]} +controller_Controller_down__P168673.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__P168673.isGetter = true; -function game_BaseDialog_textAreaWidth__P172425_mk(s) { +function controller_Controller_down__P168673_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_BaseDialog_textAreaWidth__P172425, depth: s.depth + 1, + parent: s, fn: controller_Controller_down__P168673, depth: s.depth + 1, pc: 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, } } @@ -16562,7 +17856,7 @@ function game_BaseDialog_textAreaWidth__P172425_mk(s) { -function game_BaseDialog_rowHeight__P172424(s) { +function controller_Controller_button__P172238(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16574,45 +17868,37 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_BaseDialog__C169430_VT)) failedCast(r0); - s.tmp_1 = if_charHeight_1_mk(s); - r0 = s.arg0.fields["font"]; - s.tmp_1.arg0 = r0; - 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 = 1209; s.pc = 1; return s.tmp_1; } - } - case 1: - r0 = s.retval; + if (!checkSubtype(r0, controller_Controller__C168661_VT)) failedCast(r0); + r0 = s.arg0.fields["buttons"]; s.tmp_0 = r0; - r0 = (s.tmp_0 + 1); + r0 = (s.arg1 - 1); + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); return leave(s, r0) default: oops() } } } -game_BaseDialog_rowHeight__P172424.info = {"start":5601,"length":78,"line":178,"column":8,"endLine":180,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"rowHeight","argumentNames":["this"]} +controller_Controller_button__P172238.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 game_BaseDialog_rowHeight__P172424_mk(s) { +function controller_Controller_button__P172238_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_BaseDialog_rowHeight__P172424, depth: s.depth + 1, + parent: s, fn: controller_Controller_button__P172238, 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_Dialog_prevPage__P169455(s) { +function controller_Controller_up__P168672(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16627,39 +17913,25 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_Dialog__C169448_VT)) failedCast(r0); - s.tmp_1 = game_Dialog_hasPrev__P169453_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 1214; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; + if (!checkSubtype(r0, controller_Controller__C168661_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_2 = r0 = s.arg0; - r0 = s.tmp_2.fields["chunkIndex"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 - 1); - s.tmp_3 = r0; - r0 = (s.tmp_2).fields["chunkIndex"] = (s.tmp_3); - case 1: - case 2: - r0 = undefined; - 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_Dialog_prevPage__P169455.info = {"start":6814,"length":105,"line":221,"column":8,"endLine":225,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"prevPage","argumentNames":["this"]} +controller_Controller_up__P168672.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__P168672.isGetter = true; -function game_Dialog_prevPage__P169455_mk(s) { +function controller_Controller_up__P168672_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_Dialog_prevPage__P169455, depth: s.depth + 1, + parent: s, fn: controller_Controller_up__P168672, depth: s.depth + 1, pc: 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, } } @@ -16667,7 +17939,7 @@ function game_Dialog_prevPage__P169455_mk(s) { -function game_Dialog_nextPage__P169454(s) { +function controller_Controller_right__P168671(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16682,39 +17954,25 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_Dialog__C169448_VT)) failedCast(r0); - s.tmp_1 = game_Dialog_hasNext__P169452_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 1213; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; + if (!checkSubtype(r0, controller_Controller__C168661_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_2 = r0 = s.arg0; - r0 = s.tmp_2.fields["chunkIndex"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 + 1); - s.tmp_3 = r0; - r0 = (s.tmp_2).fields["chunkIndex"] = (s.tmp_3); - case 1: - case 2: - r0 = undefined; - return leave(s, r0) + r0 = (3 - 1); + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); + return leaveAccessor(s, r0) default: oops() } } } -game_Dialog_nextPage__P169454.info = {"start":6699,"length":105,"line":215,"column":8,"endLine":219,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"nextPage","argumentNames":["this"]} +controller_Controller_right__P168671.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__P168671.isGetter = true; -function game_Dialog_nextPage__P169454_mk(s) { +function controller_Controller_right__P168671_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_Dialog_nextPage__P169454, depth: s.depth + 1, + parent: s, fn: controller_Controller_right__P168671, depth: s.depth + 1, pc: 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, } } @@ -16722,7 +17980,7 @@ function game_Dialog_nextPage__P169454_mk(s) { -function game_Dialog_hasPrev__P169453(s) { +function controller_Controller_left__P168670(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16737,53 +17995,25 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_Dialog__C169448_VT)) failedCast(r0); - r0 = s.arg0.fields["chunks"]; - 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, controller_Controller__C168661_VT)) failedCast(r0); + r0 = s.arg0.fields["buttons"]; 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["chunks"]; - s.tmp_4 = r0; - r0 = pxsim_Array__length(s.tmp_4); - s.tmp_3 = r0; - r0 = (s.tmp_3 === 0); - case 2: - // jmp value (already in r0) - s.tmp_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); - if (!r0) { step = 3; continue; } - r0 = false; - { step = 5; continue; } - case 3: - case 4: - r0 = s.arg0.fields["chunkIndex"]; - s.tmp_6 = r0; - r0 = (s.tmp_6 > 0); - case 5: - 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() } } } -game_Dialog_hasPrev__P169453.info = {"start":6556,"length":133,"line":210,"column":8,"endLine":213,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"hasPrev","argumentNames":["this"]} +controller_Controller_left__P168670.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__P168670.isGetter = true; -function game_Dialog_hasPrev__P169453_mk(s) { +function controller_Controller_left__P168670_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_Dialog_hasPrev__P169453, depth: s.depth + 1, + parent: s, fn: controller_Controller_left__P168670, depth: s.depth + 1, pc: 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, } } @@ -16791,7 +18021,7 @@ function game_Dialog_hasPrev__P169453_mk(s) { -function game_Dialog_hasNext__P169452(s) { +function controller_Controller__controlledSprites__P168667(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16803,73 +18033,43 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_Dialog__C169448_VT)) failedCast(r0); - r0 = s.arg0.fields["chunks"]; - 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; } + if (!checkSubtype(r0, controller_Controller__C168661_VT)) failedCast(r0); + s.tmp_1 = game_currentScene__P169526_mk(s); + s.callLocIdx = 232; s.pc = 1; return s.tmp_1; case 1: - r0 = s.arg0.fields["chunks"]; - s.tmp_4 = r0; - r0 = pxsim_Array__length(s.tmp_4); - s.tmp_3 = r0; - r0 = (s.tmp_3 === 0); - case 2: - // jmp value (already in r0) - s.tmp_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); - if (!r0) { step = 3; continue; } - r0 = false; - { step = 5; continue; } - case 3: - case 4: - r0 = s.arg0.fields["chunkIndex"]; - s.tmp_6 = r0; - r0 = s.arg0.fields["chunks"]; - s.tmp_9 = r0; - r0 = pxsim_Array__length(s.tmp_9); - s.tmp_8 = r0; - r0 = (s.tmp_8 - 1); - s.tmp_7 = r0; - r0 = (s.tmp_6 < s.tmp_7); - case 5: + r0 = s.retval; + r0 = r0.fields["controlledSprites"]; + s.tmp_0 = r0; + r0 = s.arg0.fields["playerIndex"]; + s.tmp_2 = r0; + r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_2, s.arg1); + r0 = undefined; return leave(s, r0) default: oops() } } } -game_Dialog_hasNext__P169452.info = {"start":6392,"length":154,"line":205,"column":8,"endLine":208,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"hasNext","argumentNames":["this"]} +controller_Controller__controlledSprites__P168667.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 game_Dialog_hasNext__P169452_mk(s) { +function controller_Controller__controlledSprites__P168667_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_Dialog_hasNext__P169452, depth: s.depth + 1, + parent: s, fn: controller_Controller__controlledSprites__P168667, depth: s.depth + 1, pc: 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_Dialog_constructor__P169451(s) { +function controller_Controller__controlledSprites__P168666(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16881,51 +18081,41 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); - s.arg5 = (s.lambdaArgs[5]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_Dialog__C169448_VT)) failedCast(r0); - s.tmp_0 = game_BaseDialog_constructor__P169442_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 = 1212; s.pc = 1; return s.tmp_0; + if (!checkSubtype(r0, controller_Controller__C168661_VT)) failedCast(r0); + s.tmp_1 = game_currentScene__P169526_mk(s); + s.callLocIdx = 231; s.pc = 1; return s.tmp_1; case 1: r0 = s.retval; - r0 = (s.arg0).fields["chunkIndex"] = (0); - r0 = undefined; - return leave(s, r0) + r0 = r0.fields["controlledSprites"]; + s.tmp_0 = r0; + r0 = s.arg0.fields["playerIndex"]; + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_2); + return leaveAccessor(s, r0) default: oops() } } } -game_Dialog_constructor__P169451.info = {"start":6189,"length":193,"line":199,"column":8,"endLine":203,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"inline","argumentNames":["this","width","height","frame","font","cursor"]} +controller_Controller__controlledSprites__P168666.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__P168666.isGetter = true; -function game_Dialog_constructor__P169451_mk(s) { +function controller_Controller__controlledSprites__P168666_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_Dialog_constructor__P169451, depth: s.depth + 1, + parent: s, fn: controller_Controller__controlledSprites__P168666, 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 game_BaseDialog_constructor__P169442(s) { +function Fx_imul__P166688(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16938,50 +18128,28 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); - s.arg5 = (s.lambdaArgs[5]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, game_BaseDialog__C169430_VT)) failedCast(r0); - r0 = (s.arg0).fields["cursorCount"] = (0); - s.tmp_0 = game_BaseDialog_resize__P169443_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 = 1180; 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() } } } -game_BaseDialog_constructor__P169442.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"]} +Fx_imul__P166688.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 game_BaseDialog_constructor__P169442_mk(s) { +function Fx_imul__P166688_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_BaseDialog_constructor__P169442, depth: s.depth + 1, + parent: s, fn: Fx_imul__P166688, 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 game_BaseDialog_resize__P169443(s) { +function power_checkDeepSleep__P168457(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16991,169 +18159,77 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); - s.arg5 = (s.lambdaArgs[5]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, game_BaseDialog__C169430_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg3; + s.p___179243 = undefined; + s.to___179246 = undefined; + s.tmp_0 = power_init__P172082_mk(s); + s.callLocIdx = 143; s.pc = 11; return s.tmp_0; + case 11: + r0 = s.retval; + s.tmp_0 = r0 = globals._poked___172080; r0 = pxsim_numops_toBool(s.tmp_0); if (!r0) { step = 1; continue; } r0 = s.tmp_0; { step = 2; continue; } case 1: - r0 = globals.dialogFrame___172414; + r0 = 0; case 2: // jmp value (already in r0) s.tmp_1 = r0; - r0 = pxsim_numops_toBool(s.tmp_1); + s.p___179243 = (s.tmp_1); + s.tmp_0 = r0 = globals._timeout___172081; + r0 = pxsim_numops_toBool(s.tmp_0); if (!r0) { step = 3; continue; } - r0 = s.tmp_1; + r0 = s.tmp_0; { step = 4; continue; } case 3: - s.tmp_3 = game_defaultFrame__P172441_mk(s); - s.callLocIdx = 1181; s.pc = 13; return s.tmp_3; - case 13: - r0 = s.retval; - s.tmp_2 = r0; - globals.dialogFrame___172414 = (r0); - r0 = s.tmp_2; + r0 = 0; case 4: // jmp value (already in r0) - s.tmp_4 = r0; - r0 = (s.arg0).fields["frame"] = (s.tmp_4); - s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["frame"]; - s.tmp_4 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_4); - s.tmp_3 = r0; - r0 = (s.tmp_3 / 3); - s.tmp_2 = r0; - r0 = pxsim.Math_.floor(s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["unit"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["unit"]; - s.tmp_3 = r0; - r0 = (s.arg1 / s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim.Math_.floor(s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["columns"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["unit"]; - 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; + s.to___179246 = (s.tmp_1); + r0 = (s.to___179246 > 0); + s.tmp_0 = r0; r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 5; continue; } + if (r0) { step = 5; continue; } r0 = s.tmp_0; { step = 6; continue; } case 5: - r0 = globals.font8___168502; + r0 = pxsim.control.millis(); + s.tmp_2 = r0; + r0 = (s.tmp_2 - s.p___179243); + s.tmp_1 = r0; + r0 = (s.tmp_1 > s.to___179246); case 6: // jmp value (already in r0) - s.tmp_1 = r0; - r0 = (s.arg0).fields["font"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg5; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 7; continue; } - r0 = s.tmp_0; + 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 = globals.dialogCursor___172415; + 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_1 = r0; - r0 = pxsim_numops_toBool(s.tmp_1); + s.tmp_6 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_6); if (!r0) { step = 9; continue; } - r0 = s.tmp_1; - { step = 10; continue; } + r0 = pxsim_pxtcore.deepSleep(); case 9: - s.tmp_3 = game_defaultCursorImage__P172443_mk(s); - s.callLocIdx = 1182; s.pc = 14; return s.tmp_3; - case 14: - r0 = s.retval; - s.tmp_2 = r0; - globals.dialogCursor___172415 = (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___172416 == undefined); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 11; continue; } - globals.dialogTextColor___172416 = (15); - r0 = 15; - { step = 12; continue; } - case 11: - r0 = globals.dialogTextColor___172416; - 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__P172419_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1183; s.pc = 15; return s.tmp_0; - case 15: - r0 = s.retval; - s.tmp_0 = game_BaseDialog_clearInterior__P172421_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1184; s.pc = 16; return s.tmp_0; - case 16: - r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -game_BaseDialog_resize__P169443.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"]} +power_checkDeepSleep__P168457.info = {"start":1087,"length":298,"line":36,"column":4,"endLine":46,"endColumn":5,"fileName":"pxt_modules/power/power.ts","functionName":"checkDeepSleep","argumentNames":[]} -function game_BaseDialog_resize__P169443_mk(s) { +function power_checkDeepSleep__P168457_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_BaseDialog_resize__P169443, depth: s.depth + 1, + parent: s, fn: power_checkDeepSleep__P168457, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -17162,19 +18238,15 @@ function game_BaseDialog_resize__P169443_mk(s) { tmp_4: undefined, tmp_5: undefined, tmp_6: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, - arg5: undefined, + p___179243: undefined, + to___179246: undefined, } } -function game_defaultCursorImage__P172443(s) { +function power_init__P172082(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17184,39 +18256,54 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_ImageMethods.isMono(globals.screen___168559); + r0 = (globals._timeout___172081 !== undefined); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = pxsim.image.ofBuffer(_hex178915); - { step = 2; continue; } + { step = 7; continue; } case 1: - r0 = pxsim.image.ofBuffer(_hex178917); case 2: + r0 = pxsim_pxtcore.getConfig(212, -1); + s.tmp_1 = r0; + r0 = (s.tmp_1 * 1000); + globals._timeout___172081 = (r0); + r0 = (globals._timeout___172081 > 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___172081 < 300000); + case 4: // jmp value (already in r0) s.tmp_1 = r0; - r0 = s.tmp_1; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 5; continue; } + globals._timeout___172081 = (300000); + case 5: + case 6: + case 7: + r0 = undefined; return leave(s, r0) default: oops() } } } -game_defaultCursorImage__P172443.info = {"start":28103,"length":690,"line":783,"column":4,"endLine":809,"endColumn":5,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"defaultCursorImage","argumentNames":[]} +power_init__P172082.info = {"start":1610,"length":376,"line":57,"column":4,"endLine":66,"endColumn":5,"fileName":"pxt_modules/power/power.ts","functionName":"init","argumentNames":[]} -function game_defaultCursorImage__P172443_mk(s) { +function power_init__P172082_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_defaultCursorImage__P172443, depth: s.depth + 1, + parent: s, fn: power_init__P172082, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, } } -const _hex178915 = pxsim.BufferMethods.createBufferFromHex("87040a000800000011111101010000010111010111100001011101010100000101000001100010000001010000100000") -const _hex178917 = pxsim.BufferMethods.createBufferFromHex("87040b000b00000000606686080000006076776686000000607777676608000076171111670800007671177766080000767117776608000076711777660800007617111167080000607777676608000060767766860000000060668608000000") -function game_defaultFrame__P172441(s) { +function power_poke__P168456(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17226,39 +18313,31 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_ImageMethods.isMono(globals.screen___168559); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = pxsim.image.ofBuffer(_hex178921); - { step = 2; continue; } + s.tmp_0 = power_init__P172082_mk(s); + s.callLocIdx = 142; s.pc = 1; return s.tmp_0; case 1: - r0 = pxsim.image.ofBuffer(_hex178923); - case 2: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = s.tmp_1; + r0 = s.retval; + r0 = pxsim.control.millis(); + globals._poked___172080 = (r0); + r0 = undefined; return leave(s, r0) default: oops() } } } -game_defaultFrame__P172441.info = {"start":27315,"length":556,"line":744,"column":4,"endLine":766,"endColumn":5,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"defaultFrame","argumentNames":[]} +power_poke__P168456.info = {"start":795,"length":81,"line":26,"column":4,"endLine":29,"endColumn":5,"fileName":"pxt_modules/power/power.ts","functionName":"poke","argumentNames":[]} -function game_defaultFrame__P172441_mk(s) { +function power_poke__P168456_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_defaultFrame__P172441, depth: s.depth + 1, + parent: s, fn: power_poke__P168456, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, } } -const _hex178921 = pxsim.BufferMethods.createBufferFromHex("8704030003000000110100000101000011010000") -const _hex178923 = pxsim.BufferMethods.createBufferFromHex("87040c000c0000000000000000000000b0bbbbbbbb0b0000b0bbbbbbbbcb0000b0db1111bdcb0000b01b1111b1cb0000b01b1111b1cb0000b01b1111b1cb0000b01b1111b1cb0000b0db1111bdcb0000b0bbbbbbbbcb0000b0bbbbbbbbcb000000cccccccccc0000") -function game_BaseDialog_clearInterior__P172421(s) { +function control_EventContext_deltaTime__P166927(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17268,96 +18347,27 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.d___178215 = undefined; - s.s___178222 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_BaseDialog__C169430_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__P172420_mk(s); - s.tmp_2.arg0 = s.arg0; - s.tmp_2.arg1 = 4; - s.tmp_2.arg2 = 1; - s.tmp_2.arg3 = 1; - r0 = s.arg0.fields["columns"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 - 2); - s.tmp_2.arg4 = r0; - r0 = s.arg0.fields["rows"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 - 2); - s.tmp_2.arg5 = r0; - s.callLocIdx = 1207; s.pc = 8; return s.tmp_2; - case 8: - r0 = s.retval; - { step = 7; continue; } - case 1: - case 2: - s.d___178215 = (1); - case 3: - s.tmp_1 = r0 = s.d___178215; - 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___178222 = (1); - case 4: - s.tmp_1 = r0 = s.s___178222; - 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); + if (!checkSubtype(r0, control_EventContext__C166922_VT)) failedCast(r0); + r0 = s.arg0.fields["deltaTimeMillis"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - s.tmp_4 = game_BaseDialog_drawPartial__P172422_mk(s); - s.tmp_4.arg0 = s.arg0; - s.tmp_4.arg1 = 4; - s.tmp_4.arg2 = s.d___178215; - s.tmp_4.arg3 = s.s___178222; - s.callLocIdx = 1208; s.pc = 9; return s.tmp_4; - case 9: - r0 = s.retval; - r0 = (s.s___178222 + 1); - s.s___178222 = (r0); - { step = 4; continue; } - case 5: - r0 = (s.d___178215 + 1); - s.d___178215 = (r0); - { step = 3; continue; } - case 6: - case 7: - r0 = undefined; - return leave(s, r0) + r0 = (s.tmp_0 / 1000); + return leaveAccessor(s, r0) default: oops() } } } -game_BaseDialog_clearInterior__P172421.info = {"start":4543,"length":342,"line":146,"column":8,"endLine":155,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"clearInterior","argumentNames":["this"]} +control_EventContext_deltaTime__P166927.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__P166927.isGetter = true; -function game_BaseDialog_clearInterior__P172421_mk(s) { +function control_EventContext_deltaTime__P166927_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_BaseDialog_clearInterior__P172421, depth: s.depth + 1, + parent: s, fn: control_EventContext_deltaTime__P166927, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - d___178215: undefined, - s___178222: undefined, arg0: undefined, } } @@ -17365,7 +18375,7 @@ function game_BaseDialog_clearInterior__P172421_mk(s) { -function game_BaseDialog_drawPartial__P172422(s) { +function scene_Scene_constructor__P169393(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17375,125 +18385,156 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.x0___178240 = undefined; - s.y0___178248 = undefined; - s.xf___178256 = undefined; - s.yf___178263 = undefined; - s.e___178270 = undefined; - s.t___178276 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_BaseDialog__C169430_VT)) failedCast(r0); - r0 = s.arg0.fields["innerLeft"]; + if (!checkSubtype(r0, scene_Scene__C169370_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__C169054_VT); s.tmp_0 = r0; - r0 = s.arg0.fields["unit"]; - s.tmp_2 = r0; - r0 = (s.arg2 * s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.x0___178240 = (r0); - r0 = s.arg0.fields["innerTop"]; + s.tmp_1 = ArcadePhysicsEngine_constructor__P169055_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 = 1134; 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__C169308_VT); 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___178248 = (r0); - r0 = (s.arg1 % 3); + s.tmp_1 = scene_Camera_constructor__P169312_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 1135; 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__C169196_VT); s.tmp_0 = r0; - r0 = s.arg0.fields["unit"]; + s.tmp_1 = scene_Background_constructor__P169200_mk(s); + s.tmp_1.arg0 = s.tmp_0; + r0 = s.arg0.fields["camera"]; + s.tmp_1.arg1 = r0; + s.callLocIdx = 1136; 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 * s.tmp_1); - s.xf___178256 = (r0); - r0 = pxsim.Math_.idiv(s.arg1, 3); - s.tmp_0 = r0; - r0 = s.arg0.fields["unit"]; + 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 * s.tmp_1); - s.yf___178263 = (r0); - s.e___178270 = (0); - case 1: - r0 = s.arg0.fields["unit"]; + 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.e___178270 < s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - s.t___178276 = (0); - case 2: - r0 = s.arg0.fields["unit"]; + 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.t___178276 < 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___178240 + s.e___178270); - s.tmp_3 = r0; - r0 = (s.y0___178248 + s.t___178276); - s.tmp_4 = r0; - r0 = s.arg0.fields["frame"]; - s.tmp_6 = r0; - r0 = (s.xf___178256 + s.e___178270); - s.tmp_7 = r0; - r0 = (s.yf___178263 + s.t___178276); - 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___178276 + 1); - s.t___178276 = (r0); - { step = 2; continue; } - case 3: - r0 = (s.e___178270 + 1); - s.e___178270 = (r0); - { step = 1; continue; } - case 4: + 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() } } } -game_BaseDialog_drawPartial__P172422.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"]} +scene_Scene_constructor__P169393.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 game_BaseDialog_drawPartial__P172422_mk(s) { +function scene_Scene_constructor__P169393_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_BaseDialog_drawPartial__P172422, depth: s.depth + 1, + parent: s, fn: scene_Scene_constructor__P169393, depth: s.depth + 1, pc: 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___178240: undefined, - y0___178248: undefined, - xf___178256: undefined, - yf___178263: undefined, - e___178270: undefined, - t___178276: undefined, arg0: undefined, arg1: undefined, arg2: undefined, - arg3: undefined, } } -function game_BaseDialog_fastFill__P172420(s) { +function scene_Camera_constructor__P169312(s) { +let r0 = s.r0, 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__C169308_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__P169312.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__P169312_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: scene_Camera_constructor__P169312, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function scene_Background_constructor__P169200(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17503,71 +18544,41 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.color___178312 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); - s.arg5 = (s.lambdaArgs[5]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_BaseDialog__C169430_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___178312 = (r0); - s.tmp_0 = helpers_imageFillRect__P168483_mk(s); - r0 = s.arg0.fields["image"]; - s.tmp_0.arg0 = r0; - r0 = s.arg0.fields["innerLeft"]; + if (!checkSubtype(r0, scene_Background__C169196_VT)) failedCast(r0); + r0 = (s.arg0).fields["color"] = (0); + r0 = (s.arg0).fields["camera"] = (s.arg1); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); s.tmp_1 = r0; - r0 = (s.tmp_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___178312; - s.callLocIdx = 1206; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; + r0 = (s.tmp_0).fields["_layers"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -game_BaseDialog_fastFill__P172420.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"]} +scene_Background_constructor__P169200.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 game_BaseDialog_fastFill__P172420_mk(s) { +function scene_Background_constructor__P169200_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_BaseDialog_fastFill__P172420, depth: s.depth + 1, + parent: s, fn: scene_Background_constructor__P169200, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - color___178312: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, - arg5: undefined, } } -function game_BaseDialog_drawBorder__P172419(s) { +function ArcadePhysicsEngine_constructor__P169055(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17577,279 +18588,70 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.y___178846 = undefined; - s.c___178862 = undefined; - s.r___178896 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_BaseDialog__C169430_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__P172420_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 = 1190; s.pc = 12; return s.tmp_2; - case 12: - r0 = s.retval; - s.tmp_0 = game_BaseDialog_fastFill__P172420_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 = 1191; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; - s.tmp_0 = game_BaseDialog_fastFill__P172420_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 = 1192; s.pc = 14; return s.tmp_0; - case 14: - r0 = s.retval; - s.tmp_0 = game_BaseDialog_fastFill__P172420_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 = 1193; s.pc = 15; return s.tmp_0; - case 15: - r0 = s.retval; - s.tmp_0 = game_BaseDialog_fastFill__P172420_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 5; - r0 = s.arg0.fields["columns"]; + if (!checkSubtype(r0, ArcadePhysicsEngine__C169054_VT)) failedCast(r0); + r0 = undefined; + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); 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 = 1194; s.pc = 16; return s.tmp_0; - case 16: - r0 = s.retval; - r0 = s.arg0.fields["rows"]; + r0 = (s.tmp_0).fields["sprites"] = (s.tmp_1); + r0 = pxsim_pxtcore_mkClassInstance(sprites_SpriteMap__C168973_VT); s.tmp_0 = r0; - r0 = (s.tmp_0 - 1); - s.y___178846 = (r0); - s.tmp_0 = game_BaseDialog_fastFill__P172420_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 6; - s.tmp_0.arg2 = 0; - s.tmp_0.arg3 = s.y___178846; - s.tmp_0.arg4 = 1; - s.tmp_0.arg5 = 1; - s.callLocIdx = 1195; s.pc = 17; return s.tmp_0; - case 17: + s.tmp_1 = sprites_SpriteMap_constructor__P168974_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 633; s.pc = 1; return s.tmp_1; + case 1: r0 = s.retval; - s.tmp_0 = game_BaseDialog_fastFill__P172420_mk(s); + r0 = (s.arg0).fields["map"] = (s.tmp_0); + s.tmp_0 = ArcadePhysicsEngine_maxSpeed__P169057_mk(s); s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 7; - s.tmp_0.arg2 = 1; - s.tmp_0.arg3 = s.y___178846; - 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 = 1196; s.pc = 18; return s.tmp_0; - case 18: + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 634; s.pc = 2; return s.tmp_0; + case 2: r0 = s.retval; - s.tmp_0 = game_BaseDialog_fastFill__P172420_mk(s); + s.tmp_0 = ArcadePhysicsEngine_maxStep__P169061_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___178846; - s.tmp_0.arg4 = 1; - s.tmp_0.arg5 = 1; - s.callLocIdx = 1197; s.pc = 19; return s.tmp_0; - case 19: - r0 = s.retval; - { step = 11; continue; } - case 1: - case 2: - s.c___178862 = (0); + s.tmp_0.arg1 = s.arg3; + s.callLocIdx = 635; s.pc = 3; return s.tmp_0; case 3: - r0 = s.arg0.fields["columns"]; - s.tmp_1 = r0; - r0 = (s.c___178862 < s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 8; continue; } - r0 = (s.c___178862 == 0); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 4; continue; } - s.tmp_3 = game_BaseDialog_drawPartial__P172422_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 = 1198; s.pc = 20; return s.tmp_3; - case 20: r0 = s.retval; - s.tmp_0 = game_BaseDialog_drawPartial__P172422_mk(s); + s.tmp_0 = ArcadePhysicsEngine_minStep__P169059_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 = 1199; s.pc = 21; return s.tmp_0; - case 21: - r0 = s.retval; - { step = 7; continue; } + s.tmp_0.arg1 = s.arg2; + s.callLocIdx = 636; s.pc = 4; return s.tmp_0; case 4: - s.tmp_1 = r0 = s.c___178862; - 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__P172422_mk(s); - s.tmp_4.arg0 = s.arg0; - s.tmp_4.arg1 = 2; - s.tmp_4.arg2 = s.c___178862; - s.tmp_4.arg3 = 0; - s.callLocIdx = 1200; s.pc = 22; return s.tmp_4; - case 22: - r0 = s.retval; - s.tmp_0 = game_BaseDialog_drawPartial__P172422_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 8; - s.tmp_0.arg2 = s.c___178862; - r0 = s.arg0.fields["rows"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 - 1); - s.tmp_0.arg3 = r0; - s.callLocIdx = 1201; s.pc = 23; return s.tmp_0; - case 23: - r0 = s.retval; - { step = 6; continue; } - case 5: - s.tmp_0 = game_BaseDialog_drawPartial__P172422_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 1; - s.tmp_0.arg2 = s.c___178862; - s.tmp_0.arg3 = 0; - s.callLocIdx = 1202; s.pc = 24; return s.tmp_0; - case 24: - r0 = s.retval; - s.tmp_0 = game_BaseDialog_drawPartial__P172422_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 7; - s.tmp_0.arg2 = s.c___178862; - r0 = s.arg0.fields["rows"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 - 1); - s.tmp_0.arg3 = r0; - s.callLocIdx = 1203; s.pc = 25; return s.tmp_0; - case 25: - r0 = s.retval; - case 6: - case 7: - r0 = (s.c___178862 + 1); - s.c___178862 = (r0); - { step = 3; continue; } - case 8: - s.r___178896 = (1); - case 9: - s.tmp_1 = r0 = s.r___178896; - 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__P172422_mk(s); - s.tmp_4.arg0 = s.arg0; - s.tmp_4.arg1 = 3; - s.tmp_4.arg2 = 0; - s.tmp_4.arg3 = s.r___178896; - s.callLocIdx = 1204; s.pc = 26; return s.tmp_4; - case 26: r0 = s.retval; - s.tmp_0 = game_BaseDialog_drawPartial__P172422_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___178896; - s.callLocIdx = 1205; s.pc = 27; return s.tmp_0; - case 27: - r0 = s.retval; - r0 = (s.r___178896 + 1); - s.r___178896 = (r0); - { step = 9; continue; } - case 10: - case 11: r0 = undefined; return leave(s, r0) default: oops() } } } -game_BaseDialog_drawBorder__P172419.info = {"start":2953,"length":1321,"line":103,"column":8,"endLine":139,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"drawBorder","argumentNames":["this"]} +ArcadePhysicsEngine_constructor__P169055.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 game_BaseDialog_drawBorder__P172419_mk(s) { +function ArcadePhysicsEngine_constructor__P169055_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_BaseDialog_drawBorder__P172419, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_constructor__P169055, depth: s.depth + 1, pc: 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___178846: undefined, - c___178862: undefined, - r___178896: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function game_BaseDialog_update__P169444(s) { +function ArcadePhysicsEngine_maxStep__P169061(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17861,47 +18663,40 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_BaseDialog__C169430_VT)) failedCast(r0); - s.tmp_0 = game_BaseDialog_clearInterior__P172421_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1185; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.tmp_0 = game_BaseDialog__C169430_v2_1_mk(s); - s.tmp_0.arg0 = s.arg0; - if (!checkSubtype(s.tmp_0.arg0, game_BaseDialog__C169430_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.drawTextCore; - s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; - s.tmp_0 = game_BaseDialog_drawCursorRow__P169447_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1186; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; + if (!checkSubtype(r0, ArcadePhysicsEngine__C169054_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() } } } -game_BaseDialog_update__P169444.info = {"start":2171,"length":121,"line":74,"column":8,"endLine":78,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"update","argumentNames":["this"]} +ArcadePhysicsEngine_maxStep__P169061.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 game_BaseDialog_update__P169444_mk(s) { +function ArcadePhysicsEngine_maxStep__P169061_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_BaseDialog_update__P169444, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_maxStep__P169061, 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 game_BaseDialog_drawCursorRow__P169447(s) { +function ArcadePhysicsEngine_maxStep__P169060(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17911,117 +18706,30 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.offset___178120 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_BaseDialog__C169430_VT)) failedCast(r0); - s.offset___178120 = (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___178120 = (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"]; + if (!checkSubtype(r0, ArcadePhysicsEngine__C169054_VT)) failedCast(r0); + r0 = s.arg0.fields["maxSingleStep"]; s.tmp_0 = r0; - r0 = s.arg0.fields["cursor"]; + r0 = (s.tmp_0 + 128); s.tmp_1 = r0; - r0 = s.arg0.fields["innerLeft"]; - s.tmp_6 = r0; - s.tmp_8 = game_BaseDialog_textAreaWidth__P172425_mk(s); - s.tmp_8.arg0 = s.arg0; - s.callLocIdx = 1187; 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___178120); - 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__P172426_mk(s); - s.tmp_19.arg0 = s.arg0; - s.callLocIdx = 1188; 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) + r0 = (s.tmp_1 >> 8); + return leaveAccessor(s, r0) default: oops() } } } -game_BaseDialog_drawCursorRow__P169447.info = {"start":2464,"length":479,"line":88,"column":8,"endLine":101,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"drawCursorRow","argumentNames":["this"]} +ArcadePhysicsEngine_maxStep__P169060.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__P169060.isGetter = true; -function game_BaseDialog_drawCursorRow__P169447_mk(s) { +function ArcadePhysicsEngine_maxStep__P169060_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_BaseDialog_drawCursorRow__P169447, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_maxStep__P169060, depth: s.depth + 1, pc: 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___178120: undefined, arg0: undefined, } } @@ -18029,7 +18737,7 @@ function game_BaseDialog_drawCursorRow__P169447_mk(s) { -function game_BaseDialog_cursorRowHeight__P172423(s) { +function Fx_toInt__P166699(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18043,25 +18751,20 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, game_BaseDialog__C169430_VT)) failedCast(r0); - r0 = s.arg0.fields["cursor"]; - s.tmp_1 = r0; - r0 = pxsim_ImageMethods.height(s.tmp_1); + r0 = (s.arg0 + 128); s.tmp_0 = r0; - r0 = (s.tmp_0 + 1); + r0 = (s.tmp_0 >> 8); return leave(s, r0) default: oops() } } } -game_BaseDialog_cursorRowHeight__P172423.info = {"start":5509,"length":82,"line":174,"column":8,"endLine":176,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"cursorRowHeight","argumentNames":["this"]} +Fx_toInt__P166699.info = {"start":2379,"length":86,"line":74,"column":4,"endLine":76,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"toInt","argumentNames":["v"]} -function game_BaseDialog_cursorRowHeight__P172423_mk(s) { +function Fx_toInt__P166699_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_BaseDialog_cursorRowHeight__P172423, depth: s.depth + 1, + parent: s, fn: Fx_toInt__P166699, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, arg0: undefined, } } @@ -18069,7 +18772,7 @@ function game_BaseDialog_cursorRowHeight__P172423_mk(s) { -function game_BaseDialog_drawTextCore__P169446(s) { +function ArcadePhysicsEngine_minStep__P169059(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18081,29 +18784,40 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_BaseDialog__C169430_VT)) failedCast(r0); + if (!checkSubtype(r0, ArcadePhysicsEngine__C169054_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg1 * 256); + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["minSingleStep"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -game_BaseDialog_drawTextCore__P169446.info = {"start":2389,"length":65,"line":84,"column":8,"endLine":86,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"drawTextCore","argumentNames":["this"]} +ArcadePhysicsEngine_minStep__P169059.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 game_BaseDialog_drawTextCore__P169446_mk(s) { +function ArcadePhysicsEngine_minStep__P169059_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_BaseDialog_drawTextCore__P169446, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_minStep__P169059, 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_setBackgroundImage__P169412(s) { +function ArcadePhysicsEngine_minStep__P169058(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18113,36 +18827,30 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___178064 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1168; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.scene___178064 = (r0); - s.tmp_0 = scene_Background_image__P169203_mk(s); - r0 = s.scene___178064.fields["background"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.arg0; - s.callLocIdx = 1169; s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, ArcadePhysicsEngine__C169054_VT)) failedCast(r0); + r0 = s.arg0.fields["minSingleStep"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 + 128); + s.tmp_1 = r0; + r0 = (s.tmp_1 >> 8); + return leaveAccessor(s, r0) default: oops() } } } -scene_setBackgroundImage__P169412.info = {"start":1962,"length":135,"line":78,"column":4,"endLine":81,"endColumn":5,"fileName":"pxt_modules/game/scenes.ts","functionName":"setBackgroundImage","argumentNames":["img"]} +ArcadePhysicsEngine_minStep__P169058.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__P169058.isGetter = true; -function scene_setBackgroundImage__P169412_mk(s) { +function ArcadePhysicsEngine_minStep__P169058_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_setBackgroundImage__P169412, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_minStep__P169058, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - scene___178064: undefined, + tmp_1: undefined, arg0: undefined, } } @@ -18150,7 +18858,7 @@ function scene_setBackgroundImage__P169412_mk(s) { -function scene_Background_image__P169203(s) { +function ArcadePhysicsEngine_maxSpeed__P169057(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18166,19 +18874,33 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_Background__C169196_VT)) failedCast(r0); - r0 = (s.arg0).fields["_image"] = (s.arg1); + if (!checkSubtype(r0, ArcadePhysicsEngine__C169054_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() } } } -scene_Background_image__P169203.info = {"start":1003,"length":68,"line":40,"column":8,"endLine":42,"endColumn":9,"fileName":"pxt_modules/game/background.ts","functionName":"image","argumentNames":["this","image"]} +ArcadePhysicsEngine_maxSpeed__P169057.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 scene_Background_image__P169203_mk(s) { +function ArcadePhysicsEngine_maxSpeed__P169057_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Background_image__P169203, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_maxSpeed__P169057, 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, } } @@ -18187,7 +18909,7 @@ function scene_Background_image__P169203_mk(s) { -function scene_Background_image__P169202(s) { +function Fx_neg__P166682(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18201,45 +18923,17 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, scene_Background__C169196_VT)) failedCast(r0); - r0 = s.arg0.fields["_image"]; - 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_ImageMethods.width(globals.screen___168559); - s.tmp_5 = r0; - r0 = pxsim_ImageMethods.height(globals.screen___168559); - s.tmp_6 = r0; - r0 = pxsim.image.create(s.tmp_5, s.tmp_6); - s.tmp_4 = r0; - r0 = (s.tmp_3).fields["_image"] = (s.tmp_4); - case 1: - case 2: - r0 = s.arg0.fields["_image"]; - return leaveAccessor(s, r0) + r0 = (0 - s.arg0); + return leave(s, r0) default: oops() } } } -scene_Background_image__P169202.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__P169202.isGetter = true; +Fx_neg__P166682.info = {"start":311,"length":88,"line":14,"column":4,"endLine":16,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"neg","argumentNames":["a"]} -function scene_Background_image__P169202_mk(s) { +function Fx_neg__P166682_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Background_image__P169202, depth: s.depth + 1, + parent: s, fn: Fx_neg__P166682, depth: s.depth + 1, pc: 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, } } @@ -18247,7 +18941,7 @@ function scene_Background_image__P169202_mk(s) { -function Sprite_top__P168931(s) { +function ArcadePhysicsEngine_maxSpeed__P169056(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18257,62 +18951,38 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.physics___178690 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - s.tmp_0 = game_currentScene__P169526_mk(s); - s.callLocIdx = 458; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = r0.fields["physicsEngine"]; - s.physics___178690 = (r0); - s.tmp_0 = PhysicsEngine__C169038_v2_4_mk(s); - s.tmp_0.arg0 = s.physics___178690; - s.tmp_0.arg1 = s.arg0; - s.tmp_0.arg2 = 0; - r0 = (s.arg1 * 256); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); + if (!checkSubtype(r0, ArcadePhysicsEngine__C169054_VT)) failedCast(r0); + r0 = s.arg0.fields["maxVelocity"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 + 128); 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__C169038_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) + r0 = (s.tmp_1 >> 8); + return leaveAccessor(s, r0) default: oops() } } } -Sprite_top__P168931.info = {"start":11687,"length":256,"line":421,"column":4,"endLine":431,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"top","argumentNames":["this","value"]} +ArcadePhysicsEngine_maxSpeed__P169056.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__P169056.isGetter = true; -function Sprite_top__P168931_mk(s) { +function ArcadePhysicsEngine_maxSpeed__P169056_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_top__P168931, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_maxSpeed__P169056, depth: s.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___178690: undefined, arg0: undefined, - arg1: undefined, } } -function PhysicsEngine_moveSprite__P169042(s) { +function PhysicsEngine_constructor__P169039(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18324,9 +18994,6 @@ 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; @@ -18335,24 +19002,21 @@ switch (step) { return leave(s, r0) default: oops() } } } -PhysicsEngine_moveSprite__P169042.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"]} +PhysicsEngine_constructor__P169039.info = {"start":26,"length":21,"line":1,"column":4,"endLine":2,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["this"]} -function PhysicsEngine_moveSprite__P169042_mk(s) { +function PhysicsEngine_constructor__P169039_mk(s) { checkStack(s.depth); return { - parent: s, fn: PhysicsEngine_moveSprite__P169042, depth: s.depth + 1, + parent: s, fn: PhysicsEngine_constructor__P169039, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function Fx_sub__P166686(s) { +function sprites_SpriteMap_constructor__P168974(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18364,29 +19028,35 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg0 - s.arg1); + r0 = s.arg0; + if (!checkSubtype(r0, sprites_SpriteMap__C168973_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() } } } -Fx_sub__P166686.info = {"start":749,"length":118,"line":26,"column":4,"endLine":28,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"sub","argumentNames":["a","b"]} +sprites_SpriteMap_constructor__P168974.info = {"start":237,"length":56,"line":8,"column":8,"endLine":10,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"inline","argumentNames":["this"]} -function Fx_sub__P166686_mk(s) { +function sprites_SpriteMap_constructor__P168974_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_sub__P166686, depth: s.depth + 1, + parent: s, fn: sprites_SpriteMap_constructor__P168974, 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__P168930(s) { +function control_pushEventContext__P166936(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18396,35 +19066,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.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - r0 = s.arg0.fields["_y"]; + s.ctx___180778 = undefined; + s.n___180784 = undefined; + r0 = pxsim_numops_toBoolDecr(globals.eventContexts___171957); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = pxsim_Array__mk(); + globals.eventContexts___171957 = (r0); + case 1: + case 2: + s.tmp_0 = control_eventContext__P166935_mk(s); + s.callLocIdx = 75; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.ctx___180778 = (r0); + r0 = pxsim_numops_toBoolDecr(s.ctx___180778); + if (!r0) { step = 3; continue; } + s.tmp_0 = control_EventContext_unregister__P166929_mk(s); + s.tmp_0.arg0 = s.ctx___180778; + s.callLocIdx = 76; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + case 3: + case 4: + r0 = pxsim_pxtcore_mkClassInstance(control_EventContext__C166922_VT); + s.tmp_0 = r0; + s.tmp_1 = control_EventContext_constructor__P166926_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 77; s.pc = 7; return s.tmp_1; + case 7: + r0 = s.retval; + s.n___180784 = (s.tmp_0); + r0 = pxsim_Array__push(globals.eventContexts___171957, s.n___180784); + r0 = s.n___180784; + return leave(s, r0) default: oops() } } } -Sprite_top__P168930.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__P168930.isGetter = true; +control_pushEventContext__P166936.info = {"start":7310,"length":340,"line":220,"column":4,"endLine":231,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"pushEventContext","argumentNames":[]} -function Sprite_top__P168930_mk(s) { +function control_pushEventContext__P166936_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_top__P168930, depth: s.depth + 1, + parent: s, fn: control_pushEventContext__P166936, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - arg0: undefined, + tmp_1: undefined, + ctx___180778: undefined, + n___180784: undefined, } } -function Sprite_left__P168927(s) { +function control_EventContext_constructor__P166926(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18434,62 +19132,52 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.physics___178668 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - s.tmp_0 = game_currentScene__P169526_mk(s); - s.callLocIdx = 450; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = r0.fields["physicsEngine"]; - s.physics___178668 = (r0); - s.tmp_0 = PhysicsEngine__C169038_v2_4_mk(s); - s.tmp_0.arg0 = s.physics___178668; - s.tmp_0.arg1 = s.arg0; - r0 = (s.arg1 * 256); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); + if (!checkSubtype(r0, control_EventContext__C166922_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); 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__C169038_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.moveSprite; - s.pc = 2; return s.tmp_0; + 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___166924); + 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___166924 = (r0); + case 1: case 2: - r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_left__P168927.info = {"start":10853,"length":257,"line":391,"column":4,"endLine":401,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"left","argumentNames":["this","value"]} +control_EventContext_constructor__P166926.info = {"start":1778,"length":347,"line":59,"column":8,"endLine":69,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":["this"]} -function Sprite_left__P168927_mk(s) { +function control_EventContext_constructor__P166926_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_left__P168927, depth: s.depth + 1, + parent: s, fn: control_EventContext_constructor__P166926, depth: s.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___178668: undefined, arg0: undefined, - arg1: undefined, } } -function Sprite_left__P168926(s) { +function particles_disableAll__P169709(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18499,35 +19187,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; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - r0 = s.arg0.fields["_x"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) + s.sources___180962 = undefined; + s.tmp_0 = particles_particleSources__P172807_mk(s); + s.callLocIdx = 1615; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.sources___180962 = (r0); + r0 = pxsim_numops_toBoolDecr(s.sources___180962); + if (!r0) { step = 1; continue; } + s.tmp_0 = helpers_arrayForEach__P166636_mk(s); + s.tmp_0.arg0 = s.sources___180962; + s.tmp_0.arg1 = particles_disableAll_inline__P180968; + s.callLocIdx = 1617; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + s.tmp_0 = particles_pruneParticles__P172803_mk(s); + s.callLocIdx = 1618; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + case 1: + case 2: + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_left__P168926.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__P168926.isGetter = true; +particles_disableAll__P169709.info = {"start":12370,"length":195,"line":402,"column":4,"endLine":408,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"disableAll","argumentNames":[]} -function Sprite_left__P168926_mk(s) { +function particles_disableAll__P169709_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_left__P168926, depth: s.depth + 1, + parent: s, fn: particles_disableAll__P169709, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - arg0: undefined, + sources___180962: undefined, } } -function controller__setUserEventsEnabled__P168733(s) { +function particles_disableAll_inline__P180968(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18541,18 +19240,24 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - globals._userEventsEnabled___172253 = (s.arg0); - r0 = undefined; + s.tmp_0 = particles_ParticleSource_enabled__P169691_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = false; + s.callLocIdx = 1616; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = false; return leave(s, r0) default: oops() } } } -controller__setUserEventsEnabled__P168733.info = {"start":10070,"length":101,"line":291,"column":4,"endLine":293,"endColumn":5,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"_setUserEventsEnabled","argumentNames":["enabled"]} +particles_disableAll_inline__P180968.info = {"start":12495,"length":22,"line":405,"column":28,"endLine":405,"endColumn":50,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["s"]} -function controller__setUserEventsEnabled__P168733_mk(s) { +function particles_disableAll_inline__P180968_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller__setUserEventsEnabled__P168733, depth: s.depth + 1, + parent: s, fn: particles_disableAll_inline__P180968, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, } } @@ -18560,7 +19265,7 @@ function controller__setUserEventsEnabled__P168733_mk(s) { -function controller_Button_isPressed__P168727(s) { +function particles_clearAll__P169708(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18570,31 +19275,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; - if (!checkSubtype(r0, controller_Button__C168716_VT)) failedCast(r0); - r0 = s.arg0.fields["_pressed"]; + s.sources___180973 = undefined; + s.tmp_0 = particles_particleSources__P172807_mk(s); + s.callLocIdx = 1611; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.sources___180973 = (r0); + r0 = pxsim_numops_toBoolDecr(s.sources___180973); + if (!r0) { step = 1; continue; } + s.tmp_0 = helpers_arrayForEach__P166636_mk(s); + s.tmp_0.arg0 = s.sources___180973; + s.tmp_0.arg1 = particles_clearAll_inline__P180979; + s.callLocIdx = 1613; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + s.tmp_0 = particles_pruneParticles__P172803_mk(s); + s.callLocIdx = 1614; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + case 1: + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Button_isPressed__P168727.info = {"start":6303,"length":57,"line":185,"column":8,"endLine":187,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"isPressed","argumentNames":["this"]} +particles_clearAll__P169708.info = {"start":12098,"length":185,"line":391,"column":4,"endLine":397,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"clearAll","argumentNames":[]} -function controller_Button_isPressed__P168727_mk(s) { +function particles_clearAll__P169708_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_isPressed__P168727, depth: s.depth + 1, + parent: s, fn: particles_clearAll__P169708, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, + tmp_0: undefined, + sources___180973: undefined, } } -function console_inspect__P166909(s) { +function particles_clearAll_inline__P180979(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18604,239 +19324,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.asArr___181008 = undefined; - s.asString___181026 = undefined; - s.keys___181038 = undefined; - s.snipped___181042 = 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"); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.arg0; - { step = 17; continue; } - { step = 16; continue; } + s.tmp_0 = particles_ParticleSource_clear__P169693_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1612; s.pc = 1; return s.tmp_0; case 1: - r0 = pxsim_pxtcore.typeOf(s.arg0); - s.tmp_3 = r0; - r0 = (s.tmp_3 == "number"); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 2; continue; } - r0 = pxsim_String_.mkEmpty(); - s.tmp_4 = r0; - if ((s.arg0) && (s.arg0).vtable) { - setupResume(s, 18); - pxsim_String__stringConv(s.arg0); - checkResumeConsumed(); - return; - } else { s.retval = (s.arg0) + ""; } - case 18: - r0 = s.retval; - s.tmp_5 = r0; - r0 = pxsim_String__concat(s.tmp_4, s.tmp_5); - { step = 17; continue; } - { step = 15; continue; } - case 2: - r0 = pxsim_Array_.isArray(s.arg0); - s.tmp_6 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_6); - if (!r0) { step = 5; continue; } - s.asArr___181008 = (s.arg0); - r0 = pxsim_Array__length(s.asArr___181008); - s.tmp_1 = r0; - r0 = (s.tmp_1 <= s.arg1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_2 = helpers_arrayJoin__P166630_mk(s); - s.tmp_2.arg0 = s.asArr___181008; - s.tmp_2.arg1 = ","; - s.callLocIdx = 48; 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__P166630_mk(s); - s.tmp_8 = helpers_arraySlice__P166642_mk(s); - s.tmp_8.arg0 = s.asArr___181008; - s.tmp_8.arg1 = 0; - s.tmp_8.arg2 = s.arg1; - s.callLocIdx = 49; s.pc = 21; return s.tmp_8; - case 21: - r0 = s.retval; - s.tmp_7.arg0 = r0; - s.tmp_7.arg1 = ","; - s.callLocIdx = 50; 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___181026 = (r0); - r0 = (s.asString___181026 != "[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___181026 != "[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___181026; - { step = 17; continue; } - case 8: - case 9: - r0 = pxsim_pxtrt.keysOf(s.arg0); - s.keys___181038 = (r0); - r0 = pxsim_Array__length(s.keys___181038); - s.tmp_0 = r0; - r0 = (s.tmp_0 > s.arg1); - s.snipped___181042 = (r0); - r0 = pxsim_numops_toBoolDecr(s.snipped___181042); - if (!r0) { step = 10; continue; } - s.tmp_0 = helpers_arraySlice__P166642_mk(s); - s.tmp_0.arg0 = s.keys___181038; - s.tmp_0.arg1 = 0; - s.tmp_0.arg2 = s.arg1; - s.callLocIdx = 51; s.pc = 24; return s.tmp_0; - case 24: - r0 = s.retval; - s.keys___181038 = (r0); - case 10: - case 11: - r0 = pxsim_pxtcore_mkAction(1, console_inspect_inline__P181059); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - r0 = pxsim_numops_toBoolDecr(s.snipped___181042); - 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__P166639_mk(s); - s.tmp_7.arg0 = s.keys___181038; - s.tmp_7.arg1 = s.tmp_0; - r0 = pxsim_String_.mkEmpty(); - s.tmp_7.arg2 = r0; - s.callLocIdx = 52; 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() } } } -console_inspect__P166909.info = {"start":2271,"length":1190,"line":81,"column":4,"endLine":114,"endColumn":5,"fileName":"pxt_modules/base/console.ts","functionName":"inspect","argumentNames":["obj","maxElements"]} +particles_clearAll_inline__P180979.info = {"start":12221,"length":14,"line":394,"column":28,"endLine":394,"endColumn":42,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["s"]} -function console_inspect__P166909_mk(s) { +function particles_clearAll_inline__P180979_mk(s) { checkStack(s.depth); return { - parent: s, fn: console_inspect__P166909, depth: s.depth + 1, + parent: s, fn: particles_clearAll_inline__P180979, depth: s.depth + 1, pc: 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___181008: undefined, - asString___181026: undefined, - keys___181038: undefined, - snipped___181042: undefined, arg0: undefined, - arg1: undefined, } } -function console_inspect_inline__P181059(s) { +function particles_ParticleSource_clear__P169693(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18848,81 +19364,30 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - if ((s.arg0) && (s.arg0).vtable) { - setupResume(s, 1); - pxsim_String__stringConv(s.arg0); - checkResumeConsumed(); - return; - } else { s.retval = (s.arg0) + ""; } - case 1: - r0 = s.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, particles_ParticleSource__C169678_VT)) failedCast(r0); + r0 = (s.arg0).fields["head"] = (undefined); + r0 = undefined; return leave(s, r0) default: oops() } } } -console_inspect_inline__P181059.info = {"start":3293,"length":61,"line":108,"column":20,"endLine":108,"endColumn":81,"fileName":"pxt_modules/base/console.ts","functionName":"inline","argumentNames":["prev","currKey"]} +particles_ParticleSource_clear__P169693.info = {"start":7424,"length":54,"line":243,"column":8,"endLine":245,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"clear","argumentNames":["this"]} -function console_inspect_inline__P181059_mk(s) { +function particles_ParticleSource_clear__P169693_mk(s) { checkStack(s.depth); return { - parent: s, fn: console_inspect_inline__P181059, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_clear__P169693, depth: s.depth + 1, pc: 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 helpers_arrayReduce__P166639(s) { +function game_Dialog_setText__P169457(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18932,62 +19397,57 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.len___181086 = undefined; - s.i___181089 = 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___181086 = (r0); - s.i___181089 = (0); + r0 = s.arg0; + if (!checkSubtype(r0, game_Dialog__C169448_VT)) failedCast(r0); + s.tmp_0 = game_BaseDialog_setFont__P172427_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = image_getFontForText__P168504_mk(s); + s.tmp_1.arg0 = s.arg1; + s.callLocIdx = 1222; s.pc = 2; return s.tmp_1; + case 2: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1223; s.pc = 1; return s.tmp_0; case 1: - r0 = (s.i___181089 < s.len___181086); - 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___181089); - s.tmp_1.arg1 = r0; - s.tmp_1.arg2 = s.i___181089; - setupLambda(s.tmp_1, s.tmp_1.argL); - s.callLocIdx = 9; s.pc = 3; return s.tmp_1; + r0 = s.retval; + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = game_Dialog_chunkText__P169456_mk(s); + s.tmp_2.arg0 = s.arg0; + s.tmp_2.arg1 = s.arg1; + s.callLocIdx = 1224; s.pc = 3; return s.tmp_2; case 3: r0 = s.retval; - s.arg2 = (r0); - r0 = (s.i___181089 + 1); - s.i___181089 = (r0); - { step = 1; continue; } - case 2: - r0 = s.arg2; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["chunks"] = (s.tmp_1); + r0 = (s.arg0).fields["chunkIndex"] = (0); + r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_arrayReduce__P166639.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"]} +game_Dialog_setText__P169457.info = {"start":7674,"length":183,"line":241,"column":8,"endLine":245,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"setText","argumentNames":["this","rawString"]} -function helpers_arrayReduce__P166639_mk(s) { +function game_Dialog_setText__P169457_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arrayReduce__P166639, depth: s.depth + 1, + parent: s, fn: game_Dialog_setText__P169457, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - len___181086: undefined, - i___181089: undefined, + tmp_2: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function helpers_arrayJoin__P166630(s) { +function game_BaseDialog_setFont__P172427(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18997,144 +19457,25 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.r___181114 = undefined; - s.len___181115 = undefined; - s.i___181118 = 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; } - 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___181114 = (r0); - r0 = pxsim_Array__length(s.arg0); - s.len___181115 = (r0); - s.i___181118 = (0); - case 5: - r0 = (s.i___181118 < s.len___181115); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 14; continue; } - r0 = (s.i___181118 > 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___181114) && (s.r___181114).vtable) { - setupResume(s, 15); - pxsim_String__stringConv(s.r___181114); - checkResumeConsumed(); - return; - } else { s.retval = (s.r___181114) + ""; } - 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___181114 = (r0); - case 8: - case 9: - r0 = pxsim_Array__getAt(s.arg0, s.i___181118); - 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___181118); - 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___181118); - case 13: - // jmp value (already in r0) - s.tmp_4 = r0; - if ((s.r___181114) && (s.r___181114).vtable) { - setupResume(s, 17); - pxsim_String__stringConv(s.r___181114); - checkResumeConsumed(); - return; - } else { s.retval = (s.r___181114) + ""; } - 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___181114 = (r0); - r0 = (s.i___181118 + 1); - s.i___181118 = (r0); - { step = 5; continue; } - case 14: - r0 = s.r___181114; + r0 = s.arg0; + if (!checkSubtype(r0, game_BaseDialog__C169430_VT)) failedCast(r0); + r0 = (s.arg0).fields["font"] = (s.arg1); + r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_arrayJoin__P166630.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"]} +game_BaseDialog_setFont__P172427.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 helpers_arrayJoin__P166630_mk(s) { +function game_BaseDialog_setFont__P172427_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arrayJoin__P166630, depth: s.depth + 1, + parent: s, fn: game_BaseDialog_setFont__P172427, depth: s.depth + 1, pc: 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___181114: undefined, - len___181115: undefined, - i___181118: undefined, arg0: undefined, arg1: undefined, } } @@ -19143,7 +19484,7 @@ function helpers_arrayJoin__P166630_mk(s) { -function tiles_getTileLocation__P169294(s) { +function game_Dialog_chunkText__P169456(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19153,65 +19494,141 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___181158 = undefined; + s.charactersPerRow___178349 = undefined; + s.charactersPerCursorRow___178358 = undefined; + s.rowsOfCharacters___178370 = undefined; + s.rowsWithCursor___178377 = undefined; + s.lineLengths___178385 = undefined; + s.i___178387 = undefined; + s.i___178400 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1102; s.pc = 8; return s.tmp_0; - case 8: + r0 = s.arg0; + if (!checkSubtype(r0, game_Dialog__C169448_VT)) failedCast(r0); + s.tmp_2 = game_BaseDialog_textAreaWidth__P172425_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 1215; s.pc = 5; return s.tmp_2; + case 5: r0 = s.retval; - s.scene___181158 = (r0); - r0 = (s.arg0 == 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 == undefined); - case 2: - // jmp value (already in r0) s.tmp_1 = r0; - r0 = pxsim_numops_toBool(s.tmp_1); - if (!r0) { step = 3; continue; } - r0 = s.tmp_1; - { step = 4; continue; } - case 3: - r0 = s.scene___181158.fields["tileMap"]; - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); - case 4: - // jmp value (already in r0) - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - if (!r0) { step = 5; continue; } - r0 = null; - { step = 7; continue; } - case 5: + s.tmp_4 = if_charWidth_1_mk(s); + r0 = s.arg0.fields["font"]; + s.tmp_4.arg0 = r0; + 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 = 1216; s.pc = 6; return s.tmp_4; } + } case 6: - s.tmp_5 = tiles_TileMap_getTile__P169276_mk(s); - r0 = s.scene___181158.fields["tileMap"]; - s.tmp_5.arg0 = r0; - s.tmp_5.arg1 = s.arg0; - s.tmp_5.arg2 = s.arg1; - s.callLocIdx = 1103; s.pc = 9; return s.tmp_5; - case 9: r0 = s.retval; + s.tmp_3 = r0; + r0 = (s.tmp_1 / s.tmp_3); + s.tmp_0 = r0; + r0 = pxsim.Math_.floor(s.tmp_0); + s.charactersPerRow___178349 = (r0); + s.tmp_1 = r0 = s.charactersPerRow___178349; + r0 = s.arg0.fields["cursor"]; + s.tmp_4 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_4); + s.tmp_3 = 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 = 1217; s.pc = 7; return s.tmp_6; } + } case 7: + r0 = s.retval; + s.tmp_5 = r0; + r0 = (s.tmp_3 / s.tmp_5); + s.tmp_2 = r0; + r0 = (s.tmp_1 - s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim.Math_.floor(s.tmp_0); + s.charactersPerCursorRow___178358 = (r0); + s.tmp_2 = game_BaseDialog_textAreaHeight__P172426_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 1218; s.pc = 8; return s.tmp_2; + case 8: + r0 = s.retval; + s.tmp_1 = r0; + s.tmp_4 = game_BaseDialog_rowHeight__P172424_mk(s); + s.tmp_4.arg0 = s.arg0; + s.callLocIdx = 1219; s.pc = 9; return s.tmp_4; + case 9: + r0 = s.retval; + s.tmp_3 = r0; + r0 = (s.tmp_1 / s.tmp_3); + s.tmp_0 = r0; + r0 = pxsim.Math_.floor(s.tmp_0); + s.rowsOfCharacters___178370 = (r0); + r0 = s.arg0.fields["cursor"]; + s.tmp_2 = r0; + r0 = pxsim_ImageMethods.height(s.tmp_2); + s.tmp_1 = r0; + s.tmp_4 = game_BaseDialog_rowHeight__P172424_mk(s); + s.tmp_4.arg0 = s.arg0; + s.callLocIdx = 1220; s.pc = 10; return s.tmp_4; + case 10: + r0 = s.retval; + s.tmp_3 = r0; + r0 = (s.tmp_1 / s.tmp_3); + s.tmp_0 = r0; + r0 = pxsim.Math_.ceil(s.tmp_0); + s.rowsWithCursor___178377 = (r0); + r0 = pxsim_Array__mk(); + s.lineLengths___178385 = (r0); + s.i___178387 = (0); + case 1: + s.tmp_1 = r0 = s.i___178387; + r0 = (s.rowsOfCharacters___178370 - s.rowsWithCursor___178377); + 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 = pxsim_Array__push(s.lineLengths___178385, s.charactersPerRow___178349); + r0 = (s.i___178387 + 1); + s.i___178387 = (r0); + { step = 1; continue; } + case 2: + s.i___178400 = (0); + case 3: + r0 = (s.i___178400 < s.rowsWithCursor___178377); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + r0 = pxsim_Array__push(s.lineLengths___178385, s.charactersPerCursorRow___178358); + r0 = (s.i___178400 + 1); + s.i___178400 = (r0); + { step = 3; continue; } + case 4: + s.tmp_0 = game_breakIntoPages__P172445_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = s.lineLengths___178385; + s.callLocIdx = 1221; s.pc = 11; return s.tmp_0; + case 11: + r0 = s.retval; return leave(s, r0) default: oops() } } } -tiles_getTileLocation__P169294.info = {"start":21520,"length":247,"line":663,"column":4,"endLine":667,"endColumn":5,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTileLocation","argumentNames":["col","row"]} +game_Dialog_chunkText__P169456.info = {"start":6929,"length":735,"line":227,"column":8,"endLine":239,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"chunkText","argumentNames":["this","str"]} -function tiles_getTileLocation__P169294_mk(s) { +function game_Dialog_chunkText__P169456_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_getTileLocation__P169294, depth: s.depth + 1, + parent: s, fn: game_Dialog_chunkText__P169456, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -19219,7 +19636,14 @@ function tiles_getTileLocation__P169294_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - scene___181158: undefined, + tmp_6: undefined, + charactersPerRow___178349: undefined, + charactersPerCursorRow___178358: undefined, + rowsOfCharacters___178370: undefined, + rowsWithCursor___178377: undefined, + lineLengths___178385: undefined, + i___178387: undefined, + i___178400: undefined, arg0: undefined, arg1: undefined, } } @@ -19228,7 +19652,7 @@ function tiles_getTileLocation__P169294_mk(s) { -function tiles_TileMap_getTile__P169276(s) { +function game_breakIntoPages__P172445(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19238,47 +19662,321 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.result___178416 = undefined; + s.currentPage___178418 = undefined; + s.lastBreakLocation___178420 = undefined; + s.lastBreak___178421 = undefined; + s.line___178422 = undefined; + s.lineLength___178423 = undefined; + s.nextLine___178426 = undefined; + s.index___178432 = 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__C169262_VT)) failedCast(r0); - r0 = pxsim_pxtcore_mkClassInstance(tiles_Location__C169220_VT); + r0 = pxsim_Array__mk(); + s.result___178416 = (r0); + r0 = pxsim_Array__mk(); + s.currentPage___178418 = (r0); + s.lastBreakLocation___178420 = (0); + s.lastBreak___178421 = (0); + r0 = pxsim_pxtrt.mklocRef(); + s.line___178422 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.line___178422, 0); + r0 = pxsim_pxtrt.mklocRef(); + s.lineLength___178423 = (r0); + s.tmp_0 = r0 = s.lineLength___178423; + s.tmp_2 = r0 = s.arg1; + r0 = pxsim_pxtrt_ldlocRef(s.line___178422); + s.tmp_3 = r0; + r0 = pxsim_Array__getAt(s.tmp_2, s.tmp_3); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + r0 = pxsim_pxtcore_mkAction(3, nextLine__P178426); s.tmp_0 = r0; - s.tmp_1 = tiles_Location_constructor__P169221_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 = 1051; s.pc = 1; return s.tmp_1; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.line___178422); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.lineLength___178423); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.arg1); + s.nextLine___178426 = (s.tmp_0); + s.index___178432 = (0); case 1: + s.tmp_1 = r0 = s.index___178432; + 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 = 18; continue; } + r0 = pxsim_String_.charAt(s.arg0, s.index___178432); + s.tmp_4 = r0; + r0 = (s.tmp_4 === "\n"); + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 2; continue; } + s.tmp_5 = r0 = s.currentPage___178418; + s.tmp_7 = game_formatLine__P172446_mk(s); + s.tmp_8 = helpers_stringSubstr__P166645_mk(s); + s.tmp_8.arg0 = s.arg0; + s.tmp_8.arg1 = s.lastBreak___178421; + r0 = (s.index___178432 - s.lastBreak___178421); + s.tmp_8.arg2 = r0; + s.callLocIdx = 1309; s.pc = 24; return s.tmp_8; + case 24: + r0 = s.retval; + s.tmp_7.arg0 = r0; + s.callLocIdx = 1310; s.pc = 23; return s.tmp_7; + case 23: + r0 = s.retval; + s.tmp_6 = r0; + r0 = pxsim_Array__push(s.tmp_5, s.tmp_6); + r0 = (s.index___178432 + 1); + s.index___178432 = (r0); + s.lastBreak___178421 = (s.index___178432); + s.tmp_0 = lambda_1_mk(s); + s.tmp_0.argL = s.nextLine___178426; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 1311; s.pc = 25; return s.tmp_0; + case 25: + r0 = s.retval; + { step = 9; continue; } + case 2: + r0 = pxsim_String_.charAt(s.arg0, s.index___178432); + s.tmp_1 = r0; + r0 = (s.tmp_1 === "\\"); + 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_3 = r0 = s.arg0; + r0 = (s.index___178432 + 1); + s.tmp_4 = r0; + r0 = pxsim_String_.charAt(s.tmp_3, s.tmp_4); + s.tmp_2 = r0; + r0 = (s.tmp_2 === "n"); + case 4: + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + if (!r0) { step = 5; continue; } + s.tmp_6 = r0 = s.currentPage___178418; + s.tmp_8 = game_formatLine__P172446_mk(s); + s.tmp_9 = helpers_stringSubstr__P166645_mk(s); + s.tmp_9.arg0 = s.arg0; + s.tmp_9.arg1 = s.lastBreak___178421; + r0 = (s.index___178432 - s.lastBreak___178421); + s.tmp_9.arg2 = r0; + s.callLocIdx = 1312; s.pc = 27; return s.tmp_9; + case 27: + r0 = s.retval; + s.tmp_8.arg0 = r0; + s.callLocIdx = 1313; s.pc = 26; return s.tmp_8; + case 26: + r0 = s.retval; + s.tmp_7 = r0; + r0 = pxsim_Array__push(s.tmp_6, s.tmp_7); + r0 = (s.index___178432 + 2); + s.index___178432 = (r0); + s.lastBreak___178421 = (s.index___178432); + s.tmp_0 = lambda_1_mk(s); + s.tmp_0.argL = s.nextLine___178426; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 1314; s.pc = 28; return s.tmp_0; + case 28: + r0 = s.retval; + { step = 8; continue; } + case 5: + s.tmp_1 = game_isBreakCharacter__P172444_mk(s); + r0 = pxsim_String_.charCodeAt(s.arg0, s.index___178432); + s.tmp_1.arg0 = r0; + s.callLocIdx = 1315; s.pc = 29; return s.tmp_1; + case 29: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 6; continue; } + s.lastBreakLocation___178420 = (s.index___178432); + case 6: + case 7: + case 8: + case 9: + r0 = (s.index___178432 - s.lastBreak___178421); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_ldlocRef(s.lineLength___178423); + s.tmp_2 = r0; + r0 = (s.tmp_1 === s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 14; continue; } + r0 = (s.lastBreakLocation___178420 === s.index___178432); + s.tmp_3 = r0; + r0 = pxsim_numops_toBool(s.tmp_3); + if (!r0) { step = 10; continue; } + r0 = s.tmp_3; + { step = 11; continue; } + case 10: + r0 = (s.lastBreakLocation___178420 < s.lastBreak___178421); + case 11: + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + if (!r0) { step = 12; continue; } + s.tmp_5 = r0 = s.currentPage___178418; + s.tmp_7 = game_formatLine__P172446_mk(s); + s.tmp_8 = helpers_stringSubstr__P166645_mk(s); + s.tmp_8.arg0 = s.arg0; + s.tmp_8.arg1 = s.lastBreak___178421; + r0 = pxsim_pxtrt_ldlocRef(s.lineLength___178423); + s.tmp_8.arg2 = r0; + s.callLocIdx = 1316; s.pc = 31; return s.tmp_8; + case 31: + r0 = s.retval; + s.tmp_7.arg0 = r0; + s.callLocIdx = 1317; s.pc = 30; return s.tmp_7; + case 30: + r0 = s.retval; + s.tmp_6 = r0; + r0 = pxsim_Array__push(s.tmp_5, s.tmp_6); + s.lastBreak___178421 = (s.index___178432); + s.tmp_0 = lambda_1_mk(s); + s.tmp_0.argL = s.nextLine___178426; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 1318; s.pc = 32; return s.tmp_0; + case 32: + r0 = s.retval; + { step = 13; continue; } + case 12: + s.tmp_0 = r0 = s.currentPage___178418; + s.tmp_2 = game_formatLine__P172446_mk(s); + s.tmp_3 = helpers_stringSubstr__P166645_mk(s); + s.tmp_3.arg0 = s.arg0; + s.tmp_3.arg1 = s.lastBreak___178421; + r0 = (s.lastBreakLocation___178420 - s.lastBreak___178421); + s.tmp_3.arg2 = r0; + s.callLocIdx = 1319; s.pc = 34; return s.tmp_3; + case 34: + r0 = s.retval; + s.tmp_2.arg0 = r0; + s.callLocIdx = 1320; s.pc = 33; return s.tmp_2; + case 33: + r0 = s.retval; + s.tmp_1 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); + s.lastBreak___178421 = (s.lastBreakLocation___178420); + s.tmp_0 = lambda_1_mk(s); + s.tmp_0.argL = s.nextLine___178426; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 1321; s.pc = 35; return s.tmp_0; + case 35: + r0 = s.retval; + case 13: + case 14: + case 15: + r0 = pxsim_pxtrt_ldlocRef(s.line___178422); + s.tmp_1 = r0; + r0 = pxsim_Array__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 = 16; continue; } + r0 = pxsim_pxtrt_stlocRef(s.line___178422, 0); + s.tmp_0 = r0 = s.lineLength___178423; + s.tmp_2 = r0 = s.arg1; + r0 = pxsim_pxtrt_ldlocRef(s.line___178422); + s.tmp_3 = r0; + r0 = pxsim_Array__getAt(s.tmp_2, s.tmp_3); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + r0 = pxsim_Array__push(s.result___178416, s.currentPage___178418); + r0 = pxsim_Array__mk(); + s.currentPage___178418 = (r0); + case 16: + case 17: + r0 = (s.index___178432 + 1); + s.index___178432 = (r0); + { step = 1; continue; } + case 18: + s.tmp_0 = r0 = s.currentPage___178418; + s.tmp_2 = game_formatLine__P172446_mk(s); + s.tmp_3 = helpers_stringSubstr__P166645_mk(s); + s.tmp_3.arg0 = s.arg0; + s.tmp_3.arg1 = s.lastBreak___178421; + r0 = pxsim_String_.length(s.arg0); + s.tmp_4 = r0; + r0 = (s.tmp_4 - s.lastBreak___178421); + s.tmp_3.arg2 = r0; + s.callLocIdx = 1322; s.pc = 37; return s.tmp_3; + case 37: + r0 = s.retval; + s.tmp_2.arg0 = r0; + s.callLocIdx = 1323; s.pc = 36; return s.tmp_2; + case 36: r0 = s.retval; + s.tmp_1 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); + r0 = pxsim_Array__length(s.currentPage___178418); + s.tmp_1 = r0; + r0 = (s.tmp_1 > 1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 19; continue; } r0 = s.tmp_0; + { step = 20; continue; } + case 19: + r0 = pxsim_Array__getAt(s.currentPage___178418, 0); + s.tmp_2 = r0; + r0 = pxsim_String_.mkEmpty(); + s.tmp_3 = r0; + r0 = (s.tmp_2 !== s.tmp_3); + case 20: + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + if (!r0) { step = 21; continue; } + r0 = pxsim_Array__push(s.result___178416, s.currentPage___178418); + case 21: + case 22: + r0 = s.result___178416; return leave(s, r0) default: oops() } } } -tiles_TileMap_getTile__P169276.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"]} +game_breakIntoPages__P172445.info = {"start":32043,"length":2187,"line":908,"column":4,"endLine":969,"endColumn":5,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"breakIntoPages","argumentNames":["text","lineLengths"]} -function tiles_TileMap_getTile__P169276_mk(s) { +function game_breakIntoPages__P172445_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_getTile__P169276, depth: s.depth + 1, + parent: s, fn: game_breakIntoPages__P172445, depth: s.depth + 1, pc: 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, + result___178416: undefined, + currentPage___178418: undefined, + lastBreakLocation___178420: undefined, + lastBreak___178421: undefined, + line___178422: undefined, + lineLength___178423: undefined, + nextLine___178426: undefined, + index___178432: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function tiles_Location_constructor__P169221(s) { +function nextLine__P178426(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19288,39 +19986,41 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_Location__C169220_VT)) failedCast(r0); - r0 = (s.arg0).fields["_col"] = (s.arg1); - r0 = (s.arg0).fields["_row"] = (s.arg2); + s.tmp_0 = r0 = s.caps[0]; + r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); + s.tmp_2 = r0; + r0 = (s.tmp_2 + 1); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + s.tmp_0 = r0 = s.caps[1]; + s.tmp_2 = r0 = s.caps[2]; + r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); + s.tmp_3 = r0; + r0 = pxsim_Array__getAt(s.tmp_2, s.tmp_3); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -tiles_Location_constructor__P169221.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"]} +nextLine__P178426.info = {"start":32336,"length":95,"line":918,"column":8,"endLine":921,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"nextLine","argumentNames":[]} -function tiles_Location_constructor__P169221_mk(s) { +function nextLine__P178426_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_Location_constructor__P169221, depth: s.depth + 1, + parent: s, fn: nextLine__P178426, 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 tiles_placeOnTile__P169300(s) { +function game_formatLine__P172446(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19330,84 +20030,52 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.i___178620 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(s.arg0); + s.i___178620 = (0); + case 1: + r0 = pxsim_String_.charAt(s.arg0, s.i___178620); s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = (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(s.arg1); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + r0 = (s.i___178620 + 1); + s.i___178620 = (r0); + { step = 1; continue; } 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 = 4; continue; } - case 3: - s.tmp_6 = tiles_Location_tileMap__P169222_mk(s); - s.tmp_6.arg0 = s.arg1; - s.callLocIdx = 1107; s.pc = 8; return s.tmp_6; - case 8: - r0 = s.retval; - s.tmp_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); - s.tmp_4 = r0; - r0 = pxsim_Boolean__bang(s.tmp_4); - case 4: - // jmp value (already in r0) - s.tmp_7 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_7); - if (!r0) { step = 5; continue; } - { step = 7; continue; } - case 5: - case 6: - s.tmp_8 = tiles_Location_place__P169236_mk(s); - s.tmp_8.arg0 = s.arg1; - s.tmp_8.arg1 = s.arg0; - s.callLocIdx = 1108; s.pc = 9; return s.tmp_8; - case 9: + s.tmp_0 = helpers_stringSubstr__P166645_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.i___178620; + r0 = pxsim_String_.length(s.arg0); + s.tmp_0.arg2 = r0; + s.callLocIdx = 1324; s.pc = 3; return s.tmp_0; + case 3: r0 = s.retval; - case 7: - r0 = undefined; return leave(s, r0) default: oops() } } } -tiles_placeOnTile__P169300.info = {"start":24747,"length":152,"line":747,"column":4,"endLine":750,"endColumn":5,"fileName":"pxt_modules/game/tilemap.ts","functionName":"placeOnTile","argumentNames":["sprite","loc"]} +game_formatLine__P172446.info = {"start":34236,"length":148,"line":971,"column":4,"endLine":975,"endColumn":5,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"formatLine","argumentNames":["text"]} -function tiles_placeOnTile__P169300_mk(s) { +function game_formatLine__P172446_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_placeOnTile__P169300, depth: s.depth + 1, + parent: s, fn: game_formatLine__P172446, depth: s.depth + 1, pc: 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, + i___178620: undefined, arg0: undefined, - arg1: undefined, } } -function tiles_Location_place__P169236(s) { +function game_isBreakCharacter__P172444(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19419,63 +20087,142 @@ 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_Location__C169220_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(s.arg1); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = (s.arg0 <= 32); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + r0 = pxsim_numops_toBool(s.tmp_0); if (!r0) { step = 1; continue; } - { step = 3; continue; } + r0 = s.tmp_0; + { step = 4; continue; } case 1: + r0 = (s.arg0 >= 58); + s.tmp_1 = r0; + r0 = pxsim_numops_toBool(s.tmp_1); + if (r0) { step = 2; continue; } + r0 = s.tmp_1; + { step = 3; continue; } case 2: - s.tmp_2 = Sprite_setPosition__P168936_mk(s); - s.tmp_2.arg0 = s.arg1; - s.tmp_3 = tiles_Location_x__P169225_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 1025; s.pc = 5; return s.tmp_3; + r0 = (s.arg0 <= 64); + case 3: + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = s.tmp_2; + case 4: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBool(s.tmp_3); + if (!r0) { step = 5; continue; } + r0 = s.tmp_3; + { step = 8; continue; } case 5: - r0 = s.retval; - s.tmp_2.arg1 = r0; - s.tmp_4 = tiles_Location_y__P169226_mk(s); - s.tmp_4.arg0 = s.arg0; - s.callLocIdx = 1026; s.pc = 6; return s.tmp_4; + r0 = (s.arg0 >= 91); + s.tmp_4 = r0; + r0 = pxsim_numops_toBool(s.tmp_4); + if (r0) { step = 6; continue; } + r0 = s.tmp_4; + { step = 7; continue; } case 6: - r0 = s.retval; - s.tmp_2.arg2 = r0; - s.callLocIdx = 1027; s.pc = 4; return s.tmp_2; - case 4: - r0 = s.retval; - case 3: - r0 = undefined; + r0 = (s.arg0 <= 96); + case 7: + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = s.tmp_5; + case 8: + // jmp value (already in r0) + s.tmp_6 = r0; + r0 = pxsim_numops_toBool(s.tmp_6); + if (!r0) { step = 9; continue; } + r0 = s.tmp_6; + { step = 12; continue; } + case 9: + r0 = (s.arg0 >= 123); + s.tmp_7 = r0; + r0 = pxsim_numops_toBool(s.tmp_7); + if (r0) { step = 10; continue; } + r0 = s.tmp_7; + { step = 11; continue; } + case 10: + r0 = (s.arg0 <= 126); + case 11: + // jmp value (already in r0) + s.tmp_8 = r0; + r0 = s.tmp_8; + case 12: + // jmp value (already in r0) + s.tmp_9 = r0; + r0 = pxsim_numops_toBool(s.tmp_9); + if (!r0) { step = 13; continue; } + r0 = s.tmp_9; + { step = 16; continue; } + case 13: + r0 = (s.arg0 >= 19968); + s.tmp_10 = r0; + r0 = pxsim_numops_toBool(s.tmp_10); + if (r0) { step = 14; continue; } + r0 = s.tmp_10; + { step = 15; continue; } + case 14: + r0 = (s.arg0 <= 40869); + case 15: + // jmp value (already in r0) + s.tmp_11 = r0; + r0 = s.tmp_11; + case 16: + // jmp value (already in r0) + s.tmp_12 = r0; + r0 = pxsim_numops_toBool(s.tmp_12); + if (!r0) { step = 17; continue; } + r0 = s.tmp_12; + { step = 18; continue; } + case 17: + r0 = (s.arg0 == 12290); + case 18: + // jmp value (already in r0) + s.tmp_13 = r0; + r0 = pxsim_numops_toBool(s.tmp_13); + if (!r0) { step = 19; continue; } + r0 = s.tmp_13; + { step = 20; continue; } + case 19: + r0 = (s.arg0 == 65292); + case 20: + // jmp value (already in r0) + s.tmp_14 = r0; + r0 = s.tmp_14; return leave(s, r0) default: oops() } } } -tiles_Location_place__P169236.info = {"start":3931,"length":126,"line":130,"column":8,"endLine":133,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"place","argumentNames":["this","mySprite"]} +game_isBreakCharacter__P172444.info = {"start":31679,"length":358,"line":898,"column":4,"endLine":906,"endColumn":5,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"isBreakCharacter","argumentNames":["charCode"]} -function tiles_Location_place__P169236_mk(s) { +function game_isBreakCharacter__P172444_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_Location_place__P169236, depth: s.depth + 1, + parent: s, fn: game_isBreakCharacter__P172444, depth: s.depth + 1, pc: 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, arg0: undefined, - arg1: undefined, } } -function tiles_Location_y__P169226(s) { +function helpers_stringSubstr__P166645(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19485,54 +20232,59 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scale___181220 = 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_Location__C169220_VT)) failedCast(r0); - s.tmp_1 = tiles_Location_tileMap__P169222_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 1017; s.pc = 1; return s.tmp_1; - case 1: - r0 = s.retval; - s.tmp_0 = r0; - r0 = s.tmp_0.fields["_scale"]; - s.scale___181220 = (r0); - r0 = s.arg0.fields["_row"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 << s.scale___181220); + r0 = (s.arg2 === undefined); s.tmp_0 = r0; - r0 = (s.scale___181220 - 1); - s.tmp_3 = r0; - r0 = (1 << s.tmp_3); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = pxsim_String_.length(s.arg0); + { step = 4; continue; } + case 1: + s.tmp_1 = r0 = s.arg2; + r0 = pxsim_numops_toBool(s.tmp_1); + if (!r0) { step = 2; continue; } + r0 = s.tmp_1; + { step = 3; continue; } + case 2: + r0 = 0; + case 3: + // jmp value (already in r0) s.tmp_2 = r0; - r0 = (s.tmp_0 + s.tmp_2); - return leaveAccessor(s, r0) + r0 = s.tmp_2; + case 4: + // jmp value (already in r0) + s.tmp_3 = r0; + s.arg2 = (s.tmp_3); + r0 = pxsim_String_.substr(s.arg0, s.arg1, s.arg2); + return leave(s, r0) default: oops() } } } -tiles_Location_y__P169226.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__P169226.isGetter = true; +helpers_stringSubstr__P166645.info = {"start":11286,"length":204,"line":379,"column":4,"endLine":382,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"stringSubstr","argumentNames":["s","start","length"]} -function tiles_Location_y__P169226_mk(s) { +function helpers_stringSubstr__P166645_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_Location_y__P169226, depth: s.depth + 1, + parent: s, fn: helpers_stringSubstr__P166645, depth: s.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___181220: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function tiles_Location_x__P169225(s) { +function game_BaseDialog_textAreaHeight__P172426(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19542,46 +20294,51 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scale___181236 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_Location__C169220_VT)) failedCast(r0); - s.tmp_1 = tiles_Location_tileMap__P169222_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 1015; s.pc = 1; return s.tmp_1; + if (!checkSubtype(r0, game_BaseDialog__C169430_VT)) failedCast(r0); + r0 = s.arg0.fields["image"]; + s.tmp_2 = r0; + r0 = pxsim_ImageMethods.height(s.tmp_2); + s.tmp_1 = r0; + r0 = s.arg0.fields["innerTop"]; + s.tmp_5 = r0; + s.tmp_7 = Math_min__P166658_mk(s); + r0 = s.arg0.fields["unit"]; + s.tmp_7.arg0 = r0; + s.tmp_7.arg1 = 12; + s.callLocIdx = 1211; s.pc = 1; return s.tmp_7; case 1: r0 = s.retval; - s.tmp_0 = r0; - r0 = s.tmp_0.fields["_scale"]; - s.scale___181236 = (r0); - r0 = s.arg0.fields["_col"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 << s.scale___181236); - s.tmp_0 = r0; - r0 = (s.scale___181236 - 1); + 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 = (1 << s.tmp_3); - s.tmp_2 = r0; - r0 = (s.tmp_0 + s.tmp_2); - return leaveAccessor(s, r0) + r0 = (s.tmp_1 - s.tmp_3); + s.tmp_0 = r0; + r0 = (s.tmp_0 - 1); + return leave(s, r0) default: oops() } } } -tiles_Location_x__P169225.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__P169225.isGetter = true; +game_BaseDialog_textAreaHeight__P172426.info = {"start":5841,"length":143,"line":186,"column":8,"endLine":188,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"textAreaHeight","argumentNames":["this"]} -function tiles_Location_x__P169225_mk(s) { +function game_BaseDialog_textAreaHeight__P172426_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_Location_x__P169225, depth: s.depth + 1, + parent: s, fn: game_BaseDialog_textAreaHeight__P172426, depth: s.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___181236: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, arg0: undefined, } } @@ -19589,7 +20346,7 @@ function tiles_Location_x__P169225_mk(s) { -function Sprite_setPosition__P168936(s) { +function game_BaseDialog_textAreaWidth__P172425(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19599,65 +20356,42 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.physics___181254 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - s.tmp_0 = game_currentScene__P169526_mk(s); - s.callLocIdx = 470; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = r0.fields["physicsEngine"]; - s.physics___181254 = (r0); - s.tmp_0 = PhysicsEngine__C169038_v2_4_mk(s); - s.tmp_0.arg0 = s.physics___181254; - s.tmp_0.arg1 = s.arg0; - s.tmp_2 = r0 = s.arg1; - s.tmp_4 = Sprite_x__P168881_mk(s); - s.tmp_4.arg0 = s.arg0; - s.callLocIdx = 471; s.pc = 3; return s.tmp_4; - case 3: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_2 - s.tmp_3); + if (!checkSubtype(r0, game_BaseDialog__C169430_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.tmp_1 * 256); + r0 = s.arg0.fields["innerLeft"]; s.tmp_5 = r0; - r0 = (s.tmp_5 | 0); - s.tmp_0.arg2 = r0; - s.tmp_7 = r0 = s.arg2; - s.tmp_9 = Sprite_y__P168883_mk(s); - s.tmp_9.arg0 = s.arg0; - s.callLocIdx = 473; s.pc = 4; return s.tmp_9; - case 4: + s.tmp_7 = Math_min__P166658_mk(s); + r0 = s.arg0.fields["unit"]; + s.tmp_7.arg0 = r0; + s.tmp_7.arg1 = 12; + s.callLocIdx = 1210; s.pc = 1; return s.tmp_7; + case 1: r0 = s.retval; - s.tmp_8 = r0; - r0 = (s.tmp_7 - s.tmp_8); s.tmp_6 = r0; - r0 = (s.tmp_6 * 256); - s.tmp_10 = r0; - r0 = (s.tmp_10 | 0); - s.tmp_0.arg3 = r0; - if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C169038_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; + 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() } } } -Sprite_setPosition__P168936.info = {"start":13931,"length":220,"line":496,"column":4,"endLine":503,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"setPosition","argumentNames":["this","x","y"]} +game_BaseDialog_textAreaWidth__P172425.info = {"start":5689,"length":142,"line":182,"column":8,"endLine":184,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"textAreaWidth","argumentNames":["this"]} -function Sprite_setPosition__P168936_mk(s) { +function game_BaseDialog_textAreaWidth__P172425_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_setPosition__P168936, depth: s.depth + 1, + parent: s, fn: game_BaseDialog_textAreaWidth__P172425, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -19667,20 +20401,14 @@ function Sprite_setPosition__P168936_mk(s) { tmp_5: undefined, tmp_6: undefined, tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - physics___181254: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function tiles_Location_tileMap__P169222(s) { +function game_BaseDialog_rowHeight__P172424(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19695,24 +20423,34 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_Location__C169220_VT)) failedCast(r0); - s.tmp_0 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1014; s.pc = 1; return s.tmp_0; + if (!checkSubtype(r0, game_BaseDialog__C169430_VT)) failedCast(r0); + s.tmp_1 = if_charHeight_1_mk(s); + r0 = s.arg0.fields["font"]; + s.tmp_1.arg0 = r0; + 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 = 1209; s.pc = 1; return s.tmp_1; } + } case 1: r0 = s.retval; - r0 = r0.fields["tileMap"]; - return leaveAccessor(s, r0) + s.tmp_0 = r0; + r0 = (s.tmp_0 + 1); + return leave(s, r0) default: oops() } } } -tiles_Location_tileMap__P169222.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__P169222.isGetter = true; +game_BaseDialog_rowHeight__P172424.info = {"start":5601,"length":78,"line":178,"column":8,"endLine":180,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"rowHeight","argumentNames":["this"]} -function tiles_Location_tileMap__P169222_mk(s) { +function game_BaseDialog_rowHeight__P172424_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_Location_tileMap__P169222, depth: s.depth + 1, + parent: s, fn: game_BaseDialog_rowHeight__P172424, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, arg0: undefined, } } @@ -19720,7 +20458,7 @@ function tiles_Location_tileMap__P169222_mk(s) { -function sprites_create__P168802(s) { +function game_Dialog_prevPage__P169455(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19730,87 +20468,52 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___181274 = undefined; - s.sprite___181277 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = game_currentScene__P169526_mk(s); - s.callLocIdx = 394; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.scene___181274 = (r0); - r0 = pxsim_pxtcore_mkClassInstance(Sprite__C168868_VT); - s.tmp_0 = r0; - s.tmp_1 = Sprite_constructor__P168915_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = s.arg0; - s.callLocIdx = 395; s.pc = 2; return s.tmp_1; - case 2: - r0 = s.retval; - s.sprite___181277 = (s.tmp_0); - s.tmp_0 = Sprite_setKind__P168935_mk(s); - s.tmp_0.arg0 = s.sprite___181277; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 396; s.pc = 3; return s.tmp_0; + r0 = s.arg0; + if (!checkSubtype(r0, game_Dialog__C169448_VT)) failedCast(r0); + s.tmp_1 = game_Dialog_hasPrev__P169453_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 1214; s.pc = 3; return s.tmp_1; case 3: r0 = s.retval; - s.tmp_0 = PhysicsEngine__C169038_v0_2_mk(s); - r0 = s.scene___181274.fields["physicsEngine"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.sprite___181277; - if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C169038_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__P181292); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); - r0 = pxsim_pxtcore_mkAction(1, sprites_create_inline__P181299); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.sprite___181277); - s.tmp_2 = helpers_arrayForEach__P166636_mk(s); - s.tmp_3 = helpers_arrayFilter__P166637_mk(s); - r0 = s.scene___181274.fields["createdHandlers"]; - s.tmp_3.arg0 = r0; - s.tmp_3.arg1 = s.tmp_0; - s.callLocIdx = 397; 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 = 399; s.pc = 5; return s.tmp_2; - case 5: - r0 = s.retval; - r0 = s.sprite___181277; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_2 = r0 = s.arg0; + r0 = s.tmp_2.fields["chunkIndex"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 - 1); + s.tmp_3 = r0; + r0 = (s.tmp_2).fields["chunkIndex"] = (s.tmp_3); + case 1: + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_create__P168802.info = {"start":890,"length":400,"line":35,"column":4,"endLine":47,"endColumn":5,"fileName":"pxt_modules/game/sprites.ts","functionName":"create","argumentNames":["img","kind"]} +game_Dialog_prevPage__P169455.info = {"start":6814,"length":105,"line":221,"column":8,"endLine":225,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"prevPage","argumentNames":["this"]} -function sprites_create__P168802_mk(s) { +function game_Dialog_prevPage__P169455_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_create__P168802, depth: s.depth + 1, + parent: s, fn: game_Dialog_prevPage__P169455, depth: s.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___181274: undefined, - sprite___181277: undefined, + tmp_4: undefined, arg0: undefined, - arg1: undefined, } } -function forEach_inline__P181292(s) { +function game_Dialog_nextPage__P169454(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19824,20 +20527,40 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0.fields["kind"]; + r0 = s.arg0; + if (!checkSubtype(r0, game_Dialog__C169448_VT)) failedCast(r0); + s.tmp_1 = game_Dialog_hasNext__P169452_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 1213; s.pc = 3; return s.tmp_1; + case 3: + r0 = s.retval; s.tmp_0 = r0; - r0 = (s.tmp_0 == s.caps[0]); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_2 = r0 = s.arg0; + r0 = s.tmp_2.fields["chunkIndex"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 + 1); + s.tmp_3 = r0; + r0 = (s.tmp_2).fields["chunkIndex"] = (s.tmp_3); + case 1: + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -forEach_inline__P181292.info = {"start":1195,"length":19,"line":43,"column":20,"endLine":43,"endColumn":39,"fileName":"pxt_modules/game/sprites.ts","functionName":"inline","argumentNames":["h"]} +game_Dialog_nextPage__P169454.info = {"start":6699,"length":105,"line":215,"column":8,"endLine":219,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"nextPage","argumentNames":["this"]} -function forEach_inline__P181292_mk(s) { +function game_Dialog_nextPage__P169454_mk(s) { checkStack(s.depth); return { - parent: s, fn: forEach_inline__P181292, depth: s.depth + 1, + parent: s, fn: game_Dialog_nextPage__P169454, depth: s.depth + 1, pc: 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, } } @@ -19845,7 +20568,7 @@ function forEach_inline__P181292_mk(s) { -function sprites_create_inline__P181299(s) { +function game_Dialog_hasPrev__P169453(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19859,32 +20582,54 @@ 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 = 398; 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 = 398; s.pc = 1; return s.tmp_0; } - else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 398; s.pc = 1; return s.tmp_0;; } - else { s.callLocIdx = 398; s.pc = 1; return s.tmp_0; } - } + r0 = s.arg0; + if (!checkSubtype(r0, game_Dialog__C169448_VT)) failedCast(r0); + r0 = s.arg0.fields["chunks"]; + 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.retval; - r0 = undefined; + r0 = s.arg0.fields["chunks"]; + s.tmp_4 = r0; + r0 = pxsim_Array__length(s.tmp_4); + s.tmp_3 = r0; + r0 = (s.tmp_3 === 0); + case 2: + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + if (!r0) { step = 3; continue; } + r0 = false; + { step = 5; continue; } + case 3: + case 4: + r0 = s.arg0.fields["chunkIndex"]; + s.tmp_6 = r0; + r0 = (s.tmp_6 > 0); + case 5: return leave(s, r0) default: oops() } } } -sprites_create_inline__P181299.info = {"start":1237,"length":22,"line":44,"column":21,"endLine":44,"endColumn":43,"fileName":"pxt_modules/game/sprites.ts","functionName":"inline","argumentNames":["h"]} +game_Dialog_hasPrev__P169453.info = {"start":6556,"length":133,"line":210,"column":8,"endLine":213,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"hasPrev","argumentNames":["this"]} -function sprites_create_inline__P181299_mk(s) { +function game_Dialog_hasPrev__P169453_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_create_inline__P181299, depth: s.depth + 1, + parent: s, fn: game_Dialog_hasPrev__P169453, depth: s.depth + 1, pc: 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, } } @@ -19892,7 +20637,7 @@ function sprites_create_inline__P181299_mk(s) { -function PhysicsEngine_addSprite__P169040(s) { +function game_Dialog_hasNext__P169452(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19904,31 +20649,73 @@ 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__C169038_VT)) failedCast(r0); - r0 = undefined; + if (!checkSubtype(r0, game_Dialog__C169448_VT)) failedCast(r0); + r0 = s.arg0.fields["chunks"]; + 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.arg0.fields["chunks"]; + s.tmp_4 = r0; + r0 = pxsim_Array__length(s.tmp_4); + s.tmp_3 = r0; + r0 = (s.tmp_3 === 0); + case 2: + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + if (!r0) { step = 3; continue; } + r0 = false; + { step = 5; continue; } + case 3: + case 4: + r0 = s.arg0.fields["chunkIndex"]; + s.tmp_6 = r0; + r0 = s.arg0.fields["chunks"]; + s.tmp_9 = r0; + r0 = pxsim_Array__length(s.tmp_9); + s.tmp_8 = r0; + r0 = (s.tmp_8 - 1); + s.tmp_7 = r0; + r0 = (s.tmp_6 < s.tmp_7); + case 5: return leave(s, r0) default: oops() } } } -PhysicsEngine_addSprite__P169040.info = {"start":124,"length":29,"line":8,"column":4,"endLine":8,"endColumn":33,"fileName":"pxt_modules/game/physics.ts","functionName":"addSprite","argumentNames":["this","sprite"]} +game_Dialog_hasNext__P169452.info = {"start":6392,"length":154,"line":205,"column":8,"endLine":208,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"hasNext","argumentNames":["this"]} -function PhysicsEngine_addSprite__P169040_mk(s) { +function game_Dialog_hasNext__P169452_mk(s) { checkStack(s.depth); return { - parent: s, fn: PhysicsEngine_addSprite__P169040, depth: s.depth + 1, + parent: s, fn: game_Dialog_hasNext__P169452, depth: s.depth + 1, pc: 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_setKind__P168935(s) { +function game_Dialog_constructor__P169451(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19938,153 +20725,53 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.spritesByKind___181318 = undefined; - s.overlapMap___181347 = 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, Sprite__C168868_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; } + if (!checkSubtype(r0, game_Dialog__C169448_VT)) failedCast(r0); + s.tmp_0 = game_BaseDialog_constructor__P169442_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 = 1212; 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__P169526_mk(s); - s.callLocIdx = 465; s.pc = 16; return s.tmp_3; - case 16: - r0 = s.retval; - r0 = r0.fields["spritesByKind"]; - s.spritesByKind___181318 = (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___181318, 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__P168997_mk(s); - r0 = s.arg0.fields["_kind"]; - s.tmp_5 = r0; - r0 = pxsim_pxtrt.mapGetGeneric(s.spritesByKind___181318, s.tmp_5); - s.tmp_4.arg0 = r0; - s.tmp_4.arg1 = s.arg0; - s.callLocIdx = 466; 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___181318, 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__C168990_VT); - s.tmp_4 = r0; - s.tmp_5 = sprites_SpriteSet_constructor__P168992_mk(s); - s.tmp_5.arg0 = s.tmp_4; - s.callLocIdx = 467; s.pc = 18; return s.tmp_5; - case 18: - r0 = s.retval; - r0 = pxsim_pxtrt.mapSetGeneric(s.spritesByKind___181318, s.arg1, s.tmp_4); - case 9: - case 10: - s.tmp_0 = sprites_SpriteSet_add__P168995_mk(s); - r0 = pxsim_pxtrt.mapGetGeneric(s.spritesByKind___181318, s.arg1); - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.arg0; - s.callLocIdx = 468; s.pc = 19; return s.tmp_0; - case 19: - r0 = s.retval; - case 11: - case 12: - s.tmp_0 = game_currentScene__P169526_mk(s); - s.callLocIdx = 469; s.pc = 20; return s.tmp_0; - case 20: r0 = s.retval; - r0 = r0.fields["overlapMap"]; - s.overlapMap___181347 = (r0); - r0 = pxsim_pxtrt.mapGetGeneric(s.overlapMap___181347, 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___181347; - 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___181347, 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 = (s.arg0).fields["chunkIndex"] = (0); r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_setKind__P168935.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_Dialog_constructor__P169451.info = {"start":6189,"length":193,"line":199,"column":8,"endLine":203,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"inline","argumentNames":["this","width","height","frame","font","cursor"]} -function Sprite_setKind__P168935_mk(s) { +function game_Dialog_constructor__P169451_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_setKind__P168935, depth: s.depth + 1, + parent: s, fn: game_Dialog_constructor__P169451, depth: s.depth + 1, pc: 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___181318: undefined, - overlapMap___181347: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, + arg5: undefined, } } -function sprites_SpriteSet_remove__P168997(s) { +function game_BaseDialog_constructor__P169442(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20094,58 +20781,53 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.i___181395 = 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, sprites_SpriteSet__C168990_VT)) failedCast(r0); - r0 = s.arg0.fields["_sprites"]; - s.tmp_0 = r0; - r0 = pxsim_Array_.indexOf(s.tmp_0, s.arg1, undefined); - s.i___181395 = (r0); - r0 = (s.i___181395 > -1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_1 = helpers_arraySplice__P166627_mk(s); - r0 = s.arg0.fields["_sprites"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.i___181395; - s.tmp_1.arg2 = 1; - s.callLocIdx = 624; s.pc = 4; return s.tmp_1; - case 4: - r0 = s.retval; - r0 = true; - { step = 3; continue; } + if (!checkSubtype(r0, game_BaseDialog__C169430_VT)) failedCast(r0); + r0 = (s.arg0).fields["cursorCount"] = (0); + s.tmp_0 = game_BaseDialog_resize__P169443_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 = 1180; s.pc = 1; return s.tmp_0; case 1: - case 2: - r0 = false; - case 3: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_SpriteSet_remove__P168997.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_constructor__P169442.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 sprites_SpriteSet_remove__P168997_mk(s) { +function game_BaseDialog_constructor__P169442_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteSet_remove__P168997, depth: s.depth + 1, + parent: s, fn: game_BaseDialog_constructor__P169442, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - i___181395: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, + arg5: undefined, } } -function sprites_SpriteSet_add__P168995(s) { +function game_BaseDialog_resize__P169443(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20158,46 +20840,166 @@ 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_SpriteSet__C168990_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(s.arg1); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!checkSubtype(r0, game_BaseDialog__C169430_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg3; + r0 = pxsim_numops_toBool(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = false; - { step = 5; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: + r0 = globals.dialogFrame___172414; 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); + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBool(s.tmp_1); if (!r0) { step = 3; continue; } - r0 = false; - { step = 5; continue; } + r0 = s.tmp_1; + { step = 4; continue; } case 3: + s.tmp_3 = game_defaultFrame__P172441_mk(s); + s.callLocIdx = 1181; s.pc = 13; return s.tmp_3; + case 13: + r0 = s.retval; + s.tmp_2 = r0; + globals.dialogFrame___172414 = (r0); + r0 = s.tmp_2; case 4: - r0 = s.arg0.fields["_sprites"]; + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = (s.arg0).fields["frame"] = (s.tmp_4); + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["frame"]; + s.tmp_4 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_4); + s.tmp_3 = r0; + r0 = (s.tmp_3 / 3); + s.tmp_2 = r0; + r0 = pxsim.Math_.floor(s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["unit"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["unit"]; + s.tmp_3 = r0; + r0 = (s.arg1 / s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim.Math_.floor(s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["columns"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["unit"]; + 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 = pxsim_Array__push(s.tmp_5, s.arg1); - r0 = true; + 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.tmp_0; + { step = 6; continue; } case 5: + r0 = globals.font8___168502; + case 6: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = (s.arg0).fields["font"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg5; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 7; continue; } + r0 = s.tmp_0; + { step = 8; continue; } + case 7: + r0 = globals.dialogCursor___172415; + 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__P172443_mk(s); + s.callLocIdx = 1182; s.pc = 14; return s.tmp_3; + case 14: + r0 = s.retval; + s.tmp_2 = r0; + globals.dialogCursor___172415 = (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___172416 == undefined); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 11; continue; } + globals.dialogTextColor___172416 = (15); + r0 = 15; + { step = 12; continue; } + case 11: + r0 = globals.dialogTextColor___172416; + 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__P172419_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1183; s.pc = 15; return s.tmp_0; + case 15: + r0 = s.retval; + s.tmp_0 = game_BaseDialog_clearInterior__P172421_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1184; s.pc = 16; return s.tmp_0; + case 16: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_SpriteSet_add__P168995.info = {"start":1041,"length":263,"line":41,"column":8,"endLine":49,"endColumn":9,"fileName":"pxt_modules/game/spriteset.ts","functionName":"add","argumentNames":["this","sprite"]} +game_BaseDialog_resize__P169443.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 sprites_SpriteSet_add__P168995_mk(s) { +function game_BaseDialog_resize__P169443_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteSet_add__P168995, depth: s.depth + 1, + parent: s, fn: game_BaseDialog_resize__P169443, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -20205,15 +21007,20 @@ function sprites_SpriteSet_add__P168995_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, + tmp_6: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, + arg5: undefined, } } -function sprites_SpriteSet_contains__P168998(s) { +function game_defaultCursorImage__P172443(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20223,39 +21030,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, sprites_SpriteSet__C168990_VT)) failedCast(r0); - r0 = s.arg0.fields["_sprites"]; - s.tmp_1 = r0; - r0 = pxsim_Array_.indexOf(s.tmp_1, s.arg1, undefined); + r0 = pxsim_ImageMethods.isMono(globals.screen___168559); s.tmp_0 = r0; - r0 = (s.tmp_0 > -1); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = pxsim.image.ofBuffer(_hex178915); + { step = 2; continue; } + case 1: + r0 = pxsim.image.ofBuffer(_hex178917); + case 2: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = s.tmp_1; return leave(s, r0) default: oops() } } } -sprites_SpriteSet_contains__P168998.info = {"start":2172,"length":100,"line":79,"column":8,"endLine":81,"endColumn":9,"fileName":"pxt_modules/game/spriteset.ts","functionName":"contains","argumentNames":["this","sprite"]} +game_defaultCursorImage__P172443.info = {"start":28103,"length":690,"line":783,"column":4,"endLine":809,"endColumn":5,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"defaultCursorImage","argumentNames":[]} -function sprites_SpriteSet_contains__P168998_mk(s) { +function game_defaultCursorImage__P172443_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteSet_contains__P168998, depth: s.depth + 1, + parent: s, fn: game_defaultCursorImage__P172443, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - arg0: undefined, - arg1: undefined, } } +const _hex178915 = pxsim.BufferMethods.createBufferFromHex("87040a000800000011111101010000010111010111100001011101010100000101000001100010000001010000100000") +const _hex178917 = pxsim.BufferMethods.createBufferFromHex("87040b000b00000000606686080000006076776686000000607777676608000076171111670800007671177766080000767117776608000076711777660800007617111167080000607777676608000060767766860000000060668608000000") -function sprites_SpriteSet_constructor__P168992(s) { +function game_defaultFrame__P172441(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20265,37 +21072,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.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, sprites_SpriteSet__C168990_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); + r0 = pxsim_ImageMethods.isMono(globals.screen___168559); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = pxsim.image.ofBuffer(_hex178921); + { step = 2; continue; } + case 1: + r0 = pxsim.image.ofBuffer(_hex178923); + case 2: + // jmp value (already in r0) s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_sprites"] = (s.tmp_1); - r0 = undefined; + r0 = s.tmp_1; return leave(s, r0) default: oops() } } } -sprites_SpriteSet_constructor__P168992.info = {"start":485,"length":57,"line":19,"column":8,"endLine":21,"endColumn":9,"fileName":"pxt_modules/game/spriteset.ts","functionName":"inline","argumentNames":["this"]} +game_defaultFrame__P172441.info = {"start":27315,"length":556,"line":744,"column":4,"endLine":766,"endColumn":5,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"defaultFrame","argumentNames":[]} -function sprites_SpriteSet_constructor__P168992_mk(s) { +function game_defaultFrame__P172441_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteSet_constructor__P168992, depth: s.depth + 1, + parent: s, fn: game_defaultFrame__P172441, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - arg0: undefined, } } +const _hex178921 = pxsim.BufferMethods.createBufferFromHex("8704030003000000110100000101000011010000") +const _hex178923 = pxsim.BufferMethods.createBufferFromHex("87040c000c0000000000000000000000b0bbbbbbbb0b0000b0bbbbbbbbcb0000b0db1111bdcb0000b01b1111b1cb0000b01b1111b1cb0000b01b1111b1cb0000b01b1111b1cb0000b0db1111bdcb0000b0bbbbbbbbcb0000b0bbbbbbbbcb000000cccccccccc0000") -function Sprite_constructor__P168915(s) { +function game_BaseDialog_clearInterior__P172421(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20305,141 +21114,104 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.d___178215 = undefined; + s.s___178222 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - s.tmp_0 = sprites_BaseSprite_constructor__P168623_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 427; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_ImageMethods.width(globals.screen___168559); - 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); + if (!checkSubtype(r0, game_BaseDialog__C169430_VT)) failedCast(r0); + r0 = s.arg0.fields["unit"]; 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___168559); + 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__P172420_mk(s); + s.tmp_2.arg0 = s.arg0; + s.tmp_2.arg1 = 4; + s.tmp_2.arg2 = 1; + s.tmp_2.arg3 = 1; + r0 = s.arg0.fields["columns"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 - 2); + s.tmp_2.arg4 = r0; + r0 = s.arg0.fields["rows"]; s.tmp_4 = r0; - r0 = pxsim_ImageMethods.height(s.arg1); - s.tmp_5 = r0; - r0 = (s.tmp_4 - s.tmp_5); + r0 = (s.tmp_4 - 2); + s.tmp_2.arg5 = r0; + s.callLocIdx = 1207; s.pc = 8; return s.tmp_2; + case 8: + r0 = s.retval; + { step = 7; continue; } + case 1: + case 2: + s.d___178215 = (1); + case 3: + s.tmp_1 = r0 = s.d___178215; + r0 = s.arg0.fields["columns"]; s.tmp_3 = r0; - r0 = (s.tmp_3 >> 1); + 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"]; + r0 = (s.tmp_1 < s.tmp_2); s.tmp_0 = r0; - r0 = (s.arg0).fields["_lastY"] = (s.tmp_0); - s.tmp_0 = Sprite_vx__P168886_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 430; s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; - s.tmp_0 = Sprite_vy__P168888_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 431; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.tmp_0 = Sprite_ax__P168890_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 432; s.pc = 4; return s.tmp_0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 6; continue; } + s.s___178222 = (1); case 4: + s.tmp_1 = r0 = s.s___178222; + r0 = s.arg0.fields["rows"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 - 1); + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + s.tmp_4 = game_BaseDialog_drawPartial__P172422_mk(s); + s.tmp_4.arg0 = s.arg0; + s.tmp_4.arg1 = 4; + s.tmp_4.arg2 = s.d___178215; + s.tmp_4.arg3 = s.s___178222; + s.callLocIdx = 1208; s.pc = 9; return s.tmp_4; + case 9: r0 = s.retval; - s.tmp_0 = Sprite_ay__P168892_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 433; s.pc = 5; return s.tmp_0; + r0 = (s.s___178222 + 1); + s.s___178222 = (r0); + { step = 4; continue; } case 5: - r0 = s.retval; - s.tmp_0 = Sprite_fx__P168894_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 434; s.pc = 6; return s.tmp_0; + r0 = (s.d___178215 + 1); + s.d___178215 = (r0); + { step = 3; continue; } case 6: - r0 = s.retval; - s.tmp_0 = Sprite_fy__P168896_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 435; 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__P168918_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 436; s.pc = 8; return s.tmp_0; - case 8: - r0 = s.retval; - s.tmp_0 = Sprite_setKind__P168935_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = -1; - s.callLocIdx = 437; 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() } } } -Sprite_constructor__P168915.info = {"start":7406,"length":678,"line":278,"column":4,"endLine":300,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["this","img"]} +game_BaseDialog_clearInterior__P172421.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_constructor__P168915_mk(s) { +function game_BaseDialog_clearInterior__P172421_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_constructor__P168915, depth: s.depth + 1, + parent: s, fn: game_BaseDialog_clearInterior__P172421, depth: s.depth + 1, pc: 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, + d___178215: undefined, + s___178222: undefined, arg0: undefined, - arg1: undefined, } } -function Sprite_setImage__P168918(s) { +function game_BaseDialog_drawPartial__P172422(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20449,132 +21221,98 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.x0___178240 = undefined; + s.y0___178248 = undefined; + s.xf___178256 = undefined; + s.yf___178263 = undefined; + s.e___178270 = undefined; + s.t___178276 = 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__C168868_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(s.arg1); + if (!checkSubtype(r0, game_BaseDialog__C169430_VT)) failedCast(r0); + r0 = s.arg0.fields["innerLeft"]; + s.tmp_0 = r0; + r0 = s.arg0.fields["unit"]; + s.tmp_2 = r0; + r0 = (s.arg2 * s.tmp_2); s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = (s.tmp_0 + s.tmp_1); + s.x0___178240 = (r0); + r0 = s.arg0.fields["innerTop"]; 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"]; + r0 = s.arg0.fields["unit"]; 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__C168868_v5_1_mk(s); - s.tmp_0.arg0 = s.arg0; - if (!checkSubtype(s.tmp_0.arg0, Sprite__C168868_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() -} } } -Sprite_setImage__P168918.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 Sprite_setImage__P168918_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Sprite_setImage__P168918, depth: s.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_recalcSize__P172265(s) { -let r0 = s.r0, 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__C168868_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__P168897_mk(s); - s.tmp_6.arg0 = s.arg0; - s.callLocIdx = 442; s.pc = 1; return s.tmp_6; + r0 = (s.arg3 * s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); + s.y0___178248 = (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___178256 = (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___178263 = (r0); + s.e___178270 = (0); case 1: - r0 = s.retval; - s.tmp_5 = r0; - r0 = (s.tmp_3 * s.tmp_5); - s.tmp_2 = r0; - r0 = (s.tmp_2 * 256); - s.tmp_7 = r0; - r0 = (s.tmp_7 | 0); + r0 = s.arg0.fields["unit"]; 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__P168899_mk(s); - s.tmp_6.arg0 = s.arg0; - s.callLocIdx = 444; s.pc = 2; return s.tmp_6; + r0 = (s.e___178270 < s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + s.t___178276 = (0); case 2: - r0 = s.retval; - s.tmp_5 = r0; - r0 = (s.tmp_3 * s.tmp_5); + r0 = s.arg0.fields["unit"]; + s.tmp_1 = r0; + r0 = (s.t___178276 < 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.tmp_2 * 256); + r0 = (s.x0___178240 + s.e___178270); + s.tmp_3 = r0; + r0 = (s.y0___178248 + s.t___178276); + s.tmp_4 = r0; + r0 = s.arg0.fields["frame"]; + s.tmp_6 = r0; + r0 = (s.xf___178256 + s.e___178270); 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__P168920_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 446; s.pc = 3; return s.tmp_0; + r0 = (s.yf___178263 + s.t___178276); + 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___178276 + 1); + s.t___178276 = (r0); + { step = 2; continue; } case 3: - r0 = s.retval; + r0 = (s.e___178270 + 1); + s.e___178270 = (r0); + { step = 1; continue; } + case 4: r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_recalcSize__P172265.info = {"start":9982,"length":178,"line":363,"column":4,"endLine":367,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"recalcSize","argumentNames":["this"]} +game_BaseDialog_drawPartial__P172422.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 Sprite_recalcSize__P172265_mk(s) { +function game_BaseDialog_drawPartial__P172422_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_recalcSize__P172265, depth: s.depth + 1, + parent: s, fn: game_BaseDialog_drawPartial__P172422, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -20584,14 +21322,24 @@ function Sprite_recalcSize__P172265_mk(s) { tmp_5: undefined, tmp_6: undefined, tmp_7: undefined, + tmp_8: undefined, + x0___178240: undefined, + y0___178248: undefined, + xf___178256: undefined, + yf___178263: undefined, + e___178270: undefined, + t___178276: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function Sprite_resetHitbox__P168920(s) { +function game_BaseDialog_fastFill__P172420(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20601,40 +21349,71 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.color___178312 = 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, Sprite__C168868_VT)) failedCast(r0); - r0 = (s.arg0).fields["_hitbox"] = (null); - s.tmp_0 = Sprite__C168868_v4_1_mk(s); - s.tmp_0.arg0 = s.arg0; - if (!checkSubtype(s.tmp_0.arg0, Sprite__C168868_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.setHitbox; - s.pc = 1; return s.tmp_0; + if (!checkSubtype(r0, game_BaseDialog__C169430_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___178312 = (r0); + s.tmp_0 = helpers_imageFillRect__P168483_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___178312; + s.callLocIdx = 1206; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_resetHitbox__P168920.info = {"start":9580,"length":76,"line":342,"column":4,"endLine":345,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"resetHitbox","argumentNames":["this"]} +game_BaseDialog_fastFill__P172420.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_resetHitbox__P168920_mk(s) { +function game_BaseDialog_fastFill__P172420_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_resetHitbox__P168920, depth: s.depth + 1, + parent: s, fn: game_BaseDialog_fastFill__P172420, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + color___178312: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, + arg5: undefined, } } -function Sprite_setHitbox__P168921(s) { +function game_BaseDialog_drawBorder__P172419(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20644,265 +21423,271 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.y___178846 = undefined; + s.c___178862 = undefined; + s.r___178896 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - r0 = s.arg0.fields["_hitbox"]; + if (!checkSubtype(r0, game_BaseDialog__C169430_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_1 = game_Hitbox_updateIfInvalid__P168749_mk(s); - r0 = s.arg0.fields["_hitbox"]; - s.tmp_1.arg0 = r0; - s.callLocIdx = 440; 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__P168751_mk(s); + s.tmp_2 = game_BaseDialog_fastFill__P172420_mk(s); s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 441; s.pc = 4; return s.tmp_2; - case 4: + 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 = 1190; s.pc = 12; return s.tmp_2; + case 12: r0 = s.retval; + s.tmp_0 = game_BaseDialog_fastFill__P172420_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_0).fields["_hitbox"] = (s.tmp_1); - case 2: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -Sprite_setHitbox__P168921.info = {"start":9662,"length":173,"line":347,"column":4,"endLine":353,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"setHitbox","argumentNames":["this"]} - -function Sprite_setHitbox__P168921_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Sprite_setHitbox__P168921, 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_calculateHitBox__P168751(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.i___176902 = undefined; - s.minX___176905 = undefined; - s.minY___176909 = undefined; - s.maxX___176913 = undefined; - s.maxY___176915 = undefined; - s.c___176917 = undefined; - s.fxc___176918 = undefined; - s.r___176925 = undefined; - s.fxr___176926 = undefined; - s.width___176990 = undefined; - s.height___176998 = 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__P168747_mk(s); - r0 = s.arg0.fields["_hitbox"]; - s.tmp_1.arg0 = r0; - s.callLocIdx = 373; s.pc = 12; return s.tmp_1; - case 12: + r0 = (s.tmp_1 - 2); + s.tmp_0.arg4 = r0; + s.tmp_0.arg5 = 1; + s.callLocIdx = 1191; s.pc = 13; return s.tmp_0; + case 13: r0 = s.retval; - case 2: - // jmp value (already in r0) + s.tmp_0 = game_BaseDialog_fastFill__P172420_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 = 1192; s.pc = 14; return s.tmp_0; + case 14: + r0 = s.retval; + s.tmp_0 = game_BaseDialog_fastFill__P172420_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 = 1193; s.pc = 15; return s.tmp_0; + case 15: + r0 = s.retval; + s.tmp_0 = game_BaseDialog_fastFill__P172420_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 = 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___176902 = (r0); - r0 = pxsim_ImageMethods.width(s.i___176902); + r0 = (s.tmp_2 - 2); + s.tmp_0.arg5 = r0; + s.callLocIdx = 1194; 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 * 256); + r0 = (s.tmp_0 - 1); + s.y___178846 = (r0); + s.tmp_0 = game_BaseDialog_fastFill__P172420_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 6; + s.tmp_0.arg2 = 0; + s.tmp_0.arg3 = s.y___178846; + s.tmp_0.arg4 = 1; + s.tmp_0.arg5 = 1; + s.callLocIdx = 1195; s.pc = 17; return s.tmp_0; + case 17: + r0 = s.retval; + s.tmp_0 = game_BaseDialog_fastFill__P172420_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 7; + s.tmp_0.arg2 = 1; + s.tmp_0.arg3 = s.y___178846; + r0 = s.arg0.fields["columns"]; s.tmp_1 = r0; - r0 = (s.tmp_1 | 0); - s.minX___176905 = (r0); - r0 = pxsim_ImageMethods.height(s.i___176902); - s.tmp_0 = r0; - r0 = (s.tmp_0 * 256); + r0 = (s.tmp_1 - 2); + s.tmp_0.arg4 = r0; + s.tmp_0.arg5 = 1; + s.callLocIdx = 1196; s.pc = 18; return s.tmp_0; + case 18: + r0 = s.retval; + s.tmp_0 = game_BaseDialog_fastFill__P172420_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 | 0); - s.minY___176909 = (r0); - s.maxX___176913 = (0); - s.maxY___176915 = (0); - s.c___176917 = (0); - s.fxc___176918 = (0); - case 5: - s.tmp_1 = r0 = s.c___176917; - r0 = pxsim_ImageMethods.width(s.i___176902); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); + r0 = (s.tmp_1 - 1); + s.tmp_0.arg2 = r0; + s.tmp_0.arg3 = s.y___178846; + s.tmp_0.arg4 = 1; + s.tmp_0.arg5 = 1; + s.callLocIdx = 1197; s.pc = 19; return s.tmp_0; + case 19: + r0 = s.retval; + { step = 11; continue; } + case 1: + case 2: + s.c___178862 = (0); + case 3: + r0 = s.arg0.fields["columns"]; + s.tmp_1 = r0; + r0 = (s.c___178862 < s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 10; continue; } - s.r___176925 = (0); - s.fxr___176926 = (0); - case 6: - s.tmp_1 = r0 = s.r___176925; - r0 = pxsim_ImageMethods.height(s.i___176902); + if (!r0) { step = 8; continue; } + r0 = (s.c___178862 == 0); s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 4; continue; } + s.tmp_3 = game_BaseDialog_drawPartial__P172422_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 = 1198; s.pc = 20; return s.tmp_3; + case 20: + r0 = s.retval; + s.tmp_0 = game_BaseDialog_drawPartial__P172422_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 = 1199; s.pc = 21; return s.tmp_0; + case 21: + r0 = s.retval; + { step = 7; continue; } + case 4: + s.tmp_1 = r0 = s.c___178862; + 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 = 9; continue; } - r0 = pxsim_ImageMethods.getPixel(s.i___176902, s.c___176917, s.r___176925); - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 7; continue; } - s.tmp_4 = Fx_min__P166693_mk(s); - s.tmp_4.arg0 = s.minX___176905; - s.tmp_4.arg1 = s.fxc___176918; - s.callLocIdx = 377; s.pc = 13; return s.tmp_4; - case 13: + if (!r0) { step = 5; continue; } + s.tmp_4 = game_BaseDialog_drawPartial__P172422_mk(s); + s.tmp_4.arg0 = s.arg0; + s.tmp_4.arg1 = 2; + s.tmp_4.arg2 = s.c___178862; + s.tmp_4.arg3 = 0; + s.callLocIdx = 1200; s.pc = 22; return s.tmp_4; + case 22: r0 = s.retval; - s.minX___176905 = (r0); - s.tmp_0 = Fx_min__P166693_mk(s); - s.tmp_0.arg0 = s.minY___176909; - s.tmp_0.arg1 = s.fxr___176926; - s.callLocIdx = 378; s.pc = 14; return s.tmp_0; - case 14: + s.tmp_0 = game_BaseDialog_drawPartial__P172422_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 8; + s.tmp_0.arg2 = s.c___178862; + r0 = s.arg0.fields["rows"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 - 1); + s.tmp_0.arg3 = r0; + s.callLocIdx = 1201; s.pc = 23; return s.tmp_0; + case 23: r0 = s.retval; - s.minY___176909 = (r0); - s.tmp_0 = Fx_max__P166694_mk(s); - s.tmp_0.arg0 = s.maxX___176913; - s.tmp_0.arg1 = s.fxc___176918; - s.callLocIdx = 379; s.pc = 15; return s.tmp_0; - case 15: + { step = 6; continue; } + case 5: + s.tmp_0 = game_BaseDialog_drawPartial__P172422_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 1; + s.tmp_0.arg2 = s.c___178862; + s.tmp_0.arg3 = 0; + s.callLocIdx = 1202; s.pc = 24; return s.tmp_0; + case 24: r0 = s.retval; - s.maxX___176913 = (r0); - s.tmp_0 = Fx_max__P166694_mk(s); - s.tmp_0.arg0 = s.maxY___176915; - s.tmp_0.arg1 = s.fxr___176926; - s.callLocIdx = 380; s.pc = 16; return s.tmp_0; - case 16: + s.tmp_0 = game_BaseDialog_drawPartial__P172422_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 7; + s.tmp_0.arg2 = s.c___178862; + r0 = s.arg0.fields["rows"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 - 1); + s.tmp_0.arg3 = r0; + s.callLocIdx = 1203; s.pc = 25; return s.tmp_0; + case 25: r0 = s.retval; - s.maxY___176915 = (r0); + case 6: case 7: + r0 = (s.c___178862 + 1); + s.c___178862 = (r0); + { step = 3; continue; } case 8: - r0 = (s.r___176925 + 1); - s.r___176925 = (r0); - r0 = (s.fxr___176926 + 256); - s.tmp_0 = r0; - s.fxr___176926 = (r0); - r0 = s.tmp_0; - { step = 6; continue; } + s.r___178896 = (1); case 9: - r0 = (s.c___176917 + 1); - s.c___176917 = (r0); - r0 = (s.fxc___176918 + 256); - s.tmp_0 = r0; - s.fxc___176918 = (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___176905, s.tmp_0); - s.tmp_1 = r0; - r0 = (s.tmp_1 >> 8); - s.minX___176905 = (r0); - r0 = s.arg0.fields["_sy"]; - s.tmp_0 = r0; - r0 = pxsim.Math_.imul(s.minY___176909, s.tmp_0); - s.tmp_1 = r0; - r0 = (s.tmp_1 >> 8); - s.minY___176909 = (r0); - r0 = s.arg0.fields["_sx"]; - s.tmp_0 = r0; - r0 = pxsim.Math_.imul(s.maxX___176913, s.tmp_0); - s.tmp_1 = r0; - r0 = (s.tmp_1 >> 8); - s.maxX___176913 = (r0); - r0 = s.arg0.fields["_sy"]; - s.tmp_0 = r0; - r0 = pxsim.Math_.imul(s.maxY___176915, s.tmp_0); - s.tmp_1 = r0; - r0 = (s.tmp_1 >> 8); - s.maxY___176915 = (r0); - r0 = (s.maxX___176913 - s.minX___176905); - s.tmp_0 = r0; - r0 = s.arg0.fields["_sx"]; - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.width___176990 = (r0); - r0 = (s.maxY___176915 - s.minY___176909); + s.tmp_1 = r0 = s.r___178896; + 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 = s.arg0.fields["_sy"]; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 10; continue; } + s.tmp_4 = game_BaseDialog_drawPartial__P172422_mk(s); + s.tmp_4.arg0 = s.arg0; + s.tmp_4.arg1 = 3; + s.tmp_4.arg2 = 0; + s.tmp_4.arg3 = s.r___178896; + s.callLocIdx = 1204; s.pc = 26; return s.tmp_4; + case 26: + r0 = s.retval; + s.tmp_0 = game_BaseDialog_drawPartial__P172422_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_0 + s.tmp_1); - s.height___176998 = (r0); - r0 = pxsim_pxtcore_mkClassInstance(game_Hitbox__C168735_VT); - s.tmp_0 = r0; - s.tmp_1 = game_Hitbox_constructor__P168742_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = s.arg0; - s.tmp_1.arg2 = s.width___176990; - s.tmp_1.arg3 = s.height___176998; - r0 = (s.minX___176905 & -256); - s.tmp_1.arg4 = r0; - r0 = (s.minY___176909 & -256); - s.tmp_1.arg5 = r0; - s.callLocIdx = 393; s.pc = 17; return s.tmp_1; - case 17: + r0 = (s.tmp_1 - 1); + s.tmp_0.arg2 = r0; + s.tmp_0.arg3 = s.r___178896; + s.callLocIdx = 1205; s.pc = 27; return s.tmp_0; + case 27: r0 = s.retval; - r0 = s.tmp_0; + r0 = (s.r___178896 + 1); + s.r___178896 = (r0); + { step = 9; continue; } + case 10: case 11: + r0 = undefined; return leave(s, r0) default: oops() } } } -game_calculateHitBox__P168751.info = {"start":3223,"length":1086,"line":103,"column":4,"endLine":132,"endColumn":5,"fileName":"pxt_modules/game/hitbox.ts","functionName":"calculateHitBox","argumentNames":["s"]} +game_BaseDialog_drawBorder__P172419.info = {"start":2953,"length":1321,"line":103,"column":8,"endLine":139,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"drawBorder","argumentNames":["this"]} -function game_calculateHitBox__P168751_mk(s) { +function game_BaseDialog_drawBorder__P172419_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_calculateHitBox__P168751, depth: s.depth + 1, + parent: s, fn: game_BaseDialog_drawBorder__P172419, depth: s.depth + 1, pc: 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___176902: undefined, - minX___176905: undefined, - minY___176909: undefined, - maxX___176913: undefined, - maxY___176915: undefined, - c___176917: undefined, - fxc___176918: undefined, - r___176925: undefined, - fxr___176926: undefined, - width___176990: undefined, - height___176998: undefined, + y___178846: undefined, + c___178862: undefined, + r___178896: undefined, arg0: undefined, } } @@ -20910,7 +21695,7 @@ function game_calculateHitBox__P168751_mk(s) { -function game_Hitbox_isValid__P168747(s) { +function game_BaseDialog_update__P169444(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20925,30 +21710,36 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_Hitbox__C168735_VT)) failedCast(r0); - r0 = s.arg0.fields["hash"]; - s.tmp_0 = r0; - s.tmp_2 = Sprite_calcDimensionalHash__P168919_mk(s); - r0 = s.arg0.fields["parent"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 326; s.pc = 1; return s.tmp_2; + if (!checkSubtype(r0, game_BaseDialog__C169430_VT)) failedCast(r0); + s.tmp_0 = game_BaseDialog_clearInterior__P172421_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1185; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0 === s.tmp_1); + s.tmp_0 = game_BaseDialog__C169430_v2_1_mk(s); + s.tmp_0.arg0 = s.arg0; + if (!checkSubtype(s.tmp_0.arg0, game_BaseDialog__C169430_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.drawTextCore; + s.pc = 2; return s.tmp_0; + case 2: + r0 = s.retval; + s.tmp_0 = game_BaseDialog_drawCursorRow__P169447_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1186; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -game_Hitbox_isValid__P168747.info = {"start":935,"length":89,"line":40,"column":8,"endLine":42,"endColumn":9,"fileName":"pxt_modules/game/hitbox.ts","functionName":"isValid","argumentNames":["this"]} +game_BaseDialog_update__P169444.info = {"start":2171,"length":121,"line":74,"column":8,"endLine":78,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"update","argumentNames":["this"]} -function game_Hitbox_isValid__P168747_mk(s) { +function game_BaseDialog_update__P169444_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_Hitbox_isValid__P168747, depth: s.depth + 1, + parent: s, fn: game_BaseDialog_update__P169444, 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, } } @@ -20956,7 +21747,7 @@ function game_Hitbox_isValid__P168747_mk(s) { -function Sprite_calcDimensionalHash__P168919(s) { +function game_BaseDialog_drawCursorRow__P169447(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20966,40 +21757,92 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.offset___178120 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - r0 = s.arg0.fields["_image"]; - s.tmp_2 = r0; - r0 = pxsim_ImageMethods.revision(s.tmp_2); + if (!checkSubtype(r0, game_BaseDialog__C169430_VT)) failedCast(r0); + s.offset___178120 = (0); + r0 = s.arg0.fields["cursorCount"]; 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); + r0 = (s.tmp_1 > 20); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.offset___178120 = (1); + case 1: + case 2: + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["cursorCount"]; s.tmp_3 = r0; - r0 = (s.tmp_1 + s.tmp_3); + 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["_height"]; - s.tmp_7 = r0; - r0 = (16 + 8); - s.tmp_8 = r0; - r0 = (s.tmp_7 >> s.tmp_8); + r0 = s.arg0.fields["cursor"]; + s.tmp_1 = r0; + r0 = s.arg0.fields["innerLeft"]; s.tmp_6 = r0; - r0 = (s.tmp_0 + s.tmp_6); + s.tmp_8 = game_BaseDialog_textAreaWidth__P172425_mk(s); + s.tmp_8.arg0 = s.arg0; + s.callLocIdx = 1187; 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___178120); + 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__P172426_mk(s); + s.tmp_19.arg0 = s.arg0; + s.callLocIdx = 1188; 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_calcDimensionalHash__P168919.info = {"start":9436,"length":138,"line":338,"column":4,"endLine":340,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"calcDimensionalHash","argumentNames":["this"]} +game_BaseDialog_drawCursorRow__P169447.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_calcDimensionalHash__P168919_mk(s) { +function game_BaseDialog_drawCursorRow__P169447_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_calcDimensionalHash__P168919, depth: s.depth + 1, + parent: s, fn: game_BaseDialog_drawCursorRow__P169447, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -21010,6 +21853,21 @@ function Sprite_calcDimensionalHash__P168919_mk(s) { 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___178120: undefined, arg0: undefined, } } @@ -21017,7 +21875,7 @@ function Sprite_calcDimensionalHash__P168919_mk(s) { -function Fx_toIntShifted__P166683(s) { +function game_BaseDialog_cursorRowHeight__P172423(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21029,34 +21887,35 @@ switch (step) { 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); + r0 = s.arg0; + if (!checkSubtype(r0, game_BaseDialog__C169430_VT)) failedCast(r0); + r0 = s.arg0.fields["cursor"]; s.tmp_1 = r0; - r0 = (s.tmp_0 >> s.tmp_1); + r0 = pxsim_ImageMethods.height(s.tmp_1); + s.tmp_0 = r0; + r0 = (s.tmp_0 + 1); return leave(s, r0) default: oops() } } } -Fx_toIntShifted__P166683.info = {"start":404,"length":102,"line":17,"column":4,"endLine":19,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"toIntShifted","argumentNames":["a","n"]} +game_BaseDialog_cursorRowHeight__P172423.info = {"start":5509,"length":82,"line":174,"column":8,"endLine":176,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"cursorRowHeight","argumentNames":["this"]} -function Fx_toIntShifted__P166683_mk(s) { +function game_BaseDialog_cursorRowHeight__P172423_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_toIntShifted__P166683, depth: s.depth + 1, + parent: s, fn: game_BaseDialog_cursorRowHeight__P172423, 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_constructor__P168742(s) { +function game_BaseDialog_drawTextCore__P169446(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21068,55 +21927,29 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); - s.arg5 = (s.lambdaArgs[5]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_Hitbox__C168735_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = Sprite_calcDimensionalHash__P168919_mk(s); - s.tmp_2.arg0 = s.arg1; - s.callLocIdx = 317; s.pc = 1; return s.tmp_2; - case 1: - r0 = s.retval; - 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); + if (!checkSubtype(r0, game_BaseDialog__C169430_VT)) failedCast(r0); r0 = undefined; return leave(s, r0) default: oops() } } } -game_Hitbox_constructor__P168742.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"]} +game_BaseDialog_drawTextCore__P169446.info = {"start":2389,"length":65,"line":84,"column":8,"endLine":86,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"drawTextCore","argumentNames":["this"]} -function game_Hitbox_constructor__P168742_mk(s) { +function game_BaseDialog_drawTextCore__P169446_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_Hitbox_constructor__P168742, depth: s.depth + 1, + parent: s, fn: game_BaseDialog_drawTextCore__P169446, 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__P166695(s) { +function scene_setBackgroundImage__P169412(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21126,21 +21959,36 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.scene___178064 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = (s.arg0 & -256); + s.tmp_0 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1168; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + s.scene___178064 = (r0); + s.tmp_0 = scene_Background_image__P169203_mk(s); + r0 = s.scene___178064.fields["background"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 1169; s.pc = 2; return s.tmp_0; + case 2: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -Fx_floor__P166695.info = {"start":1919,"length":103,"line":62,"column":4,"endLine":64,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"floor","argumentNames":["v"]} +scene_setBackgroundImage__P169412.info = {"start":1962,"length":135,"line":78,"column":4,"endLine":81,"endColumn":5,"fileName":"pxt_modules/game/scenes.ts","functionName":"setBackgroundImage","argumentNames":["img"]} -function Fx_floor__P166695_mk(s) { +function scene_setBackgroundImage__P169412_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_floor__P166695, depth: s.depth + 1, + parent: s, fn: scene_setBackgroundImage__P169412, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + scene___178064: undefined, arg0: undefined, } } @@ -21148,7 +21996,7 @@ function Fx_floor__P166695_mk(s) { -function Fx_max__P166694(s) { +function scene_Background_image__P169203(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21163,30 +22011,20 @@ switch (step) { 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; } - case 1: - r0 = s.arg1; - { step = 3; continue; } - case 2: + if (!checkSubtype(r0, scene_Background__C169196_VT)) failedCast(r0); + r0 = (s.arg0).fields["_image"] = (s.arg1); r0 = undefined; - case 3: return leave(s, r0) default: oops() } } } -Fx_max__P166694.info = {"start":1797,"length":117,"line":56,"column":4,"endLine":61,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"max","argumentNames":["a","b"]} +scene_Background_image__P169203.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 Fx_max__P166694_mk(s) { +function scene_Background_image__P169203_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_max__P166694, depth: s.depth + 1, + parent: s, fn: scene_Background_image__P169203, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, arg1: undefined, } } @@ -21195,7 +22033,7 @@ function Fx_max__P166694_mk(s) { -function Fx_min__P166693(s) { +function scene_Background_image__P169202(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21207,42 +22045,55 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg0 < s.arg1); + r0 = s.arg0; + if (!checkSubtype(r0, scene_Background__C169196_VT)) failedCast(r0); + r0 = s.arg0.fields["_image"]; + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = s.arg0; - { step = 3; continue; } - { step = 2; continue; } + s.tmp_3 = r0 = s.arg0; + r0 = pxsim_ImageMethods.width(globals.screen___168559); + s.tmp_5 = r0; + r0 = pxsim_ImageMethods.height(globals.screen___168559); + s.tmp_6 = r0; + r0 = pxsim.image.create(s.tmp_5, s.tmp_6); + s.tmp_4 = r0; + r0 = (s.tmp_3).fields["_image"] = (s.tmp_4); case 1: - r0 = s.arg1; - { step = 3; continue; } case 2: - r0 = undefined; - case 3: - return leave(s, r0) + r0 = s.arg0.fields["_image"]; + return leaveAccessor(s, r0) default: oops() } } } -Fx_min__P166693.info = {"start":1675,"length":117,"line":50,"column":4,"endLine":55,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"min","argumentNames":["a","b"]} +scene_Background_image__P169202.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__P169202.isGetter = true; -function Fx_min__P166693_mk(s) { +function scene_Background_image__P169202_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_min__P166693, depth: s.depth + 1, + parent: s, fn: scene_Background_image__P169202, depth: s.depth + 1, pc: 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 Fx_mul__P166687(s) { +function Sprite_top__P168931(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21252,192 +22103,62 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.physics___178690 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim.Math_.imul(s.arg0, s.arg1); - s.tmp_0 = r0; - r0 = (s.tmp_0 >> 8); - return leave(s, r0) - default: oops() -} } } -Fx_mul__P166687.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 Fx_mul__P166687_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Fx_mul__P166687, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function game_Hitbox_updateIfInvalid__P168749(s) { -let r0 = s.r0, 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.newHitBox___177108 = undefined; - s.oMinX___177113 = undefined; - s.oMinY___177116 = undefined; - s.oMaxX___177119 = undefined; - s.oMaxY___177125 = undefined; - s.nMinX___177131 = undefined; - s.nMinY___177134 = undefined; - s.nMaxX___177137 = undefined; - s.nMaxY___177143 = undefined; - s.xDiff___177149 = undefined; - s.yDiff___177160 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } r0 = s.arg0; - if (!checkSubtype(r0, game_Hitbox__C168735_VT)) failedCast(r0); - s.tmp_1 = game_Hitbox_isValid__P168747_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 331; s.pc = 8; return s.tmp_1; - case 8: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 7; continue; } + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + s.tmp_0 = game_currentScene__P169526_mk(s); + s.callLocIdx = 458; s.pc = 1; return s.tmp_0; case 1: - case 2: - s.tmp_2 = game_calculateHitBox__P168751_mk(s); - r0 = s.arg0.fields["parent"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 332; s.pc = 9; return s.tmp_2; - case 9: - r0 = s.retval; - s.newHitBox___177108 = (r0); - r0 = s.arg0.fields["ox"]; - s.oMinX___177113 = (r0); - r0 = s.arg0.fields["oy"]; - s.oMinY___177116 = (r0); - r0 = s.arg0.fields["width"]; - s.tmp_0 = r0; - r0 = (s.oMinX___177113 + s.tmp_0); - s.oMaxX___177119 = (r0); - r0 = s.arg0.fields["height"]; - s.tmp_0 = r0; - r0 = (s.oMinY___177116 + s.tmp_0); - s.oMaxY___177125 = (r0); - r0 = s.newHitBox___177108.fields["ox"]; - s.nMinX___177131 = (r0); - r0 = s.newHitBox___177108.fields["oy"]; - s.nMinY___177134 = (r0); - r0 = s.newHitBox___177108.fields["width"]; - s.tmp_0 = r0; - r0 = (s.nMinX___177131 + s.tmp_0); - s.nMaxX___177137 = (r0); - r0 = s.newHitBox___177108.fields["height"]; - s.tmp_0 = r0; - r0 = (s.nMinY___177134 + s.tmp_0); - s.nMaxY___177143 = (r0); - s.tmp_1 = Fx_abs__P166692_mk(s); - r0 = (s.oMinX___177113 - s.nMinX___177131); - s.tmp_1.arg0 = r0; - s.callLocIdx = 338; s.pc = 10; return s.tmp_1; - case 10: - r0 = s.retval; - s.tmp_0 = r0; - s.tmp_3 = Fx_abs__P166692_mk(s); - r0 = (s.oMaxX___177119 - s.nMaxX___177137); - s.tmp_3.arg0 = r0; - s.callLocIdx = 340; s.pc = 11; return s.tmp_3; - case 11: r0 = s.retval; + r0 = r0.fields["physicsEngine"]; + s.physics___178690 = (r0); + s.tmp_0 = PhysicsEngine__C169038_v2_4_mk(s); + s.tmp_0.arg0 = s.physics___178690; + s.tmp_0.arg1 = s.arg0; + s.tmp_0.arg2 = 0; + r0 = (s.arg1 * 256); s.tmp_2 = r0; - r0 = (s.tmp_0 + s.tmp_2); - s.xDiff___177149 = (r0); - s.tmp_1 = Fx_abs__P166692_mk(s); - r0 = (s.oMinY___177116 - s.nMinY___177134); - s.tmp_1.arg0 = r0; - s.callLocIdx = 343; s.pc = 12; return s.tmp_1; - case 12: - r0 = s.retval; - s.tmp_0 = r0; - s.tmp_3 = Fx_abs__P166692_mk(s); - r0 = (s.oMaxY___177125 - s.nMaxY___177143); - s.tmp_3.arg0 = r0; - s.callLocIdx = 345; s.pc = 13; return s.tmp_3; - case 13: + 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__C169038_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; - s.tmp_2 = r0; - r0 = (s.tmp_0 + s.tmp_2); - s.yDiff___177160 = (r0); - r0 = (s.xDiff___177149 > 512); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = (s.arg0).fields["ox"] = (s.nMinX___177131); - r0 = s.newHitBox___177108.fields["width"]; - s.tmp_0 = r0; - r0 = (s.arg0).fields["width"] = (s.tmp_0); - case 3: - case 4: - r0 = (s.yDiff___177160 > 512); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - r0 = (s.arg0).fields["oy"] = (s.nMinY___177134); - r0 = s.newHitBox___177108.fields["height"]; - s.tmp_0 = r0; - r0 = (s.arg0).fields["height"] = (s.tmp_0); - case 5: - case 6: - r0 = s.newHitBox___177108.fields["hash"]; - s.tmp_0 = r0; - r0 = (s.arg0).fields["hash"] = (s.tmp_0); - case 7: r0 = undefined; return leave(s, r0) default: oops() } } } -game_Hitbox_updateIfInvalid__P168749.info = {"start":1188,"length":1317,"line":48,"column":8,"endLine":85,"endColumn":9,"fileName":"pxt_modules/game/hitbox.ts","functionName":"updateIfInvalid","argumentNames":["this"]} +Sprite_top__P168931.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 game_Hitbox_updateIfInvalid__P168749_mk(s) { +function Sprite_top__P168931_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_Hitbox_updateIfInvalid__P168749, depth: s.depth + 1, + parent: s, fn: Sprite_top__P168931, depth: s.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___177108: undefined, - oMinX___177113: undefined, - oMinY___177116: undefined, - oMaxX___177119: undefined, - oMaxY___177125: undefined, - nMinX___177131: undefined, - nMinY___177134: undefined, - nMaxX___177137: undefined, - nMaxY___177143: undefined, - xDiff___177149: undefined, - yDiff___177160: undefined, + physics___178690: undefined, arg0: undefined, + arg1: undefined, } } -function Fx_abs__P166692(s) { +function PhysicsEngine_moveSprite__P169042(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21449,78 +22170,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 < 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, PhysicsEngine__C169038_VT)) failedCast(r0); r0 = undefined; - case 3: return leave(s, r0) default: oops() } } } -Fx_abs__P166692.info = {"start":1506,"length":164,"line":44,"column":4,"endLine":49,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"abs","argumentNames":["a"]} - -function Fx_abs__P166692_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Fx_abs__P166692, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, -} } - - - - - -function Sprite_sy__P168899(s) { -let r0 = s.r0, 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__C168868_VT)) failedCast(r0); - r0 = s.arg0.fields["_sy"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) - default: oops() -} } } -Sprite_sy__P168899.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__P168899.isGetter = true; +PhysicsEngine_moveSprite__P169042.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 Sprite_sy__P168899_mk(s) { +function PhysicsEngine_moveSprite__P169042_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_sy__P168899, depth: s.depth + 1, + parent: s, fn: PhysicsEngine_moveSprite__P169042, 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 Sprite_sx__P168897(s) { +function Sprite_top__P168930(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21536,19 +22214,19 @@ switch (step) { } r0 = s.arg0; if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - r0 = s.arg0.fields["_sx"]; + r0 = s.arg0.fields["_y"]; s.tmp_0 = r0; r0 = (s.tmp_0 / 256); return leaveAccessor(s, r0) default: oops() } } } -Sprite_sx__P168897.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__P168897.isGetter = true; +Sprite_top__P168930.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__P168930.isGetter = true; -function Sprite_sx__P168897_mk(s) { +function Sprite_top__P168930_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_sx__P168897, depth: s.depth + 1, + parent: s, fn: Sprite_top__P168930, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -21558,7 +22236,7 @@ function Sprite_sx__P168897_mk(s) { -function Sprite_fy__P168896(s) { +function Sprite_left__P168927(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21568,6 +22246,7 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.physics___178668 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); @@ -21575,35 +22254,45 @@ switch (step) { } r0 = s.arg0; if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - s.tmp_3 = Math_max__P166657_mk(s); - s.tmp_3.arg0 = 0; - s.tmp_3.arg1 = s.arg1; - s.callLocIdx = 423; s.pc = 1; return s.tmp_3; + s.tmp_0 = game_currentScene__P169526_mk(s); + s.callLocIdx = 450; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; + r0 = r0.fields["physicsEngine"]; + s.physics___178668 = (r0); + s.tmp_0 = PhysicsEngine__C169038_v2_4_mk(s); + s.tmp_0.arg0 = s.physics___178668; + s.tmp_0.arg1 = s.arg0; + r0 = (s.arg1 * 256); s.tmp_2 = r0; - r0 = (s.tmp_2 * 256); - s.tmp_4 = r0; - r0 = (s.tmp_4 | 0); + r0 = (s.tmp_2 | 0); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_fy"] = (s.tmp_1); + 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__C169038_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_fy__P168896.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_left__P168927.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 Sprite_fy__P168896_mk(s) { +function Sprite_left__P168927_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_fy__P168896, depth: s.depth + 1, + parent: s, fn: Sprite_left__P168927, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - tmp_4: undefined, + physics___178668: undefined, arg0: undefined, arg1: undefined, } } @@ -21612,7 +22301,7 @@ function Sprite_fy__P168896_mk(s) { -function Sprite_fy__P168895(s) { +function Sprite_left__P168926(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21628,19 +22317,19 @@ switch (step) { } r0 = s.arg0; if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - r0 = s.arg0.fields["_fy"]; + r0 = s.arg0.fields["_x"]; s.tmp_0 = r0; r0 = (s.tmp_0 / 256); return leaveAccessor(s, r0) default: oops() } } } -Sprite_fy__P168895.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__P168895.isGetter = true; +Sprite_left__P168926.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__P168926.isGetter = true; -function Sprite_fy__P168895_mk(s) { +function Sprite_left__P168926_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_fy__P168895, depth: s.depth + 1, + parent: s, fn: Sprite_left__P168926, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -21650,7 +22339,7 @@ function Sprite_fy__P168895_mk(s) { -function Sprite_fx__P168894(s) { +function controller__setUserEventsEnabled__P168733(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21662,49 +22351,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, Sprite__C168868_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - s.tmp_3 = Math_max__P166657_mk(s); - s.tmp_3.arg0 = 0; - s.tmp_3.arg1 = s.arg1; - s.callLocIdx = 420; 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["_fx"] = (s.tmp_1); + globals._userEventsEnabled___172253 = (s.arg0); r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_fx__P168894.info = {"start":4766,"length":64,"line":181,"column":4,"endLine":183,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"fx","argumentNames":["this","v"]} +controller__setUserEventsEnabled__P168733.info = {"start":10070,"length":101,"line":291,"column":4,"endLine":293,"endColumn":5,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"_setUserEventsEnabled","argumentNames":["enabled"]} -function Sprite_fx__P168894_mk(s) { +function controller__setUserEventsEnabled__P168733_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_fx__P168894, depth: s.depth + 1, + parent: s, fn: controller__setUserEventsEnabled__P168733, depth: s.depth + 1, pc: 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_fx__P168893(s) { +function controller_Button_isPressed__P168727(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21719,22 +22387,18 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - r0 = s.arg0.fields["_fx"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) + if (!checkSubtype(r0, controller_Button__C168716_VT)) failedCast(r0); + r0 = s.arg0.fields["_pressed"]; + return leave(s, r0) default: oops() } } } -Sprite_fx__P168893.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__P168893.isGetter = true; +controller_Button_isPressed__P168727.info = {"start":6303,"length":57,"line":185,"column":8,"endLine":187,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"isPressed","argumentNames":["this"]} -function Sprite_fx__P168893_mk(s) { +function controller_Button_isPressed__P168727_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_fx__P168893, depth: s.depth + 1, + parent: s, fn: controller_Button_isPressed__P168727, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, } } @@ -21742,7 +22406,7 @@ function Sprite_fx__P168893_mk(s) { -function Sprite_ay__P168892(s) { +function console_inspect__P166909(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21752,80 +22416,239 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.asArr___181008 = undefined; + s.asString___181026 = undefined; + s.keys___181038 = undefined; + s.snipped___181042 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 * 256); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); + r0 = pxsim_pxtcore.typeOf(s.arg0); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_ay"] = (s.tmp_1); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -Sprite_ay__P168892.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 Sprite_ay__P168892_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Sprite_ay__P168892, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function Sprite_ay__P168891(s) { -let r0 = s.r0, 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.tmp_1 == "string"); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - r0 = s.arg0.fields["_ay"]; + { 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_.isArray(s.arg0); + s.tmp_6 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_6); + if (!r0) { step = 5; continue; } + s.asArr___181008 = (s.arg0); + r0 = pxsim_Array__length(s.asArr___181008); + s.tmp_1 = r0; + r0 = (s.tmp_1 <= 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 = 3; continue; } + s.tmp_2 = helpers_arrayJoin__P166630_mk(s); + s.tmp_2.arg0 = s.asArr___181008; + s.tmp_2.arg1 = ","; + s.callLocIdx = 48; 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__P166630_mk(s); + s.tmp_8 = helpers_arraySlice__P166642_mk(s); + s.tmp_8.arg0 = s.asArr___181008; + s.tmp_8.arg1 = 0; + s.tmp_8.arg2 = s.arg1; + s.callLocIdx = 49; s.pc = 21; return s.tmp_8; + case 21: + r0 = s.retval; + s.tmp_7.arg0 = r0; + s.tmp_7.arg1 = ","; + s.callLocIdx = 50; 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___181026 = (r0); + r0 = (s.asString___181026 != "[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___181026 != "[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___181026; + { step = 17; continue; } + case 8: + case 9: + r0 = pxsim_pxtrt.keysOf(s.arg0); + s.keys___181038 = (r0); + r0 = pxsim_Array__length(s.keys___181038); + s.tmp_0 = r0; + r0 = (s.tmp_0 > s.arg1); + s.snipped___181042 = (r0); + r0 = pxsim_numops_toBoolDecr(s.snipped___181042); + if (!r0) { step = 10; continue; } + s.tmp_0 = helpers_arraySlice__P166642_mk(s); + s.tmp_0.arg0 = s.keys___181038; + s.tmp_0.arg1 = 0; + s.tmp_0.arg2 = s.arg1; + s.callLocIdx = 51; s.pc = 24; return s.tmp_0; + case 24: + r0 = s.retval; + s.keys___181038 = (r0); + case 10: + case 11: + r0 = pxsim_pxtcore_mkAction(1, console_inspect_inline__P181059); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + r0 = pxsim_numops_toBoolDecr(s.snipped___181042); + 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__P166639_mk(s); + s.tmp_7.arg0 = s.keys___181038; + s.tmp_7.arg1 = s.tmp_0; + r0 = pxsim_String_.mkEmpty(); + s.tmp_7.arg2 = r0; + s.callLocIdx = 52; s.pc = 25; return s.tmp_7; + case 25: + r0 = s.retval; + s.tmp_6 = r0; + if ((s.tmp_6) && (s.tmp_6).vtable) { + setupResume(s, 26); + pxsim_String__stringConv(s.tmp_6); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_6) + ""; } + case 26: + r0 = s.retval; + s.tmp_5 = r0; + if ((s.tmp_1) && (s.tmp_1).vtable) { + setupResume(s, 27); + pxsim_String__stringConv(s.tmp_1); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_1) + ""; } + case 27: + r0 = s.retval; + s.tmp_8 = r0; + r0 = pxsim_String__concat(s.tmp_5, s.tmp_8); + s.tmp_4 = r0; + if ((s.tmp_4) && (s.tmp_4).vtable) { + setupResume(s, 28); + pxsim_String__stringConv(s.tmp_4); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_4) + ""; } + case 28: + r0 = s.retval; + s.tmp_3 = r0; + r0 = pxsim_String__concat("{", s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_String__concat(s.tmp_2, "\n}"); + { step = 17; continue; } + case 14: + case 15: + case 16: + r0 = undefined; + case 17: + return leave(s, r0) default: oops() } } } -Sprite_ay__P168891.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__P168891.isGetter = true; +console_inspect__P166909.info = {"start":2271,"length":1190,"line":81,"column":4,"endLine":114,"endColumn":5,"fileName":"pxt_modules/base/console.ts","functionName":"inspect","argumentNames":["obj","maxElements"]} -function Sprite_ay__P168891_mk(s) { +function console_inspect__P166909_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_ay__P168891, depth: s.depth + 1, + parent: s, fn: console_inspect__P166909, depth: s.depth + 1, pc: 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___181008: undefined, + asString___181026: undefined, + keys___181038: undefined, + snipped___181042: undefined, arg0: undefined, + arg1: undefined, } } -function Sprite_ax__P168890(s) { +function console_inspect_inline__P181059(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21840,28 +22663,69 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 * 256); + 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; - r0 = (s.tmp_2 | 0); + 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 = (s.tmp_0).fields["_ax"] = (s.tmp_1); - r0 = undefined; + r0 = pxsim_String__concat(s.tmp_0, s.tmp_1); return leave(s, r0) default: oops() } } } -Sprite_ax__P168890.info = {"start":4096,"length":51,"line":159,"column":4,"endLine":161,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"ax","argumentNames":["this","v"]} +console_inspect_inline__P181059.info = {"start":3293,"length":61,"line":108,"column":20,"endLine":108,"endColumn":81,"fileName":"pxt_modules/base/console.ts","functionName":"inline","argumentNames":["prev","currKey"]} -function Sprite_ax__P168890_mk(s) { +function console_inspect_inline__P181059_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_ax__P168890, depth: s.depth + 1, + parent: s, fn: console_inspect_inline__P181059, depth: s.depth + 1, pc: 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, } } @@ -21870,7 +22734,7 @@ function Sprite_ax__P168890_mk(s) { -function Sprite_ax__P168889(s) { +function helpers_arrayReduce__P166639(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21880,35 +22744,62 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.len___181086 = undefined; + s.i___181089 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - r0 = s.arg0.fields["_ax"]; + r0 = pxsim_Array__length(s.arg0); + s.len___181086 = (r0); + s.i___181089 = (0); + case 1: + r0 = (s.i___181089 < s.len___181086); s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, 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___181089); + s.tmp_1.arg1 = r0; + s.tmp_1.arg2 = s.i___181089; + setupLambda(s.tmp_1, s.tmp_1.argL); + s.callLocIdx = 9; s.pc = 3; return s.tmp_1; + case 3: + r0 = s.retval; + s.arg2 = (r0); + r0 = (s.i___181089 + 1); + s.i___181089 = (r0); + { step = 1; continue; } + case 2: + r0 = s.arg2; + return leave(s, r0) default: oops() } } } -Sprite_ax__P168889.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__P168889.isGetter = true; +helpers_arrayReduce__P166639.info = {"start":8316,"length":317,"line":280,"column":4,"endLine":286,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arrayReduce","argumentNames":["arr","callbackfn","initialValue"]} -function Sprite_ax__P168889_mk(s) { +function helpers_arrayReduce__P166639_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_ax__P168889, depth: s.depth + 1, + parent: s, fn: helpers_arrayReduce__P166639, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + len___181086: undefined, + i___181089: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function Sprite_vy__P168888(s) { +function helpers_arrayJoin__P166630(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21918,33 +22809,144 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.r___181114 = undefined; + s.len___181115 = undefined; + s.i___181118 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 * 256); + 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___181114 = (r0); + r0 = pxsim_Array__length(s.arg0); + s.len___181115 = (r0); + s.i___181118 = (0); + case 5: + r0 = (s.i___181118 < s.len___181115); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 14; continue; } + r0 = (s.i___181118 > 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 = (s.tmp_2 | 0); + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 8; continue; } + if ((s.r___181114) && (s.r___181114).vtable) { + setupResume(s, 15); + pxsim_String__stringConv(s.r___181114); + checkResumeConsumed(); + return; + } else { s.retval = (s.r___181114) + ""; } + 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___181114 = (r0); + case 8: + case 9: + r0 = pxsim_Array__getAt(s.arg0, s.i___181118); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_vy"] = (s.tmp_1); - r0 = undefined; + 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___181118); + 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___181118); + case 13: + // jmp value (already in r0) + s.tmp_4 = r0; + if ((s.r___181114) && (s.r___181114).vtable) { + setupResume(s, 17); + pxsim_String__stringConv(s.r___181114); + checkResumeConsumed(); + return; + } else { s.retval = (s.r___181114) + ""; } + 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___181114 = (r0); + r0 = (s.i___181118 + 1); + s.i___181118 = (r0); + { step = 5; continue; } + case 14: + r0 = s.r___181114; return leave(s, r0) default: oops() } } } -Sprite_vy__P168888.info = {"start":3757,"length":51,"line":148,"column":4,"endLine":150,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"vy","argumentNames":["this","v"]} +helpers_arrayJoin__P166630.info = {"start":4133,"length":432,"line":157,"column":4,"endLine":170,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arrayJoin","argumentNames":["arr","sep"]} -function Sprite_vy__P168888_mk(s) { +function helpers_arrayJoin__P166630_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_vy__P168888, depth: s.depth + 1, + parent: s, fn: helpers_arrayJoin__P166630, depth: s.depth + 1, pc: 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___181114: undefined, + len___181115: undefined, + i___181118: undefined, arg0: undefined, arg1: undefined, } } @@ -21953,7 +22955,7 @@ function Sprite_vy__P168888_mk(s) { -function Sprite_vy__P168887(s) { +function tiles_getTileLocation__P169294(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21963,71 +22965,73 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.scene___181158 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - r0 = s.arg0.fields["_vy"]; + s.tmp_0 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1102; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + s.scene___181158 = (r0); + r0 = (s.arg0 == undefined); s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) - default: oops() -} } } -Sprite_vy__P168887.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__P168887.isGetter = true; - -function Sprite_vy__P168887_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Sprite_vy__P168887, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, -} } - - - - - -function Sprite_vx__P168886(s) { -let r0 = s.r0, 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, Sprite__C168868_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 * 256); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + r0 = (s.arg1 == undefined); + case 2: + // jmp value (already in r0) s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_vx"] = (s.tmp_1); - r0 = undefined; + r0 = pxsim_numops_toBool(s.tmp_1); + if (!r0) { step = 3; continue; } + r0 = s.tmp_1; + { step = 4; continue; } + case 3: + r0 = s.scene___181158.fields["tileMap"]; + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); + case 4: + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + if (!r0) { step = 5; continue; } + r0 = null; + { step = 7; continue; } + case 5: + case 6: + s.tmp_5 = tiles_TileMap_getTile__P169276_mk(s); + r0 = s.scene___181158.fields["tileMap"]; + s.tmp_5.arg0 = r0; + s.tmp_5.arg1 = s.arg0; + s.tmp_5.arg2 = s.arg1; + s.callLocIdx = 1103; s.pc = 9; return s.tmp_5; + case 9: + r0 = s.retval; + case 7: return leave(s, r0) default: oops() } } } -Sprite_vx__P168886.info = {"start":3426,"length":51,"line":137,"column":4,"endLine":139,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"vx","argumentNames":["this","v"]} +tiles_getTileLocation__P169294.info = {"start":21520,"length":247,"line":663,"column":4,"endLine":667,"endColumn":5,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTileLocation","argumentNames":["col","row"]} -function Sprite_vx__P168886_mk(s) { +function tiles_getTileLocation__P169294_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_vx__P168886, depth: s.depth + 1, + parent: s, fn: tiles_getTileLocation__P169294, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + scene___181158: undefined, arg0: undefined, arg1: undefined, } } @@ -22036,7 +23040,7 @@ function Sprite_vx__P168886_mk(s) { -function Sprite_vx__P168885(s) { +function tiles_TileMap_getTile__P169276(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22048,33 +23052,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, Sprite__C168868_VT)) failedCast(r0); - r0 = s.arg0.fields["_vx"]; + if (!checkSubtype(r0, tiles_TileMap__C169262_VT)) failedCast(r0); + r0 = pxsim_pxtcore_mkClassInstance(tiles_Location__C169220_VT); s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) + s.tmp_1 = tiles_Location_constructor__P169221_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 = 1051; s.pc = 1; return s.tmp_1; + case 1: + r0 = s.retval; + r0 = s.tmp_0; + return leave(s, r0) default: oops() } } } -Sprite_vx__P168885.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__P168885.isGetter = true; +tiles_TileMap_getTile__P169276.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 Sprite_vx__P168885_mk(s) { +function tiles_TileMap_getTile__P169276_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_vx__P168885, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_getTile__P169276, 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 sprites_BaseSprite_constructor__P168623(s) { +function tiles_Location_constructor__P169221(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22087,48 +23103,36 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_BaseSprite__C168621_VT)) failedCast(r0); - s.tmp_0 = sprites_BaseSprite_z__P168626_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 201; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.tmp_0 = scene_Scene_addSprite__P169397_mk(s); - s.tmp_1 = game_currentScene__P169526_mk(s); - s.callLocIdx = 202; 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 = 203; s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; + if (!checkSubtype(r0, tiles_Location__C169220_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() } } } -sprites_BaseSprite_constructor__P168623.info = {"start":344,"length":170,"line":15,"column":8,"endLine":20,"endColumn":9,"fileName":"pxt_modules/game/basesprite.ts","functionName":"inline","argumentNames":["this","z"]} +tiles_Location_constructor__P169221.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 sprites_BaseSprite_constructor__P168623_mk(s) { +function tiles_Location_constructor__P169221_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_BaseSprite_constructor__P168623, depth: s.depth + 1, + parent: s, fn: tiles_Location_constructor__P169221, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function scene_Scene_addSprite__P169397(s) { +function tiles_placeOnTile__P169300(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22143,45 +23147,70 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, scene_Scene__C169370_VT)) failedCast(r0); - r0 = s.arg0.fields["allSprites"]; - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.arg1); - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["spriteNextId"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 + 1); + r0 = pxsim_numops_toBoolDecr(s.arg0); 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 = 1159; s.pc = 1; return s.tmp_3; } - } + 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(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_toBool(s.tmp_3); + if (!r0) { step = 3; continue; } + r0 = s.tmp_3; + { step = 4; continue; } + case 3: + s.tmp_6 = tiles_Location_tileMap__P169222_mk(s); + s.tmp_6.arg0 = s.arg1; + s.callLocIdx = 1107; s.pc = 8; return s.tmp_6; + case 8: + r0 = s.retval; + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + s.tmp_4 = r0; + r0 = pxsim_Boolean__bang(s.tmp_4); + case 4: + // jmp value (already in r0) + s.tmp_7 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_7); + if (!r0) { step = 5; continue; } + { step = 7; continue; } + case 5: + case 6: + s.tmp_8 = tiles_Location_place__P169236_mk(s); + s.tmp_8.arg0 = s.arg1; + s.tmp_8.arg1 = s.arg0; + s.callLocIdx = 1108; s.pc = 9; return s.tmp_8; + case 9: r0 = s.retval; + case 7: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_Scene_addSprite__P169397.info = {"start":7218,"length":128,"line":200,"column":8,"endLine":203,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"addSprite","argumentNames":["this","sprite"]} +tiles_placeOnTile__P169300.info = {"start":24747,"length":152,"line":747,"column":4,"endLine":750,"endColumn":5,"fileName":"pxt_modules/game/tilemap.ts","functionName":"placeOnTile","argumentNames":["sprite","loc"]} -function scene_Scene_addSprite__P169397_mk(s) { +function tiles_placeOnTile__P169300_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_addSprite__P169397, depth: s.depth + 1, + parent: s, fn: tiles_placeOnTile__P169300, depth: s.depth + 1, pc: 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, } } @@ -22190,7 +23219,7 @@ function scene_Scene_addSprite__P169397_mk(s) { -function sprites_BaseSprite_z__P168626(s) { +function tiles_Location_place__P169236(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22206,41 +23235,50 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_BaseSprite__C168621_VT)) failedCast(r0); - r0 = s.arg0.fields["_z"]; + if (!checkSubtype(r0, tiles_Location__C169220_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(s.arg1); s.tmp_1 = r0; - r0 = (s.tmp_1 !== s.arg1); + 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["_z"] = (s.arg1); - s.tmp_1 = game_currentScene__P169526_mk(s); - s.callLocIdx = 204; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; - s.tmp_0 = r0; - r0 = s.tmp_0.fields["flags"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 | 1); - s.tmp_2 = r0; - r0 = (s.tmp_0).fields["flags"] = (s.tmp_2); + { step = 3; continue; } case 1: case 2: + s.tmp_2 = Sprite_setPosition__P168936_mk(s); + s.tmp_2.arg0 = s.arg1; + s.tmp_3 = tiles_Location_x__P169225_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 1025; s.pc = 5; return s.tmp_3; + case 5: + r0 = s.retval; + s.tmp_2.arg1 = r0; + s.tmp_4 = tiles_Location_y__P169226_mk(s); + s.tmp_4.arg0 = s.arg0; + s.callLocIdx = 1026; s.pc = 6; return s.tmp_4; + case 6: + r0 = s.retval; + s.tmp_2.arg2 = r0; + s.callLocIdx = 1027; s.pc = 4; return s.tmp_2; + case 4: + r0 = s.retval; + case 3: r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_BaseSprite_z__P168626.info = {"start":656,"length":174,"line":30,"column":8,"endLine":35,"endColumn":9,"fileName":"pxt_modules/game/basesprite.ts","functionName":"z","argumentNames":["this","v"]} +tiles_Location_place__P169236.info = {"start":3931,"length":126,"line":130,"column":8,"endLine":133,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"place","argumentNames":["this","mySprite"]} -function sprites_BaseSprite_z__P168626_mk(s) { +function tiles_Location_place__P169236_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_BaseSprite_z__P168626, depth: s.depth + 1, + parent: s, fn: tiles_Location_place__P169236, depth: s.depth + 1, pc: 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, } } @@ -22249,7 +23287,7 @@ function sprites_BaseSprite_z__P168626_mk(s) { -function sprites_BaseSprite_z__P168625(s) { +function tiles_Location_y__P169226(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22259,24 +23297,46 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.scale___181220 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_BaseSprite__C168621_VT)) failedCast(r0); - r0 = s.arg0.fields["_z"]; + if (!checkSubtype(r0, tiles_Location__C169220_VT)) failedCast(r0); + s.tmp_1 = tiles_Location_tileMap__P169222_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 1017; s.pc = 1; return s.tmp_1; + case 1: + r0 = s.retval; + s.tmp_0 = r0; + r0 = s.tmp_0.fields["_scale"]; + s.scale___181220 = (r0); + r0 = s.arg0.fields["_row"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 << s.scale___181220); + s.tmp_0 = r0; + r0 = (s.scale___181220 - 1); + s.tmp_3 = r0; + r0 = (1 << s.tmp_3); + s.tmp_2 = r0; + r0 = (s.tmp_0 + s.tmp_2); return leaveAccessor(s, r0) default: oops() } } } -sprites_BaseSprite_z__P168625.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__P168625.isGetter = true; +tiles_Location_y__P169226.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__P169226.isGetter = true; -function sprites_BaseSprite_z__P168625_mk(s) { +function tiles_Location_y__P169226_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_BaseSprite_z__P168625, depth: s.depth + 1, + parent: s, fn: tiles_Location_y__P169226, depth: s.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___181220: undefined, arg0: undefined, } } @@ -22284,7 +23344,7 @@ function sprites_BaseSprite_z__P168625_mk(s) { -function helpers_getTilemapByName__P169862(s) { +function tiles_Location_x__P169225(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22294,27 +23354,46 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.scale___181236 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = helpers__getFactoryInstance__P169860_mk(s); - s.tmp_0.arg0 = "tilemap"; - s.tmp_0.arg1 = s.arg0; - s.callLocIdx = 1715; s.pc = 1; return s.tmp_0; + r0 = s.arg0; + if (!checkSubtype(r0, tiles_Location__C169220_VT)) failedCast(r0); + s.tmp_1 = tiles_Location_tileMap__P169222_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 1015; s.pc = 1; return s.tmp_1; case 1: r0 = s.retval; - return leave(s, r0) + s.tmp_0 = r0; + r0 = s.tmp_0.fields["_scale"]; + s.scale___181236 = (r0); + r0 = s.arg0.fields["_col"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 << s.scale___181236); + s.tmp_0 = r0; + r0 = (s.scale___181236 - 1); + s.tmp_3 = r0; + r0 = (1 << s.tmp_3); + s.tmp_2 = r0; + r0 = (s.tmp_0 + s.tmp_2); + return leaveAccessor(s, r0) default: oops() } } } -helpers_getTilemapByName__P169862.info = {"start":2768,"length":107,"line":83,"column":4,"endLine":85,"endColumn":5,"fileName":"pxt_modules/game/assetTemplates.ts","functionName":"getTilemapByName","argumentNames":["name"]} +tiles_Location_x__P169225.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__P169225.isGetter = true; -function helpers_getTilemapByName__P169862_mk(s) { +function tiles_Location_x__P169225_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_getTilemapByName__P169862, depth: s.depth + 1, + parent: s, fn: tiles_Location_x__P169225, depth: s.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___181236: undefined, arg0: undefined, } } @@ -22322,7 +23401,7 @@ function helpers_getTilemapByName__P169862_mk(s) { -function helpers__getFactoryInstance__P169860(s) { +function Sprite_setPosition__P168936(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22332,86 +23411,65 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.factory___181568 = undefined; - s.unnamed838___U1 = undefined; - s.unnamed839___U2 = undefined; - s.data___181575 = undefined; + s.physics___181254 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(globals.factories___172876); - if (!r0) { step = 7; continue; } - s.factory___181568 = (undefined); - s.unnamed838___U1 = (globals.factories___172876); - s.unnamed839___U2 = (0); + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + s.tmp_0 = game_currentScene__P169526_mk(s); + s.callLocIdx = 470; s.pc = 1; return s.tmp_0; case 1: - s.tmp_0 = r0 = s.unnamed839___U2; - r0 = pxsim_Array__length(s.unnamed838___U1); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 6; continue; } - r0 = pxsim_Array__getAt(s.unnamed838___U1, s.unnamed839___U2); - s.factory___181568 = (r0); - s.tmp_4 = if_kind_1_mk(s); - s.tmp_4.arg0 = s.factory___181568; - if (!s.tmp_4.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_4.arg0, "kind"); - } else { - s.tmp_4.fn = s.tmp_4.arg0.vtable.iface["kind"]; - if (s.tmp_4.fn == null) { s.retval = s.tmp_4.arg0.fields["kind"]; } - else if (!s.tmp_4.fn.isGetter) { s.retval = bind(s.tmp_4); } - else { s.callLocIdx = 1713; s.pc = 10; return s.tmp_4; } - } - case 10: + r0 = s.retval; + r0 = r0.fields["physicsEngine"]; + s.physics___181254 = (r0); + s.tmp_0 = PhysicsEngine__C169038_v2_4_mk(s); + s.tmp_0.arg0 = s.physics___181254; + s.tmp_0.arg1 = s.arg0; + s.tmp_2 = r0 = s.arg1; + s.tmp_4 = Sprite_x__P168881_mk(s); + s.tmp_4.arg0 = s.arg0; + s.callLocIdx = 471; s.pc = 3; return s.tmp_4; + case 3: r0 = s.retval; s.tmp_3 = r0; - r0 = (s.tmp_3 === s.arg0); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 4; continue; } - s.tmp_5 = if_factory_2_mk(s); - s.tmp_5.arg0 = s.factory___181568; - s.tmp_5.arg1 = s.arg1; - if (!s.tmp_5.arg0.vtable.iface) { - setupLambda(s.tmp_5, pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "factory"), 2); - s.callLocIdx = 1714; s.pc = 11; return s.tmp_5; - } else { - s.tmp_5.fn = s.tmp_5.arg0.vtable.iface["factory"]; - if (s.tmp_5.fn == null) { setupLambda(s.tmp_5, s.tmp_5.arg0.fields["factory"], 2); s.callLocIdx = 1714; s.pc = 11; return s.tmp_5; } - else if (s.tmp_5.fn.isGetter) { s.tmp_5.stage2Call = true; s.callLocIdx = 1714; s.pc = 11; return s.tmp_5;; } - else { s.callLocIdx = 1714; s.pc = 11; return s.tmp_5; } - } - case 11: + r0 = (s.tmp_2 - s.tmp_3); + s.tmp_1 = r0; + r0 = (s.tmp_1 * 256); + s.tmp_5 = r0; + r0 = (s.tmp_5 | 0); + s.tmp_0.arg2 = r0; + s.tmp_7 = r0 = s.arg2; + s.tmp_9 = Sprite_y__P168883_mk(s); + s.tmp_9.arg0 = s.arg0; + s.callLocIdx = 473; s.pc = 4; return s.tmp_9; + case 4: r0 = s.retval; - s.data___181575 = (r0); - r0 = pxsim_numops_toBoolDecr(s.data___181575); - if (!r0) { step = 2; continue; } - r0 = s.data___181575; - { step = 9; continue; } + s.tmp_8 = r0; + r0 = (s.tmp_7 - s.tmp_8); + s.tmp_6 = r0; + r0 = (s.tmp_6 * 256); + s.tmp_10 = r0; + r0 = (s.tmp_10 | 0); + s.tmp_0.arg3 = r0; + if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C169038_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: - case 3: - case 4: - case 5: - r0 = (s.unnamed839___U2 + 1); - s.unnamed839___U2 = (r0); - { step = 1; continue; } - case 6: - s.unnamed838___U1 = (undefined); - case 7: - case 8: - r0 = null; - case 9: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -helpers__getFactoryInstance__P169860.info = {"start":2226,"length":348,"line":66,"column":4,"endLine":76,"endColumn":5,"fileName":"pxt_modules/game/assetTemplates.ts","functionName":"_getFactoryInstance","argumentNames":["kind","name"]} +Sprite_setPosition__P168936.info = {"start":13931,"length":220,"line":496,"column":4,"endLine":503,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"setPosition","argumentNames":["this","x","y"]} -function helpers__getFactoryInstance__P169860_mk(s) { +function Sprite_setPosition__P168936_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers__getFactoryInstance__P169860, depth: s.depth + 1, + parent: s, fn: Sprite_setPosition__P168936, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -22419,19 +23477,22 @@ function helpers__getFactoryInstance__P169860_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - factory___181568: undefined, - unnamed838___U1: undefined, - unnamed839___U2: undefined, - data___181575: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, + physics___181254: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function tilemap__P169848(s) { +function tiles_Location_tileMap__P169222(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22443,29 +23504,35 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = null; - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, tiles_Location__C169220_VT)) failedCast(r0); + s.tmp_0 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1014; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = r0.fields["tileMap"]; + return leaveAccessor(s, r0) default: oops() } } } -tilemap__P169848.info = {"start":99,"length":78,"line":3,"column":0,"endLine":3,"endColumn":78,"fileName":"pxt_modules/game/assetTemplates.ts","functionName":"tilemap","argumentNames":["lits","args"]} +tiles_Location_tileMap__P169222.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__P169222.isGetter = true; -function tilemap__P169848_mk(s) { +function tiles_Location_tileMap__P169222_mk(s) { checkStack(s.depth); return { - parent: s, fn: tilemap__P169848, depth: s.depth + 1, + parent: s, fn: tiles_Location_tileMap__P169222, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, - arg1: undefined, } } -function tiles_setCurrentTilemap__P169291(s) { +function sprites_create__P168802(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22475,105 +23542,87 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.scene___181274 = undefined; + s.sprite___181277 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = scene_setTileMapLevel__P169415_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1101; s.pc = 1; return s.tmp_0; + s.tmp_0 = game_currentScene__P169526_mk(s); + s.callLocIdx = 394; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -tiles_setCurrentTilemap__P169291.info = {"start":19775,"length":103,"line":614,"column":4,"endLine":616,"endColumn":5,"fileName":"pxt_modules/game/tilemap.ts","functionName":"setCurrentTilemap","argumentNames":["tilemap"]} - -function tiles_setCurrentTilemap__P169291_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_setCurrentTilemap__P169291, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, -} } - - - - - -function scene_setTileMapLevel__P169415(s) { -let r0 = s.r0, 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___181590 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - s.tmp_0 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1172; s.pc = 3; return s.tmp_0; + s.scene___181274 = (r0); + r0 = pxsim_pxtcore_mkClassInstance(Sprite__C168868_VT); + s.tmp_0 = r0; + s.tmp_1 = Sprite_constructor__P168915_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = s.arg0; + s.callLocIdx = 395; s.pc = 2; return s.tmp_1; + case 2: + r0 = s.retval; + s.sprite___181277 = (s.tmp_0); + s.tmp_0 = Sprite_setKind__P168935_mk(s); + s.tmp_0.arg0 = s.sprite___181277; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 396; s.pc = 3; return s.tmp_0; case 3: r0 = s.retval; - s.scene___181590 = (r0); - r0 = s.scene___181590.fields["tileMap"]; - 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(tiles_TileMap__C169262_VT); - s.tmp_3 = r0; - s.tmp_4 = tiles_TileMap_constructor__P169264_mk(s); - s.tmp_4.arg0 = s.tmp_3; - s.tmp_4.arg1 = 4; - s.callLocIdx = 1173; s.pc = 4; return s.tmp_4; + s.tmp_0 = PhysicsEngine__C169038_v0_2_mk(s); + r0 = s.scene___181274.fields["physicsEngine"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.sprite___181277; + if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C169038_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 = (s.scene___181590).fields["tileMap"] = (s.tmp_3); - case 1: - case 2: - s.tmp_0 = tiles_TileMap_setData__P169275_mk(s); - r0 = s.scene___181590.fields["tileMap"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.arg0; - s.callLocIdx = 1174; s.pc = 5; return s.tmp_0; + r0 = pxsim_pxtcore_mkAction(1, forEach_inline__P181292); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); + r0 = pxsim_pxtcore_mkAction(1, sprites_create_inline__P181299); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.sprite___181277); + s.tmp_2 = helpers_arrayForEach__P166636_mk(s); + s.tmp_3 = helpers_arrayFilter__P166637_mk(s); + r0 = s.scene___181274.fields["createdHandlers"]; + s.tmp_3.arg0 = r0; + s.tmp_3.arg1 = s.tmp_0; + s.callLocIdx = 397; 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 = 399; s.pc = 5; return s.tmp_2; case 5: r0 = s.retval; - r0 = undefined; + r0 = s.sprite___181277; return leave(s, r0) default: oops() } } } -scene_setTileMapLevel__P169415.info = {"start":3018,"length":219,"line":113,"column":4,"endLine":118,"endColumn":5,"fileName":"pxt_modules/game/scenes.ts","functionName":"setTileMapLevel","argumentNames":["map"]} +sprites_create__P168802.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 scene_setTileMapLevel__P169415_mk(s) { +function sprites_create__P168802_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_setTileMapLevel__P169415, depth: s.depth + 1, + parent: s, fn: sprites_create__P168802, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - tmp_4: undefined, - scene___181590: undefined, + scene___181274: undefined, + sprite___181277: undefined, arg0: undefined, + arg1: undefined, } } -function tiles_TileMap_setData__P169275(s) { +function forEach_inline__P181292(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22583,189 +23632,79 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.previous___181607 = undefined; - s.eventHandler___181620 = undefined; - s.unnamed826___U2 = undefined; - s.unnamed827___U3 = undefined; - s.eventHandler___181649 = undefined; - s.unnamed828___U5 = undefined; - s.unnamed829___U6 = 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__C169262_VT)) failedCast(r0); - r0 = s.arg0.fields["_map"]; - s.previous___181607 = (r0); - r0 = s.arg0.fields["handlerState"]; + r0 = s.arg0.fields["kind"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } - case 1: - r0 = (s.previous___181607 !== s.arg1); - case 2: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBool(s.tmp_1); - if (r0) { step = 3; continue; } - r0 = s.tmp_1; - { step = 4; continue; } - case 3: - r0 = s.previous___181607; - case 4: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 9; continue; } - s.eventHandler___181620 = (undefined); - r0 = s.arg0.fields["handlerState"]; - s.unnamed826___U2 = (r0); - s.unnamed827___U3 = (0); - case 5: - s.tmp_0 = r0 = s.unnamed827___U3; - r0 = pxsim_Array__length(s.unnamed826___U2); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 8; continue; } - r0 = pxsim_Array__getAt(s.unnamed826___U2, s.unnamed827___U3); - s.eventHandler___181620 = (r0); - r0 = s.eventHandler___181620.fields["event"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 === 1); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 6; continue; } - s.tmp_4 = if_callback_2_mk(s); - s.tmp_4.arg0 = s.eventHandler___181620; - s.tmp_4.arg1 = s.previous___181607; - if (!s.tmp_4.arg0.vtable.iface) { - setupLambda(s.tmp_4, pxsim_pxtrt.mapGetByString(s.tmp_4.arg0, "callback"), 2); - s.callLocIdx = 1048; s.pc = 23; return s.tmp_4; - } else { - s.tmp_4.fn = s.tmp_4.arg0.vtable.iface["callback"]; - if (s.tmp_4.fn == null) { setupLambda(s.tmp_4, s.tmp_4.arg0.fields["callback"], 2); s.callLocIdx = 1048; s.pc = 23; return s.tmp_4; } - else if (s.tmp_4.fn.isGetter) { s.tmp_4.stage2Call = true; s.callLocIdx = 1048; s.pc = 23; return s.tmp_4;; } - else { s.callLocIdx = 1048; s.pc = 23; return s.tmp_4; } + r0 = (s.tmp_0 == s.caps[0]); + return leave(s, r0) + default: oops() +} } } +forEach_inline__P181292.info = {"start":1195,"length":19,"line":43,"column":20,"endLine":43,"endColumn":39,"fileName":"pxt_modules/game/sprites.ts","functionName":"inline","argumentNames":["h"]} + +function forEach_inline__P181292_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: forEach_inline__P181292, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function sprites_create_inline__P181299(s) { +let r0 = s.r0, 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; } - case 23: - r0 = s.retval; - case 6: - case 7: - r0 = (s.unnamed827___U3 + 1); - s.unnamed827___U3 = (r0); - { step = 5; continue; } - case 8: - s.unnamed826___U2 = (undefined); - case 9: - case 10: - r0 = (s.arg0).fields["_map"] = (s.arg1); - r0 = pxsim_numops_toBoolDecr(s.arg1); - if (!r0) { step = 11; continue; } - s.tmp_0 = r0 = s.arg0; - r0 = s.arg1.fields["_scale"]; - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_scale"] = (s.tmp_1); - case 11: - case 12: - r0 = s.arg0.fields["handlerState"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 13; continue; } - r0 = s.tmp_0; - { step = 14; continue; } - case 13: - r0 = (s.previous___181607 !== s.arg1); - case 14: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBool(s.tmp_1); - if (r0) { step = 15; continue; } - r0 = s.tmp_1; - { step = 16; continue; } - case 15: - r0 = s.arg1; - case 16: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 21; continue; } - s.eventHandler___181649 = (undefined); - r0 = s.arg0.fields["handlerState"]; - s.unnamed828___U5 = (r0); - s.unnamed829___U6 = (0); - case 17: - s.tmp_0 = r0 = s.unnamed829___U6; - r0 = pxsim_Array__length(s.unnamed828___U5); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 20; continue; } - r0 = pxsim_Array__getAt(s.unnamed828___U5, s.unnamed829___U6); - s.eventHandler___181649 = (r0); - r0 = s.eventHandler___181649.fields["event"]; - 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; } - s.tmp_4 = if_callback_2_mk(s); - s.tmp_4.arg0 = s.eventHandler___181649; - s.tmp_4.arg1 = s.arg1; - if (!s.tmp_4.arg0.vtable.iface) { - setupLambda(s.tmp_4, pxsim_pxtrt.mapGetByString(s.tmp_4.arg0, "callback"), 2); - s.callLocIdx = 1050; s.pc = 24; return s.tmp_4; + 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 = 398; s.pc = 1; return s.tmp_0; } else { - s.tmp_4.fn = s.tmp_4.arg0.vtable.iface["callback"]; - if (s.tmp_4.fn == null) { setupLambda(s.tmp_4, s.tmp_4.arg0.fields["callback"], 2); s.callLocIdx = 1050; s.pc = 24; return s.tmp_4; } - else if (s.tmp_4.fn.isGetter) { s.tmp_4.stage2Call = true; s.callLocIdx = 1050; s.pc = 24; return s.tmp_4;; } - else { s.callLocIdx = 1050; s.pc = 24; return s.tmp_4; } + 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 = 398; s.pc = 1; return s.tmp_0; } + else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 398; s.pc = 1; return s.tmp_0;; } + else { s.callLocIdx = 398; s.pc = 1; return s.tmp_0; } } - case 24: + case 1: r0 = s.retval; - case 18: - case 19: - r0 = (s.unnamed829___U6 + 1); - s.unnamed829___U6 = (r0); - { step = 17; continue; } - case 20: - s.unnamed828___U5 = (undefined); - case 21: - case 22: r0 = undefined; return leave(s, r0) default: oops() } } } -tiles_TileMap_setData__P169275.info = {"start":10253,"length":807,"line":355,"column":8,"endLine":378,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"setData","argumentNames":["this","map"]} +sprites_create_inline__P181299.info = {"start":1237,"length":22,"line":44,"column":21,"endLine":44,"endColumn":43,"fileName":"pxt_modules/game/sprites.ts","functionName":"inline","argumentNames":["h"]} -function tiles_TileMap_setData__P169275_mk(s) { +function sprites_create_inline__P181299_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_setData__P169275, depth: s.depth + 1, + parent: s, fn: sprites_create_inline__P181299, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - previous___181607: undefined, - eventHandler___181620: undefined, - unnamed826___U2: undefined, - unnamed827___U3: undefined, - eventHandler___181649: undefined, - unnamed828___U5: undefined, - unnamed829___U6: undefined, arg0: undefined, - arg1: undefined, } } -function tiles_TileMapData_scale__P169248(s) { +function PhysicsEngine_addSprite__P169040(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22777,30 +23716,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, tiles_TileMapData__C169244_VT)) failedCast(r0); - r0 = s.arg0.fields["_scale"]; - return leaveAccessor(s, r0) + if (!checkSubtype(r0, PhysicsEngine__C169038_VT)) failedCast(r0); + r0 = undefined; + return leave(s, r0) default: oops() } } } -tiles_TileMapData_scale__P169248.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__P169248.isGetter = true; +PhysicsEngine_addSprite__P169040.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 tiles_TileMapData_scale__P169248_mk(s) { +function PhysicsEngine_addSprite__P169040_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMapData_scale__P169248, depth: s.depth + 1, + parent: s, fn: PhysicsEngine_addSprite__P169040, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, + arg1: undefined, } } -function tiles_TileMap_constructor__P169264(s) { +function Sprite_setKind__P168935(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22810,48 +23750,144 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.spritesByKind___181318 = undefined; + s.overlapMap___181347 = 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__C169262_VT)) failedCast(r0); - r0 = (s.arg0).fields["_layer"] = (1); - s.tmp_0 = tiles_TileMap_scale__P169266_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 1034; s.pc = 1; return s.tmp_0; + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + r0 = (s.arg1 == undefined); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: + r0 = s.arg0.fields["_kind"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 === s.arg1); + case 2: + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 3; continue; } + { step = 15; continue; } + case 3: + case 4: + s.tmp_3 = game_currentScene__P169526_mk(s); + s.callLocIdx = 465; s.pc = 16; return s.tmp_3; + case 16: r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, tiles_TileMap_inline__P181675); + r0 = r0.fields["spritesByKind"]; + s.spritesByKind___181318 = (r0); + r0 = s.arg0.fields["_kind"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 >= 0); 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__P169332_mk(s); - s.tmp_3.arg0 = -1; - s.tmp_3.arg1 = s.tmp_0; - s.tmp_3.arg2 = undefined; - s.callLocIdx = 1036; s.pc = 2; return s.tmp_3; - case 2: + 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___181318, 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__P168997_mk(s); + r0 = s.arg0.fields["_kind"]; + s.tmp_5 = r0; + r0 = pxsim_pxtrt.mapGetGeneric(s.spritesByKind___181318, s.tmp_5); + s.tmp_4.arg0 = r0; + s.tmp_4.arg1 = s.arg0; + s.callLocIdx = 466; 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___181318, s.arg1); + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); s.tmp_2 = r0; - r0 = (s.tmp_1).fields["renderable"] = (s.tmp_2); + 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__C168990_VT); + s.tmp_4 = r0; + s.tmp_5 = sprites_SpriteSet_constructor__P168992_mk(s); + s.tmp_5.arg0 = s.tmp_4; + s.callLocIdx = 467; s.pc = 18; return s.tmp_5; + case 18: + r0 = s.retval; + r0 = pxsim_pxtrt.mapSetGeneric(s.spritesByKind___181318, s.arg1, s.tmp_4); + case 9: + case 10: + s.tmp_0 = sprites_SpriteSet_add__P168995_mk(s); + r0 = pxsim_pxtrt.mapGetGeneric(s.spritesByKind___181318, s.arg1); + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 468; s.pc = 19; return s.tmp_0; + case 19: + r0 = s.retval; + case 11: + case 12: + s.tmp_0 = game_currentScene__P169526_mk(s); + s.callLocIdx = 469; s.pc = 20; return s.tmp_0; + case 20: + r0 = s.retval; + r0 = r0.fields["overlapMap"]; + s.overlapMap___181347 = (r0); + r0 = pxsim_pxtrt.mapGetGeneric(s.overlapMap___181347, 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___181347; + 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___181347, 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() } } } -tiles_TileMap_constructor__P169264.info = {"start":8927,"length":268,"line":300,"column":8,"endLine":308,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"inline","argumentNames":["this","scale"]} +Sprite_setKind__P168935.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 tiles_TileMap_constructor__P169264_mk(s) { +function Sprite_setKind__P168935_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_constructor__P169264, depth: s.depth + 1, + parent: s, fn: Sprite_setKind__P168935, depth: s.depth + 1, pc: 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___181318: undefined, + overlapMap___181347: undefined, arg0: undefined, arg1: undefined, } } @@ -22860,7 +23896,7 @@ function tiles_TileMap_constructor__P169264_mk(s) { -function tiles_TileMap_inline__P181675(s) { +function sprites_SpriteSet_remove__P168997(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22870,30 +23906,49 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.i___181395 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = tiles_TileMap_draw__P172386_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_0.arg1 = s.arg0; - s.tmp_0.arg2 = s.arg1; - s.callLocIdx = 1035; s.pc = 1; return s.tmp_0; - case 1: + r0 = s.arg0; + if (!checkSubtype(r0, sprites_SpriteSet__C168990_VT)) failedCast(r0); + r0 = s.arg0.fields["_sprites"]; + s.tmp_0 = r0; + r0 = pxsim_Array_.indexOf(s.tmp_0, s.arg1, undefined); + s.i___181395 = (r0); + r0 = (s.i___181395 > -1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_1 = helpers_arraySplice__P166627_mk(s); + r0 = s.arg0.fields["_sprites"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.i___181395; + s.tmp_1.arg2 = 1; + s.callLocIdx = 624; s.pc = 4; return s.tmp_1; + case 4: r0 = s.retval; - r0 = undefined; + r0 = true; + { step = 3; continue; } + case 1: + case 2: + r0 = false; + case 3: return leave(s, r0) default: oops() } } } -tiles_TileMap_inline__P181675.info = {"start":9145,"length":25,"line":306,"column":16,"endLine":306,"endColumn":41,"fileName":"pxt_modules/game/tilemap.ts","functionName":"inline","argumentNames":["t","c"]} +sprites_SpriteSet_remove__P168997.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 tiles_TileMap_inline__P181675_mk(s) { +function sprites_SpriteSet_remove__P168997_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_inline__P181675, depth: s.depth + 1, + parent: s, fn: sprites_SpriteSet_remove__P168997, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + i___181395: undefined, arg0: undefined, arg1: undefined, } } @@ -22902,7 +23957,7 @@ function tiles_TileMap_inline__P181675_mk(s) { -function tiles_TileMap_draw__P172386(s) { +function sprites_SpriteSet_add__P168995(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22912,297 +23967,49 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.bitmask___181686 = undefined; - s.offsetX___181692 = undefined; - s.offsetY___181697 = undefined; - s.x0___181702 = undefined; - s.xn___181709 = undefined; - s.y0___181726 = undefined; - s.yn___181733 = undefined; - s.x___181750 = undefined; - s.y___181756 = undefined; - s.index___181762 = undefined; - s.tile___181769 = undefined; - s.x___181805 = undefined; - s.xLine___181811 = undefined; - s.y___181837 = undefined; - s.yLine___181843 = 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__C169262_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); + if (!checkSubtype(r0, sprites_SpriteSet__C168990_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(s.arg1); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - { step = 23; continue; } + r0 = false; + { step = 5; 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___181686 = (r0); - r0 = s.arg2.fields["drawOffsetX"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 & s.bitmask___181686); - s.offsetX___181692 = (r0); - r0 = s.arg2.fields["drawOffsetY"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 & s.bitmask___181686); - s.offsetY___181697 = (r0); - s.tmp_0 = Math_max__P166657_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 = 1057; s.pc = 24; return s.tmp_0; - case 24: - r0 = s.retval; - s.x0___181702 = (r0); - s.tmp_0 = Math_min__P166658_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 = 1060; s.pc = 25; return s.tmp_0; - case 25: - r0 = s.retval; - s.xn___181709 = (r0); - s.tmp_0 = Math_max__P166657_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 = 1062; s.pc = 26; return s.tmp_0; - case 26: - r0 = s.retval; - s.y0___181726 = (r0); - s.tmp_0 = Math_min__P166658_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"]; + r0 = s.arg0.fields["_sprites"]; s.tmp_4 = r0; - r0 = pxsim_ImageMethods.height(s.arg1); - s.tmp_5 = r0; - r0 = (s.tmp_4 + s.tmp_5); + r0 = pxsim_Array_.indexOf(s.tmp_4, s.arg1, undefined); s.tmp_3 = r0; - r0 = s.arg0.fields["_scale"]; - s.tmp_6 = r0; - r0 = (s.tmp_3 >> s.tmp_6); + r0 = (s.tmp_3 > -1); s.tmp_2 = r0; - r0 = (s.tmp_2 + 1); - s.tmp_0.arg1 = r0; - s.callLocIdx = 1065; s.pc = 27; return s.tmp_0; - case 27: - r0 = s.retval; - s.yn___181733 = (r0); - s.x___181750 = (s.x0___181702); + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 3; continue; } + r0 = false; + { step = 5; continue; } case 3: - r0 = (s.x___181750 <= s.xn___181709); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 8; continue; } - s.y___181756 = (s.y0___181726); case 4: - r0 = (s.y___181756 <= s.yn___181733); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - s.tmp_1 = tiles_TileMapData_getTile__P169250_mk(s); - r0 = s.arg0.fields["_map"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.x___181750; - s.tmp_1.arg2 = s.y___181756; - s.callLocIdx = 1066; s.pc = 28; return s.tmp_1; - case 28: - r0 = s.retval; - s.index___181762 = (r0); - s.tmp_0 = tiles_TileMapData_getTileImage__P169253_mk(s); - r0 = s.arg0.fields["_map"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.index___181762; - s.callLocIdx = 1067; s.pc = 29; return s.tmp_0; - case 29: - r0 = s.retval; - s.tile___181769 = (r0); - r0 = pxsim_numops_toBoolDecr(s.tile___181769); - if (!r0) { step = 5; continue; } - s.tmp_0 = r0 = s.arg1; - s.tmp_1 = r0 = s.tile___181769; - r0 = (s.x___181750 - s.x0___181702); - s.tmp_4 = r0; - r0 = s.arg0.fields["_scale"]; + r0 = s.arg0.fields["_sprites"]; s.tmp_5 = r0; - r0 = (s.tmp_4 << s.tmp_5); - s.tmp_3 = r0; - r0 = (s.tmp_3 - s.offsetX___181692); - s.tmp_2 = r0; - r0 = (s.y___181756 - s.y0___181726); - 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___181697); - s.tmp_6 = r0; - r0 = pxsim_ImageMethods.drawTransparentImage(s.tmp_0, s.tmp_1, s.tmp_2, s.tmp_6); + r0 = pxsim_Array__push(s.tmp_5, s.arg1); + r0 = true; case 5: - case 6: - r0 = (s.y___181756 + 1); - s.y___181756 = (r0); - { step = 4; continue; } - case 7: - r0 = (s.x___181750 + 1); - s.x___181750 = (r0); - { step = 3; continue; } - case 8: - r0 = pxsim_numops_toBoolDecr(globals.debug___169494); - if (!r0) { step = 21; continue; } - s.x___181805 = (s.x0___181702); - case 9: - r0 = (s.x___181805 <= s.xn___181709); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 14; continue; } - r0 = (s.x___181805 - s.x0___181702); - 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___181692); - s.xLine___181811 = (r0); - r0 = (s.xLine___181811 >= 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___181811; - r0 = pxsim_ImageMethods.width(globals.screen___168559); - 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__P168485_mk(s); - s.tmp_4.arg0 = s.arg1; - s.tmp_4.arg1 = s.xLine___181811; - s.tmp_4.arg2 = 0; - s.tmp_4.arg3 = s.xLine___181811; - r0 = pxsim_ImageMethods.height(s.arg1); - s.tmp_4.arg4 = r0; - s.tmp_4.arg5 = 1; - s.callLocIdx = 1071; s.pc = 30; return s.tmp_4; - case 30: - r0 = s.retval; - case 12: - case 13: - r0 = (s.x___181805 + 1); - s.x___181805 = (r0); - { step = 9; continue; } - case 14: - s.y___181837 = (s.y0___181726); - case 15: - r0 = (s.y___181837 <= s.yn___181733); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 20; continue; } - r0 = (s.y___181837 - s.y0___181726); - 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___181697); - s.yLine___181843 = (r0); - r0 = (s.yLine___181843 >= 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___181843; - r0 = pxsim_ImageMethods.height(globals.screen___168559); - 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__P168485_mk(s); - s.tmp_4.arg0 = s.arg1; - s.tmp_4.arg1 = 0; - s.tmp_4.arg2 = s.yLine___181843; - r0 = pxsim_ImageMethods.width(s.arg1); - s.tmp_4.arg3 = r0; - s.tmp_4.arg4 = s.yLine___181843; - s.tmp_4.arg5 = 1; - s.callLocIdx = 1073; s.pc = 31; return s.tmp_4; - case 31: - r0 = s.retval; - case 18: - case 19: - r0 = (s.y___181837 + 1); - s.y___181837 = (r0); - { step = 15; continue; } - case 20: - case 21: - case 22: - case 23: - r0 = undefined; return leave(s, r0) default: oops() } } } -tiles_TileMap_draw__P172386.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_add__P168995.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 tiles_TileMap_draw__P172386_mk(s) { +function sprites_SpriteSet_add__P168995_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_draw__P172386, depth: s.depth + 1, + parent: s, fn: sprites_SpriteSet_add__P168995, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -23210,35 +24017,15 @@ function tiles_TileMap_draw__P172386_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - bitmask___181686: undefined, - offsetX___181692: undefined, - offsetY___181697: undefined, - x0___181702: undefined, - xn___181709: undefined, - y0___181726: undefined, - yn___181733: undefined, - x___181750: undefined, - y___181756: undefined, - index___181762: undefined, - tile___181769: undefined, - x___181805: undefined, - xLine___181811: undefined, - y___181837: undefined, - yLine___181843: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function tiles_TileMapData_getTileImage__P169253(s) { +function sprites_SpriteSet_contains__P168998(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23248,85 +24035,30 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.size___181871 = undefined; - s.cachedImage___181875 = undefined; - s.originalImage___181882 = 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__C169244_VT)) failedCast(r0); - r0 = s.arg0.fields["_scale"]; - s.tmp_0 = r0; - r0 = (1 << s.tmp_0); - s.size___181871 = (r0); - r0 = s.arg0.fields["cachedTileView"]; - s.tmp_0 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.arg1); - s.cachedImage___181875 = (r0); - r0 = pxsim_numops_toBoolDecr(s.cachedImage___181875); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - r0 = s.arg0.fields["tileset"]; - s.tmp_2 = r0; - r0 = pxsim_Array__getAt(s.tmp_2, s.arg1); - s.originalImage___181882 = (r0); - r0 = pxsim_numops_toBoolDecr(s.originalImage___181882); - if (!r0) { step = 5; continue; } - r0 = pxsim_ImageMethods.width(s.originalImage___181882); + if (!checkSubtype(r0, sprites_SpriteSet__C168990_VT)) failedCast(r0); + r0 = s.arg0.fields["_sprites"]; s.tmp_1 = r0; - r0 = (s.tmp_1 <= s.size___181871); - 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___181882); - s.tmp_2 = r0; - r0 = (s.tmp_2 <= s.size___181871); - 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___181875 = (s.originalImage___181882); - { step = 4; continue; } - case 3: - r0 = pxsim.image.create(s.size___181871, s.size___181871); - s.cachedImage___181875 = (r0); - r0 = pxsim_ImageMethods.drawImage(s.cachedImage___181875, s.originalImage___181882, 0, 0); - case 4: - r0 = s.arg0.fields["cachedTileView"]; + r0 = pxsim_Array_.indexOf(s.tmp_1, s.arg1, undefined); s.tmp_0 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, s.arg1, s.cachedImage___181875); - case 5: - case 6: - case 7: - case 8: - r0 = s.cachedImage___181875; + r0 = (s.tmp_0 > -1); return leave(s, r0) default: oops() } } } -tiles_TileMapData_getTileImage__P169253.info = {"start":7354,"length":717,"line":251,"column":8,"endLine":268,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTileImage","argumentNames":["this","index"]} +sprites_SpriteSet_contains__P168998.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 tiles_TileMapData_getTileImage__P169253_mk(s) { +function sprites_SpriteSet_contains__P168998_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMapData_getTileImage__P169253, depth: s.depth + 1, + parent: s, fn: sprites_SpriteSet_contains__P168998, depth: s.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___181871: undefined, - cachedImage___181875: undefined, - originalImage___181882: undefined, arg0: undefined, arg1: undefined, } } @@ -23335,7 +24067,7 @@ function tiles_TileMapData_getTileImage__P169253_mk(s) { -function tiles_TileMapData_getTile__P169250(s) { +function sprites_SpriteSet_constructor__P168992(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23347,71 +24079,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, tiles_TileMapData__C169244_VT)) failedCast(r0); - s.tmp_1 = tiles_TileMapData_isOutsideMap__P169256_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_1.arg1 = s.arg1; - s.tmp_1.arg2 = s.arg2; - s.callLocIdx = 1029; s.pc = 4; return s.tmp_1; - case 4: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = 0; - { step = 3; continue; } - case 1: - case 2: - r0 = s.arg0.fields["data"]; - s.tmp_2 = r0; - r0 = (s.arg1 | 0); - s.tmp_5 = r0; - r0 = (4 + s.tmp_5); - s.tmp_4 = r0; - r0 = (s.arg2 | 0); - s.tmp_7 = r0; - r0 = s.arg0.fields["_width"]; - s.tmp_8 = r0; - r0 = (s.tmp_7 * s.tmp_8); - s.tmp_6 = r0; - r0 = (s.tmp_4 + s.tmp_6); - s.tmp_3 = r0; - r0 = pxsim.BufferMethods.getUint8(s.tmp_2, s.tmp_3); - case 3: + if (!checkSubtype(r0, sprites_SpriteSet__C168990_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_sprites"] = (s.tmp_1); + r0 = undefined; return leave(s, r0) default: oops() } } } -tiles_TileMapData_getTile__P169250.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"]} +sprites_SpriteSet_constructor__P168992.info = {"start":485,"length":57,"line":19,"column":8,"endLine":21,"endColumn":9,"fileName":"pxt_modules/game/spriteset.ts","functionName":"inline","argumentNames":["this"]} -function tiles_TileMapData_getTile__P169250_mk(s) { +function sprites_SpriteSet_constructor__P168992_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMapData_getTile__P169250, depth: s.depth + 1, + parent: s, fn: sprites_SpriteSet_constructor__P168992, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function tiles_TileMapData_isOutsideMap__P169256(s) { +function Sprite_constructor__P168915(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23424,75 +24120,138 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMapData__C169244_VT)) failedCast(r0); - r0 = (s.arg1 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + s.tmp_0 = sprites_BaseSprite_constructor__P168623_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 427; s.pc = 1; return s.tmp_0; case 1: - s.tmp_1 = r0 = s.arg1; - r0 = s.arg0.fields["_width"]; + r0 = s.retval; + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_ImageMethods.width(globals.screen___168559); + 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_1 >= s.tmp_2); - case 2: - // jmp value (already in 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___168559); + 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 = pxsim_numops_toBool(s.tmp_3); - if (!r0) { step = 3; continue; } - r0 = s.tmp_3; - { step = 4; continue; } + 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__P168886_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 430; s.pc = 2; return s.tmp_0; + case 2: + r0 = s.retval; + s.tmp_0 = Sprite_vy__P168888_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 431; s.pc = 3; return s.tmp_0; case 3: - r0 = (s.arg2 < 0); + r0 = s.retval; + s.tmp_0 = Sprite_ax__P168890_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 432; s.pc = 4; return s.tmp_0; case 4: - // jmp value (already in r0) - s.tmp_4 = r0; - r0 = pxsim_numops_toBool(s.tmp_4); - if (!r0) { step = 5; continue; } - r0 = s.tmp_4; - { step = 6; continue; } + r0 = s.retval; + s.tmp_0 = Sprite_ay__P168892_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 433; s.pc = 5; return s.tmp_0; case 5: - s.tmp_5 = r0 = s.arg2; - r0 = s.arg0.fields["_height"]; - s.tmp_6 = r0; - r0 = (s.tmp_5 >= s.tmp_6); + r0 = s.retval; + s.tmp_0 = Sprite_fx__P168894_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 434; s.pc = 6; return s.tmp_0; case 6: - // jmp value (already in r0) - s.tmp_7 = r0; - r0 = s.tmp_7; - return leave(s, r0) - default: oops() -} } } -tiles_TileMapData_isOutsideMap__P169256.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__P169256_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_TileMapData_isOutsideMap__P169256, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, + r0 = s.retval; + s.tmp_0 = Sprite_fy__P168896_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 435; 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__P168918_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 436; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + s.tmp_0 = Sprite_setKind__P168935_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = -1; + s.callLocIdx = 437; 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() +} } } +Sprite_constructor__P168915.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 Sprite_constructor__P168915_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Sprite_constructor__P168915, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, tmp_6: undefined, - tmp_7: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function scene_createRenderable__P169332(s) { +function Sprite_fy__P168896(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23502,60 +24261,51 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.renderable___181956 = 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__C169327_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__P181962; - case 2: - // jmp value (already in r0) - s.tmp_2 = r0; - s.tmp_3 = scene_Renderable_constructor__P169328_mk(s); - s.tmp_3.arg0 = s.tmp_0; + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + s.tmp_3 = Math_max__P166657_mk(s); + s.tmp_3.arg0 = 0; s.tmp_3.arg1 = s.arg1; - s.tmp_3.arg2 = s.tmp_2; - s.tmp_3.arg3 = s.arg0; - s.callLocIdx = 1133; s.pc = 3; return s.tmp_3; - case 3: + s.callLocIdx = 423; s.pc = 1; return s.tmp_3; + case 1: r0 = s.retval; - s.renderable___181956 = (s.tmp_0); - r0 = s.renderable___181956; + s.tmp_2 = r0; + r0 = (s.tmp_2 * 256); + s.tmp_4 = r0; + r0 = (s.tmp_4 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_fy"] = (s.tmp_1); + r0 = undefined; return leave(s, r0) default: oops() } } } -scene_createRenderable__P169332.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"]} +Sprite_fy__P168896.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 scene_createRenderable__P169332_mk(s) { +function Sprite_fy__P168896_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_createRenderable__P169332, depth: s.depth + 1, + parent: s, fn: Sprite_fy__P168896, depth: s.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___181956: undefined, + tmp_4: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function renderable_inline__P181962(s) { +function Sprite_fy__P168895(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23565,24 +24315,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = true; - return leave(s, r0) + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + r0 = s.arg0.fields["_fy"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -renderable_inline__P181962.info = {"start":875,"length":10,"line":31,"column":32,"endLine":31,"endColumn":42,"fileName":"pxt_modules/game/renderable.ts","functionName":"inline","argumentNames":[]} +Sprite_fy__P168895.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__P168895.isGetter = true; -function renderable_inline__P181962_mk(s) { +function Sprite_fy__P168895_mk(s) { checkStack(s.depth); return { - parent: s, fn: renderable_inline__P181962, depth: s.depth + 1, + parent: s, fn: Sprite_fy__P168895, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, } } -function scene_Renderable_constructor__P169328(s) { +function Sprite_fx__P168894(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23595,43 +24356,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.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_Renderable__C169327_VT)) failedCast(r0); - r0 = (s.arg0).fields["handler"] = (s.arg1); - r0 = (s.arg0).fields["shouldBeVisible"] = (s.arg2); - s.tmp_0 = sprites_BaseSprite_constructor__P168623_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg3; - s.callLocIdx = 1130; s.pc = 1; return s.tmp_0; + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + s.tmp_3 = Math_max__P166657_mk(s); + s.tmp_3.arg0 = 0; + s.tmp_3.arg1 = s.arg1; + s.callLocIdx = 420; 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["_fx"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -scene_Renderable_constructor__P169328.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"]} +Sprite_fx__P168894.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 scene_Renderable_constructor__P169328_mk(s) { +function Sprite_fx__P168894_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Renderable_constructor__P169328, depth: s.depth + 1, + parent: s, fn: Sprite_fx__P168894, depth: s.depth + 1, pc: 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 tiles_TileMap_scale__P169266(s) { +function Sprite_fx__P168893(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23643,47 +24409,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__C169262_VT)) failedCast(r0); - r0 = (s.arg0).fields["_scale"] = (s.arg1); - r0 = s.arg0.fields["_map"]; + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + r0 = s.arg0.fields["_fx"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_1 = tiles_TileMapData_scale__P169249_mk(s); - r0 = s.arg0.fields["_map"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.arg1; - s.callLocIdx = 1037; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; - case 1: - case 2: - r0 = undefined; - return leave(s, r0) + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -tiles_TileMap_scale__P169266.info = {"start":9270,"length":144,"line":314,"column":8,"endLine":319,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"scale","argumentNames":["this","s"]} +Sprite_fx__P168893.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__P168893.isGetter = true; -function tiles_TileMap_scale__P169266_mk(s) { +function Sprite_fx__P168893_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_scale__P169266, depth: s.depth + 1, + parent: s, fn: Sprite_fx__P168893, 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_TileMapData_scale__P169249(s) { +function Sprite_ay__P168892(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23699,25 +24451,27 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMapData__C169244_VT)) failedCast(r0); - r0 = (s.arg0).fields["_scale"] = (s.arg1); + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); + r0 = (s.arg1 * 256); + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["cachedTileView"] = (s.tmp_1); + r0 = (s.tmp_0).fields["_ay"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -tiles_TileMapData_scale__P169249.info = {"start":6640,"length":102,"line":226,"column":8,"endLine":229,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"scale","argumentNames":["this","s"]} +Sprite_ay__P168892.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_TileMapData_scale__P169249_mk(s) { +function Sprite_ay__P168892_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMapData_scale__P169249, depth: s.depth + 1, + parent: s, fn: Sprite_ay__P168892, 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, } } @@ -23726,7 +24480,7 @@ function tiles_TileMapData_scale__P169249_mk(s) { -function sprites_destroy__P168804(s) { +function Sprite_ay__P168891(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23738,51 +24492,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 = pxsim_numops_toBoolDecr(s.arg0); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + r0 = s.arg0.fields["_ay"]; 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 = Sprite_destroy__P168955_mk(s); - s.tmp_2.arg0 = s.arg0; - s.tmp_2.arg1 = s.arg1; - s.tmp_2.arg2 = s.arg2; - s.callLocIdx = 400; s.pc = 4; return s.tmp_2; - case 4: - r0 = s.retval; - case 3: - r0 = undefined; - return leave(s, r0) + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -sprites_destroy__P168804.info = {"start":2047,"length":170,"line":70,"column":4,"endLine":73,"endColumn":5,"fileName":"pxt_modules/game/sprites.ts","functionName":"destroy","argumentNames":["sprite","effect","duration"]} +Sprite_ay__P168891.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__P168891.isGetter = true; -function sprites_destroy__P168804_mk(s) { +function Sprite_ay__P168891_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_destroy__P168804, depth: s.depth + 1, + parent: s, fn: Sprite_ay__P168891, 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 Sprite_destroy__P168955(s) { +function Sprite_ax__P168890(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23795,71 +24531,77 @@ 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__C168868_VT)) failedCast(r0); - r0 = s.arg0.fields["flags"]; + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg1 * 256); + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); s.tmp_1 = r0; - r0 = (s.tmp_1 & 2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 5; continue; } - case 1: - case 2: - s.tmp_2 = 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__P169792_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 = 535; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - { step = 4; continue; } - case 3: - s.tmp_0 = Sprite__destroyCore__P168956_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 536; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - case 4: - case 5: + r0 = (s.tmp_0).fields["_ax"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_destroy__P168955.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"]} +Sprite_ax__P168890.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 Sprite_destroy__P168955_mk(s) { +function Sprite_ax__P168890_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_destroy__P168955, depth: s.depth + 1, + parent: s, fn: Sprite_ax__P168890, depth: s.depth + 1, pc: 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__P169792(s) { +function Sprite_ax__P168889(s) { +let r0 = s.r0, 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__C168868_VT)) failedCast(r0); + r0 = s.arg0.fields["_ax"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) + default: oops() +} } } +Sprite_ax__P168889.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__P168889.isGetter = true; + +function Sprite_ax__P168889_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Sprite_ax__P168889, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function Sprite_vy__P168888(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23872,85 +24614,39 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, effects_ParticleEffect__C169789_VT)) failedCast(r0); - s.tmp_0 = Sprite_setFlag__P168946_mk(s); - s.tmp_0.arg0 = s.arg1; - s.tmp_0.arg1 = 7168; - s.tmp_0.arg2 = true; - s.callLocIdx = 1675; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.tmp_0 = effects_ParticleEffect_start__P169791_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); + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg1 * 256); 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 = 1676; 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 >> 2); - case 2: - // jmp value (already in r0) + r0 = (s.tmp_2 | 0); s.tmp_1 = r0; - r0 = (s.arg1).fields["lifespan"] = (s.tmp_1); - s.tmp_0 = effects_ImageEffect_applyTo__P169819_mk(s); - s.tmp_0.arg0 = globals.dissolve___169822; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 1677; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; + r0 = (s.tmp_0).fields["_vy"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -effects_ParticleEffect_destroy__P169792.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"]} +Sprite_vy__P168888.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 effects_ParticleEffect_destroy__P169792_mk(s) { +function Sprite_vy__P168888_mk(s) { checkStack(s.depth); return { - parent: s, fn: effects_ParticleEffect_destroy__P169792, depth: s.depth + 1, + parent: s, fn: Sprite_vy__P168888, depth: s.depth + 1, pc: 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__P182098(s) { +function Sprite_vx__P168886(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23960,96 +24656,33 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.i___182101 = undefined; - s.x___182112 = undefined; - s.y___182118 = undefined; - s.w___182124 = undefined; - s.h___182128 = 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); + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg1 * 256); s.tmp_2 = r0; - r0 = (s.tmp_1 * s.tmp_2); - s.tmp_0 = r0; - r0 = (s.tmp_0 >> 5); - s.i___182101 = (r0); - case 1: - r0 = (s.i___182101 > 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.tmp_1 = Math_FastRandom_randomRange__P169590_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 = 53; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; - s.x___182112 = (r0); - s.tmp_0 = Math_FastRandom_randomRange__P169590_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 = 54; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - s.y___182118 = (r0); - s.tmp_0 = Math_FastRandom_randomRange__P169590_mk(s); - s.tmp_0.arg0 = s.arg1; - s.tmp_0.arg1 = 1; - s.tmp_0.arg2 = 3; - s.callLocIdx = 55; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - s.w___182124 = (r0); - s.tmp_0 = Math_FastRandom_randomRange__P169590_mk(s); - s.tmp_0.arg0 = s.arg1; - s.tmp_0.arg1 = 1; - s.tmp_0.arg2 = 3; - s.callLocIdx = 56; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.h___182128 = (r0); - s.tmp_0 = helpers_imageDrawRect__P168486_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.x___182112; - s.tmp_0.arg2 = s.y___182118; - s.tmp_0.arg3 = s.w___182124; - s.tmp_0.arg4 = s.h___182128; - s.tmp_0.arg5 = 0; - s.callLocIdx = 57; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - r0 = (s.i___182101 - 1); - s.i___182101 = (r0); - { step = 1; continue; } - case 2: + r0 = (s.tmp_2 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_vx"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -dissolve_inline__P182098.info = {"start":2199,"length":360,"line":60,"column":49,"endLine":69,"endColumn":5,"fileName":"pxt_modules/game/effects.ts","functionName":"inline","argumentNames":["input","r"]} +Sprite_vx__P168886.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 dissolve_inline__P182098_mk(s) { +function Sprite_vx__P168886_mk(s) { checkStack(s.depth); return { - parent: s, fn: dissolve_inline__P182098, depth: s.depth + 1, + parent: s, fn: Sprite_vx__P168886, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - i___182101: undefined, - x___182112: undefined, - y___182118: undefined, - w___182124: undefined, - h___182128: undefined, arg0: undefined, arg1: undefined, } } @@ -24058,7 +24691,7 @@ function dissolve_inline__P182098_mk(s) { -function helpers_imageDrawRect__P168486(s) { +function sprites_BaseSprite_constructor__P168623(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24071,107 +24704,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.lambdaArgs = null; } - r0 = (s.arg3 == 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } - case 1: - r0 = (s.arg4 == 0); - case 2: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 3; continue; } - { step = 5; continue; } - case 3: - case 4: - r0 = (s.arg3 - 1); - s.arg3 = (r0); - r0 = (s.arg4 - 1); - s.arg4 = (r0); - s.tmp_0 = helpers_imageDrawLine__P168485_mk(s); + r0 = s.arg0; + if (!checkSubtype(r0, sprites_BaseSprite__C168621_VT)) failedCast(r0); + s.tmp_0 = sprites_BaseSprite_z__P168626_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 = 153; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.tmp_0 = helpers_imageDrawLine__P168485_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 = 154; s.pc = 7; return s.tmp_0; - case 7: + s.callLocIdx = 201; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - s.tmp_0 = helpers_imageDrawLine__P168485_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 = 155; s.pc = 8; return s.tmp_0; - case 8: + s.tmp_0 = scene_Scene_addSprite__P169397_mk(s); + s.tmp_1 = game_currentScene__P169526_mk(s); + s.callLocIdx = 202; s.pc = 3; return s.tmp_1; + case 3: r0 = s.retval; - s.tmp_0 = helpers_imageDrawLine__P168485_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 = 156; s.pc = 9; return s.tmp_0; - case 9: + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 203; s.pc = 2; return s.tmp_0; + case 2: r0 = s.retval; - case 5: r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_imageDrawRect__P168486.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"]} +sprites_BaseSprite_constructor__P168623.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 helpers_imageDrawRect__P168486_mk(s) { +function sprites_BaseSprite_constructor__P168623_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_imageDrawRect__P168486, depth: s.depth + 1, + parent: s, fn: sprites_BaseSprite_constructor__P168623, 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 Math_FastRandom_randomRange__P169590(s) { +function scene_Scene_addSprite__P169397(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24184,59 +24758,56 @@ 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__C169586_VT)) failedCast(r0); - r0 = (s.arg2 > s.arg1); + if (!checkSubtype(r0, scene_Scene__C169370_VT)) failedCast(r0); + r0 = s.arg0.fields["allSprites"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_2 = Math_FastRandom_next__P169589_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 1392; s.pc = 3; return s.tmp_2; - case 3: - r0 = s.retval; + r0 = pxsim_Array__push(s.tmp_0, s.arg1); + s.tmp_0 = r0 = s.arg0; + r0 = s.tmp_0.fields["spriteNextId"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + 1); s.tmp_1 = r0; - r0 = (s.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; } + 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 = 1159; s.pc = 1; return s.tmp_3; } + } case 1: - r0 = 0; - case 2: - // jmp value (already in r0) - s.tmp_5 = r0; - r0 = (s.arg1 + s.tmp_5); + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -Math_FastRandom_randomRange__P169590.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_Scene_addSprite__P169397.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 Math_FastRandom_randomRange__P169590_mk(s) { +function scene_Scene_addSprite__P169397_mk(s) { checkStack(s.depth); return { - parent: s, fn: Math_FastRandom_randomRange__P169590, depth: s.depth + 1, + parent: s, fn: scene_Scene_addSprite__P169397, depth: s.depth + 1, pc: 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__P169589(s) { +function sprites_BaseSprite_z__P168626(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24248,53 +24819,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, Math_FastRandom__C169586_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["lfsr"]; + if (!checkSubtype(r0, sprites_BaseSprite__C168621_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["_z"] = (s.arg1); + s.tmp_1 = game_currentScene__P169526_mk(s); + s.callLocIdx = 204; s.pc = 3; return s.tmp_1; + case 3: + r0 = s.retval; + s.tmp_0 = r0; + r0 = s.tmp_0.fields["flags"]; s.tmp_3 = r0; - r0 = (s.tmp_3 >> 1); + r0 = (s.tmp_3 | 1); s.tmp_2 = r0; - r0 = s.arg0.fields["lfsr"]; - s.tmp_7 = r0; - r0 = (s.tmp_7 & 1); - s.tmp_6 = r0; - r0 = (0 - s.tmp_6); - s.tmp_5 = r0; - r0 = (s.tmp_5 & 46080); - s.tmp_4 = r0; - r0 = (s.tmp_2 ^ s.tmp_4); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["lfsr"] = (s.tmp_1); - r0 = s.tmp_1; + r0 = (s.tmp_0).fields["flags"] = (s.tmp_2); + case 1: + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -Math_FastRandom_next__P169589.info = {"start":1713,"length":107,"line":53,"column":8,"endLine":55,"endColumn":9,"fileName":"pxt_modules/game/mathUtil.ts","functionName":"next","argumentNames":["this"]} +sprites_BaseSprite_z__P168626.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 Math_FastRandom_next__P169589_mk(s) { +function sprites_BaseSprite_z__P168626_mk(s) { checkStack(s.depth); return { - parent: s, fn: Math_FastRandom_next__P169589, depth: s.depth + 1, + parent: s, fn: sprites_BaseSprite_z__P168626, depth: s.depth + 1, pc: 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 effects_ImageEffect_constructor__P169818(s) { +function sprites_BaseSprite_z__P168625(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24306,47 +24878,68 @@ 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__C169817_VT)) failedCast(r0); - r0 = (s.arg0).fields["effect"] = (s.arg2); - r0 = pxsim_pxtcore_mkClassInstance(Math_FastRandom__C169586_VT); - s.tmp_0 = r0; - s.tmp_1 = Math_FastRandom_constructor__P169588_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = undefined; - s.callLocIdx = 1693; s.pc = 1; return s.tmp_1; + if (!checkSubtype(r0, sprites_BaseSprite__C168621_VT)) failedCast(r0); + r0 = s.arg0.fields["_z"]; + return leaveAccessor(s, r0) + default: oops() +} } } +sprites_BaseSprite_z__P168625.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__P168625.isGetter = true; + +function sprites_BaseSprite_z__P168625_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: sprites_BaseSprite_z__P168625, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function helpers_getTilemapByName__P169862(s) { +let r0 = s.r0, 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 = helpers__getFactoryInstance__P169860_mk(s); + s.tmp_0.arg0 = "tilemap"; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 1715; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - r0 = (s.arg0).fields["fastRandom"] = (s.tmp_0); - r0 = (s.arg0).fields["preferredDelay"] = (s.arg1); - r0 = (s.arg0).fields["times"] = (undefined); - r0 = undefined; return leave(s, r0) default: oops() } } } -effects_ImageEffect_constructor__P169818.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"]} +helpers_getTilemapByName__P169862.info = {"start":2768,"length":107,"line":83,"column":4,"endLine":85,"endColumn":5,"fileName":"pxt_modules/game/assetTemplates.ts","functionName":"getTilemapByName","argumentNames":["name"]} -function effects_ImageEffect_constructor__P169818_mk(s) { +function helpers_getTilemapByName__P169862_mk(s) { checkStack(s.depth); return { - parent: s, fn: effects_ImageEffect_constructor__P169818, depth: s.depth + 1, + parent: s, fn: helpers_getTilemapByName__P169862, 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 effects_ImageEffect_applyTo__P169819(s) { +function helpers__getFactoryInstance__P169860(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24356,63 +24949,86 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.clonedImage___182262 = undefined; + s.factory___181568 = undefined; + s.unnamed838___U1 = undefined; + s.unnamed839___U2 = undefined; + s.data___181575 = 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__C169817_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; } + r0 = pxsim_numops_toBoolDecr(globals.factories___172876); + if (!r0) { step = 7; continue; } + s.factory___181568 = (undefined); + s.unnamed838___U1 = (globals.factories___172876); + s.unnamed839___U2 = (0); case 1: - r0 = s.arg1.fields["_image"]; + s.tmp_0 = r0 = s.unnamed839___U2; + r0 = pxsim_Array__length(s.unnamed838___U1); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 6; continue; } + r0 = pxsim_Array__getAt(s.unnamed838___U1, s.unnamed839___U2); + s.factory___181568 = (r0); + s.tmp_4 = if_kind_1_mk(s); + s.tmp_4.arg0 = s.factory___181568; + if (!s.tmp_4.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_4.arg0, "kind"); + } else { + s.tmp_4.fn = s.tmp_4.arg0.vtable.iface["kind"]; + if (s.tmp_4.fn == null) { s.retval = s.tmp_4.arg0.fields["kind"]; } + else if (!s.tmp_4.fn.isGetter) { s.retval = bind(s.tmp_4); } + else { s.callLocIdx = 1713; s.pc = 10; return s.tmp_4; } + } + case 10: + r0 = s.retval; s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); + r0 = (s.tmp_3 === s.arg0); s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 4; continue; } + s.tmp_5 = if_factory_2_mk(s); + s.tmp_5.arg0 = s.factory___181568; + s.tmp_5.arg1 = s.arg1; + if (!s.tmp_5.arg0.vtable.iface) { + setupLambda(s.tmp_5, pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "factory"), 2); + s.callLocIdx = 1714; s.pc = 11; return s.tmp_5; + } else { + s.tmp_5.fn = s.tmp_5.arg0.vtable.iface["factory"]; + if (s.tmp_5.fn == null) { setupLambda(s.tmp_5, s.tmp_5.arg0.fields["factory"], 2); s.callLocIdx = 1714; s.pc = 11; return s.tmp_5; } + else if (s.tmp_5.fn.isGetter) { s.tmp_5.stage2Call = true; s.callLocIdx = 1714; s.pc = 11; return s.tmp_5;; } + else { s.callLocIdx = 1714; s.pc = 11; return s.tmp_5; } + } + case 11: + r0 = s.retval; + s.data___181575 = (r0); + r0 = pxsim_numops_toBoolDecr(s.data___181575); + if (!r0) { step = 2; continue; } + r0 = s.data___181575; + { step = 9; continue; } 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___182262 = (r0); - s.tmp_0 = effects_ImageEffect_change__P169820_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.clonedImage___182262; - s.callLocIdx = 1696; s.pc = 6; return s.tmp_0; + case 5: + r0 = (s.unnamed839___U2 + 1); + s.unnamed839___U2 = (r0); + { step = 1; continue; } case 6: - r0 = s.retval; - s.tmp_0 = Sprite_setImage__P168918_mk(s); - s.tmp_0.arg0 = s.arg1; - s.tmp_0.arg1 = s.clonedImage___182262; - s.callLocIdx = 1697; s.pc = 7; return s.tmp_0; + s.unnamed838___U1 = (undefined); case 7: - r0 = s.retval; - case 5: - r0 = undefined; + case 8: + r0 = null; + case 9: return leave(s, r0) default: oops() } } } -effects_ImageEffect_applyTo__P169819.info = {"start":823,"length":218,"line":21,"column":8,"endLine":26,"endColumn":9,"fileName":"pxt_modules/game/effects.ts","functionName":"applyTo","argumentNames":["this","sprite"]} +helpers__getFactoryInstance__P169860.info = {"start":2226,"length":348,"line":66,"column":4,"endLine":76,"endColumn":5,"fileName":"pxt_modules/game/assetTemplates.ts","functionName":"_getFactoryInstance","argumentNames":["kind","name"]} -function effects_ImageEffect_applyTo__P169819_mk(s) { +function helpers__getFactoryInstance__P169860_mk(s) { checkStack(s.depth); return { - parent: s, fn: effects_ImageEffect_applyTo__P169819, depth: s.depth + 1, + parent: s, fn: helpers__getFactoryInstance__P169860, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -24420,7 +25036,10 @@ function effects_ImageEffect_applyTo__P169819_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - clonedImage___182262: undefined, + factory___181568: undefined, + unnamed838___U1: undefined, + unnamed839___U2: undefined, + data___181575: undefined, arg0: undefined, arg1: undefined, } } @@ -24429,7 +25048,7 @@ function effects_ImageEffect_applyTo__P169819_mk(s) { -function effects_ImageEffect_change__P169820(s) { +function tilemap__P169848(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24444,36 +25063,17 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, effects_ImageEffect__C169817_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 = 1698; 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 = 1698; s.pc = 1; return s.tmp_0; } - else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 1698; s.pc = 1; return s.tmp_0;; } - else { s.callLocIdx = 1698; s.pc = 1; return s.tmp_0; } - } - case 1: - r0 = s.retval; - r0 = undefined; + r0 = null; return leave(s, r0) default: oops() } } } -effects_ImageEffect_change__P169820.info = {"start":1151,"length":81,"line":32,"column":8,"endLine":34,"endColumn":9,"fileName":"pxt_modules/game/effects.ts","functionName":"change","argumentNames":["this","input"]} +tilemap__P169848.info = {"start":99,"length":78,"line":3,"column":0,"endLine":3,"endColumn":78,"fileName":"pxt_modules/game/assetTemplates.ts","functionName":"tilemap","argumentNames":["lits","args"]} -function effects_ImageEffect_change__P169820_mk(s) { +function tilemap__P169848_mk(s) { checkStack(s.depth); return { - parent: s, fn: effects_ImageEffect_change__P169820, depth: s.depth + 1, + parent: s, fn: tilemap__P169848, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, arg1: undefined, } } @@ -24482,7 +25082,7 @@ function effects_ImageEffect_change__P169820_mk(s) { -function effects_ParticleEffect_start__P169791(s) { +function tiles_setCurrentTilemap__P169291(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24492,112 +25092,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.src___182287 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, effects_ParticleEffect__C169789_VT)) failedCast(r0); - r0 = s.arg0.fields["sourceFactory"]; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 9; continue; } + s.tmp_0 = scene_setTileMapLevel__P169415_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1101; s.pc = 1; return s.tmp_0; 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 = 1673; 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 = 1673; s.pc = 10; return s.tmp_4; } - else if (s.tmp_4.fn.isGetter) { s.tmp_4.stage2Call = true; s.callLocIdx = 1673; s.pc = 10; return s.tmp_4;; } - else { s.callLocIdx = 1673; s.pc = 10; return s.tmp_4; } - } - case 10: - r0 = s.retval; - s.src___182287 = (r0); - s.tmp_0 = particles_ParticleSource_setRelativeToCamera__P169689_mk(s); - s.tmp_0.arg0 = s.src___182287; - 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 = 1674; 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); - 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___182287).fields["lifespan"] = (s.tmp_1); - case 7: - case 8: - case 9: r0 = undefined; return leave(s, r0) default: oops() } } } -effects_ParticleEffect_start__P169791.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"]} +tiles_setCurrentTilemap__P169291.info = {"start":19775,"length":103,"line":614,"column":4,"endLine":616,"endColumn":5,"fileName":"pxt_modules/game/tilemap.ts","functionName":"setCurrentTilemap","argumentNames":["tilemap"]} -function effects_ParticleEffect_start__P169791_mk(s) { +function tiles_setCurrentTilemap__P169291_mk(s) { checkStack(s.depth); return { - parent: s, fn: effects_ParticleEffect_start__P169791, depth: s.depth + 1, + parent: s, fn: tiles_setCurrentTilemap__P169291, depth: s.depth + 1, pc: 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___182287: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, } } -function particles_ParticleSource_setRelativeToCamera__P169689(s) { +function scene_setTileMapLevel__P169415(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24607,59 +25130,67 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.scene___181590 = 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__C169678_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_0 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1172; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.scene___181590 = (r0); + r0 = s.scene___181590.fields["tileMap"]; s.tmp_2 = r0; - r0 = (s.tmp_2 | 4); + r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["pFlags"] = (s.tmp_1); - { step = 2; continue; } - case 1: - s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["pFlags"]; - s.tmp_4 = r0; - r0 = (~ 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(tiles_TileMap__C169262_VT); 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); + s.tmp_4 = tiles_TileMap_constructor__P169264_mk(s); + s.tmp_4.arg0 = s.tmp_3; + s.tmp_4.arg1 = 4; + s.callLocIdx = 1173; s.pc = 4; return s.tmp_4; + case 4: + r0 = s.retval; + r0 = (s.scene___181590).fields["tileMap"] = (s.tmp_3); + case 1: case 2: + s.tmp_0 = tiles_TileMap_setData__P169275_mk(s); + r0 = s.scene___181590.fields["tileMap"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 1174; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ParticleSource_setRelativeToCamera__P169689.info = {"start":6439,"length":173,"line":211,"column":8,"endLine":214,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"setRelativeToCamera","argumentNames":["this","on"]} +scene_setTileMapLevel__P169415.info = {"start":3018,"length":219,"line":113,"column":4,"endLine":118,"endColumn":5,"fileName":"pxt_modules/game/scenes.ts","functionName":"setTileMapLevel","argumentNames":["map"]} -function particles_ParticleSource_setRelativeToCamera__P169689_mk(s) { +function scene_setTileMapLevel__P169415_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_setRelativeToCamera__P169689, depth: s.depth + 1, + parent: s, fn: scene_setTileMapLevel__P169415, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, + scene___181590: undefined, arg0: undefined, - arg1: undefined, } } -function Sprite_setFlag__P168946(s) { +function tiles_TileMap_setData__P169275(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24669,198 +25200,189 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.previous___181607 = undefined; + s.eventHandler___181620 = undefined; + s.unnamed826___U2 = undefined; + s.unnamed827___U3 = undefined; + s.eventHandler___181649 = undefined; + s.unnamed828___U5 = undefined; + s.unnamed829___U6 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(s.arg2); - if (!r0) { step = 1; continue; } - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["flags"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 | s.arg1); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["flags"] = (s.tmp_1); - { step = 2; continue; } - case 1: - s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["flags"]; - s.tmp_4 = r0; - r0 = (~ s.tmp_4); - s.tmp_3 = r0; - r0 = (s.tmp_3 | s.arg1); - s.tmp_2 = r0; - r0 = (~ s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["flags"] = (s.tmp_1); - case 2: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -Sprite_setFlag__P168946.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 Sprite_setFlag__P168946_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Sprite_setFlag__P168946, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, -} } - - - - - -function Sprite__destroyCore__P168956(s) { -let r0 = s.r0, 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___182023 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_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__P169526_mk(s); - s.callLocIdx = 537; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - s.scene___182023 = (r0); - r0 = s.scene___182023.fields["allSprites"]; - s.tmp_0 = r0; - r0 = pxsim_Array_.removeElement(s.tmp_0, s.arg0); - r0 = s.arg0.fields["_kind"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 >= 0); + if (!checkSubtype(r0, tiles_TileMap__C169262_VT)) failedCast(r0); + r0 = s.arg0.fields["_map"]; + s.previous___181607 = (r0); + r0 = s.arg0.fields["handlerState"]; 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___182023.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); + r0 = (s.previous___181607 !== s.arg1); 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__P168997_mk(s); - r0 = s.scene___182023.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 = 541; s.pc = 8; return s.tmp_5; - case 8: - r0 = s.retval; + s.tmp_1 = r0; + r0 = pxsim_numops_toBool(s.tmp_1); + if (r0) { step = 3; continue; } + r0 = s.tmp_1; + { step = 4; continue; } case 3: + r0 = s.previous___181607; case 4: - s.tmp_0 = PhysicsEngine__C169038_v1_2_mk(s); - r0 = s.scene___182023.fields["physicsEngine"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.arg0; - if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C169038_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 = 542; s.pc = 10; return s.tmp_1; + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 9; continue; } + s.eventHandler___181620 = (undefined); + r0 = s.arg0.fields["handlerState"]; + s.unnamed826___U2 = (r0); + s.unnamed827___U3 = (0); + case 5: + s.tmp_0 = r0 = s.unnamed827___U3; + r0 = pxsim_Array__length(s.unnamed826___U2); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 8; continue; } + r0 = pxsim_Array__getAt(s.unnamed826___U2, s.unnamed827___U3); + s.eventHandler___181620 = (r0); + r0 = s.eventHandler___181620.fields["event"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 === 1); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 6; continue; } + s.tmp_4 = if_callback_2_mk(s); + s.tmp_4.arg0 = s.eventHandler___181620; + s.tmp_4.arg1 = s.previous___181607; + if (!s.tmp_4.arg0.vtable.iface) { + setupLambda(s.tmp_4, pxsim_pxtrt.mapGetByString(s.tmp_4.arg0, "callback"), 2); + s.callLocIdx = 1048; s.pc = 23; return s.tmp_4; } 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 = 542; s.pc = 10; return s.tmp_1; } - else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 542; s.pc = 10; return s.tmp_1;; } - else { s.callLocIdx = 542; s.pc = 10; return s.tmp_1; } + s.tmp_4.fn = s.tmp_4.arg0.vtable.iface["callback"]; + if (s.tmp_4.fn == null) { setupLambda(s.tmp_4, s.tmp_4.arg0.fields["callback"], 2); s.callLocIdx = 1048; s.pc = 23; return s.tmp_4; } + else if (s.tmp_4.fn.isGetter) { s.tmp_4.stage2Call = true; s.callLocIdx = 1048; s.pc = 23; return s.tmp_4;; } + else { s.callLocIdx = 1048; s.pc = 23; return s.tmp_4; } } - case 10: + case 23: r0 = s.retval; - case 5: case 6: - r0 = pxsim_pxtcore_mkAction(1, forEach_inline__P182052); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - r0 = pxsim_pxtcore_mkAction(1, Sprite__destroyCore_inline__P182058); + case 7: + r0 = (s.unnamed827___U3 + 1); + s.unnamed827___U3 = (r0); + { step = 5; continue; } + case 8: + s.unnamed826___U2 = (undefined); + case 9: + case 10: + r0 = (s.arg0).fields["_map"] = (s.arg1); + r0 = pxsim_numops_toBoolDecr(s.arg1); + if (!r0) { step = 11; continue; } + s.tmp_0 = r0 = s.arg0; + r0 = s.arg1.fields["_scale"]; s.tmp_1 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.arg0); - s.tmp_2 = helpers_arrayForEach__P166636_mk(s); - s.tmp_3 = helpers_arrayFilter__P166637_mk(s); - r0 = s.scene___182023.fields["destroyedHandlers"]; - s.tmp_3.arg0 = r0; - s.tmp_3.arg1 = s.tmp_0; - s.callLocIdx = 544; 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 = 546; s.pc = 11; return s.tmp_2; + r0 = (s.tmp_0).fields["_scale"] = (s.tmp_1); case 11: + case 12: + r0 = s.arg0.fields["handlerState"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 13; continue; } + r0 = s.tmp_0; + { step = 14; continue; } + case 13: + r0 = (s.previous___181607 !== s.arg1); + case 14: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBool(s.tmp_1); + if (r0) { step = 15; continue; } + r0 = s.tmp_1; + { step = 16; continue; } + case 15: + r0 = s.arg1; + case 16: + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 21; continue; } + s.eventHandler___181649 = (undefined); + r0 = s.arg0.fields["handlerState"]; + s.unnamed828___U5 = (r0); + s.unnamed829___U6 = (0); + case 17: + s.tmp_0 = r0 = s.unnamed829___U6; + r0 = pxsim_Array__length(s.unnamed828___U5); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 20; continue; } + r0 = pxsim_Array__getAt(s.unnamed828___U5, s.unnamed829___U6); + s.eventHandler___181649 = (r0); + r0 = s.eventHandler___181649.fields["event"]; + 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; } + s.tmp_4 = if_callback_2_mk(s); + s.tmp_4.arg0 = s.eventHandler___181649; + s.tmp_4.arg1 = s.arg1; + if (!s.tmp_4.arg0.vtable.iface) { + setupLambda(s.tmp_4, pxsim_pxtrt.mapGetByString(s.tmp_4.arg0, "callback"), 2); + s.callLocIdx = 1050; s.pc = 24; return s.tmp_4; + } else { + s.tmp_4.fn = s.tmp_4.arg0.vtable.iface["callback"]; + if (s.tmp_4.fn == null) { setupLambda(s.tmp_4, s.tmp_4.arg0.fields["callback"], 2); s.callLocIdx = 1050; s.pc = 24; return s.tmp_4; } + else if (s.tmp_4.fn.isGetter) { s.tmp_4.stage2Call = true; s.callLocIdx = 1050; s.pc = 24; return s.tmp_4;; } + else { s.callLocIdx = 1050; s.pc = 24; return s.tmp_4; } + } + case 24: r0 = s.retval; + case 18: + case 19: + r0 = (s.unnamed829___U6 + 1); + s.unnamed829___U6 = (r0); + { step = 17; continue; } + case 20: + s.unnamed828___U5 = (undefined); + case 21: + case 22: r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite__destroyCore__P168956.info = {"start":26792,"length":522,"line":870,"column":4,"endLine":882,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"_destroyCore","argumentNames":["this"]} +tiles_TileMap_setData__P169275.info = {"start":10253,"length":807,"line":355,"column":8,"endLine":378,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"setData","argumentNames":["this","map"]} -function Sprite__destroyCore__P168956_mk(s) { +function tiles_TileMap_setData__P169275_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite__destroyCore__P168956, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_setData__P169275, depth: s.depth + 1, pc: 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___182023: undefined, + previous___181607: undefined, + eventHandler___181620: undefined, + unnamed826___U2: undefined, + unnamed827___U3: undefined, + eventHandler___181649: undefined, + unnamed828___U5: undefined, + unnamed829___U6: undefined, arg0: undefined, + arg1: undefined, } } -function forEach_inline__P182052(s) { +function tiles_TileMapData_scale__P169248(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24874,23 +25396,20 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0.fields["kind"]; - s.tmp_0 = r0; - r0 = s.caps[0].fields["_kind"]; - s.tmp_1 = r0; - r0 = (s.tmp_0 == s.tmp_1); - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMapData__C169244_VT)) failedCast(r0); + r0 = s.arg0.fields["_scale"]; + return leaveAccessor(s, r0) default: oops() } } } -forEach_inline__P182052.info = {"start":27237,"length":26,"line":880,"column":20,"endLine":880,"endColumn":46,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["h"]} +tiles_TileMapData_scale__P169248.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__P169248.isGetter = true; -function forEach_inline__P182052_mk(s) { +function tiles_TileMapData_scale__P169248_mk(s) { checkStack(s.depth); return { - parent: s, fn: forEach_inline__P182052, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_scale__P169248, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, arg0: undefined, } } @@ -24898,7 +25417,7 @@ function forEach_inline__P182052_mk(s) { -function Sprite__destroyCore_inline__P182058(s) { +function tiles_TileMap_constructor__P169264(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24910,69 +25429,46 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = if_handler_2_mk(s); + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMap__C169262_VT)) failedCast(r0); + r0 = (s.arg0).fields["_layer"] = (1); + s.tmp_0 = tiles_TileMap_scale__P169266_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 = 545; 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 = 545; s.pc = 1; return s.tmp_0; } - else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 545; s.pc = 1; return s.tmp_0;; } - else { s.callLocIdx = 545; s.pc = 1; return s.tmp_0; } - } + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 1034; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, tiles_TileMap_inline__P181675); + 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__P169332_mk(s); + s.tmp_3.arg0 = -1; + s.tmp_3.arg1 = s.tmp_0; + s.tmp_3.arg2 = undefined; + s.callLocIdx = 1036; 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); r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite__destroyCore_inline__P182058.info = {"start":27286,"length":20,"line":881,"column":21,"endLine":881,"endColumn":41,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["h"]} +tiles_TileMap_constructor__P169264.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 Sprite__destroyCore_inline__P182058_mk(s) { +function tiles_TileMap_constructor__P169264_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite__destroyCore_inline__P182058, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_constructor__P169264, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - arg0: undefined, -} } - - - - - -function PhysicsEngine_removeSprite__P169041(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, PhysicsEngine__C169038_VT)) failedCast(r0); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -PhysicsEngine_removeSprite__P169041.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 PhysicsEngine_removeSprite__P169041_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: PhysicsEngine_removeSprite__P169041, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, arg0: undefined, arg1: undefined, } } @@ -24981,41 +25477,7 @@ function PhysicsEngine_removeSprite__P169041_mk(s) { -function Sprite_kind__P168934(s) { -let r0 = s.r0, 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__C168868_VT)) failedCast(r0); - r0 = s.arg0.fields["_kind"]; - return leave(s, r0) - default: oops() -} } } -Sprite_kind__P168934.info = {"start":12573,"length":41,"line":453,"column":4,"endLine":455,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"kind","argumentNames":["this"]} - -function Sprite_kind__P168934_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Sprite_kind__P168934, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function Render_move__P171832(s) { +function tiles_TileMap_inline__P181675(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25028,39 +25490,36 @@ 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 = Render_RayCastingRender_move__P171778_mk(s); - s.tmp_0.arg0 = globals.raycastingRender___171795; + s.tmp_0 = tiles_TileMap_draw__P172386_mk(s); + s.tmp_0.arg0 = s.caps[0]; s.tmp_0.arg1 = s.arg0; s.tmp_0.arg2 = s.arg1; - s.tmp_0.arg3 = s.arg2; - s.callLocIdx = 2079; s.pc = 1; return s.tmp_0; + s.callLocIdx = 1035; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -Render_move__P171832.info = {"start":14015,"length":112,"line":378,"column":4,"endLine":380,"endColumn":5,"fileName":"pxt_modules/pxt-raycasting/render_blocks.ts","functionName":"move","argumentNames":["sprite","v","a"]} +tiles_TileMap_inline__P181675.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 Render_move__P171832_mk(s) { +function tiles_TileMap_inline__P181675_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_move__P171832, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_inline__P181675, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function Render_RayCastingRender_move__P171778(s) { +function tiles_TileMap_draw__P172386(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25070,62 +25529,333 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.motionZ___182357 = undefined; + s.bitmask___181686 = undefined; + s.offsetX___181692 = undefined; + s.offsetY___181697 = undefined; + s.x0___181702 = undefined; + s.xn___181709 = undefined; + s.y0___181726 = undefined; + s.yn___181733 = undefined; + s.x___181750 = undefined; + s.y___181756 = undefined; + s.index___181762 = undefined; + s.tile___181769 = undefined; + s.x___181805 = undefined; + s.xLine___181811 = undefined; + s.y___181837 = undefined; + s.yLine___181843 = 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, Render_RayCastingRender__C171738_VT)) failedCast(r0); - s.tmp_0 = Render_RayCastingRender_getMotionZ__P171773_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.tmp_0.arg2 = 0; - s.callLocIdx = 1947; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.motionZ___182357 = (r0); - s.tmp_0 = r0 = s.motionZ___182357; - r0 = (s.arg2 * 256); + if (!checkSubtype(r0, tiles_TileMap__C169262_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 = (s.tmp_2 | 0); + r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["v"] = (s.tmp_1); - s.tmp_0 = r0 = s.motionZ___182357; - r0 = (s.arg3 * 256); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); + 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___181686 = (r0); + r0 = s.arg2.fields["drawOffsetX"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 & s.bitmask___181686); + s.offsetX___181692 = (r0); + r0 = s.arg2.fields["drawOffsetY"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 & s.bitmask___181686); + s.offsetY___181697 = (r0); + s.tmp_0 = Math_max__P166657_mk(s); + s.tmp_0.arg0 = 0; + r0 = s.arg2.fields["drawOffsetX"]; s.tmp_1 = r0; - r0 = (s.tmp_0).fields["a"] = (s.tmp_1); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -Render_RayCastingRender_move__P171778.info = {"start":6419,"length":167,"line":203,"column":8,"endLine":208,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"move","argumentNames":["this","spr","v","a"]} + r0 = s.arg0.fields["_scale"]; + s.tmp_2 = r0; + r0 = (s.tmp_1 >> s.tmp_2); + s.tmp_0.arg1 = r0; + s.callLocIdx = 1057; s.pc = 24; return s.tmp_0; + case 24: + r0 = s.retval; + s.x0___181702 = (r0); + s.tmp_0 = Math_min__P166658_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 = 1060; s.pc = 25; return s.tmp_0; + case 25: + r0 = s.retval; + s.xn___181709 = (r0); + s.tmp_0 = Math_max__P166657_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 = 1062; s.pc = 26; return s.tmp_0; + case 26: + r0 = s.retval; + s.y0___181726 = (r0); + s.tmp_0 = Math_min__P166658_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 = 1065; s.pc = 27; return s.tmp_0; + case 27: + r0 = s.retval; + s.yn___181733 = (r0); + s.x___181750 = (s.x0___181702); + case 3: + r0 = (s.x___181750 <= s.xn___181709); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 8; continue; } + s.y___181756 = (s.y0___181726); + case 4: + r0 = (s.y___181756 <= s.yn___181733); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; continue; } + s.tmp_1 = tiles_TileMapData_getTile__P169250_mk(s); + r0 = s.arg0.fields["_map"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.x___181750; + s.tmp_1.arg2 = s.y___181756; + s.callLocIdx = 1066; s.pc = 28; return s.tmp_1; + case 28: + r0 = s.retval; + s.index___181762 = (r0); + s.tmp_0 = tiles_TileMapData_getTileImage__P169253_mk(s); + r0 = s.arg0.fields["_map"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.index___181762; + s.callLocIdx = 1067; s.pc = 29; return s.tmp_0; + case 29: + r0 = s.retval; + s.tile___181769 = (r0); + r0 = pxsim_numops_toBoolDecr(s.tile___181769); + if (!r0) { step = 5; continue; } + s.tmp_0 = r0 = s.arg1; + s.tmp_1 = r0 = s.tile___181769; + r0 = (s.x___181750 - s.x0___181702); + 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___181692); + s.tmp_2 = r0; + r0 = (s.y___181756 - s.y0___181726); + 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___181697); + 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___181756 + 1); + s.y___181756 = (r0); + { step = 4; continue; } + case 7: + r0 = (s.x___181750 + 1); + s.x___181750 = (r0); + { step = 3; continue; } + case 8: + r0 = pxsim_numops_toBoolDecr(globals.debug___169494); + if (!r0) { step = 21; continue; } + s.x___181805 = (s.x0___181702); + case 9: + r0 = (s.x___181805 <= s.xn___181709); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 14; continue; } + r0 = (s.x___181805 - s.x0___181702); + 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___181692); + s.xLine___181811 = (r0); + r0 = (s.xLine___181811 >= 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___181811; + r0 = pxsim_ImageMethods.width(globals.screen___168559); + 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__P168485_mk(s); + s.tmp_4.arg0 = s.arg1; + s.tmp_4.arg1 = s.xLine___181811; + s.tmp_4.arg2 = 0; + s.tmp_4.arg3 = s.xLine___181811; + r0 = pxsim_ImageMethods.height(s.arg1); + s.tmp_4.arg4 = r0; + s.tmp_4.arg5 = 1; + s.callLocIdx = 1071; s.pc = 30; return s.tmp_4; + case 30: + r0 = s.retval; + case 12: + case 13: + r0 = (s.x___181805 + 1); + s.x___181805 = (r0); + { step = 9; continue; } + case 14: + s.y___181837 = (s.y0___181726); + case 15: + r0 = (s.y___181837 <= s.yn___181733); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 20; continue; } + r0 = (s.y___181837 - s.y0___181726); + 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___181697); + s.yLine___181843 = (r0); + r0 = (s.yLine___181843 >= 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___181843; + r0 = pxsim_ImageMethods.height(globals.screen___168559); + 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__P168485_mk(s); + s.tmp_4.arg0 = s.arg1; + s.tmp_4.arg1 = 0; + s.tmp_4.arg2 = s.yLine___181843; + r0 = pxsim_ImageMethods.width(s.arg1); + s.tmp_4.arg3 = r0; + s.tmp_4.arg4 = s.yLine___181843; + s.tmp_4.arg5 = 1; + s.callLocIdx = 1073; s.pc = 31; return s.tmp_4; + case 31: + r0 = s.retval; + case 18: + case 19: + r0 = (s.y___181837 + 1); + s.y___181837 = (r0); + { step = 15; continue; } + case 20: + case 21: + case 22: + case 23: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +tiles_TileMap_draw__P172386.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 Render_RayCastingRender_move__P171778_mk(s) { +function tiles_TileMap_draw__P172386_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_move__P171778, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_draw__P172386, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - motionZ___182357: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + bitmask___181686: undefined, + offsetX___181692: undefined, + offsetY___181697: undefined, + x0___181702: undefined, + xn___181709: undefined, + y0___181726: undefined, + yn___181733: undefined, + x___181750: undefined, + y___181756: undefined, + index___181762: undefined, + tile___181769: undefined, + x___181805: undefined, + xLine___181811: undefined, + y___181837: undefined, + yLine___181843: undefined, arg0: undefined, arg1: undefined, arg2: undefined, - arg3: undefined, } } -function Render_RayCastingRender_getMotionZ__P171773(s) { +function tiles_TileMapData_getTileImage__P169253(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25135,73 +25865,94 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.motionZ___182374 = undefined; + s.size___181871 = undefined; + s.cachedImage___181875 = undefined; + s.originalImage___181882 = 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, Render_RayCastingRender__C171738_VT)) failedCast(r0); - r0 = s.arg0.fields["spriteMotionZ"]; + if (!checkSubtype(r0, tiles_TileMapData__C169244_VT)) failedCast(r0); + r0 = s.arg0.fields["_scale"]; s.tmp_0 = r0; - r0 = s.arg1.fields["id"]; - s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); - s.motionZ___182374 = (r0); - r0 = pxsim_numops_toBoolDecr(s.motionZ___182374); + r0 = (1 << s.tmp_0); + s.size___181871 = (r0); + r0 = s.arg0.fields["cachedTileView"]; + s.tmp_0 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.arg1); + s.cachedImage___181875 = (r0); + r0 = pxsim_numops_toBoolDecr(s.cachedImage___181875); 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(Render_MotionSet1D__C174841_VT); + if (!r0) { step = 7; continue; } + r0 = s.arg0.fields["tileset"]; s.tmp_2 = r0; - s.tmp_3 = Render_MotionSet1D_constructor__P174842_mk(s); - s.tmp_3.arg0 = s.tmp_2; - r0 = (s.arg2 * 256); - s.tmp_4 = r0; - r0 = (s.tmp_4 | 0); - s.tmp_3.arg1 = r0; - s.callLocIdx = 1946; s.pc = 3; return s.tmp_3; - case 3: - r0 = s.retval; - s.motionZ___182374 = (s.tmp_2); - r0 = s.arg0.fields["spriteMotionZ"]; - s.tmp_0 = r0; - r0 = s.arg1.fields["id"]; + r0 = pxsim_Array__getAt(s.tmp_2, s.arg1); + s.originalImage___181882 = (r0); + r0 = pxsim_numops_toBoolDecr(s.originalImage___181882); + if (!r0) { step = 5; continue; } + r0 = pxsim_ImageMethods.width(s.originalImage___181882); s.tmp_1 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_1, s.motionZ___182374); + r0 = (s.tmp_1 <= s.size___181871); + 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___181882); + s.tmp_2 = r0; + r0 = (s.tmp_2 <= s.size___181871); case 2: - r0 = s.motionZ___182374; + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 3; continue; } + s.cachedImage___181875 = (s.originalImage___181882); + { step = 4; continue; } + case 3: + r0 = pxsim.image.create(s.size___181871, s.size___181871); + s.cachedImage___181875 = (r0); + r0 = pxsim_ImageMethods.drawImage(s.cachedImage___181875, s.originalImage___181882, 0, 0); + case 4: + r0 = s.arg0.fields["cachedTileView"]; + s.tmp_0 = r0; + r0 = pxsim_Array_.setAt(s.tmp_0, s.arg1, s.cachedImage___181875); + case 5: + case 6: + case 7: + case 8: + r0 = s.cachedImage___181875; return leave(s, r0) default: oops() } } } -Render_RayCastingRender_getMotionZ__P171773.info = {"start":4937,"length":289,"line":162,"column":8,"endLine":169,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"getMotionZ","argumentNames":["this","spr","offsetZ"]} +tiles_TileMapData_getTileImage__P169253.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 Render_RayCastingRender_getMotionZ__P171773_mk(s) { +function tiles_TileMapData_getTileImage__P169253_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_getMotionZ__P171773, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_getTileImage__P169253, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - tmp_4: undefined, - motionZ___182374: undefined, + size___181871: undefined, + cachedImage___181875: undefined, + originalImage___181882: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function Render_MotionSet1D_constructor__P174842(s) { +function tiles_TileMapData_getTile__P169250(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25214,34 +25965,70 @@ 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, Render_MotionSet1D__C174841_VT)) failedCast(r0); - r0 = (s.arg0).fields["offset"] = (s.arg1); - r0 = (s.arg0).fields["v"] = (0); - r0 = (s.arg0).fields["a"] = (0); - r0 = (s.arg0).fields["p"] = (s.arg1); - r0 = undefined; + if (!checkSubtype(r0, tiles_TileMapData__C169244_VT)) failedCast(r0); + s.tmp_1 = tiles_TileMapData_isOutsideMap__P169256_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_1.arg1 = s.arg1; + s.tmp_1.arg2 = s.arg2; + s.callLocIdx = 1029; s.pc = 4; return s.tmp_1; + case 4: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = 0; + { step = 3; continue; } + case 1: + case 2: + r0 = s.arg0.fields["data"]; + s.tmp_2 = r0; + r0 = (s.arg1 | 0); + s.tmp_5 = r0; + r0 = (4 + s.tmp_5); + s.tmp_4 = r0; + r0 = (s.arg2 | 0); + s.tmp_7 = r0; + r0 = s.arg0.fields["_width"]; + s.tmp_8 = r0; + r0 = (s.tmp_7 * s.tmp_8); + s.tmp_6 = r0; + r0 = (s.tmp_4 + s.tmp_6); + s.tmp_3 = r0; + r0 = pxsim.BufferMethods.getUint8(s.tmp_2, s.tmp_3); + case 3: return leave(s, r0) default: oops() } } } -Render_MotionSet1D_constructor__P174842.info = {"start":655,"length":74,"line":26,"column":8,"endLine":28,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":["this","offset"]} +tiles_TileMapData_getTile__P169250.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 Render_MotionSet1D_constructor__P174842_mk(s) { +function tiles_TileMapData_getTile__P169250_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_MotionSet1D_constructor__P174842, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_getTile__P169250, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function game_gameOver__P169540(s) { +function tiles_TileMapData_isOutsideMap__P169256(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25253,34 +26040,76 @@ 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 = game__gameOverImpl__P172467_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = undefined; - s.callLocIdx = 1351; s.pc = 1; return s.tmp_0; + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMapData__C169244_VT)) failedCast(r0); + r0 = (s.arg1 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: - r0 = s.retval; - r0 = undefined; + s.tmp_1 = r0 = s.arg1; + r0 = s.arg0.fields["_width"]; + s.tmp_2 = r0; + r0 = (s.tmp_1 >= s.tmp_2); + case 2: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBool(s.tmp_3); + if (!r0) { step = 3; continue; } + r0 = s.tmp_3; + { step = 4; continue; } + case 3: + r0 = (s.arg2 < 0); + case 4: + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = pxsim_numops_toBool(s.tmp_4); + if (!r0) { step = 5; continue; } + r0 = s.tmp_4; + { step = 6; continue; } + case 5: + s.tmp_5 = r0 = s.arg2; + r0 = s.arg0.fields["_height"]; + s.tmp_6 = r0; + r0 = (s.tmp_5 >= s.tmp_6); + case 6: + // jmp value (already in r0) + s.tmp_7 = r0; + r0 = s.tmp_7; return leave(s, r0) default: oops() } } } -game_gameOver__P169540.info = {"start":11084,"length":74,"line":342,"column":4,"endLine":344,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"gameOver","argumentNames":["win"]} +tiles_TileMapData_isOutsideMap__P169256.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 game_gameOver__P169540_mk(s) { +function tiles_TileMapData_isOutsideMap__P169256_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_gameOver__P169540, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_isOutsideMap__P169256, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function game__gameOverImpl__P172467(s) { +function scene_createRenderable__P169332(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25290,366 +26119,60 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.goc___182416 = undefined; - s.judged___182419 = undefined; - s.playersWithScores___182427 = undefined; - s.prevBestScore___182430 = undefined; - s.winner___182434 = undefined; - s.scores___182440 = undefined; - s.preferMultiplayer___182461 = undefined; - s.message___182469 = undefined; - s.effect___182475 = undefined; - s.sound___182480 = undefined; - s.looping___182485 = undefined; - s.playbackMode___182490 = undefined; - s.overDialog___182516 = undefined; + s.renderable___181956 = 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_init__P172465_mk(s); - s.tmp_0.arg0 = undefined; - s.callLocIdx = 1352; s.pc = 32; return s.tmp_0; - case 32: - r0 = s.retval; - r0 = pxsim_numops_toBoolDecr(globals.__isOver___172464); + r0 = pxsim_pxtcore_mkClassInstance(scene_Renderable__C169327_VT); + s.tmp_0 = r0; + s.tmp_1 = r0 = s.arg2; + r0 = pxsim_numops_toBool(s.tmp_1); if (!r0) { step = 1; continue; } - { step = 31; continue; } + r0 = s.tmp_1; + { step = 2; continue; } case 1: + r0 = renderable_inline__P181962; case 2: - globals.__isOver___172464 = (true); - r0 = pxsim_numops_toBoolDecr(globals.__gameOverHandler___172462); - if (!r0) { step = 3; continue; } - s.tmp_0 = lambda_2_mk(s); - s.tmp_0.argL = globals.__gameOverHandler___172462; - s.tmp_0.arg0 = s.arg0; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 1353; s.pc = 33; return s.tmp_0; - case 33: - r0 = s.retval; - { step = 30; continue; } + // jmp value (already in r0) + s.tmp_2 = r0; + s.tmp_3 = scene_Renderable_constructor__P169328_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 = 1133; s.pc = 3; return s.tmp_3; case 3: - s.tmp_0 = lambda_1_mk(s); - s.tmp_0.argL = globals.gameOverConfig___169525; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 1354; s.pc = 34; return s.tmp_0; - case 34: - r0 = s.retval; - s.goc___182416 = (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 = 4; continue; } - r0 = s.tmp_0; - { step = 5; continue; } - case 4: - r0 = s.goc___182416.fields["scoringType"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 !== 2); - case 5: - // jmp value (already in r0) - s.tmp_3 = r0; - s.judged___182419 = (s.tmp_3); - s.tmp_0 = info_playersWithScores__P169091_mk(s); - s.callLocIdx = 1355; s.pc = 35; return s.tmp_0; - case 35: - r0 = s.retval; - s.playersWithScores___182427 = (r0); - s.tmp_0 = r0 = s.judged___182419; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 6; continue; } - r0 = s.tmp_0; - { step = 7; continue; } - case 6: - s.tmp_1 = info_highScore__P169098_mk(s); - s.callLocIdx = 1356; s.pc = 36; return s.tmp_1; - case 36: - r0 = s.retval; - case 7: - // jmp value (already in r0) - s.tmp_2 = r0; - s.prevBestScore___182430 = (s.tmp_2); - s.tmp_0 = r0 = s.judged___182419; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 8; continue; } - r0 = s.tmp_0; - { step = 9; continue; } - case 8: - r0 = s.arg0; - case 9: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBool(s.tmp_1); - if (r0) { step = 10; continue; } - r0 = s.tmp_1; - { step = 11; continue; } - case 10: - s.tmp_2 = info_winningPlayer__P169093_mk(s); - s.callLocIdx = 1357; s.pc = 37; return s.tmp_2; - case 37: - r0 = s.retval; - case 11: - // jmp value (already in r0) - s.tmp_3 = r0; - s.winner___182434 = (s.tmp_3); - r0 = pxsim_pxtcore_mkAction(1, scores_inline__P182442); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.winner___182434); - s.tmp_1 = helpers_arrayMap__P166633_mk(s); - s.tmp_1.arg0 = s.playersWithScores___182427; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 1361; s.pc = 38; return s.tmp_1; - case 38: - r0 = s.retval; - s.scores___182440 = (r0); - s.tmp_0 = info_saveAllScores__P169092_mk(s); - s.callLocIdx = 1362; s.pc = 39; return s.tmp_0; - case 39: - r0 = s.retval; - s.tmp_0 = r0 = s.judged___182419; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 12; continue; } - r0 = s.tmp_0; - { step = 13; continue; } - case 12: - r0 = s.winner___182434; - case 13: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 14; continue; } - s.tmp_2 = info_saveHighScore__P169095_mk(s); - s.callLocIdx = 1363; s.pc = 40; return s.tmp_2; - case 40: - r0 = s.retval; - case 14: - case 15: - r0 = pxsim_numops_toBoolDecr(s.arg1); - 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_toBool(s.tmp_0); - if (!r0) { step = 16; continue; } - r0 = s.tmp_0; - { step = 19; continue; } - case 16: - s.tmp_4 = r0 = s.judged___182419; - r0 = pxsim_numops_toBool(s.tmp_4); - if (r0) { step = 17; continue; } - r0 = s.tmp_4; - { step = 18; continue; } - case 17: - s.tmp_5 = info_multiplayerScoring__P169090_mk(s); - s.callLocIdx = 1364; s.pc = 41; return s.tmp_5; - case 41: - r0 = s.retval; - case 18: - // jmp value (already in r0) - s.tmp_6 = r0; - r0 = s.tmp_6; - case 19: - // jmp value (already in r0) - s.tmp_7 = r0; - s.preferMultiplayer___182461 = (s.tmp_7); - s.tmp_0 = game_GameOverConfig_getMessage__P169524_mk(s); - s.tmp_0.arg0 = s.goc___182416; - s.tmp_0.arg1 = s.arg0; - s.tmp_0.arg2 = s.preferMultiplayer___182461; - s.callLocIdx = 1365; s.pc = 42; return s.tmp_0; - case 42: - r0 = s.retval; - s.message___182469 = (r0); - s.tmp_0 = game_GameOverConfig_getEffect__P169519_mk(s); - s.tmp_0.arg0 = s.goc___182416; - s.tmp_0.arg1 = s.arg0; - s.callLocIdx = 1366; s.pc = 43; return s.tmp_0; - case 43: - r0 = s.retval; - s.effect___182475 = (r0); - s.tmp_0 = game_GameOverConfig_getSound__P169521_mk(s); - s.tmp_0.arg0 = s.goc___182416; - s.tmp_0.arg1 = s.arg0; - s.callLocIdx = 1367; s.pc = 44; return s.tmp_0; - case 44: - r0 = s.retval; - s.sound___182480 = (r0); - s.tmp_0 = game_GameOverConfig_getSoundLooping__P169522_mk(s); - s.tmp_0.arg0 = s.goc___182416; - s.tmp_0.arg1 = s.arg0; - s.callLocIdx = 1368; s.pc = 45; return s.tmp_0; - case 45: - r0 = s.retval; - s.looping___182485 = (r0); - r0 = pxsim_numops_toBoolDecr(s.looping___182485); - if (!r0) { step = 20; continue; } - r0 = 2; - { step = 21; continue; } - case 20: - r0 = 1; - case 21: - // jmp value (already in r0) - s.tmp_0 = r0; - s.playbackMode___182490 = (s.tmp_0); - case 22: - s.tmp_0 = r0 = globals._sceneStack___172458; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 23; continue; } - r0 = s.tmp_0; - { step = 24; continue; } - case 23: - r0 = pxsim_Array__length(globals._sceneStack___172458); - case 24: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 25; continue; } - s.tmp_2 = scene_Scene_destroy__P169398_mk(s); - s.tmp_2.arg0 = globals._scene___172457; - s.callLocIdx = 1369; s.pc = 46; return s.tmp_2; - case 46: - r0 = s.retval; - s.tmp_0 = game_popScene__P169531_mk(s); - s.callLocIdx = 1370; s.pc = 47; return s.tmp_0; - case 47: - r0 = s.retval; - { step = 22; continue; } - case 25: - s.tmp_0 = game_pushScene__P169530_mk(s); - s.callLocIdx = 1371; s.pc = 48; return s.tmp_0; - case 48: - r0 = s.retval; - s.tmp_0 = scene_setBackgroundImage__P169412_mk(s); - r0 = pxsim_ImageMethods.clone(globals.screen___168559); - s.tmp_0.arg0 = r0; - s.callLocIdx = 1372; s.pc = 49; return s.tmp_0; - case 49: - r0 = s.retval; - r0 = pxsim_numops_toBoolDecr(s.sound___182480); - if (!r0) { step = 26; continue; } - s.tmp_0 = music_play__P168449_mk(s); - s.tmp_0.arg0 = s.sound___182480; - s.tmp_0.arg1 = s.playbackMode___182490; - s.callLocIdx = 1373; s.pc = 50; return s.tmp_0; - case 50: - r0 = s.retval; - case 26: - case 27: - r0 = pxsim_numops_toBoolDecr(s.effect___182475); - if (!r0) { step = 28; continue; } - s.tmp_0 = if_startScreenEffect_1_mk(s); - s.tmp_0.arg0 = s.effect___182475; - if (!s.tmp_0.arg0.vtable.iface) { - setupLambda(s.tmp_0, pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "startScreenEffect"), 1); - s.callLocIdx = 1374; s.pc = 51; return s.tmp_0; - } else { - s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["startScreenEffect"]; - if (s.tmp_0.fn == null) { setupLambda(s.tmp_0, s.tmp_0.arg0.fields["startScreenEffect"], 1); s.callLocIdx = 1374; s.pc = 51; return s.tmp_0; } - else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 1374; s.pc = 51; return s.tmp_0;; } - else { s.callLocIdx = 1374; s.pc = 51; return s.tmp_0; } - } - case 51: - r0 = s.retval; - case 28: - case 29: - s.tmp_0 = pause__P166940_mk(s); - s.tmp_0.arg0 = 400; - s.callLocIdx = 1375; s.pc = 52; return s.tmp_0; - case 52: - r0 = s.retval; - r0 = pxsim_pxtcore_mkClassInstance(game_GameOverDialog__C169473_VT); - s.tmp_0 = r0; - s.tmp_1 = game_GameOverDialog_constructor__P169480_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = s.arg0; - s.tmp_1.arg2 = s.message___182469; - s.tmp_1.arg3 = s.judged___182419; - s.tmp_1.arg4 = s.scores___182440; - s.tmp_1.arg5 = s.prevBestScore___182430; - s.tmp_1.arg6 = s.arg1; - s.callLocIdx = 1376; s.pc = 53; return s.tmp_1; - case 53: - r0 = s.retval; - s.overDialog___182516 = (s.tmp_0); - r0 = pxsim_pxtcore_mkAction(1, game__gameOverImpl_inline__P182528); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.overDialog___182516); - s.tmp_1 = scene_createRenderable__P169332_mk(s); - s.tmp_1.arg0 = 100; - s.tmp_1.arg1 = s.tmp_0; - s.tmp_1.arg2 = undefined; - s.callLocIdx = 1377; s.pc = 54; return s.tmp_1; - case 54: - r0 = s.retval; - s.tmp_0 = pause__P166940_mk(s); - s.tmp_0.arg0 = 500; - s.callLocIdx = 1378; s.pc = 55; return s.tmp_0; - case 55: - r0 = s.retval; - s.tmp_0 = game_GameOverDialog_displayCursor__P169481_mk(s); - s.tmp_0.arg0 = s.overDialog___182516; - s.callLocIdx = 1379; s.pc = 56; return s.tmp_0; - case 56: - r0 = s.retval; - s.tmp_0 = game_waitAnyButton__P169528_mk(s); - s.callLocIdx = 1380; s.pc = 57; return s.tmp_0; - case 57: - r0 = s.retval; - setupResume(s, 58); - pxsim.control.reset(); - checkResumeConsumed(); - return; - case 58: r0 = s.retval; - case 30: - case 31: - r0 = undefined; + s.renderable___181956 = (s.tmp_0); + r0 = s.renderable___181956; return leave(s, r0) default: oops() } } } -game__gameOverImpl__P172467.info = {"start":11264,"length":2664,"line":350,"column":4,"endLine":410,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"_gameOverImpl","argumentNames":["win","winnerOverride"]} +scene_createRenderable__P169332.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 game__gameOverImpl__P172467_mk(s) { +function scene_createRenderable__P169332_mk(s) { checkStack(s.depth); return { - parent: s, fn: game__gameOverImpl__P172467, depth: s.depth + 1, + parent: s, fn: scene_createRenderable__P169332, depth: s.depth + 1, pc: 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, - goc___182416: undefined, - judged___182419: undefined, - playersWithScores___182427: undefined, - prevBestScore___182430: undefined, - winner___182434: undefined, - scores___182440: undefined, - preferMultiplayer___182461: undefined, - message___182469: undefined, - effect___182475: undefined, - sound___182480: undefined, - looping___182485: undefined, - playbackMode___182490: undefined, - overDialog___182516: undefined, + renderable___181956: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function scores_inline__P182442(s) { +function renderable_inline__P181962(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25659,50 +26182,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_pxtcore_mkClassInstance(game_GameOverPlayerScore__C169470_VT); - s.tmp_0 = r0; - s.tmp_1 = game_GameOverPlayerScore_constructor__P169472_mk(s); - s.tmp_1.arg0 = s.tmp_0; - r0 = s.arg0.fields["_player"]; - s.tmp_1.arg1 = r0; - s.tmp_2 = info_PlayerInfoImpl_score__P169133_mk(s); - r0 = s.arg0.fields["impl"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 1359; s.pc = 2; return s.tmp_2; - case 2: - r0 = s.retval; - s.tmp_1.arg2 = r0; - r0 = (s.arg0 === s.caps[0]); - s.tmp_1.arg3 = r0; - s.callLocIdx = 1360; s.pc = 1; return s.tmp_1; - case 1: - r0 = s.retval; - r0 = s.tmp_0; + r0 = true; return leave(s, r0) default: oops() } } } -scores_inline__P182442.info = {"start":11859,"length":88,"line":364,"column":49,"endLine":364,"endColumn":137,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":["player"]} +renderable_inline__P181962.info = {"start":875,"length":10,"line":31,"column":32,"endLine":31,"endColumn":42,"fileName":"pxt_modules/game/renderable.ts","functionName":"inline","argumentNames":[]} -function scores_inline__P182442_mk(s) { +function renderable_inline__P181962_mk(s) { checkStack(s.depth); return { - parent: s, fn: scores_inline__P182442, depth: s.depth + 1, + parent: s, fn: renderable_inline__P181962, 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__gameOverImpl_inline__P182528(s) { +function scene_Renderable_constructor__P169328(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25714,55 +26211,44 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } - s.tmp_0 = game_GameOverDialog__C169473_v0_1_mk(s); - s.tmp_0.arg0 = s.caps[0]; - if (!checkSubtype(s.tmp_0.arg0, game_GameOverDialog__C169473_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.update; - s.pc = 1; return s.tmp_0; + r0 = s.arg0; + if (!checkSubtype(r0, scene_Renderable__C169327_VT)) failedCast(r0); + r0 = (s.arg0).fields["handler"] = (s.arg1); + r0 = (s.arg0).fields["shouldBeVisible"] = (s.arg2); + s.tmp_0 = sprites_BaseSprite_constructor__P168623_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg3; + s.callLocIdx = 1130; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - s.tmp_0 = r0 = s.arg0; - r0 = s.caps[0].fields["image"]; - s.tmp_1 = r0; - r0 = pxsim_ImageMethods.height(globals.screen___168559); - s.tmp_4 = r0; - r0 = s.caps[0].fields["image"]; - s.tmp_6 = r0; - r0 = pxsim_ImageMethods.height(s.tmp_6); - 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 = pxsim_ImageMethods.drawTransparentImage(s.tmp_0, s.tmp_1, 0, s.tmp_2); r0 = undefined; return leave(s, r0) default: oops() } } } -game__gameOverImpl_inline__P182528.info = {"start":13493,"length":254,"line":396,"column":48,"endLine":403,"endColumn":13,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":["target"]} +scene_Renderable_constructor__P169328.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 game__gameOverImpl_inline__P182528_mk(s) { +function scene_Renderable_constructor__P169328_mk(s) { checkStack(s.depth); return { - parent: s, fn: game__gameOverImpl_inline__P182528, depth: s.depth + 1, + parent: s, fn: scene_Renderable_constructor__P169328, depth: s.depth + 1, pc: 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, + arg3: undefined, } } -function game_waitAnyButton__P169528(s) { +function tiles_TileMap_scale__P169266(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25772,41 +26258,49 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.__waitAnyButton___172461); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMap__C169262_VT)) failedCast(r0); + r0 = (s.arg0).fields["_scale"] = (s.arg1); + r0 = s.arg0.fields["_map"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - s.tmp_0 = lambda_1_mk(s); - s.tmp_0.argL = globals.__waitAnyButton___172461; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 1330; s.pc = 3; return s.tmp_0; + s.tmp_1 = tiles_TileMapData_scale__P169249_mk(s); + r0 = s.arg0.fields["_map"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.arg1; + s.callLocIdx = 1037; s.pc = 3; return s.tmp_1; case 3: r0 = s.retval; - { step = 2; continue; } case 1: - s.tmp_0 = pause__P166940_mk(s); - s.tmp_0.arg0 = 3000; - s.callLocIdx = 1331; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -game_waitAnyButton__P169528.info = {"start":4325,"length":111,"line":131,"column":4,"endLine":134,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"waitAnyButton","argumentNames":[]} +tiles_TileMap_scale__P169266.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 game_waitAnyButton__P169528_mk(s) { +function tiles_TileMap_scale__P169266_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_waitAnyButton__P169528, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_scale__P169266, 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_GameOverConfig_getMessage__P169524(s) { +function tiles_TileMapData_scale__P169249(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25819,82 +26313,37 @@ 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_GameOverConfig__C169500_VT)) failedCast(r0); - r0 = s.arg0.fields["messageSetByUser"]; - 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["winMessage"]; - { step = 2; continue; } - case 1: - r0 = s.arg0.fields["loseMessage"]; - case 2: - // jmp value (already in r0) + if (!checkSubtype(r0, tiles_TileMapData__C169244_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_1; - { step = 11; continue; } - { step = 10; continue; } - case 3: - r0 = pxsim_numops_toBoolDecr(s.arg2); - if (!r0) { step = 6; continue; } - r0 = pxsim_numops_toBoolDecr(s.arg1); - if (!r0) { step = 4; continue; } - r0 = s.arg0.fields["winMessageMultiplayer"]; - { step = 5; continue; } - case 4: - r0 = s.arg0.fields["loseMessage"]; - case 5: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = s.tmp_2; - { step = 11; continue; } - { step = 9; continue; } - case 6: - r0 = pxsim_numops_toBoolDecr(s.arg1); - if (!r0) { step = 7; continue; } - r0 = s.arg0.fields["winMessage"]; - { step = 8; continue; } - case 7: - r0 = s.arg0.fields["loseMessage"]; - case 8: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = s.tmp_3; - { step = 11; continue; } - case 9: - case 10: + r0 = (s.tmp_0).fields["cachedTileView"] = (s.tmp_1); r0 = undefined; - case 11: return leave(s, r0) default: oops() } } } -game_GameOverConfig_getMessage__P169524.info = {"start":3264,"length":367,"line":96,"column":8,"endLine":103,"endColumn":9,"fileName":"pxt_modules/game/game.ts","functionName":"getMessage","argumentNames":["this","win","preferMultiplayer"]} +tiles_TileMapData_scale__P169249.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 game_GameOverConfig_getMessage__P169524_mk(s) { +function tiles_TileMapData_scale__P169249_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_GameOverConfig_getMessage__P169524, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_scale__P169249, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function game_GameOverConfig_getSoundLooping__P169522(s) { +function sprites_destroy__P168804(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25907,40 +26356,50 @@ 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_GameOverConfig__C169500_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(s.arg1); + r0 = pxsim_numops_toBoolDecr(s.arg0); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = s.arg0.fields["winSoundLooping"]; - { step = 2; continue; } + { step = 3; continue; } case 1: - r0 = s.arg0.fields["loseSoundLooping"]; case 2: - // jmp value (already in r0) - s.tmp_0 = r0; - r0 = s.tmp_0; - return leave(s, r0) - default: oops() -} } } -game_GameOverConfig_getSoundLooping__P169522.info = {"start":2852,"length":112,"line":86,"column":8,"endLine":88,"endColumn":9,"fileName":"pxt_modules/game/game.ts","functionName":"getSoundLooping","argumentNames":["this","win"]} - -function game_GameOverConfig_getSoundLooping__P169522_mk(s) { + s.tmp_2 = Sprite_destroy__P168955_mk(s); + s.tmp_2.arg0 = s.arg0; + s.tmp_2.arg1 = s.arg1; + s.tmp_2.arg2 = s.arg2; + s.callLocIdx = 400; s.pc = 4; return s.tmp_2; + case 4: + r0 = s.retval; + case 3: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +sprites_destroy__P168804.info = {"start":2047,"length":170,"line":70,"column":4,"endLine":73,"endColumn":5,"fileName":"pxt_modules/game/sprites.ts","functionName":"destroy","argumentNames":["sprite","effect","duration"]} + +function sprites_destroy__P168804_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_GameOverConfig_getSoundLooping__P169522, depth: s.depth + 1, + parent: s, fn: sprites_destroy__P168804, 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_GameOverConfig_getSound__P169521(s) { +function Sprite_destroy__P168955(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25953,40 +26412,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, game_GameOverConfig__C169500_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(s.arg1); + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + r0 = s.arg0.fields["flags"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 & 2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = s.arg0.fields["winSound"]; - { step = 2; continue; } + { step = 5; continue; } case 1: - r0 = s.arg0.fields["loseSound"]; case 2: - // jmp value (already in r0) - s.tmp_0 = r0; - r0 = s.tmp_0; + 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__P169792_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 = 535; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + { step = 4; continue; } + case 3: + s.tmp_0 = Sprite__destroyCore__P168956_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 536; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + case 4: + case 5: + r0 = undefined; return leave(s, r0) default: oops() } } } -game_GameOverConfig_getSound__P169521.info = {"start":2752,"length":91,"line":83,"column":8,"endLine":85,"endColumn":9,"fileName":"pxt_modules/game/game.ts","functionName":"getSound","argumentNames":["this","win"]} +Sprite_destroy__P168955.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 game_GameOverConfig_getSound__P169521_mk(s) { +function Sprite_destroy__P168955_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_GameOverConfig_getSound__P169521, depth: s.depth + 1, + parent: s, fn: Sprite_destroy__P168955, depth: s.depth + 1, pc: 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 game_GameOverConfig_getEffect__P169519(s) { +function effects_ParticleEffect_destroy__P169792(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25999,40 +26489,85 @@ 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__C169500_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(s.arg1); + if (!checkSubtype(r0, effects_ParticleEffect__C169789_VT)) failedCast(r0); + s.tmp_0 = Sprite_setFlag__P168946_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = 7168; + s.tmp_0.arg2 = true; + s.callLocIdx = 1675; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.tmp_0 = effects_ParticleEffect_start__P169791_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 = 1676; 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.arg0.fields["winEffect"]; + r0 = s.arg2; { step = 2; continue; } case 1: - r0 = s.arg0.fields["loseEffect"]; + r0 = s.arg0.fields["defaultLifespan"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 >> 2); case 2: // jmp value (already in r0) - s.tmp_0 = r0; - r0 = s.tmp_0; + s.tmp_1 = r0; + r0 = (s.arg1).fields["lifespan"] = (s.tmp_1); + s.tmp_0 = effects_ImageEffect_applyTo__P169819_mk(s); + s.tmp_0.arg0 = globals.dissolve___169822; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 1677; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -game_GameOverConfig_getEffect__P169519.info = {"start":2199,"length":94,"line":68,"column":8,"endLine":70,"endColumn":9,"fileName":"pxt_modules/game/game.ts","functionName":"getEffect","argumentNames":["this","win"]} +effects_ParticleEffect_destroy__P169792.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 game_GameOverConfig_getEffect__P169519_mk(s) { +function effects_ParticleEffect_destroy__P169792_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_GameOverConfig_getEffect__P169519, depth: s.depth + 1, + parent: s, fn: effects_ParticleEffect_destroy__P169792, depth: s.depth + 1, pc: 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 game_GameOverDialog_update__P169482(s) { +function dissolve_inline__P182098(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26042,56 +26577,105 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.i___182101 = undefined; + s.x___182112 = undefined; + s.y___182118 = undefined; + s.w___182124 = undefined; + s.h___182128 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, game_GameOverDialog__C169473_VT)) failedCast(r0); - s.tmp_0 = game_BaseDialog_clearInterior__P172421_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1256; s.pc = 3; 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.i___182101 = (r0); + case 1: + r0 = (s.i___182101 > 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + s.tmp_1 = Math_FastRandom_randomRange__P169590_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 = 53; s.pc = 3; return s.tmp_1; case 3: r0 = s.retval; - s.tmp_0 = game_GameOverDialog__C169473_v2_1_mk(s); - s.tmp_0.arg0 = s.arg0; - if (!checkSubtype(s.tmp_0.arg0, game_GameOverDialog__C169473_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.drawTextCore; - s.pc = 4; return s.tmp_0; + s.x___182112 = (r0); + s.tmp_0 = Math_FastRandom_randomRange__P169590_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 = 54; s.pc = 4; return s.tmp_0; case 4: r0 = s.retval; - r0 = s.arg0.fields["cursorOn"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_1 = game_BaseDialog_drawCursorRow__P169447_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 1257; s.pc = 5; return s.tmp_1; + s.y___182118 = (r0); + s.tmp_0 = Math_FastRandom_randomRange__P169590_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = 1; + s.tmp_0.arg2 = 3; + s.callLocIdx = 55; s.pc = 5; return s.tmp_0; case 5: r0 = s.retval; - case 1: + s.w___182124 = (r0); + s.tmp_0 = Math_FastRandom_randomRange__P169590_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = 1; + s.tmp_0.arg2 = 3; + s.callLocIdx = 56; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + s.h___182128 = (r0); + s.tmp_0 = helpers_imageDrawRect__P168486_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.x___182112; + s.tmp_0.arg2 = s.y___182118; + s.tmp_0.arg3 = s.w___182124; + s.tmp_0.arg4 = s.h___182128; + s.tmp_0.arg5 = 0; + s.callLocIdx = 57; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + r0 = (s.i___182101 - 1); + s.i___182101 = (r0); + { step = 1; continue; } case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -game_GameOverDialog_update__P169482.info = {"start":17394,"length":173,"line":497,"column":8,"endLine":504,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"update","argumentNames":["this"]} +dissolve_inline__P182098.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 game_GameOverDialog_update__P169482_mk(s) { +function dissolve_inline__P182098_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_GameOverDialog_update__P169482, depth: s.depth + 1, + parent: s, fn: dissolve_inline__P182098, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + i___182101: undefined, + x___182112: undefined, + y___182118: undefined, + w___182124: undefined, + h___182128: undefined, arg0: undefined, + arg1: undefined, } } -function game_GameOverDialog_drawTextCore__P169486(s) { +function helpers_imageDrawRect__P168486(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26103,45 +26687,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, game_GameOverDialog__C169473_VT)) failedCast(r0); - s.tmp_0 = game_GameOverDialog_drawMessage__P169483_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1289; s.pc = 1; return s.tmp_0; + r0 = (s.arg3 == 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: + r0 = (s.arg4 == 0); + case 2: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 3; continue; } + { step = 5; continue; } + case 3: + case 4: + r0 = (s.arg3 - 1); + s.arg3 = (r0); + r0 = (s.arg4 - 1); + s.arg4 = (r0); + s.tmp_0 = helpers_imageDrawLine__P168485_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 = 153; s.pc = 6; return s.tmp_0; + case 6: r0 = s.retval; - s.tmp_0 = game_GameOverDialog_drawScores__P169484_mk(s); + s.tmp_0 = helpers_imageDrawLine__P168485_mk(s); s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1290; s.pc = 2; return s.tmp_0; - case 2: + 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 = 154; s.pc = 7; return s.tmp_0; + case 7: r0 = s.retval; - s.tmp_0 = game_GameOverDialog_drawBestScore__P169485_mk(s); + s.tmp_0 = helpers_imageDrawLine__P168485_mk(s); s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1291; s.pc = 3; return s.tmp_0; - case 3: + 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 = 155; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + s.tmp_0 = helpers_imageDrawLine__P168485_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 = 156; s.pc = 9; return s.tmp_0; + case 9: r0 = s.retval; + case 5: r0 = undefined; return leave(s, r0) default: oops() } } } -game_GameOverDialog_drawTextCore__P169486.info = {"start":23575,"length":123,"line":629,"column":8,"endLine":633,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"drawTextCore","argumentNames":["this"]} +helpers_imageDrawRect__P168486.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 game_GameOverDialog_drawTextCore__P169486_mk(s) { +function helpers_imageDrawRect__P168486_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_GameOverDialog_drawTextCore__P169486, depth: s.depth + 1, + parent: s, fn: helpers_imageDrawRect__P168486, 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 game_GameOverDialog_drawBestScore__P169485(s) { +function Math_FastRandom_randomRange__P169590(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26151,171 +26798,45 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.currY___182570 = undefined; - s.label___182579 = undefined; - s.halfWidth___182590 = 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, game_GameOverDialog__C169473_VT)) failedCast(r0); - s.tmp_1 = game_GameOverDialog_hasBestScore__P169477_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 1280; s.pc = 7; return s.tmp_1; - case 7: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - r0 = s.arg0.fields["height"]; - s.tmp_3 = r0; - s.tmp_5 = if_charHeight_1_mk(s); - s.tmp_5.arg0 = globals.font8___168502; - if (!s.tmp_5.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "charHeight"); - } else { - s.tmp_5.fn = s.tmp_5.arg0.vtable.iface["charHeight"]; - if (s.tmp_5.fn == null) { s.retval = s.tmp_5.arg0.fields["charHeight"]; } - else if (!s.tmp_5.fn.isGetter) { s.retval = bind(s.tmp_5); } - else { s.callLocIdx = 1281; s.pc = 8; return s.tmp_5; } - } - case 8: - r0 = s.retval; - s.tmp_4 = r0; - r0 = (s.tmp_3 - s.tmp_4); - s.tmp_2 = r0; - r0 = (s.tmp_2 - 5); - s.currY___182570 = (r0); - s.tmp_1 = game_GameOverDialog_isNewBestScore__P169478_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 1282; s.pc = 9; return s.tmp_1; - case 9: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.label___182579 = ("New Best Score!"); - s.tmp_0 = helpers_imagePrintCenter__P168516_mk(s); - r0 = s.arg0.fields["image"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.label___182579; - s.tmp_0.arg2 = s.currY___182570; - s.tmp_1 = game_screenColor__P172413_mk(s); - s.tmp_1.arg0 = 9; - s.callLocIdx = 1283; s.pc = 11; return s.tmp_1; - case 11: - r0 = s.retval; - s.tmp_0.arg3 = r0; - s.tmp_0.arg4 = globals.font8___168502; - s.callLocIdx = 1284; s.pc = 10; return s.tmp_0; - case 10: - r0 = s.retval; - s.tmp_3 = game_GameOverDialog_isMultiplayerGame__P169479_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 1285; s.pc = 12; return s.tmp_3; - case 12: - 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); + if (!checkSubtype(r0, Math_FastRandom__C169586_VT)) failedCast(r0); + r0 = (s.arg2 > s.arg1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = pxsim_String_.length(s.label___182579); - s.tmp_5 = r0; - s.tmp_7 = if_charWidth_1_mk(s); - s.tmp_7.arg0 = globals.font8___168502; - if (!s.tmp_7.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_7.arg0, "charWidth"); - } else { - s.tmp_7.fn = s.tmp_7.arg0.vtable.iface["charWidth"]; - if (s.tmp_7.fn == null) { s.retval = s.tmp_7.arg0.fields["charWidth"]; } - else if (!s.tmp_7.fn.isGetter) { s.retval = bind(s.tmp_7); } - else { s.callLocIdx = 1286; s.pc = 13; return s.tmp_7; } - } - case 13: + s.tmp_2 = Math_FastRandom_next__P169589_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 1392; s.pc = 3; return s.tmp_2; + case 3: r0 = s.retval; - s.tmp_6 = r0; - r0 = (s.tmp_5 * s.tmp_6); - s.tmp_4 = r0; - r0 = (s.tmp_4 >> 1); - s.halfWidth___182590 = (r0); - r0 = s.arg0.fields["image"]; - s.tmp_0 = r0; - s.tmp_1 = r0 = globals.img_trophy_sm___172432; - r0 = s.arg0.fields["image"]; - s.tmp_7 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_7); - s.tmp_6 = r0; - r0 = (s.tmp_6 >> 1); - s.tmp_5 = r0; - r0 = (s.tmp_5 - s.halfWidth___182590); - s.tmp_4 = r0; - r0 = pxsim_ImageMethods.width(globals.img_trophy_sm___172432); - s.tmp_8 = r0; - r0 = (s.tmp_4 - s.tmp_8); - s.tmp_3 = r0; - r0 = (s.tmp_3 - 2); - s.tmp_2 = r0; - r0 = pxsim_ImageMethods.drawTransparentImage(s.tmp_0, s.tmp_1, s.tmp_2, s.currY___182570); - r0 = s.arg0.fields["image"]; - s.tmp_0 = r0; - s.tmp_1 = r0 = globals.img_trophy_sm___172432; - r0 = s.arg0.fields["image"]; - s.tmp_5 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_5); + s.tmp_1 = r0; + r0 = (s.arg2 - s.arg1); s.tmp_4 = r0; - r0 = (s.tmp_4 >> 1); + r0 = (s.tmp_4 + 1); s.tmp_3 = r0; - r0 = (s.tmp_3 + s.halfWidth___182590); - s.tmp_2 = r0; - r0 = pxsim_ImageMethods.drawTransparentImage(s.tmp_0, s.tmp_1, s.tmp_2, s.currY___182570); + r0 = (s.tmp_1 % s.tmp_3); + { step = 2; continue; } case 1: + r0 = 0; case 2: - { step = 4; continue; } - case 3: - s.tmp_0 = helpers_imagePrintCenter__P168516_mk(s); - r0 = s.arg0.fields["image"]; - s.tmp_0.arg0 = r0; - r0 = s.arg0.fields["bestScore"]; - s.tmp_2 = r0; - if ((s.tmp_2) && (s.tmp_2).vtable) { - setupResume(s, 15); - pxsim_String__stringConv(s.tmp_2); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_2) + ""; } - case 15: - r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_String__concat("Best:", s.tmp_1); - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = s.currY___182570; - s.tmp_3 = game_screenColor__P172413_mk(s); - s.tmp_3.arg0 = 9; - s.callLocIdx = 1287; s.pc = 16; return s.tmp_3; - case 16: - r0 = s.retval; - s.tmp_0.arg3 = r0; - s.tmp_0.arg4 = globals.font8___168502; - s.callLocIdx = 1288; s.pc = 14; return s.tmp_0; - case 14: - r0 = s.retval; - case 4: - case 5: - case 6: - r0 = undefined; + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = (s.arg1 + s.tmp_5); return leave(s, r0) default: oops() } } } -game_GameOverDialog_drawBestScore__P169485.info = {"start":22246,"length":1319,"line":600,"column":8,"endLine":627,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"drawBestScore","argumentNames":["this"]} +Math_FastRandom_randomRange__P169590.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 game_GameOverDialog_drawBestScore__P169485_mk(s) { +function Math_FastRandom_randomRange__P169590_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_GameOverDialog_drawBestScore__P169485, depth: s.depth + 1, + parent: s, fn: Math_FastRandom_randomRange__P169590, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -26323,20 +26844,16 @@ function game_GameOverDialog_drawBestScore__P169485_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - currY___182570: undefined, - label___182579: undefined, - halfWidth___182590: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function game_screenColor__P172413(s) { +function Math_FastRandom_next__P169589(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26350,30 +26867,43 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = pxsim_ImageMethods.isMono(globals.screen___168559); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = 1; - { step = 2; continue; } - case 1: r0 = s.arg0; - case 2: - // jmp value (already in r0) + if (!checkSubtype(r0, Math_FastRandom__C169586_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["lfsr"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 >> 1); + s.tmp_2 = r0; + r0 = s.arg0.fields["lfsr"]; + s.tmp_7 = r0; + r0 = (s.tmp_7 & 1); + s.tmp_6 = r0; + r0 = (0 - s.tmp_6); + s.tmp_5 = r0; + r0 = (s.tmp_5 & 46080); + s.tmp_4 = r0; + r0 = (s.tmp_2 ^ s.tmp_4); s.tmp_1 = r0; + r0 = (s.tmp_0).fields["lfsr"] = (s.tmp_1); r0 = s.tmp_1; return leave(s, r0) default: oops() } } } -game_screenColor__P172413.info = {"start":581,"length":85,"line":28,"column":4,"endLine":30,"endColumn":5,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"screenColor","argumentNames":["c"]} +Math_FastRandom_next__P169589.info = {"start":1713,"length":107,"line":53,"column":8,"endLine":55,"endColumn":9,"fileName":"pxt_modules/game/mathUtil.ts","functionName":"next","argumentNames":["this"]} -function game_screenColor__P172413_mk(s) { +function Math_FastRandom_next__P169589_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_screenColor__P172413, depth: s.depth + 1, + parent: s, fn: Math_FastRandom_next__P169589, depth: s.depth + 1, pc: 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, } } @@ -26381,7 +26911,7 @@ function game_screenColor__P172413_mk(s) { -function game_GameOverDialog_isMultiplayerGame__P169479(s) { +function effects_ImageEffect_constructor__P169818(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26393,45 +26923,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, game_GameOverDialog__C169473_VT)) failedCast(r0); - r0 = s.arg0.fields["flags"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 & 8); - 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 (!checkSubtype(r0, effects_ImageEffect__C169817_VT)) failedCast(r0); + r0 = (s.arg0).fields["effect"] = (s.arg2); + r0 = pxsim_pxtcore_mkClassInstance(Math_FastRandom__C169586_VT); s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); - return leaveAccessor(s, r0) + s.tmp_1 = Math_FastRandom_constructor__P169588_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = undefined; + s.callLocIdx = 1693; 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() } } } -game_GameOverDialog_isMultiplayerGame__P169479.info = {"start":13962,"length":84,"line":422,"column":8,"endLine":422,"endColumn":92,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"isMultiplayerGame","argumentNames":["this"]} -game_GameOverDialog_isMultiplayerGame__P169479.isGetter = true; +effects_ImageEffect_constructor__P169818.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 game_GameOverDialog_isMultiplayerGame__P169479_mk(s) { +function effects_ImageEffect_constructor__P169818_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_GameOverDialog_isMultiplayerGame__P169479, depth: s.depth + 1, + parent: s, fn: effects_ImageEffect_constructor__P169818, depth: s.depth + 1, pc: 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 game_GameOverDialog_isNewBestScore__P169478(s) { +function effects_ImageEffect_applyTo__P169819(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26441,47 +26973,80 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.clonedImage___182262 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_GameOverDialog__C169473_VT)) failedCast(r0); - r0 = s.arg0.fields["flags"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 & 4); + if (!checkSubtype(r0, effects_ImageEffect__C169817_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.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); - 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) + 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___182262 = (r0); + s.tmp_0 = effects_ImageEffect_change__P169820_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.clonedImage___182262; + s.callLocIdx = 1696; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + s.tmp_0 = Sprite_setImage__P168918_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = s.clonedImage___182262; + s.callLocIdx = 1697; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + case 5: + r0 = undefined; + return leave(s, r0) default: oops() } } } -game_GameOverDialog_isNewBestScore__P169478.info = {"start":13875,"length":78,"line":421,"column":8,"endLine":421,"endColumn":86,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"isNewBestScore","argumentNames":["this"]} -game_GameOverDialog_isNewBestScore__P169478.isGetter = true; +effects_ImageEffect_applyTo__P169819.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 game_GameOverDialog_isNewBestScore__P169478_mk(s) { +function effects_ImageEffect_applyTo__P169819_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_GameOverDialog_isNewBestScore__P169478, depth: s.depth + 1, + parent: s, fn: effects_ImageEffect_applyTo__P169819, depth: s.depth + 1, pc: 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___182262: undefined, arg0: undefined, + arg1: undefined, } } -function game_GameOverDialog_hasBestScore__P169477(s) { +function effects_ImageEffect_change__P169820(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26493,45 +27058,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, game_GameOverDialog__C169473_VT)) failedCast(r0); - r0 = s.arg0.fields["flags"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 & 2); - 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, effects_ImageEffect__C169817_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 = 1698; 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 = 1698; s.pc = 1; return s.tmp_0; } + else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 1698; s.pc = 1; return s.tmp_0;; } + else { s.callLocIdx = 1698; s.pc = 1; return s.tmp_0; } + } + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) default: oops() } } } -game_GameOverDialog_hasBestScore__P169477.info = {"start":13790,"length":76,"line":420,"column":8,"endLine":420,"endColumn":84,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"hasBestScore","argumentNames":["this"]} -game_GameOverDialog_hasBestScore__P169477.isGetter = true; +effects_ImageEffect_change__P169820.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 game_GameOverDialog_hasBestScore__P169477_mk(s) { +function effects_ImageEffect_change__P169820_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_GameOverDialog_hasBestScore__P169477, depth: s.depth + 1, + parent: s, fn: effects_ImageEffect_change__P169820, depth: s.depth + 1, pc: 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 helpers_imagePrintCenter__P168516(s) { +function effects_ParticleEffect_start__P169791(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26541,8 +27109,7 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.w___182665 = undefined; - s.x___182671 = undefined; + s.src___182287 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); @@ -26551,70 +27118,91 @@ switch (step) { s.arg4 = (s.lambdaArgs[4]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(s.arg4); + r0 = s.arg0; + if (!checkSubtype(r0, effects_ParticleEffect__C169789_VT)) failedCast(r0); + r0 = s.arg0.fields["sourceFactory"]; + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - s.tmp_2 = image_getFontForText__P168504_mk(s); - s.tmp_2.arg0 = s.arg1; - s.callLocIdx = 164; s.pc = 3; return s.tmp_2; - case 3: - r0 = s.retval; - s.arg4 = (r0); + { step = 9; continue; } case 1: case 2: - r0 = pxsim_String_.length(s.arg1); - s.tmp_0 = r0; - s.tmp_2 = if_charWidth_1_mk(s); - s.tmp_2.arg0 = s.arg4; - if (!s.tmp_2.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "charWidth"); + 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 = 1673; s.pc = 10; return s.tmp_4; } 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 = 165; s.pc = 4; return s.tmp_2; } + 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 = 1673; s.pc = 10; return s.tmp_4; } + else if (s.tmp_4.fn.isGetter) { s.tmp_4.stage2Call = true; s.callLocIdx = 1673; s.pc = 10; return s.tmp_4;; } + else { s.callLocIdx = 1673; s.pc = 10; return s.tmp_4; } } - case 4: + case 10: r0 = s.retval; + s.src___182287 = (r0); + s.tmp_0 = particles_ParticleSource_setRelativeToCamera__P169689_mk(s); + s.tmp_0.arg0 = s.src___182287; + 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 = (s.tmp_0 * s.tmp_1); - s.w___182665 = (r0); - r0 = pxsim_ImageMethods.width(s.arg0); - s.tmp_1 = r0; - r0 = (s.tmp_1 - s.w___182665); + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0.arg1 = r0; + s.callLocIdx = 1674; 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 / 2); - s.x___182671 = (r0); - s.tmp_0 = helpers_imagePrint__P168517_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.tmp_0.arg2 = s.x___182671; - 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 = 166; s.pc = 5; return s.tmp_0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + r0 = s.arg2; + { step = 6; continue; } case 5: - r0 = s.retval; + r0 = s.arg0.fields["defaultLifespan"]; + case 6: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = (s.src___182287).fields["lifespan"] = (s.tmp_1); + case 7: + case 8: + case 9: r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_imagePrintCenter__P168516.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"]} +effects_ParticleEffect_start__P169791.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 helpers_imagePrintCenter__P168516_mk(s) { +function effects_ParticleEffect_start__P169791_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_imagePrintCenter__P168516, depth: s.depth + 1, + parent: s, fn: effects_ParticleEffect_start__P169791, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - w___182665: undefined, - x___182671: undefined, + tmp_3: undefined, + tmp_4: undefined, + src___182287: undefined, arg0: undefined, arg1: undefined, arg2: undefined, @@ -26626,7 +27214,7 @@ function helpers_imagePrintCenter__P168516_mk(s) { -function game_GameOverDialog_drawScores__P169484(s) { +function particles_ParticleSource_setRelativeToCamera__P169689(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26636,614 +27224,123 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scores___182706 = undefined; - s.currY___182719 = undefined; - s.score___182728 = undefined; - s.x___182760 = undefined; - s.strlens___182787 = undefined; - s.i___182789 = undefined; - s.col___182795 = undefined; - s.score___182798 = undefined; - s.i___182831 = undefined; - s.col___182837 = undefined; - s.score___182840 = undefined; - s.str___182844 = undefined; - s.x___182856 = undefined; - s.score___182937 = undefined; - s.currY___182958 = undefined; - s.currY___182978 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_GameOverDialog__C169473_VT)) failedCast(r0); - s.tmp_1 = game_GameOverDialog_hasScores__P169476_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 1260; s.pc = 23; return s.tmp_1; - case 23: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 19; continue; } - s.tmp_2 = helpers_arrayFilter__P166637_mk(s); - r0 = s.arg0.fields["scores"]; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = scores_inline__P182708; - s.callLocIdx = 1261; s.pc = 24; return s.tmp_2; - case 24: - r0 = s.retval; - s.scores___182706 = (r0); - s.tmp_1 = if_charHeight_1_mk(s); - s.tmp_1.arg0 = globals.font5___168507; - 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 = 1262; s.pc = 25; return s.tmp_1; } - } - case 25: - r0 = s.retval; - s.tmp_0 = r0; - r0 = (s.tmp_0 + 16); - s.currY___182719 = (r0); - s.tmp_1 = game_GameOverDialog_isMultiplayerGame__P169479_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 1263; s.pc = 26; return s.tmp_1; - case 26: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 17; continue; } - r0 = pxsim_Array__length(s.scores___182706); - s.tmp_3 = r0; - r0 = (s.tmp_3 === 1); + if (!checkSubtype(r0, particles_ParticleSource__C169678_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 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 3; continue; } - r0 = pxsim_Array__getAt(s.scores___182706, 0); - s.score___182728 = (r0); - s.tmp_0 = r0 = s.score___182728; - r0 = s.score___182728.fields["player"]; - s.tmp_7 = r0; - if ((s.tmp_7) && (s.tmp_7).vtable) { - setupResume(s, 27); - pxsim_String__stringConv(s.tmp_7); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_7) + ""; } - case 27: - r0 = s.retval; - s.tmp_6 = r0; - r0 = pxsim_String__concat("P", s.tmp_6); - s.tmp_5 = r0; - if ((s.tmp_5) && (s.tmp_5).vtable) { - setupResume(s, 28); - pxsim_String__stringConv(s.tmp_5); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_5) + ""; } - case 28: - r0 = s.retval; + r0 = (s.tmp_2 | 4); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["pFlags"] = (s.tmp_1); + { step = 2; continue; } + case 1: + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["pFlags"]; s.tmp_4 = r0; - r0 = pxsim_String__concat(s.tmp_4, ":"); + r0 = (~ s.tmp_4); s.tmp_3 = r0; - if ((s.tmp_3) && (s.tmp_3).vtable) { - setupResume(s, 29); - pxsim_String__stringConv(s.tmp_3); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_3) + ""; } - case 29: - r0 = s.retval; + r0 = (s.tmp_3 | 4); s.tmp_2 = r0; - r0 = s.score___182728.fields["value"]; - s.tmp_9 = r0; - if ((s.tmp_9) && (s.tmp_9).vtable) { - setupResume(s, 30); - pxsim_String__stringConv(s.tmp_9); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_9) + ""; } - case 30: - r0 = s.retval; - s.tmp_8 = r0; - r0 = pxsim_String__concat(s.tmp_2, s.tmp_8); + r0 = (~ s.tmp_2); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["str"] = (s.tmp_1); - s.tmp_0 = helpers_imagePrintCenter__P168516_mk(s); - r0 = s.arg0.fields["image"]; - s.tmp_0.arg0 = r0; - r0 = s.score___182728.fields["str"]; - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = s.currY___182719; - s.tmp_1 = game_screenColor__P172413_mk(s); - s.tmp_1.arg0 = 1; - s.callLocIdx = 1264; s.pc = 32; return s.tmp_1; - case 32: - r0 = s.retval; - s.tmp_0.arg3 = r0; - s.tmp_0.arg4 = globals.font5___168507; - s.callLocIdx = 1265; s.pc = 31; return s.tmp_0; - case 31: - r0 = s.retval; - r0 = s.score___182728.fields["winner"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + r0 = (s.tmp_0).fields["pFlags"] = (s.tmp_1); + case 2: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +particles_ParticleSource_setRelativeToCamera__P169689.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 particles_ParticleSource_setRelativeToCamera__P169689_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_ParticleSource_setRelativeToCamera__P169689, depth: s.depth + 1, + pc: 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_setFlag__P168946(s) { +let r0 = s.r0, 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, Sprite__C168868_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(s.arg2); if (!r0) { step = 1; continue; } - r0 = s.arg0.fields["image"]; - s.tmp_3 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_3); + s.tmp_0 = r0 = s.arg0; + 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.score___182728.fields["str"]; - s.tmp_7 = r0; - r0 = pxsim_String_.length(s.tmp_7); - s.tmp_6 = r0; - s.tmp_9 = if_charWidth_1_mk(s); - s.tmp_9.arg0 = globals.font5___168507; - if (!s.tmp_9.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_9.arg0, "charWidth"); - } else { - s.tmp_9.fn = s.tmp_9.arg0.vtable.iface["charWidth"]; - if (s.tmp_9.fn == null) { s.retval = s.tmp_9.arg0.fields["charWidth"]; } - else if (!s.tmp_9.fn.isGetter) { s.retval = bind(s.tmp_9); } - else { s.callLocIdx = 1266; s.pc = 33; return s.tmp_9; } - } - case 33: - r0 = s.retval; - s.tmp_8 = r0; - r0 = (s.tmp_6 * s.tmp_8); - s.tmp_5 = r0; - r0 = (s.tmp_5 >> 1); + r0 = (s.tmp_0).fields["flags"] = (s.tmp_1); + { step = 2; continue; } + case 1: + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["flags"]; s.tmp_4 = r0; - r0 = (s.tmp_1 - s.tmp_4); - s.x___182760 = (r0); - r0 = s.arg0.fields["image"]; - s.tmp_0 = r0; - s.tmp_1 = r0 = globals.img_trophy_sm___172432; - s.tmp_4 = r0 = s.x___182760; - r0 = pxsim_ImageMethods.width(globals.img_trophy_sm___172432); - s.tmp_5 = r0; - r0 = (s.tmp_4 - s.tmp_5); - s.tmp_3 = r0; - r0 = (s.tmp_3 - 3); - s.tmp_2 = r0; - r0 = (s.currY___182719 - 2); - s.tmp_6 = r0; - r0 = pxsim_ImageMethods.drawTransparentImage(s.tmp_0, s.tmp_1, s.tmp_2, s.tmp_6); - case 1: - case 2: - { step = 16; continue; } - case 3: - r0 = pxsim_Array__mk(); - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, 0); - r0 = pxsim_Array__push(s.tmp_0, 0); - s.strlens___182787 = (s.tmp_0); - s.i___182789 = (0); - case 4: - s.tmp_1 = r0 = s.i___182789; - r0 = pxsim_Array__length(s.scores___182706); - 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; } - r0 = (s.i___182789 % 2); - s.col___182795 = (r0); - r0 = pxsim_Array__getAt(s.scores___182706, s.i___182789); - s.score___182798 = (r0); - s.tmp_0 = r0 = s.score___182798; - r0 = s.score___182798.fields["player"]; - s.tmp_7 = r0; - if ((s.tmp_7) && (s.tmp_7).vtable) { - setupResume(s, 34); - pxsim_String__stringConv(s.tmp_7); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_7) + ""; } - case 34: - r0 = s.retval; - s.tmp_6 = r0; - r0 = pxsim_String__concat("P", s.tmp_6); - s.tmp_5 = r0; - if ((s.tmp_5) && (s.tmp_5).vtable) { - setupResume(s, 35); - pxsim_String__stringConv(s.tmp_5); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_5) + ""; } - case 35: - 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, 36); - pxsim_String__stringConv(s.tmp_3); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_3) + ""; } - case 36: - r0 = s.retval; - s.tmp_2 = r0; - r0 = s.score___182798.fields["value"]; - s.tmp_9 = r0; - if ((s.tmp_9) && (s.tmp_9).vtable) { - setupResume(s, 37); - pxsim_String__stringConv(s.tmp_9); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_9) + ""; } - case 37: - r0 = s.retval; - s.tmp_8 = r0; - r0 = pxsim_String__concat(s.tmp_2, s.tmp_8); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["str"] = (s.tmp_1); - s.tmp_0 = r0 = s.strlens___182787; - s.tmp_1 = r0 = s.col___182795; - s.tmp_3 = Math_max__P166657_mk(s); - r0 = pxsim_Array__getAt(s.strlens___182787, s.col___182795); - s.tmp_3.arg0 = r0; - r0 = s.score___182798.fields["str"]; - s.tmp_4 = r0; - r0 = pxsim_String_.length(s.tmp_4); - s.tmp_3.arg1 = r0; - s.callLocIdx = 1267; s.pc = 38; return s.tmp_3; - case 38: - r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_1, s.tmp_2); - r0 = (s.i___182789 + 1); - s.i___182789 = (r0); - { step = 4; continue; } - case 5: - s.i___182831 = (0); - case 6: - s.tmp_1 = r0 = s.i___182831; - r0 = pxsim_Array__length(s.scores___182706); - 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.i___182831 % 2); - s.col___182837 = (r0); - r0 = pxsim_Array__getAt(s.scores___182706, s.i___182831); - s.score___182840 = (r0); - s.tmp_0 = game_padStr__P172411_mk(s); - r0 = pxsim_Array__getAt(s.strlens___182787, s.col___182837); - s.tmp_0.arg0 = r0; - s.callLocIdx = 1268; s.pc = 39; return s.tmp_0; - case 39: - r0 = s.retval; - s.str___182844 = (r0); - s.tmp_0 = game_replaceRange__P172412_mk(s); - s.tmp_0.arg0 = s.str___182844; - r0 = s.score___182840.fields["str"]; - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = 0; - r0 = s.score___182840.fields["str"]; - s.tmp_1 = r0; - r0 = pxsim_String_.length(s.tmp_1); - s.tmp_0.arg3 = r0; - s.callLocIdx = 1269; s.pc = 40; return s.tmp_0; - case 40: - r0 = s.retval; - s.str___182844 = (r0); - s.x___182856 = (0); - r0 = (s.col___182837 === 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; 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 = pxsim_Array__getAt(s.strlens___182787, s.col___182837); - s.tmp_6 = r0; - s.tmp_8 = if_charWidth_1_mk(s); - s.tmp_8.arg0 = globals.font5___168507; - if (!s.tmp_8.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_8.arg0, "charWidth"); - } else { - s.tmp_8.fn = s.tmp_8.arg0.vtable.iface["charWidth"]; - if (s.tmp_8.fn == null) { s.retval = s.tmp_8.arg0.fields["charWidth"]; } - else if (!s.tmp_8.fn.isGetter) { s.retval = bind(s.tmp_8); } - else { s.callLocIdx = 1270; s.pc = 41; return s.tmp_8; } - } - case 41: - r0 = s.retval; - s.tmp_7 = r0; - r0 = (s.tmp_6 * s.tmp_7); - s.tmp_5 = r0; - r0 = (s.tmp_2 - s.tmp_5); - s.tmp_1 = r0; - r0 = (s.tmp_1 - 3); - s.x___182856 = (r0); - { step = 8; continue; } - case 7: - r0 = s.arg0.fields["image"]; - s.tmp_2 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_1 >> 1); - s.tmp_0 = r0; - r0 = (s.tmp_0 + 3); - s.x___182856 = (r0); - case 8: - r0 = s.score___182840.fields["winner"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 11; continue; } - r0 = (s.i___182831 % 2); - s.tmp_2 = r0; - r0 = (s.tmp_2 === 0); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 9; continue; } - r0 = s.arg0.fields["image"]; - s.tmp_3 = r0; - s.tmp_4 = r0 = globals.img_trophy_sm___172432; - s.tmp_7 = r0 = s.x___182856; - r0 = pxsim_ImageMethods.width(globals.img_trophy_sm___172432); - s.tmp_8 = r0; - r0 = (s.tmp_7 - s.tmp_8); - s.tmp_6 = r0; - r0 = (s.tmp_6 - 3); - s.tmp_5 = r0; - r0 = (s.currY___182719 - 2); - s.tmp_9 = r0; - r0 = pxsim_ImageMethods.drawTransparentImage(s.tmp_3, s.tmp_4, s.tmp_5, s.tmp_9); - { step = 10; continue; } - case 9: - r0 = s.arg0.fields["image"]; - s.tmp_0 = r0; - s.tmp_1 = r0 = globals.img_trophy_sm___172432; - s.tmp_4 = r0 = s.x___182856; - r0 = s.score___182840.fields["str"]; - s.tmp_7 = r0; - r0 = pxsim_String_.length(s.tmp_7); - s.tmp_6 = r0; - s.tmp_9 = if_charWidth_1_mk(s); - s.tmp_9.arg0 = globals.font5___168507; - if (!s.tmp_9.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_9.arg0, "charWidth"); - } else { - s.tmp_9.fn = s.tmp_9.arg0.vtable.iface["charWidth"]; - if (s.tmp_9.fn == null) { s.retval = s.tmp_9.arg0.fields["charWidth"]; } - else if (!s.tmp_9.fn.isGetter) { s.retval = bind(s.tmp_9); } - else { s.callLocIdx = 1271; s.pc = 42; return s.tmp_9; } - } - case 42: - r0 = s.retval; - s.tmp_8 = r0; - r0 = (s.tmp_6 * s.tmp_8); - s.tmp_5 = r0; - r0 = (s.tmp_4 + s.tmp_5); - s.tmp_3 = r0; - r0 = (s.tmp_3 + 2); - s.tmp_2 = r0; - r0 = (s.currY___182719 - 2); - s.tmp_10 = r0; - r0 = pxsim_ImageMethods.drawTransparentImage(s.tmp_0, s.tmp_1, s.tmp_2, s.tmp_10); - case 10: - case 11: - case 12: - s.tmp_0 = helpers_imagePrint__P168517_mk(s); - r0 = s.arg0.fields["image"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.str___182844; - s.tmp_0.arg2 = s.x___182856; - s.tmp_0.arg3 = s.currY___182719; - s.tmp_1 = game_screenColor__P172413_mk(s); - s.tmp_1.arg0 = 1; - s.callLocIdx = 1272; s.pc = 44; return s.tmp_1; - case 44: - r0 = s.retval; - s.tmp_0.arg4 = r0; - s.tmp_0.arg5 = globals.font5___168507; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 1273; s.pc = 43; return s.tmp_0; - case 43: - r0 = s.retval; - r0 = (s.i___182831 % 2); - s.tmp_1 = r0; - r0 = (s.tmp_1 === 1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 13; continue; } - s.tmp_2 = r0 = s.currY___182719; - s.tmp_5 = if_charHeight_1_mk(s); - s.tmp_5.arg0 = globals.font5___168507; - if (!s.tmp_5.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "charHeight"); - } else { - s.tmp_5.fn = s.tmp_5.arg0.vtable.iface["charHeight"]; - if (s.tmp_5.fn == null) { s.retval = s.tmp_5.arg0.fields["charHeight"]; } - else if (!s.tmp_5.fn.isGetter) { s.retval = bind(s.tmp_5); } - else { s.callLocIdx = 1274; s.pc = 45; return s.tmp_5; } - } - case 45: - r0 = s.retval; - s.tmp_4 = r0; - r0 = (s.tmp_4 + 2); - s.tmp_3 = r0; - r0 = (s.tmp_2 + s.tmp_3); - s.currY___182719 = (r0); - case 13: - case 14: - r0 = (s.i___182831 + 1); - s.i___182831 = (r0); - { step = 6; continue; } - case 15: - case 16: - { step = 18; continue; } - case 17: - r0 = pxsim_Array__getAt(s.scores___182706, 0); - s.score___182937 = (r0); - s.tmp_0 = r0 = s.score___182937; - r0 = s.score___182937.fields["value"]; + r0 = (~ s.tmp_4); s.tmp_3 = r0; - if ((s.tmp_3) && (s.tmp_3).vtable) { - setupResume(s, 46); - pxsim_String__stringConv(s.tmp_3); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_3) + ""; } - case 46: - r0 = s.retval; + r0 = (s.tmp_3 | s.arg1); s.tmp_2 = r0; - r0 = pxsim_String__concat("Score:", s.tmp_2); + r0 = (~ s.tmp_2); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["str"] = (s.tmp_1); - s.tmp_0 = helpers_imagePrintCenter__P168516_mk(s); - r0 = s.arg0.fields["image"]; - s.tmp_0.arg0 = r0; - r0 = s.score___182937.fields["str"]; - s.tmp_0.arg1 = r0; - r0 = (s.currY___182719 - 1); - s.tmp_0.arg2 = r0; - s.tmp_1 = game_screenColor__P172413_mk(s); - s.tmp_1.arg0 = 1; - s.callLocIdx = 1275; s.pc = 48; return s.tmp_1; - case 48: - r0 = s.retval; - s.tmp_0.arg3 = r0; - s.tmp_0.arg4 = globals.font8___168502; - s.callLocIdx = 1276; s.pc = 47; return s.tmp_0; - case 47: - r0 = s.retval; - case 18: - { step = 22; continue; } - case 19: - s.tmp_1 = game_GameOverDialog_isWinCondition__P169474_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 1277; s.pc = 49; return s.tmp_1; - case 49: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 20; continue; } - s.tmp_3 = if_charHeight_1_mk(s); - s.tmp_3.arg0 = globals.font5___168507; - 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 = 1278; s.pc = 50; return s.tmp_3; } - } - case 50: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_2 + 14); - s.currY___182958 = (r0); - r0 = s.arg0.fields["image"]; - s.tmp_0 = r0; - s.tmp_1 = r0 = globals.img_trophy_lg___172435; - r0 = s.arg0.fields["image"]; - s.tmp_5 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_5); - s.tmp_4 = r0; - r0 = (s.tmp_4 >> 1); - s.tmp_3 = r0; - r0 = pxsim_ImageMethods.width(globals.img_trophy_lg___172435); - s.tmp_7 = r0; - r0 = (s.tmp_7 >> 1); - s.tmp_6 = r0; - r0 = (s.tmp_3 - s.tmp_6); - s.tmp_2 = r0; - r0 = pxsim_ImageMethods.drawTransparentImage(s.tmp_0, s.tmp_1, s.tmp_2, s.currY___182958); - { step = 21; continue; } - case 20: - s.tmp_1 = if_charHeight_1_mk(s); - s.tmp_1.arg0 = globals.font5___168507; - 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 = 1279; s.pc = 51; return s.tmp_1; } - } - case 51: - r0 = s.retval; - s.tmp_0 = r0; - r0 = (s.tmp_0 + 14); - s.currY___182978 = (r0); - r0 = s.arg0.fields["image"]; - s.tmp_0 = r0; - s.tmp_1 = r0 = globals.img_sleepy_sim___172438; - r0 = s.arg0.fields["image"]; - s.tmp_5 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_5); - s.tmp_4 = r0; - r0 = (s.tmp_4 >> 1); - s.tmp_3 = r0; - r0 = pxsim_ImageMethods.width(globals.img_sleepy_sim___172438); - s.tmp_7 = r0; - r0 = (s.tmp_7 >> 1); - s.tmp_6 = r0; - r0 = (s.tmp_3 - s.tmp_6); - s.tmp_2 = r0; - r0 = pxsim_ImageMethods.drawTransparentImage(s.tmp_0, s.tmp_1, s.tmp_2, s.currY___182978); - case 21: - case 22: + r0 = (s.tmp_0).fields["flags"] = (s.tmp_1); + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -game_GameOverDialog_drawScores__P169484.info = {"start":17805,"length":4431,"line":516,"column":8,"endLine":598,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"drawScores","argumentNames":["this"]} +Sprite_setFlag__P168946.info = {"start":20205,"length":130,"line":676,"column":4,"endLine":679,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"setFlag","argumentNames":["this","flag","on"]} -function game_GameOverDialog_drawScores__P169484_mk(s) { +function Sprite_setFlag__P168946_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_GameOverDialog_drawScores__P169484, depth: s.depth + 1, + parent: s, fn: Sprite_setFlag__P168946, depth: s.depth + 1, pc: 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, - scores___182706: undefined, - currY___182719: undefined, - score___182728: undefined, - x___182760: undefined, - strlens___182787: undefined, - i___182789: undefined, - col___182795: undefined, - score___182798: undefined, - i___182831: undefined, - col___182837: undefined, - score___182840: undefined, - str___182844: undefined, - x___182856: undefined, - score___182937: undefined, - currY___182958: undefined, - currY___182978: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function scores_inline__P182708(s) { +function Sprite__destroyCore__P168956(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27253,121 +27350,116 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.scene___182023 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0.fields["value"]; + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C168868_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__P169526_mk(s); + s.callLocIdx = 537; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + s.scene___182023 = (r0); + r0 = s.scene___182023.fields["allSprites"]; s.tmp_0 = r0; - r0 = (s.tmp_0 != null); - return leave(s, r0) - default: oops() -} } } -scores_inline__P182708.info = {"start":17904,"length":28,"line":518,"column":50,"endLine":518,"endColumn":78,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"inline","argumentNames":["score"]} - -function scores_inline__P182708_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: scores_inline__P182708, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, -} } - - - - - -function game_replaceRange__P172412(s) { -let r0 = s.r0, 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; - } - s.tmp_4 = helpers_stringSubstr__P166645_mk(s); - s.tmp_4.arg0 = s.arg0; - s.tmp_4.arg1 = 0; - s.tmp_4.arg2 = s.arg2; - s.callLocIdx = 1177; s.pc = 1; return s.tmp_4; + 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.retval; + r0 = s.scene___182023.fields["spritesByKind"]; + s.tmp_2 = r0; + r0 = s.arg0.fields["_kind"]; s.tmp_3 = r0; - if ((s.tmp_3) && (s.tmp_3).vtable) { - setupResume(s, 2); - pxsim_String__stringConv(s.tmp_3); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_3) + ""; } + r0 = pxsim_pxtrt.mapGetGeneric(s.tmp_2, s.tmp_3); case 2: - r0 = s.retval; - s.tmp_2 = r0; - s.tmp_7 = helpers_stringSubstr__P166645_mk(s); - s.tmp_7.arg0 = s.arg1; - s.tmp_7.arg1 = 0; - s.tmp_7.arg2 = s.arg3; - s.callLocIdx = 1178; s.pc = 3; return s.tmp_7; - case 3: - r0 = s.retval; + // 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__P168997_mk(s); + r0 = s.scene___182023.fields["spritesByKind"]; s.tmp_6 = r0; - if ((s.tmp_6) && (s.tmp_6).vtable) { - setupResume(s, 4); - pxsim_String__stringConv(s.tmp_6); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_6) + ""; } - case 4: + 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 = 541; s.pc = 8; return s.tmp_5; + case 8: r0 = s.retval; - s.tmp_5 = r0; - r0 = pxsim_String__concat(s.tmp_2, s.tmp_5); - s.tmp_1 = r0; - if ((s.tmp_1) && (s.tmp_1).vtable) { - setupResume(s, 5); - pxsim_String__stringConv(s.tmp_1); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_1) + ""; } - case 5: + case 3: + case 4: + s.tmp_0 = PhysicsEngine__C169038_v1_2_mk(s); + r0 = s.scene___182023.fields["physicsEngine"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.arg0; + if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C169038_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; - s.tmp_10 = helpers_stringSubstr__P166645_mk(s); - s.tmp_10.arg0 = s.arg0; - r0 = (s.arg2 + s.arg3); - s.tmp_10.arg1 = r0; - s.tmp_10.arg2 = undefined; - s.callLocIdx = 1179; s.pc = 6; return s.tmp_10; + 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 = 542; 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 = 542; s.pc = 10; return s.tmp_1; } + else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 542; s.pc = 10; return s.tmp_1;; } + else { s.callLocIdx = 542; s.pc = 10; return s.tmp_1; } + } + case 10: + r0 = s.retval; + case 5: case 6: + r0 = pxsim_pxtcore_mkAction(1, forEach_inline__P182052); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + r0 = pxsim_pxtcore_mkAction(1, Sprite__destroyCore_inline__P182058); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.arg0); + s.tmp_2 = helpers_arrayForEach__P166636_mk(s); + s.tmp_3 = helpers_arrayFilter__P166637_mk(s); + r0 = s.scene___182023.fields["destroyedHandlers"]; + s.tmp_3.arg0 = r0; + s.tmp_3.arg1 = s.tmp_0; + s.callLocIdx = 544; s.pc = 12; return s.tmp_3; + case 12: r0 = s.retval; - s.tmp_9 = r0; - if ((s.tmp_9) && (s.tmp_9).vtable) { - setupResume(s, 7); - pxsim_String__stringConv(s.tmp_9); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_9) + ""; } - case 7: + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = s.tmp_1; + s.callLocIdx = 546; s.pc = 11; return s.tmp_2; + case 11: r0 = s.retval; - s.tmp_8 = r0; - r0 = pxsim_String__concat(s.tmp_0, s.tmp_8); + r0 = undefined; return leave(s, r0) default: oops() } } } -game_replaceRange__P172412.info = {"start":400,"length":175,"line":24,"column":4,"endLine":26,"endColumn":5,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"replaceRange","argumentNames":["dst","src","start","len"]} +Sprite__destroyCore__P168956.info = {"start":26792,"length":522,"line":870,"column":4,"endLine":882,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"_destroyCore","argumentNames":["this"]} -function game_replaceRange__P172412_mk(s) { +function Sprite__destroyCore__P168956_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_replaceRange__P172412, depth: s.depth + 1, + parent: s, fn: Sprite__destroyCore__P168956, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -27377,20 +27469,15 @@ function game_replaceRange__P172412_mk(s) { tmp_5: undefined, tmp_6: undefined, tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, + scene___182023: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function game_padStr__P172411(s) { +function forEach_inline__P182052(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27400,50 +27487,27 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.str___183033 = undefined; - s.i___183034 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = pxsim_String_.mkEmpty(); - s.str___183033 = (r0); - s.i___183034 = (0); - case 1: - r0 = (s.i___183034 < s.arg0); + r0 = s.arg0.fields["kind"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - if ((s.str___183033) && (s.str___183033).vtable) { - setupResume(s, 3); - pxsim_String__stringConv(s.str___183033); - checkResumeConsumed(); - return; - } else { s.retval = (s.str___183033) + ""; } - case 3: - r0 = s.retval; + r0 = s.caps[0].fields["_kind"]; s.tmp_1 = r0; - r0 = pxsim_String__concat(s.tmp_1, " "); - s.str___183033 = (r0); - r0 = (s.i___183034 + 1); - s.i___183034 = (r0); - { step = 1; continue; } - case 2: - r0 = s.str___183033; + r0 = (s.tmp_0 == s.tmp_1); return leave(s, r0) default: oops() } } } -game_padStr__P172411.info = {"start":234,"length":160,"line":16,"column":4,"endLine":22,"endColumn":5,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"padStr","argumentNames":["len"]} +forEach_inline__P182052.info = {"start":27237,"length":26,"line":880,"column":20,"endLine":880,"endColumn":46,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["h"]} -function game_padStr__P172411_mk(s) { +function forEach_inline__P182052_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_padStr__P172411, depth: s.depth + 1, + parent: s, fn: forEach_inline__P182052, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - str___183033: undefined, - i___183034: undefined, arg0: undefined, } } @@ -27451,7 +27515,7 @@ function game_padStr__P172411_mk(s) { -function game_GameOverDialog_hasScores__P169476(s) { +function Sprite__destroyCore_inline__P182058(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27465,35 +27529,32 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, game_GameOverDialog__C169473_VT)) failedCast(r0); - r0 = s.arg0.fields["flags"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 & 16); - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); - return leaveAccessor(s, r0) + s.tmp_0 = 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 = 545; 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 = 545; s.pc = 1; return s.tmp_0; } + else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 545; s.pc = 1; return s.tmp_0;; } + else { s.callLocIdx = 545; s.pc = 1; return s.tmp_0; } + } + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) default: oops() } } } -game_GameOverDialog_hasScores__P169476.info = {"start":13706,"length":75,"line":419,"column":8,"endLine":419,"endColumn":83,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"hasScores","argumentNames":["this"]} -game_GameOverDialog_hasScores__P169476.isGetter = true; +Sprite__destroyCore_inline__P182058.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_GameOverDialog_hasScores__P169476_mk(s) { +function Sprite__destroyCore_inline__P182058_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_GameOverDialog_hasScores__P169476, depth: s.depth + 1, + parent: s, fn: Sprite__destroyCore_inline__P182058, depth: s.depth + 1, pc: 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, } } @@ -27501,7 +27562,7 @@ function game_GameOverDialog_hasScores__P169476_mk(s) { -function game_GameOverDialog_isWinCondition__P169474(s) { +function PhysicsEngine_removeSprite__P169041(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27513,45 +27574,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, game_GameOverDialog__C169473_VT)) failedCast(r0); - r0 = s.arg0.fields["flags"]; - 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, PhysicsEngine__C169038_VT)) failedCast(r0); + r0 = undefined; + return leave(s, r0) default: oops() } } } -game_GameOverDialog_isWinCondition__P169474.info = {"start":13573,"length":73,"line":417,"column":8,"endLine":417,"endColumn":81,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"isWinCondition","argumentNames":["this"]} -game_GameOverDialog_isWinCondition__P169474.isGetter = true; +PhysicsEngine_removeSprite__P169041.info = {"start":159,"length":32,"line":10,"column":4,"endLine":10,"endColumn":36,"fileName":"pxt_modules/game/physics.ts","functionName":"removeSprite","argumentNames":["this","sprite"]} -function game_GameOverDialog_isWinCondition__P169474_mk(s) { +function PhysicsEngine_removeSprite__P169041_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_GameOverDialog_isWinCondition__P169474, depth: s.depth + 1, + parent: s, fn: PhysicsEngine_removeSprite__P169041, depth: s.depth + 1, pc: 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_GameOverDialog_drawMessage__P169483(s) { +function Sprite_kind__P168934(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27566,36 +27613,18 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_GameOverDialog__C169473_VT)) failedCast(r0); - s.tmp_0 = helpers_imagePrintCenter__P168516_mk(s); - r0 = s.arg0.fields["image"]; - s.tmp_0.arg0 = r0; - r0 = s.arg0.fields["message"]; - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = 5; - s.tmp_1 = game_screenColor__P172413_mk(s); - s.tmp_1.arg0 = 5; - s.callLocIdx = 1258; s.pc = 2; return s.tmp_1; - case 2: - r0 = s.retval; - s.tmp_0.arg3 = r0; - s.tmp_0.arg4 = globals.font8___168502; - s.callLocIdx = 1259; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + r0 = s.arg0.fields["_kind"]; return leave(s, r0) default: oops() } } } -game_GameOverDialog_drawMessage__P169483.info = {"start":17577,"length":218,"line":506,"column":8,"endLine":514,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"drawMessage","argumentNames":["this"]} +Sprite_kind__P168934.info = {"start":12573,"length":41,"line":453,"column":4,"endLine":455,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"kind","argumentNames":["this"]} -function game_GameOverDialog_drawMessage__P169483_mk(s) { +function Sprite_kind__P168934_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_GameOverDialog_drawMessage__P169483, depth: s.depth + 1, + parent: s, fn: Sprite_kind__P168934, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, arg0: undefined, } } @@ -27603,7 +27632,7 @@ function game_GameOverDialog_drawMessage__P169483_mk(s) { -function game_GameOverDialog_displayCursor__P169481(s) { +function Render_move__P171832(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27615,30 +27644,40 @@ 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_GameOverDialog__C169473_VT)) failedCast(r0); - r0 = (s.arg0).fields["cursorOn"] = (true); + s.tmp_0 = Render_RayCastingRender_move__P171778_mk(s); + s.tmp_0.arg0 = globals.raycastingRender___171795; + s.tmp_0.arg1 = s.arg0; + s.tmp_0.arg2 = s.arg1; + s.tmp_0.arg3 = s.arg2; + s.callLocIdx = 2079; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -game_GameOverDialog_displayCursor__P169481.info = {"start":17323,"length":61,"line":493,"column":8,"endLine":495,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"displayCursor","argumentNames":["this"]} +Render_move__P171832.info = {"start":14015,"length":112,"line":378,"column":4,"endLine":380,"endColumn":5,"fileName":"pxt_modules/pxt-raycasting/render_blocks.ts","functionName":"move","argumentNames":["sprite","v","a"]} -function game_GameOverDialog_displayCursor__P169481_mk(s) { +function Render_move__P171832_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_GameOverDialog_displayCursor__P169481, depth: s.depth + 1, + parent: s, fn: Render_move__P171832, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function game_GameOverDialog_constructor__P169480(s) { +function Render_RayCastingRender_move__P171778(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27648,450 +27687,138 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.score___183102 = undefined; - s.winner___183157 = undefined; - s.scoresWithValues___183234 = undefined; - s.scoreRows___183266 = undefined; + s.motionZ___182357 = 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, game_GameOverDialog__C169473_VT)) failedCast(r0); - r0 = (s.arg0).fields["message"] = (s.arg2); - r0 = (s.arg0).fields["judged"] = (s.arg3); - r0 = (s.arg0).fields["scores"] = (s.arg4); - r0 = (s.arg0).fields["bestScore"] = (s.arg5); - r0 = (s.arg0).fields["winnerOverride"] = (s.arg6); - s.tmp_0 = game_BaseDialog_constructor__P169442_mk(s); + if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); + s.tmp_0 = Render_RayCastingRender_getMotionZ__P171773_mk(s); s.tmp_0.arg0 = s.arg0; - r0 = pxsim_ImageMethods.width(globals.screen___168559); - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = 46; - s.tmp_1 = game_defaultSplashFrame__P172442_mk(s); - s.callLocIdx = 1235; s.pc = 34; return s.tmp_1; - case 34: - r0 = s.retval; - s.tmp_0.arg3 = r0; - s.tmp_0.arg4 = undefined; - s.tmp_0.arg5 = undefined; - s.callLocIdx = 1236; s.pc = 33; return s.tmp_0; - case 33: - r0 = s.retval; - r0 = (s.arg0).fields["cursorOn"] = (false); - r0 = (s.arg0).fields["flags"] = (0); - r0 = pxsim_numops_toBoolDecr(s.arg1); - 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 | 1); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["flags"] = (s.tmp_1); + s.tmp_0.arg1 = s.arg1; + s.tmp_0.arg2 = 0; + s.callLocIdx = 1947; s.pc = 1; return s.tmp_0; case 1: - case 2: - r0 = pxsim_numops_toBoolDecr(s.arg6); - if (!r0) { step = 5; continue; } - s.arg1 = (true); - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["flags"]; + r0 = s.retval; + s.motionZ___182357 = (r0); + s.tmp_0 = r0 = s.motionZ___182357; + r0 = (s.arg2 * 256); s.tmp_2 = r0; - r0 = (s.tmp_2 | 1); + r0 = (s.tmp_2 | 0); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["flags"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["flags"]; + r0 = (s.tmp_0).fields["v"] = (s.tmp_1); + s.tmp_0 = r0 = s.motionZ___182357; + r0 = (s.arg3 * 256); s.tmp_2 = r0; - r0 = (s.tmp_2 | 8); + r0 = (s.tmp_2 | 0); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["flags"] = (s.tmp_1); - r0 = pxsim_pxtcore_mkAction(1, score_inline__P183104); + r0 = (s.tmp_0).fields["a"] = (s.tmp_1); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +Render_RayCastingRender_move__P171778.info = {"start":6419,"length":167,"line":203,"column":8,"endLine":208,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"move","argumentNames":["this","spr","v","a"]} + +function Render_RayCastingRender_move__P171778_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Render_RayCastingRender_move__P171778, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + motionZ___182357: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, +} } + + + + + +function Render_RayCastingRender_getMotionZ__P171773(s) { +let r0 = s.r0, 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.motionZ___182374 = 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, Render_RayCastingRender__C171738_VT)) failedCast(r0); + r0 = s.arg0.fields["spriteMotionZ"]; s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg6); - s.tmp_1 = helpers_arrayFind__P166638_mk(s); - s.tmp_1.arg0 = s.arg4; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 1237; s.pc = 35; return s.tmp_1; - case 35: - r0 = s.retval; - s.score___183102 = (r0); - r0 = pxsim_numops_toBoolDecr(s.score___183102); + r0 = s.arg1.fields["id"]; + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); + s.motionZ___182374 = (r0); + r0 = pxsim_numops_toBoolDecr(s.motionZ___182374); 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 = pxsim_pxtcore_mkClassInstance(game_GameOverPlayerScore__C169470_VT); + if (!r0) { step = 1; continue; } + r0 = pxsim_pxtcore_mkClassInstance(Render_MotionSet1D__C174841_VT); s.tmp_2 = r0; - s.tmp_3 = game_GameOverPlayerScore_constructor__P169472_mk(s); + s.tmp_3 = Render_MotionSet1D_constructor__P174842_mk(s); s.tmp_3.arg0 = s.tmp_2; - s.tmp_3.arg1 = s.arg6; - s.tmp_3.arg2 = null; - s.tmp_3.arg3 = true; - s.callLocIdx = 1238; s.pc = 36; return s.tmp_3; - case 36: - r0 = s.retval; - r0 = pxsim_Array__push(s.arg4, s.tmp_2); - s.tmp_0 = helpers_arraySort__P166632_mk(s); - s.tmp_0.arg0 = s.arg4; - s.tmp_0.arg1 = game_GameOverDialog_inline__P183123; - s.callLocIdx = 1239; s.pc = 37; return s.tmp_0; - case 37: - r0 = s.retval; + r0 = (s.arg2 * 256); + s.tmp_4 = r0; + r0 = (s.tmp_4 | 0); + s.tmp_3.arg1 = r0; + s.callLocIdx = 1946; s.pc = 3; return s.tmp_3; case 3: - case 4: - r0 = pxsim_pxtcore_mkAction(1, game_GameOverDialog_inline__P183133); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg6); - s.tmp_1 = helpers_arrayForEach__P166636_mk(s); - s.tmp_1.arg0 = s.arg4; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 1240; s.pc = 38; return s.tmp_1; - case 38: - r0 = s.retval; - case 5: - case 6: - r0 = pxsim_Array__length(s.arg4); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 21; continue; } - r0 = pxsim_pxtcore_mkAction(1, game_GameOverDialog_inline__P183145); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.arg0); - s.tmp_2 = helpers_arrayForEach__P166636_mk(s); - s.tmp_2.arg0 = s.arg4; - s.tmp_2.arg1 = s.tmp_1; - s.callLocIdx = 1241; s.pc = 39; return s.tmp_2; - case 39: - r0 = s.retval; - r0 = pxsim_numops_toBoolDecr(s.arg1); - if (!r0) { step = 19; continue; } - s.tmp_0 = helpers_arrayFind__P166638_mk(s); - s.tmp_0.arg0 = s.arg4; - s.tmp_0.arg1 = winner_inline__P183160; - s.callLocIdx = 1242; s.pc = 40; return s.tmp_0; - case 40: r0 = s.retval; - s.winner___183157 = (r0); - r0 = pxsim_numops_toBoolDecr(s.winner___183157); - 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 = 7; continue; } - r0 = s.tmp_0; - { step = 8; continue; } - case 7: - r0 = pxsim_Array__length(s.arg4); - s.tmp_2 = r0; - r0 = (s.tmp_2 === 1); - case 8: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 9; continue; } - r0 = pxsim_Array__getAt(s.arg4, 0); - s.winner___183157 = (r0); - case 9: - case 10: - r0 = pxsim_numops_toBoolDecr(s.winner___183157); - if (!r0) { step = 17; continue; } - r0 = s.winner___183157.fields["value"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 != null); + s.motionZ___182374 = (s.tmp_2); + r0 = s.arg0.fields["spriteMotionZ"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 15; continue; } - r0 = (s.arg5 == null); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 11; continue; } - r0 = s.winner___183157.fields["value"]; - s.tmp_3 = r0; - r0 = (s.arg0).fields["bestScore"] = (s.tmp_3); - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["flags"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 | 4); + r0 = s.arg1.fields["id"]; s.tmp_1 = r0; - r0 = (s.tmp_0).fields["flags"] = (s.tmp_1); - { step = 14; continue; } - case 11: - s.tmp_1 = info_isBetterScore__P169094_mk(s); - r0 = s.winner___183157.fields["value"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.arg5; - s.callLocIdx = 1243; s.pc = 41; return s.tmp_1; - case 41: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 12; continue; } - r0 = s.winner___183157.fields["value"]; - s.tmp_2 = r0; - r0 = (s.arg0).fields["bestScore"] = (s.tmp_2); - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["flags"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 | 4); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["flags"] = (s.tmp_1); - case 12: - case 13: - case 14: - case 15: - case 16: - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = helpers_stringReplaceAll__P166644_mk(s); - s.tmp_3 = helpers_stringReplaceAll__P166644_mk(s); - s.tmp_4 = helpers_stringReplaceAll__P166644_mk(s); - s.tmp_5 = helpers_stringReplaceAll__P166644_mk(s); - r0 = s.arg0.fields["message"]; - s.tmp_5.arg0 = r0; - s.tmp_5.arg1 = "${WINNER}"; - r0 = s.winner___183157.fields["player"]; - s.tmp_7 = r0; - if ((s.tmp_7) && (s.tmp_7).vtable) { - setupResume(s, 46); - pxsim_String__stringConv(s.tmp_7); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_7) + ""; } - case 46: - r0 = s.retval; - s.tmp_6 = r0; - r0 = pxsim_String__concat("PLAYER ", s.tmp_6); - s.tmp_5.arg2 = r0; - s.callLocIdx = 1244; s.pc = 45; return s.tmp_5; - case 45: - r0 = s.retval; - s.tmp_4.arg0 = r0; - s.tmp_4.arg1 = "${Winner}"; - r0 = s.winner___183157.fields["player"]; - s.tmp_9 = r0; - if ((s.tmp_9) && (s.tmp_9).vtable) { - setupResume(s, 47); - pxsim_String__stringConv(s.tmp_9); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_9) + ""; } - case 47: - r0 = s.retval; - s.tmp_8 = r0; - r0 = pxsim_String__concat("Player ", s.tmp_8); - s.tmp_4.arg2 = r0; - s.callLocIdx = 1245; s.pc = 44; return s.tmp_4; - case 44: - r0 = s.retval; - s.tmp_3.arg0 = r0; - s.tmp_3.arg1 = "${winner}"; - r0 = s.winner___183157.fields["player"]; - s.tmp_11 = r0; - if ((s.tmp_11) && (s.tmp_11).vtable) { - setupResume(s, 48); - pxsim_String__stringConv(s.tmp_11); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_11) + ""; } - case 48: - r0 = s.retval; - s.tmp_10 = r0; - r0 = pxsim_String__concat("player ", s.tmp_10); - s.tmp_3.arg2 = r0; - s.callLocIdx = 1246; s.pc = 43; return s.tmp_3; - case 43: - r0 = s.retval; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = "${winner_short}"; - r0 = s.winner___183157.fields["player"]; - s.tmp_13 = r0; - if ((s.tmp_13) && (s.tmp_13).vtable) { - setupResume(s, 49); - pxsim_String__stringConv(s.tmp_13); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_13) + ""; } - case 49: - r0 = s.retval; - s.tmp_12 = r0; - r0 = pxsim_String__concat("P", s.tmp_12); - s.tmp_2.arg2 = r0; - s.callLocIdx = 1247; s.pc = 42; return s.tmp_2; - case 42: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["message"] = (s.tmp_1); - case 17: - case 18: - case 19: - case 20: - case 21: - case 22: - s.tmp_0 = helpers_arrayFilter__P166637_mk(s); - s.tmp_0.arg0 = s.arg4; - s.tmp_0.arg1 = scoresWithValues_inline__P183236; - s.callLocIdx = 1248; s.pc = 50; return s.tmp_0; - case 50: - r0 = s.retval; - s.scoresWithValues___183234 = (r0); - r0 = pxsim_Array__length(s.scoresWithValues___183234); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 23; continue; } - s.tmp_1 = r0 = s.arg0; - r0 = s.tmp_1.fields["flags"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 | 16); - s.tmp_2 = r0; - r0 = (s.tmp_1).fields["flags"] = (s.tmp_2); - case 23: - case 24: - s.tmp_1 = game_GameOverDialog_isWinCondition__P169474_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 1249; s.pc = 51; return s.tmp_1; - case 51: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 25; continue; } - r0 = s.tmp_0; - { step = 26; continue; } - case 25: - r0 = s.arg0.fields["judged"]; - case 26: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = pxsim_numops_toBool(s.tmp_2); - if (r0) { step = 27; continue; } - r0 = s.tmp_2; - { step = 28; continue; } - case 27: - s.tmp_3 = game_GameOverDialog_hasScores__P169476_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 1251; s.pc = 52; return s.tmp_3; - case 52: - r0 = s.retval; - case 28: - // jmp value (already in r0) - s.tmp_4 = r0; - r0 = pxsim_numops_toBool(s.tmp_4); - if (r0) { step = 29; continue; } - r0 = s.tmp_4; - { step = 30; continue; } - case 29: - r0 = s.arg0.fields["bestScore"]; - s.tmp_5 = r0; - r0 = (s.tmp_5 != null); - case 30: - // jmp value (already in r0) - s.tmp_6 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_6); - if (!r0) { step = 31; continue; } - s.tmp_7 = r0 = s.arg0; - r0 = s.tmp_7.fields["flags"]; - s.tmp_9 = r0; - r0 = (s.tmp_9 | 2); - s.tmp_8 = r0; - r0 = (s.tmp_7).fields["flags"] = (s.tmp_8); - case 31: - case 32: - s.tmp_1 = Math_max__P166657_mk(s); - s.tmp_1.arg0 = 0; - r0 = pxsim_Array__length(s.scoresWithValues___183234); - s.tmp_2 = r0; - r0 = (s.tmp_2 - 1); - s.tmp_1.arg1 = r0; - s.callLocIdx = 1252; s.pc = 53; return s.tmp_1; - case 53: - r0 = s.retval; - s.tmp_0 = r0; - r0 = (s.tmp_0 >> 1); - s.scoreRows___183266 = (r0); - s.tmp_0 = r0 = s.arg0; - s.tmp_3 = r0 = s.scoreRows___183266; - s.tmp_5 = if_charHeight_1_mk(s); - s.tmp_5.arg0 = globals.font5___168507; - if (!s.tmp_5.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "charHeight"); - } else { - s.tmp_5.fn = s.tmp_5.arg0.vtable.iface["charHeight"]; - if (s.tmp_5.fn == null) { s.retval = s.tmp_5.arg0.fields["charHeight"]; } - else if (!s.tmp_5.fn.isGetter) { s.retval = bind(s.tmp_5); } - else { s.callLocIdx = 1253; s.pc = 54; return s.tmp_5; } - } - case 54: - r0 = s.retval; - s.tmp_4 = r0; - r0 = (s.tmp_3 * s.tmp_4); - s.tmp_2 = r0; - r0 = (47 + s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["height"] = (s.tmp_1); - s.tmp_0 = game_BaseDialog_resize__P169443_mk(s); - s.tmp_0.arg0 = s.arg0; - r0 = pxsim_ImageMethods.width(globals.screen___168559); - s.tmp_0.arg1 = r0; - r0 = s.arg0.fields["height"]; - s.tmp_0.arg2 = r0; - s.tmp_1 = game_defaultSplashFrame__P172442_mk(s); - s.callLocIdx = 1254; s.pc = 56; return s.tmp_1; - case 56: - r0 = s.retval; - s.tmp_0.arg3 = r0; - s.tmp_0.arg4 = undefined; - s.tmp_0.arg5 = undefined; - s.callLocIdx = 1255; s.pc = 55; return s.tmp_0; - case 55: - r0 = s.retval; - r0 = undefined; + r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_1, s.motionZ___182374); + case 1: + case 2: + r0 = s.motionZ___182374; return leave(s, r0) default: oops() } } } -game_GameOverDialog_constructor__P169480.info = {"start":14056,"length":3257,"line":424,"column":8,"endLine":491,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"inline","argumentNames":["this","win","message","judged","scores","bestScore","winnerOverride"]} +Render_RayCastingRender_getMotionZ__P171773.info = {"start":4937,"length":289,"line":162,"column":8,"endLine":169,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"getMotionZ","argumentNames":["this","spr","offsetZ"]} -function game_GameOverDialog_constructor__P169480_mk(s) { +function Render_RayCastingRender_getMotionZ__P171773_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_GameOverDialog_constructor__P169480, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_getMotionZ__P171773, depth: s.depth + 1, pc: 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, - score___183102: undefined, - winner___183157: undefined, - scoresWithValues___183234: undefined, - scoreRows___183266: undefined, + motionZ___182374: undefined, arg0: undefined, arg1: undefined, arg2: undefined, - arg3: undefined, - arg4: undefined, - arg5: undefined, - arg6: undefined, } } -function score_inline__P183104(s) { +function Render_MotionSet1D_constructor__P174842(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28103,30 +27830,35 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0.fields["player"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 === s.caps[0]); + r0 = s.arg0; + if (!checkSubtype(r0, Render_MotionSet1D__C174841_VT)) failedCast(r0); + r0 = (s.arg0).fields["offset"] = (s.arg1); + r0 = (s.arg0).fields["v"] = (0); + r0 = (s.arg0).fields["a"] = (0); + r0 = (s.arg0).fields["p"] = (s.arg1); + r0 = undefined; return leave(s, r0) default: oops() } } } -score_inline__P183104.info = {"start":14893,"length":40,"line":446,"column":42,"endLine":446,"endColumn":82,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"inline","argumentNames":["score"]} +Render_MotionSet1D_constructor__P174842.info = {"start":655,"length":74,"line":26,"column":8,"endLine":28,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":["this","offset"]} -function score_inline__P183104_mk(s) { +function Render_MotionSet1D_constructor__P174842_mk(s) { checkStack(s.depth); return { - parent: s, fn: score_inline__P183104, depth: s.depth + 1, + parent: s, fn: Render_MotionSet1D_constructor__P174842, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, + arg1: undefined, } } -function game_GameOverDialog_inline__P183123(s) { +function timer_after__P170892(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28141,23 +27873,24 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0.fields["player"]; - s.tmp_0 = r0; - r0 = s.arg1.fields["player"]; - s.tmp_1 = r0; - r0 = (s.tmp_0 - s.tmp_1); + s.tmp_0 = setTimeout__P166950_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 79; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -game_GameOverDialog_inline__P183123.info = {"start":15084,"length":29,"line":449,"column":32,"endLine":449,"endColumn":61,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"inline","argumentNames":["a","b"]} +timer_after__P170892.info = {"start":317,"length":96,"line":11,"column":4,"endLine":13,"endColumn":5,"fileName":"pxt_modules/Timers/timers.ts","functionName":"after","argumentNames":["time","thenDo"]} -function game_GameOverDialog_inline__P183123_mk(s) { +function timer_after__P170892_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_GameOverDialog_inline__P183123, depth: s.depth + 1, + parent: s, fn: timer_after__P170892, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, arg0: undefined, arg1: undefined, } } @@ -28166,7 +27899,7 @@ function game_GameOverDialog_inline__P183123_mk(s) { -function game_GameOverDialog_inline__P183133(s) { +function setTimeout__P166950(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28178,36 +27911,36 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["player"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 === s.caps[0]); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["winner"] = (s.tmp_1); - r0 = s.tmp_1; + s.tmp_0 = control_setInterval__P166881_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.tmp_0.arg2 = 1; + s.callLocIdx = 6; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; return leave(s, r0) default: oops() } } } -game_GameOverDialog_inline__P183133.info = {"start":15165,"length":55,"line":451,"column":31,"endLine":451,"endColumn":86,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"inline","argumentNames":["score"]} +setTimeout__P166950.info = {"start":610,"length":139,"line":26,"column":0,"endLine":28,"endColumn":1,"fileName":"pxt_modules/base/scheduling.ts","functionName":"setTimeout","argumentNames":["func","delay"]} -function game_GameOverDialog_inline__P183133_mk(s) { +function setTimeout__P166950_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_GameOverDialog_inline__P183133, depth: s.depth + 1, + parent: s, fn: setTimeout__P166950, 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 game_GameOverDialog_inline__P183145(s) { +function control_setInterval__P166881(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28217,54 +27950,81 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.interval___198957 = 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["player"]; + r0 = pxsim_numops_toBoolDecr(s.arg0); s.tmp_1 = r0; - r0 = (s.tmp_1 > 1); + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 1; continue; } + if (!r0) { step = 1; continue; } r0 = s.tmp_0; { step = 2; continue; } case 1: - s.tmp_2 = r0 = s.caps[0]; - r0 = s.tmp_2.fields["flags"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 | 8); - s.tmp_3 = r0; - r0 = (s.tmp_2).fields["flags"] = (s.tmp_3); - r0 = s.tmp_3; + r0 = (s.arg1 < 0); case 2: // jmp value (already in r0) - s.tmp_5 = r0; - r0 = s.tmp_5; + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 3; continue; } + r0 = 0; + { step = 7; continue; } + case 3: + case 4: + r0 = pxsim_numops_toBoolDecr(globals._intervals___171922); + s.tmp_4 = r0; + r0 = pxsim_Boolean__bang(s.tmp_4); + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 5; continue; } + r0 = pxsim_Array__mk(); + globals._intervals___171922 = (r0); + case 5: + case 6: + r0 = pxsim_pxtcore_mkClassInstance(control_Interval__C171923_VT); + s.tmp_0 = r0; + s.tmp_1 = control_Interval_constructor__P171926_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.arg2; + s.callLocIdx = 5; s.pc = 8; return s.tmp_1; + case 8: + r0 = s.retval; + s.interval___198957 = (s.tmp_0); + r0 = s.interval___198957.fields["id"]; + case 7: return leave(s, r0) default: oops() } } } -game_GameOverDialog_inline__P183145.info = {"start":15393,"length":76,"line":456,"column":31,"endLine":456,"endColumn":107,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"inline","argumentNames":["score"]} +control_setInterval__P166881.info = {"start":1554,"length":266,"line":54,"column":4,"endLine":59,"endColumn":5,"fileName":"pxt_modules/base/interval.ts","functionName":"setInterval","argumentNames":["func","delay","mode"]} -function game_GameOverDialog_inline__P183145_mk(s) { +function control_setInterval__P166881_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_GameOverDialog_inline__P183145, depth: s.depth + 1, + parent: s, fn: control_setInterval__P166881, depth: s.depth + 1, pc: 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, + interval___198957: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function winner_inline__P183160(s) { +function control_Interval_constructor__P171926(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28276,27 +28036,72 @@ 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.fields["winner"]; + r0 = s.arg0; + if (!checkSubtype(r0, control_Interval__C171923_VT)) failedCast(r0); + r0 = pxsim_Array__length(globals._intervals___171922); + 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 = 1; + { step = 2; continue; } + case 1: + s.tmp_3 = r0 = globals._intervals___171922; + r0 = pxsim_Array__length(globals._intervals___171922); + s.tmp_5 = r0; + r0 = (s.tmp_5 - 1); + s.tmp_4 = r0; + r0 = pxsim_Array__getAt(s.tmp_3, s.tmp_4); + r0 = r0.fields["id"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + 1); + case 2: + // jmp value (already in r0) + s.tmp_6 = r0; + r0 = (s.arg0).fields["id"] = (s.tmp_6); + r0 = (s.arg0).fields["func"] = (s.arg1); + r0 = (s.arg0).fields["delay"] = (s.arg2); + r0 = (s.arg0).fields["mode"] = (s.arg3); + r0 = pxsim_Array__push(globals._intervals___171922, s.arg0); + r0 = pxsim_pxtcore_mkAction(1, control_Interval_inline__P199000); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + r0 = pxsim.control.runInParallel(s.tmp_0); + r0 = undefined; return leave(s, r0) default: oops() } } } -winner_inline__P183160.info = {"start":15544,"length":21,"line":458,"column":45,"endLine":458,"endColumn":66,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"inline","argumentNames":["score"]} +control_Interval_constructor__P171926.info = {"start":283,"length":367,"line":15,"column":8,"endLine":24,"endColumn":9,"fileName":"pxt_modules/base/interval.ts","functionName":"inline","argumentNames":["this","func","delay","mode"]} -function winner_inline__P183160_mk(s) { +function control_Interval_constructor__P171926_mk(s) { checkStack(s.depth); return { - parent: s, fn: winner_inline__P183160, depth: s.depth + 1, + parent: s, fn: control_Interval_constructor__P171926, depth: s.depth + 1, pc: 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, + arg3: undefined, } } -function scoresWithValues_inline__P183236(s) { +function control_Interval_inline__P199000(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28306,32 +28111,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.fields["value"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 != null); + s.tmp_0 = control_Interval_work__P171924_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.callLocIdx = 0; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -scoresWithValues_inline__P183236.info = {"start":16752,"length":28,"line":480,"column":51,"endLine":480,"endColumn":79,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"inline","argumentNames":["score"]} +control_Interval_inline__P199000.info = {"start":621,"length":17,"line":23,"column":34,"endLine":23,"endColumn":51,"fileName":"pxt_modules/base/interval.ts","functionName":"inline","argumentNames":[]} -function scoresWithValues_inline__P183236_mk(s) { +function control_Interval_inline__P199000_mk(s) { checkStack(s.depth); return { - parent: s, fn: scoresWithValues_inline__P183236, depth: s.depth + 1, + parent: s, fn: control_Interval_inline__P199000, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - arg0: undefined, } } -function game_defaultSplashFrame__P172442(s) { +function control_Interval_work__P171924(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28341,39 +28144,122 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_ImageMethods.isMono(globals.screen___168559); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, control_Interval__C171923_VT)) failedCast(r0); + r0 = s.arg0.fields["mode"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = pxsim.image.ofBuffer(_hex183428); - { step = 2; continue; } + r0 = pxsim_pxtcore.switch_eq(2, 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(0, s.tmp_0); + if (r0) { step = 7; continue; } + r0 = s.tmp_0; + { step = 12; continue; } case 1: - r0 = pxsim.image.ofBuffer(_hex183430); case 2: - // jmp value (already in r0) + r0 = s.arg0.fields["delay"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 > 0); s.tmp_1 = r0; - r0 = s.tmp_1; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 3; continue; } + s.tmp_3 = pause__P166940_mk(s); + r0 = s.arg0.fields["delay"]; + s.tmp_3.arg0 = r0; + s.callLocIdx = 1; s.pc = 13; return s.tmp_3; + case 13: + r0 = s.retval; + case 3: + case 4: + r0 = s.arg0.fields["delay"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 >= 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + s.tmp_2 = if_func_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, "func"), 1); + s.callLocIdx = 2; s.pc = 14; return s.tmp_2; + } else { + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["func"]; + if (s.tmp_2.fn == null) { setupLambda(s.tmp_2, s.tmp_2.arg0.fields["func"], 1); s.callLocIdx = 2; s.pc = 14; return s.tmp_2; } + else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 2; s.pc = 14; return s.tmp_2;; } + else { s.callLocIdx = 2; s.pc = 14; return s.tmp_2; } + } + case 14: + r0 = s.retval; + case 5: + case 6: + { step = 12; continue; } + case 7: + case 8: + r0 = s.arg0.fields["delay"]; + 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; } + s.tmp_2 = pause__P166940_mk(s); + r0 = s.arg0.fields["delay"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 3; s.pc = 15; return s.tmp_2; + case 15: + r0 = s.retval; + r0 = s.arg0.fields["delay"]; + 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; } + s.tmp_2 = if_func_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, "func"), 1); + s.callLocIdx = 4; s.pc = 16; return s.tmp_2; + } else { + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["func"]; + if (s.tmp_2.fn == null) { setupLambda(s.tmp_2, s.tmp_2.arg0.fields["func"], 1); s.callLocIdx = 4; s.pc = 16; return s.tmp_2; } + else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 4; s.pc = 16; return s.tmp_2;; } + else { s.callLocIdx = 4; s.pc = 16; return s.tmp_2; } + } + case 16: + r0 = s.retval; + case 9: + case 10: + { step = 8; continue; } + case 11: + case 12: + r0 = pxsim_Array_.removeElement(globals._intervals___171922, s.arg0); + r0 = undefined; return leave(s, r0) default: oops() } } } -game_defaultSplashFrame__P172442.info = {"start":27877,"length":220,"line":768,"column":4,"endLine":781,"endColumn":5,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"defaultSplashFrame","argumentNames":[]} +control_Interval_work__P171924.info = {"start":660,"length":823,"line":26,"column":8,"endLine":47,"endColumn":9,"fileName":"pxt_modules/base/interval.ts","functionName":"work","argumentNames":["this"]} -function game_defaultSplashFrame__P172442_mk(s) { +function control_Interval_work__P171924_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_defaultSplashFrame__P172442, depth: s.depth + 1, + parent: s, fn: control_Interval_work__P171924, depth: s.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, } } -const _hex183428 = pxsim.BufferMethods.createBufferFromHex("8704030003000000010100000101000001010000") -const _hex183430 = pxsim.BufferMethods.createBufferFromHex("8704030003000000f1010000f1010000f1010000") -function game_GameOverDialog_isJudgedGame__P169475(s) { +function Render_setAttribute__P171822(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28385,107 +28271,80 @@ 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_GameOverDialog__C169473_VT)) failedCast(r0); - r0 = s.arg0.fields["judged"]; - return leaveAccessor(s, r0) - default: oops() -} } } -game_GameOverDialog_isJudgedGame__P169475.info = {"start":13655,"length":42,"line":418,"column":8,"endLine":418,"endColumn":50,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"isJudgedGame","argumentNames":["this"]} -game_GameOverDialog_isJudgedGame__P169475.isGetter = true; - -function game_GameOverDialog_isJudgedGame__P169475_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: game_GameOverDialog_isJudgedGame__P169475, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function info_isBetterScore__P169094(s) { -let r0 = s.r0, 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.goc___183382 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - s.tmp_0 = lambda_1_mk(s); - s.tmp_0.argL = globals.gameOverConfig___169525; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 935; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; - s.goc___183382 = (r0); - r0 = s.goc___183382.fields["scoringType"]; - s.tmp_0 = r0; + s.tmp_0 = r0 = s.arg0; r0 = pxsim_pxtcore.switch_eq(0, s.tmp_0); if (r0) { step = 1; continue; } r0 = pxsim_pxtcore.switch_eq(1, s.tmp_0); - if (r0) { step = 4; continue; } + 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 = 6; continue; } r0 = s.tmp_0; - { step = 7; continue; } + { step = 9; continue; } case 1: - r0 = (s.arg1 == null); - s.tmp_1 = r0; - r0 = pxsim_numops_toBool(s.tmp_1); - if (!r0) { step = 2; continue; } - r0 = s.tmp_1; - { step = 3; continue; } + s.tmp_1 = Render_RayCastingRender_dirX__P171763_mk(s); + s.tmp_1.arg0 = globals.raycastingRender___171795; + s.tmp_1.arg1 = s.arg1; + s.callLocIdx = 2074; s.pc = 11; return s.tmp_1; + case 11: + r0 = s.retval; + { step = 10; continue; } case 2: - r0 = (s.arg0 > s.arg1); + s.tmp_0 = Render_RayCastingRender_dirY__P171764_mk(s); + s.tmp_0.arg0 = globals.raycastingRender___171795; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 2075; s.pc = 12; return s.tmp_0; + case 12: + r0 = s.retval; + { step = 10; continue; } case 3: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = s.tmp_2; - { step = 8; continue; } + r0 = (s.arg1 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + s.arg1 = (0); case 4: - r0 = (s.arg1 == null); - s.tmp_3 = r0; - r0 = pxsim_numops_toBool(s.tmp_3); - if (!r0) { step = 5; continue; } - r0 = s.tmp_3; - { step = 6; continue; } case 5: - r0 = (s.arg0 < s.arg1); + s.tmp_0 = Render_RayCastingRender_fov__P171768_mk(s); + s.tmp_0.arg0 = globals.raycastingRender___171795; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 2076; s.pc = 13; return s.tmp_0; + case 13: + r0 = s.retval; + { step = 10; continue; } case 6: - // jmp value (already in r0) - s.tmp_4 = r0; - r0 = s.tmp_4; - { step = 8; continue; } + r0 = (s.arg1 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; continue; } + s.arg1 = (0); case 7: - r0 = false; case 8: + s.tmp_0 = Render_RayCastingRender_wallZScale__P171772_mk(s); + s.tmp_0.arg0 = globals.raycastingRender___171795; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 2077; s.pc = 14; return s.tmp_0; + case 14: + r0 = s.retval; + case 9: + case 10: + r0 = undefined; return leave(s, r0) default: oops() } } } -info_isBetterScore__P169094.info = {"start":8408,"length":446,"line":274,"column":4,"endLine":285,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"isBetterScore","argumentNames":["newScore","prevScore"]} +Render_setAttribute__P171822.info = {"start":6789,"length":619,"line":188,"column":4,"endLine":206,"endColumn":5,"fileName":"pxt_modules/pxt-raycasting/render_blocks.ts","functionName":"setAttribute","argumentNames":["attr","value"]} -function info_isBetterScore__P169094_mk(s) { +function Render_setAttribute__P171822_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_isBetterScore__P169094, depth: s.depth + 1, + parent: s, fn: Render_setAttribute__P171822, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - goc___183382: undefined, arg0: undefined, arg1: undefined, } } @@ -28494,7 +28353,7 @@ function info_isBetterScore__P169094_mk(s) { -function helpers_stringReplaceAll__P166644(s) { +function Render_RayCastingRender_wallZScale__P171772(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28504,230 +28363,69 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.split___183301 = undefined; - s.empty___183307 = undefined; - s.output___183311 = undefined; - s.i___183326 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - if ((s.arg1) && (s.arg1).vtable) { - setupResume(s, 11); - pxsim_String__stringConv(s.arg1); - checkResumeConsumed(); - return; - } else { s.retval = (s.arg1) + ""; } - case 11: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_String_.mkEmpty(); - s.tmp_1 = r0; - r0 = pxsim_String__concat(s.tmp_0, s.tmp_1); - s.arg1 = (r0); - s.tmp_0 = helpers_stringSplit__P166649_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.tmp_0.arg2 = undefined; - s.callLocIdx = 11; s.pc = 12; return s.tmp_0; - case 12: - r0 = s.retval; - s.split___183301 = (r0); - r0 = pxsim_numops_toBoolDecr(s.arg1); - s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); - s.empty___183307 = (r0); - r0 = pxsim_numops_toBoolDecr(s.empty___183307); - if (!r0) { step = 1; continue; } - s.tmp_0 = applyReplace__P183314_mk(s); - s.tmp_0.arg0 = s.arg1; - s.tmp_0.arg1 = s.arg2; - s.callLocIdx = 13; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; - { step = 2; continue; } - case 1: - r0 = pxsim_String_.mkEmpty(); - case 2: - // jmp value (already in r0) - s.tmp_1 = r0; - s.output___183311 = (s.tmp_1); - r0 = pxsim_Array__length(s.split___183301); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - if ((s.output___183311) && (s.output___183311).vtable) { - setupResume(s, 14); - pxsim_String__stringConv(s.output___183311); - checkResumeConsumed(); - return; - } else { s.retval = (s.output___183311) + ""; } - case 14: - r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.split___183301, 0); - 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); - s.output___183311 = (r0); - case 3: - case 4: - s.i___183326 = (1); - case 5: - s.tmp_1 = r0 = s.i___183326; - r0 = pxsim_Array__length(s.split___183301); - 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; } - if ((s.output___183311) && (s.output___183311).vtable) { - setupResume(s, 16); - pxsim_String__stringConv(s.output___183311); - checkResumeConsumed(); - return; - } else { s.retval = (s.output___183311) + ""; } - case 16: - r0 = s.retval; - s.tmp_3 = r0; - s.tmp_8 = applyReplace__P183314_mk(s); - s.tmp_8.arg0 = s.arg1; - s.tmp_8.arg1 = s.arg2; - s.callLocIdx = 14; s.pc = 17; return s.tmp_8; - case 17: - r0 = s.retval; - s.tmp_7 = r0; - if ((s.tmp_7) && (s.tmp_7).vtable) { - setupResume(s, 18); - pxsim_String__stringConv(s.tmp_7); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_7) + ""; } - case 18: - r0 = s.retval; - s.tmp_6 = r0; - r0 = pxsim_Array__getAt(s.split___183301, s.i___183326); - s.tmp_10 = r0; - if ((s.tmp_10) && (s.tmp_10).vtable) { - setupResume(s, 19); - pxsim_String__stringConv(s.tmp_10); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_10) + ""; } - case 19: - r0 = s.retval; - s.tmp_9 = r0; - r0 = pxsim_String__concat(s.tmp_6, s.tmp_9); - s.tmp_5 = r0; - if ((s.tmp_5) && (s.tmp_5).vtable) { - setupResume(s, 20); - pxsim_String__stringConv(s.tmp_5); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_5) + ""; } - case 20: - r0 = s.retval; - s.tmp_4 = r0; - r0 = pxsim_String__concat(s.tmp_3, s.tmp_4); - s.output___183311 = (r0); - r0 = (s.i___183326 + 1); - s.i___183326 = (r0); - { step = 5; continue; } - case 6: - r0 = pxsim_numops_toBoolDecr(s.arg0); - 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_toBool(s.tmp_0); - if (r0) { step = 7; continue; } - r0 = s.tmp_0; - { step = 8; continue; } - case 7: - r0 = s.empty___183307; - case 8: - // jmp value (already in r0) - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - if (!r0) { step = 9; continue; } - if ((s.output___183311) && (s.output___183311).vtable) { - setupResume(s, 21); - pxsim_String__stringConv(s.output___183311); - checkResumeConsumed(); - return; - } else { s.retval = (s.output___183311) + ""; } - case 21: - r0 = s.retval; - s.tmp_5 = r0; - s.tmp_8 = applyReplace__P183314_mk(s); - s.tmp_8.arg0 = s.arg1; - s.tmp_8.arg1 = s.arg2; - s.callLocIdx = 16; s.pc = 22; return s.tmp_8; - case 22: - r0 = s.retval; - s.tmp_7 = r0; - if ((s.tmp_7) && (s.tmp_7).vtable) { - setupResume(s, 23); - pxsim_String__stringConv(s.tmp_7); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_7) + ""; } - case 23: - r0 = s.retval; - s.tmp_6 = r0; - r0 = pxsim_String__concat(s.tmp_5, s.tmp_6); - s.output___183311 = (r0); - case 9: - case 10: - r0 = s.output___183311; + r0 = s.arg0; + if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); + r0 = (s.arg0).fields["_wallZScale"] = (s.arg1); + r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_stringReplaceAll__P166644.info = {"start":10239,"length":919,"line":346,"column":4,"endLine":374,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"stringReplaceAll","argumentNames":["s","toReplace","replacer"]} +Render_RayCastingRender_wallZScale__P171772.info = {"start":4857,"length":70,"line":158,"column":8,"endLine":160,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"wallZScale","argumentNames":["this","v"]} -function helpers_stringReplaceAll__P166644_mk(s) { +function Render_RayCastingRender_wallZScale__P171772_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_stringReplaceAll__P166644, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_wallZScale__P171772, depth: s.depth + 1, pc: 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, - split___183301: undefined, - empty___183307: undefined, - output___183311: undefined, - i___183326: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function applyReplace__P183314(s) { +function Render_RayCastingRender_wallZScale__P171771(s) { +let r0 = s.r0, 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, Render_RayCastingRender__C171738_VT)) failedCast(r0); + r0 = s.arg0.fields["_wallZScale"]; + return leaveAccessor(s, r0) + default: oops() +} } } +Render_RayCastingRender_wallZScale__P171771.info = {"start":4776,"length":72,"line":155,"column":8,"endLine":157,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"wallZScale","argumentNames":["this"]} +Render_RayCastingRender_wallZScale__P171771.isGetter = true; + +function Render_RayCastingRender_wallZScale__P171771_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Render_RayCastingRender_wallZScale__P171771, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function Render_RayCastingRender_fov__P171768(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28742,53 +28440,51 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_pxtcore.typeOf(s.arg1); + r0 = s.arg0; + if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); + r0 = (s.arg0).fields["_fov"] = (s.arg1); + s.tmp_0 = r0 = s.arg0; + r0 = (globals.SW___174806 << 7); + s.tmp_2 = r0; + r0 = s.arg0.fields["_fov"]; + s.tmp_3 = r0; + r0 = (s.tmp_2 / s.tmp_3); s.tmp_1 = r0; - r0 = (s.tmp_1 == "string"); - 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); + r0 = (s.tmp_0).fields["wallHeightInView"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["wallHeightInView"]; s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); - case 2: - // jmp value (already in r0) + r0 = (s.tmp_2 >> 8); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["wallWidthInView"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["_fov"]; s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 3; continue; } - r0 = s.arg1; - { step = 5; continue; } - { step = 4; continue; } - case 3: - s.tmp_4 = lambda_2_mk(s); - s.tmp_4.argL = s.arg1; - s.tmp_4.arg0 = s.arg0; - setupLambda(s.tmp_4, s.tmp_4.argL); - s.callLocIdx = 17; s.pc = 6; return s.tmp_4; - case 6: + r0 = pxsim.Math_.atan(s.tmp_3); + s.tmp_2 = r0; + r0 = (s.tmp_2 + 0.1); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["cameraRangeAngle"] = (s.tmp_1); + s.tmp_0 = Render_RayCastingRender_setVectors__P174847_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1942; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - { step = 5; continue; } - case 4: r0 = undefined; - case 5: return leave(s, r0) default: oops() } } } -applyReplace__P183314.info = {"start":10880,"length":272,"line":367,"column":8,"endLine":373,"endColumn":9,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"applyReplace","argumentNames":["r","replacer"]} +Render_RayCastingRender_fov__P171768.info = {"start":4169,"length":375,"line":137,"column":8,"endLine":144,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"fov","argumentNames":["this","fov"]} -function applyReplace__P183314_mk(s) { +function Render_RayCastingRender_fov__P171768_mk(s) { checkStack(s.depth); return { - parent: s, fn: applyReplace__P183314, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_fov__P171768, depth: s.depth + 1, pc: 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, } } @@ -28797,7 +28493,7 @@ function applyReplace__P183314_mk(s) { -function helpers_stringEmpty__P166652(s) { +function Render_RayCastingRender_fov__P171767(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28811,20 +28507,20 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(s.arg0); - s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); + r0 = s.arg0.fields["_fov"]; + return leaveAccessor(s, r0) default: oops() } } } -helpers_stringEmpty__P166652.info = {"start":15544,"length":74,"line":522,"column":4,"endLine":524,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"stringEmpty","argumentNames":["S"]} +Render_RayCastingRender_fov__P171767.info = {"start":4101,"length":58,"line":133,"column":8,"endLine":135,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"fov","argumentNames":["this"]} +Render_RayCastingRender_fov__P171767.isGetter = true; -function helpers_stringEmpty__P166652_mk(s) { +function Render_RayCastingRender_fov__P171767_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_stringEmpty__P166652, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_fov__P171767, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, } } @@ -28832,7 +28528,7 @@ function helpers_stringEmpty__P166652_mk(s) { -function helpers_arrayFind__P166638(s) { +function Render_RayCastingRender_dirY__P171764(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28842,60 +28538,30 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.len___183406 = undefined; - s.i___183409 = undefined; - s.v___183414 = 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___183406 = (r0); - s.i___183409 = (0); - case 1: - r0 = (s.i___183409 < s.len___183406); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - r0 = pxsim_Array__getAt(s.arg0, s.i___183409); - s.v___183414 = (r0); - s.tmp_1 = lambda_3_mk(s); - s.tmp_1.argL = s.arg1; - s.tmp_1.arg0 = s.v___183414; - s.tmp_1.arg1 = s.i___183409; - setupLambda(s.tmp_1, s.tmp_1.argL); - s.callLocIdx = 8; 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 = 2; continue; } - r0 = s.v___183414; - { step = 5; continue; } - case 2: - case 3: - r0 = (s.i___183409 + 1); - s.i___183409 = (r0); - { step = 1; continue; } - case 4: + r0 = s.arg0; + if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg1 * 256); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["dirYFpx"] = (s.tmp_1); r0 = undefined; - case 5: return leave(s, r0) default: oops() } } } -helpers_arrayFind__P166638.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"]} +Render_RayCastingRender_dirY__P171764.info = {"start":3722,"length":72,"line":121,"column":8,"endLine":123,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"dirY","argumentNames":["this","v"]} -function helpers_arrayFind__P166638_mk(s) { +function Render_RayCastingRender_dirY__P171764_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arrayFind__P166638, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_dirY__P171764, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - len___183406: undefined, - i___183409: undefined, - v___183414: undefined, arg0: undefined, arg1: undefined, } } @@ -28904,7 +28570,7 @@ function helpers_arrayFind__P166638_mk(s) { -function game_GameOverPlayerScore_constructor__P169472(s) { +function Render_RayCastingRender_dirX__P171763(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28917,37 +28583,36 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_GameOverPlayerScore__C169470_VT)) failedCast(r0); - r0 = (s.arg0).fields["player"] = (s.arg1); - r0 = (s.arg0).fields["value"] = (s.arg2); - r0 = (s.arg0).fields["winner"] = (s.arg3); + if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg1 * 256); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["dirXFpx"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -game_GameOverPlayerScore_constructor__P169472.info = {"start":13111,"length":121,"line":398,"column":8,"endLine":401,"endColumn":39,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"inline","argumentNames":["this","player","value","winner"]} +Render_RayCastingRender_dirX__P171763.info = {"start":3640,"length":72,"line":117,"column":8,"endLine":119,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"dirX","argumentNames":["this","v"]} -function game_GameOverPlayerScore_constructor__P169472_mk(s) { +function Render_RayCastingRender_dirX__P171763_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_GameOverPlayerScore_constructor__P169472, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_dirX__P171763, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function scene_Scene_destroy__P169398(s) { +function game_gameOver__P169540(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28961,36 +28626,24 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, scene_Scene__C169370_VT)) failedCast(r0); - r0 = (s.arg0).fields["eventContext"] = (undefined); - r0 = (s.arg0).fields["background"] = (undefined); - r0 = (s.arg0).fields["tileMap"] = (undefined); - r0 = (s.arg0).fields["allSprites"] = (undefined); - r0 = (s.arg0).fields["spriteNextId"] = (undefined); - r0 = (s.arg0).fields["spritesByKind"] = (undefined); - r0 = (s.arg0).fields["physicsEngine"] = (undefined); - r0 = (s.arg0).fields["camera"] = (undefined); - r0 = (s.arg0).fields["flags"] = (undefined); - r0 = (s.arg0).fields["destroyedHandlers"] = (undefined); - r0 = (s.arg0).fields["createdHandlers"] = (undefined); - r0 = (s.arg0).fields["overlapHandlers"] = (undefined); - r0 = (s.arg0).fields["tileOverlapHandlers"] = (undefined); - r0 = (s.arg0).fields["collisionHandlers"] = (undefined); - r0 = (s.arg0).fields["wallCollisionHandlers"] = (undefined); - r0 = (s.arg0).fields["gameForeverHandlers"] = (undefined); - r0 = (s.arg0).fields["_data"] = (undefined); + s.tmp_0 = game__gameOverImpl__P172467_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = undefined; + s.callLocIdx = 1351; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -scene_Scene_destroy__P169398.info = {"start":7356,"length":764,"line":205,"column":8,"endLine":223,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"destroy","argumentNames":["this"]} +game_gameOver__P169540.info = {"start":11084,"length":74,"line":342,"column":4,"endLine":344,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"gameOver","argumentNames":["win"]} -function scene_Scene_destroy__P169398_mk(s) { +function game_gameOver__P169540_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_destroy__P169398, depth: s.depth + 1, + parent: s, fn: game_gameOver__P169540, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, } } @@ -28998,7 +28651,7 @@ function scene_Scene_destroy__P169398_mk(s) { -function info_PlayerInfo_number__P169147(s) { +function game__gameOverImpl__P172467(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29008,32 +28661,366 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.goc___182416 = undefined; + s.judged___182419 = undefined; + s.playersWithScores___182427 = undefined; + s.prevBestScore___182430 = undefined; + s.winner___182434 = undefined; + s.scores___182440 = undefined; + s.preferMultiplayer___182461 = undefined; + s.message___182469 = undefined; + s.effect___182475 = undefined; + s.sound___182480 = undefined; + s.looping___182485 = undefined; + s.playbackMode___182490 = undefined; + s.overDialog___182516 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } + s.tmp_0 = game_init__P172465_mk(s); + s.tmp_0.arg0 = undefined; + s.callLocIdx = 1352; s.pc = 32; return s.tmp_0; + case 32: + r0 = s.retval; + r0 = pxsim_numops_toBoolDecr(globals.__isOver___172464); + if (!r0) { step = 1; continue; } + { step = 31; continue; } + case 1: + case 2: + globals.__isOver___172464 = (true); + r0 = pxsim_numops_toBoolDecr(globals.__gameOverHandler___172462); + if (!r0) { step = 3; continue; } + s.tmp_0 = lambda_2_mk(s); + s.tmp_0.argL = globals.__gameOverHandler___172462; + s.tmp_0.arg0 = s.arg0; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 1353; s.pc = 33; return s.tmp_0; + case 33: + r0 = s.retval; + { step = 30; continue; } + case 3: + s.tmp_0 = lambda_1_mk(s); + s.tmp_0.argL = globals.gameOverConfig___169525; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 1354; s.pc = 34; return s.tmp_0; + case 34: + r0 = s.retval; + s.goc___182416 = (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 = 4; continue; } + r0 = s.tmp_0; + { step = 5; continue; } + case 4: + r0 = s.goc___182416.fields["scoringType"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 !== 2); + case 5: + // jmp value (already in r0) + s.tmp_3 = r0; + s.judged___182419 = (s.tmp_3); + s.tmp_0 = info_playersWithScores__P169091_mk(s); + s.callLocIdx = 1355; s.pc = 35; return s.tmp_0; + case 35: + r0 = s.retval; + s.playersWithScores___182427 = (r0); + s.tmp_0 = r0 = s.judged___182419; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 6; continue; } + r0 = s.tmp_0; + { step = 7; continue; } + case 6: + s.tmp_1 = info_highScore__P169098_mk(s); + s.callLocIdx = 1356; s.pc = 36; return s.tmp_1; + case 36: + r0 = s.retval; + case 7: + // jmp value (already in r0) + s.tmp_2 = r0; + s.prevBestScore___182430 = (s.tmp_2); + s.tmp_0 = r0 = s.judged___182419; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 8; continue; } + r0 = s.tmp_0; + { step = 9; continue; } + case 8: r0 = s.arg0; - if (!checkSubtype(r0, info_PlayerInfo__C169144_VT)) failedCast(r0); - r0 = s.arg0.fields["_player"]; - return leaveAccessor(s, r0) + case 9: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBool(s.tmp_1); + if (r0) { step = 10; continue; } + r0 = s.tmp_1; + { step = 11; continue; } + case 10: + s.tmp_2 = info_winningPlayer__P169093_mk(s); + s.callLocIdx = 1357; s.pc = 37; return s.tmp_2; + case 37: + r0 = s.retval; + case 11: + // jmp value (already in r0) + s.tmp_3 = r0; + s.winner___182434 = (s.tmp_3); + r0 = pxsim_pxtcore_mkAction(1, scores_inline__P182442); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.winner___182434); + s.tmp_1 = helpers_arrayMap__P166633_mk(s); + s.tmp_1.arg0 = s.playersWithScores___182427; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 1361; s.pc = 38; return s.tmp_1; + case 38: + r0 = s.retval; + s.scores___182440 = (r0); + s.tmp_0 = info_saveAllScores__P169092_mk(s); + s.callLocIdx = 1362; s.pc = 39; return s.tmp_0; + case 39: + r0 = s.retval; + s.tmp_0 = r0 = s.judged___182419; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 12; continue; } + r0 = s.tmp_0; + { step = 13; continue; } + case 12: + r0 = s.winner___182434; + case 13: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 14; continue; } + s.tmp_2 = info_saveHighScore__P169095_mk(s); + s.callLocIdx = 1363; s.pc = 40; return s.tmp_2; + case 40: + r0 = s.retval; + case 14: + case 15: + r0 = pxsim_numops_toBoolDecr(s.arg1); + 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_toBool(s.tmp_0); + if (!r0) { step = 16; continue; } + r0 = s.tmp_0; + { step = 19; continue; } + case 16: + s.tmp_4 = r0 = s.judged___182419; + r0 = pxsim_numops_toBool(s.tmp_4); + if (r0) { step = 17; continue; } + r0 = s.tmp_4; + { step = 18; continue; } + case 17: + s.tmp_5 = info_multiplayerScoring__P169090_mk(s); + s.callLocIdx = 1364; s.pc = 41; return s.tmp_5; + case 41: + r0 = s.retval; + case 18: + // jmp value (already in r0) + s.tmp_6 = r0; + r0 = s.tmp_6; + case 19: + // jmp value (already in r0) + s.tmp_7 = r0; + s.preferMultiplayer___182461 = (s.tmp_7); + s.tmp_0 = game_GameOverConfig_getMessage__P169524_mk(s); + s.tmp_0.arg0 = s.goc___182416; + s.tmp_0.arg1 = s.arg0; + s.tmp_0.arg2 = s.preferMultiplayer___182461; + s.callLocIdx = 1365; s.pc = 42; return s.tmp_0; + case 42: + r0 = s.retval; + s.message___182469 = (r0); + s.tmp_0 = game_GameOverConfig_getEffect__P169519_mk(s); + s.tmp_0.arg0 = s.goc___182416; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 1366; s.pc = 43; return s.tmp_0; + case 43: + r0 = s.retval; + s.effect___182475 = (r0); + s.tmp_0 = game_GameOverConfig_getSound__P169521_mk(s); + s.tmp_0.arg0 = s.goc___182416; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 1367; s.pc = 44; return s.tmp_0; + case 44: + r0 = s.retval; + s.sound___182480 = (r0); + s.tmp_0 = game_GameOverConfig_getSoundLooping__P169522_mk(s); + s.tmp_0.arg0 = s.goc___182416; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 1368; s.pc = 45; return s.tmp_0; + case 45: + r0 = s.retval; + s.looping___182485 = (r0); + r0 = pxsim_numops_toBoolDecr(s.looping___182485); + if (!r0) { step = 20; continue; } + r0 = 2; + { step = 21; continue; } + case 20: + r0 = 1; + case 21: + // jmp value (already in r0) + s.tmp_0 = r0; + s.playbackMode___182490 = (s.tmp_0); + case 22: + s.tmp_0 = r0 = globals._sceneStack___172458; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 23; continue; } + r0 = s.tmp_0; + { step = 24; continue; } + case 23: + r0 = pxsim_Array__length(globals._sceneStack___172458); + case 24: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 25; continue; } + s.tmp_2 = scene_Scene_destroy__P169398_mk(s); + s.tmp_2.arg0 = globals._scene___172457; + s.callLocIdx = 1369; s.pc = 46; return s.tmp_2; + case 46: + r0 = s.retval; + s.tmp_0 = game_popScene__P169531_mk(s); + s.callLocIdx = 1370; s.pc = 47; return s.tmp_0; + case 47: + r0 = s.retval; + { step = 22; continue; } + case 25: + s.tmp_0 = game_pushScene__P169530_mk(s); + s.callLocIdx = 1371; s.pc = 48; return s.tmp_0; + case 48: + r0 = s.retval; + s.tmp_0 = scene_setBackgroundImage__P169412_mk(s); + r0 = pxsim_ImageMethods.clone(globals.screen___168559); + s.tmp_0.arg0 = r0; + s.callLocIdx = 1372; s.pc = 49; return s.tmp_0; + case 49: + r0 = s.retval; + r0 = pxsim_numops_toBoolDecr(s.sound___182480); + if (!r0) { step = 26; continue; } + s.tmp_0 = music_play__P168449_mk(s); + s.tmp_0.arg0 = s.sound___182480; + s.tmp_0.arg1 = s.playbackMode___182490; + s.callLocIdx = 1373; s.pc = 50; return s.tmp_0; + case 50: + r0 = s.retval; + case 26: + case 27: + r0 = pxsim_numops_toBoolDecr(s.effect___182475); + if (!r0) { step = 28; continue; } + s.tmp_0 = if_startScreenEffect_1_mk(s); + s.tmp_0.arg0 = s.effect___182475; + if (!s.tmp_0.arg0.vtable.iface) { + setupLambda(s.tmp_0, pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "startScreenEffect"), 1); + s.callLocIdx = 1374; s.pc = 51; return s.tmp_0; + } else { + s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["startScreenEffect"]; + if (s.tmp_0.fn == null) { setupLambda(s.tmp_0, s.tmp_0.arg0.fields["startScreenEffect"], 1); s.callLocIdx = 1374; s.pc = 51; return s.tmp_0; } + else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 1374; s.pc = 51; return s.tmp_0;; } + else { s.callLocIdx = 1374; s.pc = 51; return s.tmp_0; } + } + case 51: + r0 = s.retval; + case 28: + case 29: + s.tmp_0 = pause__P166940_mk(s); + s.tmp_0.arg0 = 400; + s.callLocIdx = 1375; s.pc = 52; return s.tmp_0; + case 52: + r0 = s.retval; + r0 = pxsim_pxtcore_mkClassInstance(game_GameOverDialog__C169473_VT); + s.tmp_0 = r0; + s.tmp_1 = game_GameOverDialog_constructor__P169480_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = s.arg0; + s.tmp_1.arg2 = s.message___182469; + s.tmp_1.arg3 = s.judged___182419; + s.tmp_1.arg4 = s.scores___182440; + s.tmp_1.arg5 = s.prevBestScore___182430; + s.tmp_1.arg6 = s.arg1; + s.callLocIdx = 1376; s.pc = 53; return s.tmp_1; + case 53: + r0 = s.retval; + s.overDialog___182516 = (s.tmp_0); + r0 = pxsim_pxtcore_mkAction(1, game__gameOverImpl_inline__P182528); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.overDialog___182516); + s.tmp_1 = scene_createRenderable__P169332_mk(s); + s.tmp_1.arg0 = 100; + s.tmp_1.arg1 = s.tmp_0; + s.tmp_1.arg2 = undefined; + s.callLocIdx = 1377; s.pc = 54; return s.tmp_1; + case 54: + r0 = s.retval; + s.tmp_0 = pause__P166940_mk(s); + s.tmp_0.arg0 = 500; + s.callLocIdx = 1378; s.pc = 55; return s.tmp_0; + case 55: + r0 = s.retval; + s.tmp_0 = game_GameOverDialog_displayCursor__P169481_mk(s); + s.tmp_0.arg0 = s.overDialog___182516; + s.callLocIdx = 1379; s.pc = 56; return s.tmp_0; + case 56: + r0 = s.retval; + s.tmp_0 = game_waitAnyButton__P169528_mk(s); + s.callLocIdx = 1380; s.pc = 57; return s.tmp_0; + case 57: + r0 = s.retval; + setupResume(s, 58); + pxsim.control.reset(); + checkResumeConsumed(); + return; + case 58: + r0 = s.retval; + case 30: + case 31: + r0 = undefined; + return leave(s, r0) default: oops() } } } -info_PlayerInfo_number__P169147.info = {"start":25566,"length":57,"line":823,"column":8,"endLine":825,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"number","argumentNames":["this"]} -info_PlayerInfo_number__P169147.isGetter = true; +game__gameOverImpl__P172467.info = {"start":11264,"length":2664,"line":350,"column":4,"endLine":410,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"_gameOverImpl","argumentNames":["win","winnerOverride"]} -function info_PlayerInfo_number__P169147_mk(s) { +function game__gameOverImpl__P172467_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_PlayerInfo_number__P169147, depth: s.depth + 1, + parent: s, fn: game__gameOverImpl__P172467, depth: s.depth + 1, pc: 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, + goc___182416: undefined, + judged___182419: undefined, + playersWithScores___182427: undefined, + prevBestScore___182430: undefined, + winner___182434: undefined, + scores___182440: undefined, + preferMultiplayer___182461: undefined, + message___182469: undefined, + effect___182475: undefined, + sound___182480: undefined, + looping___182485: undefined, + playbackMode___182490: undefined, + overDialog___182516: undefined, arg0: undefined, + arg1: undefined, } } -function info_PlayerInfoImpl_score__P169133(s) { +function scores_inline__P182442(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29043,60 +29030,42 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.state___184133 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, info_PlayerInfoImpl__C169122_VT)) failedCast(r0); - s.tmp_0 = info_PlayerInfoImpl_getState__P169131_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 959; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - s.state___184133 = (r0); - r0 = s.state___184133.fields["showScore"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 === undefined); + r0 = pxsim_pxtcore_mkClassInstance(game_GameOverPlayerScore__C169470_VT); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = (s.state___184133).fields["showScore"] = (true); - case 1: + s.tmp_1 = game_GameOverPlayerScore_constructor__P169472_mk(s); + s.tmp_1.arg0 = s.tmp_0; + r0 = s.arg0.fields["_player"]; + s.tmp_1.arg1 = r0; + s.tmp_2 = info_PlayerInfoImpl_score__P169133_mk(s); + r0 = s.arg0.fields["impl"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 1359; s.pc = 2; return s.tmp_2; case 2: - r0 = s.state___184133.fields["showPlayer"]; - 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 = (s.state___184133).fields["showPlayer"] = (true); - case 3: - case 4: - r0 = s.state___184133.fields["score"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 == null); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - r0 = (s.state___184133).fields["score"] = (0); - case 5: - case 6: - r0 = s.state___184133.fields["score"]; + r0 = s.retval; + s.tmp_1.arg2 = r0; + r0 = (s.arg0 === s.caps[0]); + s.tmp_1.arg3 = r0; + s.callLocIdx = 1360; s.pc = 1; return s.tmp_1; + case 1: + r0 = s.retval; + r0 = s.tmp_0; return leave(s, r0) default: oops() } } } -info_PlayerInfoImpl_score__P169133.info = {"start":21458,"length":318,"line":692,"column":8,"endLine":701,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"score","argumentNames":["this"]} +scores_inline__P182442.info = {"start":11859,"length":88,"line":364,"column":49,"endLine":364,"endColumn":137,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":["player"]} -function info_PlayerInfoImpl_score__P169133_mk(s) { +function scores_inline__P182442_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_PlayerInfoImpl_score__P169133, depth: s.depth + 1, + parent: s, fn: scores_inline__P182442, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - state___184133: undefined, + tmp_2: undefined, arg0: undefined, } } @@ -29104,7 +29073,7 @@ function info_PlayerInfoImpl_score__P169133_mk(s) { -function info_PlayerInfoImpl_getState__P169131(s) { +function game__gameOverImpl_inline__P182528(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29118,33 +29087,45 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, info_PlayerInfoImpl__C169122_VT)) failedCast(r0); - s.tmp_0 = info_PlayerInfoImpl_init__P172374_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 958; s.pc = 1; return s.tmp_0; + s.tmp_0 = game_GameOverDialog__C169473_v0_1_mk(s); + s.tmp_0.arg0 = s.caps[0]; + if (!checkSubtype(s.tmp_0.arg0, game_GameOverDialog__C169473_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.update; + s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - r0 = globals.infoState___172322.fields["playerStates"]; - s.tmp_0 = r0; - r0 = s.arg0.fields["_player"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 - 1); + s.tmp_0 = r0 = s.arg0; + r0 = s.caps[0].fields["image"]; s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); + r0 = pxsim_ImageMethods.height(globals.screen___168559); + s.tmp_4 = r0; + r0 = s.caps[0].fields["image"]; + s.tmp_6 = r0; + r0 = pxsim_ImageMethods.height(s.tmp_6); + 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 = pxsim_ImageMethods.drawTransparentImage(s.tmp_0, s.tmp_1, 0, s.tmp_2); + r0 = undefined; return leave(s, r0) default: oops() } } } -info_PlayerInfoImpl_getState__P169131.info = {"start":21220,"length":121,"line":682,"column":8,"endLine":685,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"getState","argumentNames":["this"]} +game__gameOverImpl_inline__P182528.info = {"start":13493,"length":254,"line":396,"column":48,"endLine":403,"endColumn":13,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":["target"]} -function info_PlayerInfoImpl_getState__P169131_mk(s) { +function game__gameOverImpl_inline__P182528_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_PlayerInfoImpl_getState__P169131, depth: s.depth + 1, + parent: s, fn: game__gameOverImpl_inline__P182528, depth: s.depth + 1, pc: 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, } } @@ -29152,7 +29133,7 @@ function info_PlayerInfoImpl_getState__P169131_mk(s) { -function info_PlayerInfoImpl_init__P172374(s) { +function game_waitAnyButton__P169528(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29162,88 +29143,41 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, info_PlayerInfoImpl__C169122_VT)) failedCast(r0); - s.tmp_0 = info_initHUD__P172368_mk(s); - s.callLocIdx = 955; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - r0 = s.arg0.fields["_player"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 > 1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(globals.__waitAnyButton___172461); if (!r0) { step = 1; continue; } - s.tmp_2 = info_initMultiHUD__P172369_mk(s); - s.callLocIdx = 956; s.pc = 6; return s.tmp_2; - case 6: + s.tmp_0 = lambda_1_mk(s); + s.tmp_0.argL = globals.__waitAnyButton___172461; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 1330; s.pc = 3; return s.tmp_0; + case 3: r0 = s.retval; + { step = 2; continue; } case 1: + s.tmp_0 = pause__P166940_mk(s); + s.tmp_0.arg0 = 3000; + s.callLocIdx = 1331; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; case 2: - r0 = globals.infoState___172322.fields["playerStates"]; - s.tmp_3 = r0; - r0 = s.arg0.fields["_player"]; - s.tmp_5 = r0; - r0 = (s.tmp_5 - 1); - s.tmp_4 = r0; - r0 = pxsim_Array__getAt(s.tmp_3, s.tmp_4); - 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 = pxsim_pxtcore_mkClassInstance(info_PlayerState__C169080_VT); - s.tmp_6 = r0; - s.tmp_7 = info_PlayerState_constructor__P169089_mk(s); - s.tmp_7.arg0 = s.tmp_6; - s.callLocIdx = 957; s.pc = 7; return s.tmp_7; - case 7: - r0 = s.retval; - r0 = globals.infoState___172322.fields["playerStates"]; - s.tmp_8 = r0; - r0 = s.arg0.fields["_player"]; - s.tmp_10 = r0; - r0 = (s.tmp_10 - 1); - s.tmp_9 = r0; - r0 = pxsim_Array_.setAt(s.tmp_8, s.tmp_9, s.tmp_6); - case 3: - case 4: r0 = undefined; return leave(s, r0) default: oops() } } } -info_PlayerInfoImpl_init__P172374.info = {"start":20958,"length":252,"line":674,"column":8,"endLine":680,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"init","argumentNames":["this"]} +game_waitAnyButton__P169528.info = {"start":4325,"length":111,"line":131,"column":4,"endLine":134,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"waitAnyButton","argumentNames":[]} -function info_PlayerInfoImpl_init__P172374_mk(s) { +function game_waitAnyButton__P169528_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_PlayerInfoImpl_init__P172374, depth: s.depth + 1, + parent: s, fn: game_waitAnyButton__P169528, depth: s.depth + 1, pc: 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 info_initMultiHUD__P172369(s) { +function game_GameOverConfig_getMessage__P169524(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29253,71 +29187,85 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = globals.infoState___172322.fields["visibilityFlag"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 16); + 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_GameOverConfig__C169500_VT)) failedCast(r0); + r0 = s.arg0.fields["messageSetByUser"]; 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; } - { step = 5; continue; } + r0 = s.arg0.fields["winMessage"]; + { step = 2; continue; } case 1: + r0 = s.arg0.fields["loseMessage"]; case 2: - s.tmp_2 = r0 = globals.infoState___172322; - r0 = s.tmp_2.fields["visibilityFlag"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 | 16); - s.tmp_3 = r0; - r0 = (s.tmp_2).fields["visibilityFlag"] = (s.tmp_3); - r0 = globals.infoState___172322.fields["visibilityFlag"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 & 32); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + // jmp value (already in r0) s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_4 = r0 = globals.infoState___172322; - s.tmp_6 = info_defaultMultiplayerHeartImage__P172371_mk(s); - s.callLocIdx = 921; s.pc = 6; return s.tmp_6; - case 6: - r0 = s.retval; - s.tmp_5 = r0; - r0 = (s.tmp_4).fields["heartImage"] = (s.tmp_5); + r0 = s.tmp_1; + { step = 11; continue; } + { step = 10; continue; } case 3: + r0 = pxsim_numops_toBoolDecr(s.arg2); + if (!r0) { step = 6; continue; } + r0 = pxsim_numops_toBoolDecr(s.arg1); + if (!r0) { step = 4; continue; } + r0 = s.arg0.fields["winMessageMultiplayer"]; + { step = 5; continue; } case 4: - s.tmp_0 = r0 = globals.infoState___172322; - r0 = pxsim.image.ofBuffer(_hex184226); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["multiplierImage"] = (s.tmp_1); + r0 = s.arg0.fields["loseMessage"]; case 5: + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = s.tmp_2; + { step = 11; continue; } + { step = 9; continue; } + case 6: + r0 = pxsim_numops_toBoolDecr(s.arg1); + if (!r0) { step = 7; continue; } + r0 = s.arg0.fields["winMessage"]; + { step = 8; continue; } + case 7: + r0 = s.arg0.fields["loseMessage"]; + case 8: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = s.tmp_3; + { step = 11; continue; } + case 9: + case 10: r0 = undefined; + case 11: return leave(s, r0) default: oops() } } } -info_initMultiHUD__P172369.info = {"start":5694,"length":393,"line":174,"column":4,"endLine":185,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"initMultiHUD","argumentNames":[]} +game_GameOverConfig_getMessage__P169524.info = {"start":3264,"length":367,"line":96,"column":8,"endLine":103,"endColumn":9,"fileName":"pxt_modules/game/game.ts","functionName":"getMessage","argumentNames":["this","win","preferMultiplayer"]} -function info_initMultiHUD__P172369_mk(s) { +function game_GameOverConfig_getMessage__P169524_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_initMultiHUD__P172369, depth: s.depth + 1, + parent: s, fn: game_GameOverConfig_getMessage__P169524, depth: s.depth + 1, pc: 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, } } -const _hex184226 = pxsim.BufferMethods.createBufferFromHex("8704030003000000010100001000000001010000") -function info_defaultMultiplayerHeartImage__P172371(s) { +function game_GameOverConfig_getSoundLooping__P169522(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29327,39 +29275,43 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_ImageMethods.isMono(globals.screen___168559); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, game_GameOverConfig__C169500_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(s.arg1); if (!r0) { step = 1; continue; } - r0 = pxsim.image.ofBuffer(_hex184230); + r0 = s.arg0.fields["winSoundLooping"]; { step = 2; continue; } case 1: - r0 = pxsim.image.ofBuffer(_hex184232); + r0 = s.arg0.fields["loseSoundLooping"]; case 2: // jmp value (already in r0) - s.tmp_1 = r0; - r0 = s.tmp_1; + s.tmp_0 = r0; + r0 = s.tmp_0; return leave(s, r0) default: oops() } } } -info_defaultMultiplayerHeartImage__P172371.info = {"start":6691,"length":503,"line":210,"column":4,"endLine":227,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"defaultMultiplayerHeartImage","argumentNames":[]} +game_GameOverConfig_getSoundLooping__P169522.info = {"start":2852,"length":112,"line":86,"column":8,"endLine":88,"endColumn":9,"fileName":"pxt_modules/game/game.ts","functionName":"getSoundLooping","argumentNames":["this","win"]} -function info_defaultMultiplayerHeartImage__P172371_mk(s) { +function game_GameOverConfig_getSoundLooping__P169522_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_defaultMultiplayerHeartImage__P172371, depth: s.depth + 1, + parent: s, fn: game_GameOverConfig_getSoundLooping__P169522, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, + arg0: undefined, + arg1: undefined, } } -const _hex184230 = pxsim.BufferMethods.createBufferFromHex("870407000500000000000000100100000110000010000100011000001001000000000000") -const _hex184232 = pxsim.BufferMethods.createBufferFromHex("870407000500000000000000100100002112000010240100411200001001000000000000") -function info_initHUD__P172368(s) { +function game_GameOverConfig_getSound__P169521(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29369,47 +29321,43 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.infoState___172322); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, game_GameOverConfig__C169500_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(s.arg1); if (!r0) { step = 1; continue; } - { step = 3; continue; } + r0 = s.arg0.fields["winSound"]; + { step = 2; continue; } case 1: + r0 = s.arg0.fields["loseSound"]; case 2: - r0 = pxsim_pxtcore_mkClassInstance(info_InfoState__C172319_VT); + // jmp value (already in r0) s.tmp_0 = r0; - s.tmp_1 = info_InfoState_constructor__P172320_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 901; s.pc = 4; return s.tmp_1; - case 4: - r0 = s.retval; - globals.infoState___172322 = (s.tmp_0); - s.tmp_0 = scene_createRenderable__P169332_mk(s); - s.tmp_0.arg0 = 100; - s.tmp_0.arg1 = info_initHUD_inline__P184240; - s.tmp_0.arg2 = undefined; - s.callLocIdx = 920; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - case 3: - r0 = undefined; + r0 = s.tmp_0; return leave(s, r0) default: oops() } } } -info_initHUD__P172368.info = {"start":3294,"length":2394,"line":118,"column":4,"endLine":172,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"initHUD","argumentNames":[]} +game_GameOverConfig_getSound__P169521.info = {"start":2752,"length":91,"line":83,"column":8,"endLine":85,"endColumn":9,"fileName":"pxt_modules/game/game.ts","functionName":"getSound","argumentNames":["this","win"]} -function info_initHUD__P172368_mk(s) { +function game_GameOverConfig_getSound__P169521_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_initHUD__P172368, depth: s.depth + 1, + parent: s, fn: game_GameOverConfig_getSound__P169521, 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 info_initHUD_inline__P184240(s) { +function game_GameOverConfig_getEffect__P169519(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29419,246 +29367,43 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ps___184249 = undefined; - s.p___184271 = undefined; - s.scene___184308 = undefined; - s.elapsed___184311 = undefined; - s.t___184319 = undefined; - s.goc___184339 = undefined; - r0 = pxsim_numops_toBoolDecr(globals.infoState___172322); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, game_GameOverConfig__C169500_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(s.arg1); if (!r0) { step = 1; continue; } - { step = 23; continue; } + r0 = s.arg0.fields["winEffect"]; + { step = 2; continue; } case 1: + r0 = s.arg0.fields["loseEffect"]; case 2: - r0 = globals.infoState___172322.fields["visibilityFlag"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 16); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_2 = helpers_arrayFilter__P166637_mk(s); - s.tmp_2.arg0 = globals.players___172323; - s.tmp_2.arg1 = ps_inline__P184251; - s.callLocIdx = 902; s.pc = 24; return s.tmp_2; - case 24: - r0 = s.retval; - s.ps___184249 = (r0); - s.tmp_0 = helpers_arrayForEach__P166636_mk(s); - s.tmp_0.arg0 = s.ps___184249; - s.tmp_0.arg1 = info_initHUD_inline__P184260; - s.callLocIdx = 904; s.pc = 25; return s.tmp_0; - case 25: - r0 = s.retval; - s.tmp_0 = helpers_arrayForEach__P166636_mk(s); - s.tmp_0.arg0 = s.ps___184249; - s.tmp_0.arg1 = info_initHUD_inline__P184266; - s.callLocIdx = 906; s.pc = 26; return s.tmp_0; - case 26: - r0 = s.retval; - { step = 12; continue; } - case 3: - s.p___184271 = (globals.player1___169188); - s.tmp_1 = info_PlayerInfoImpl_hasScore__P169136_mk(s); - r0 = s.p___184271.fields["impl"]; - s.tmp_1.arg0 = r0; - s.callLocIdx = 907; s.pc = 27; return s.tmp_1; - case 27: - r0 = s.retval; - 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 = globals.infoState___172322.fields["visibilityFlag"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 & 2); - case 5: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 6; continue; } - s.tmp_4 = info_PlayerInfo_drawScore__P169183_mk(s); - s.tmp_4.arg0 = s.p___184271; - s.callLocIdx = 908; s.pc = 28; return s.tmp_4; - case 28: - r0 = s.retval; - case 6: - case 7: - s.tmp_1 = info_PlayerInfoImpl_hasLife__P169140_mk(s); - r0 = s.p___184271.fields["impl"]; - s.tmp_1.arg0 = r0; - s.callLocIdx = 909; s.pc = 29; return s.tmp_1; - case 29: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 8; continue; } - r0 = s.tmp_0; - { step = 9; continue; } - case 8: - r0 = globals.infoState___172322.fields["visibilityFlag"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 & 4); - case 9: // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 10; continue; } - s.tmp_4 = info_PlayerInfo_drawLives__P169184_mk(s); - s.tmp_4.arg0 = s.p___184271; - s.callLocIdx = 910; s.pc = 30; return s.tmp_4; - case 30: - r0 = s.retval; - case 10: - case 11: - s.tmp_0 = info_PlayerInfoImpl_raiseLifeZero__P169143_mk(s); - r0 = s.p___184271.fields["impl"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = true; - s.callLocIdx = 911; s.pc = 31; return s.tmp_0; - case 31: - r0 = s.retval; - case 12: - r0 = globals.infoState___172322.fields["gameEnd"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 !== undefined); s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 13; continue; } r0 = s.tmp_0; - { step = 14; continue; } - case 13: - r0 = globals.infoState___172322.fields["visibilityFlag"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 & 1); - case 14: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 21; continue; } - s.tmp_4 = game_currentScene__P169526_mk(s); - s.callLocIdx = 912; s.pc = 32; return s.tmp_4; - case 32: - r0 = s.retval; - s.scene___184308 = (r0); - r0 = globals.infoState___172322.fields["gameEnd"]; - s.tmp_0 = r0; - r0 = s.scene___184308.fields["_millis"]; - s.tmp_1 = r0; - r0 = (s.tmp_0 - s.tmp_1); - s.elapsed___184311 = (r0); - s.tmp_0 = info_drawTimer__P172373_mk(s); - s.tmp_0.arg0 = s.elapsed___184311; - s.callLocIdx = 914; s.pc = 33; return s.tmp_0; - case 33: - r0 = s.retval; - r0 = (s.elapsed___184311 / 1000); - s.t___184319 = (r0); - r0 = (s.t___184319 <= 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 19; continue; } - s.t___184319 = (0); - r0 = globals.infoState___172322.fields["countdownExpired"]; - 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; } - r0 = (globals.infoState___172322).fields["countdownExpired"] = (true); - r0 = (globals.infoState___172322).fields["gameEnd"] = (undefined); - r0 = globals.infoState___172322.fields["countdownEndHandler"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 15; continue; } - s.tmp_1 = if_countdownEndHandler_1_mk(s); - s.tmp_1.arg0 = globals.infoState___172322; - if (!s.tmp_1.arg0.vtable.iface) { - setupLambda(s.tmp_1, pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "countdownEndHandler"), 1); - s.callLocIdx = 915; s.pc = 34; return s.tmp_1; - } else { - s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["countdownEndHandler"]; - if (s.tmp_1.fn == null) { setupLambda(s.tmp_1, s.tmp_1.arg0.fields["countdownEndHandler"], 1); s.callLocIdx = 915; s.pc = 34; return s.tmp_1; } - else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 915; s.pc = 34; return s.tmp_1;; } - else { s.callLocIdx = 915; s.pc = 34; return s.tmp_1; } - } - case 34: - r0 = s.retval; - { step = 16; continue; } - case 15: - s.tmp_0 = lambda_1_mk(s); - s.tmp_0.argL = globals.gameOverConfig___169525; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 916; s.pc = 35; return s.tmp_0; - case 35: - r0 = s.retval; - s.goc___184339 = (r0); - s.tmp_0 = game_GameOverConfig_setEffect__P169518_mk(s); - s.tmp_0.arg0 = s.goc___184339; - s.tmp_0.arg1 = false; - s.tmp_0.arg2 = null; - s.tmp_0.arg3 = false; - s.callLocIdx = 917; s.pc = 36; return s.tmp_0; - case 36: - r0 = s.retval; - s.tmp_0 = game_GameOverConfig_setSound__P169520_mk(s); - s.tmp_0.arg0 = s.goc___184339; - s.tmp_0.arg1 = false; - s.tmp_0.arg2 = null; - s.tmp_0.arg3 = false; - s.tmp_0.arg4 = false; - s.callLocIdx = 918; s.pc = 37; return s.tmp_0; - case 37: - r0 = s.retval; - s.tmp_0 = game_gameOver__P169540_mk(s); - s.tmp_0.arg0 = false; - s.callLocIdx = 919; s.pc = 38; return s.tmp_0; - case 38: - r0 = s.retval; - case 16: - case 17: - case 18: - case 19: - case 20: - case 21: - case 22: - case 23: - r0 = undefined; return leave(s, r0) default: oops() } } } -info_initHUD_inline__P184240.info = {"start":3454,"length":2217,"line":125,"column":12,"endLine":170,"endColumn":13,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":[]} +game_GameOverConfig_getEffect__P169519.info = {"start":2199,"length":94,"line":68,"column":8,"endLine":70,"endColumn":9,"fileName":"pxt_modules/game/game.ts","functionName":"getEffect","argumentNames":["this","win"]} -function info_initHUD_inline__P184240_mk(s) { +function game_GameOverConfig_getEffect__P169519_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_initHUD_inline__P184240, depth: s.depth + 1, + parent: s, fn: game_GameOverConfig_getEffect__P169519, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - ps___184249: undefined, - p___184271: undefined, - scene___184308: undefined, - elapsed___184311: undefined, - t___184319: undefined, - goc___184339: undefined, + arg0: undefined, + arg1: undefined, } } -function ps_inline__P184251(s) { +function game_GameOverDialog_update__P169482(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29672,26 +29417,44 @@ switch (step) { 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); + r0 = s.arg0; + if (!checkSubtype(r0, game_GameOverDialog__C169473_VT)) failedCast(r0); + s.tmp_0 = game_BaseDialog_clearInterior__P172421_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1256; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.tmp_0 = game_GameOverDialog__C169473_v2_1_mk(s); + s.tmp_0.arg0 = s.arg0; + if (!checkSubtype(s.tmp_0.arg0, game_GameOverDialog__C169473_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.drawTextCore; + s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + r0 = s.arg0.fields["cursorOn"]; s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_1 = game_BaseDialog_drawCursorRow__P169447_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 1257; s.pc = 5; return s.tmp_1; + case 5: + r0 = s.retval; + case 1: + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -ps_inline__P184251.info = {"start":3702,"length":8,"line":130,"column":46,"endLine":130,"endColumn":54,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["p"]} +game_GameOverDialog_update__P169482.info = {"start":17394,"length":173,"line":497,"column":8,"endLine":504,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"update","argumentNames":["this"]} -function ps_inline__P184251_mk(s) { +function game_GameOverDialog_update__P169482_mk(s) { checkStack(s.depth); return { - parent: s, fn: ps_inline__P184251, depth: s.depth + 1, + parent: s, fn: game_GameOverDialog_update__P169482, 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, } } @@ -29699,7 +29462,7 @@ function ps_inline__P184251_mk(s) { -function info_initHUD_inline__P184260(s) { +function game_GameOverDialog_drawTextCore__P169486(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29713,21 +29476,33 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = info_PlayerInfo_drawPlayer__P169182_mk(s); + r0 = s.arg0; + if (!checkSubtype(r0, game_GameOverDialog__C169473_VT)) failedCast(r0); + s.tmp_0 = game_GameOverDialog_drawMessage__P169483_mk(s); s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 903; s.pc = 1; return s.tmp_0; + s.callLocIdx = 1289; s.pc = 1; return s.tmp_0; case 1: + r0 = s.retval; + s.tmp_0 = game_GameOverDialog_drawScores__P169484_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1290; s.pc = 2; return s.tmp_0; + case 2: + r0 = s.retval; + s.tmp_0 = game_GameOverDialog_drawBestScore__P169485_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1291; s.pc = 3; return s.tmp_0; + case 3: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -info_initHUD_inline__P184260.info = {"start":3786,"length":19,"line":132,"column":31,"endLine":132,"endColumn":50,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["p"]} +game_GameOverDialog_drawTextCore__P169486.info = {"start":23575,"length":123,"line":629,"column":8,"endLine":633,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"drawTextCore","argumentNames":["this"]} -function info_initHUD_inline__P184260_mk(s) { +function game_GameOverDialog_drawTextCore__P169486_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_initHUD_inline__P184260, depth: s.depth + 1, + parent: s, fn: game_GameOverDialog_drawTextCore__P169486, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -29737,7 +29512,7 @@ function info_initHUD_inline__P184260_mk(s) { -function info_initHUD_inline__P184266(s) { +function game_GameOverDialog_drawBestScore__P169485(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29747,329 +29522,171 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.currY___182570 = undefined; + s.label___182579 = undefined; + s.halfWidth___182590 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = info_PlayerInfoImpl_raiseLifeZero__P169143_mk(s); - r0 = s.arg0.fields["impl"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = false; - s.callLocIdx = 905; s.pc = 1; return s.tmp_0; - case 1: + r0 = s.arg0; + if (!checkSubtype(r0, game_GameOverDialog__C169473_VT)) failedCast(r0); + s.tmp_1 = game_GameOverDialog_hasBestScore__P169477_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 1280; s.pc = 7; return s.tmp_1; + case 7: r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -info_initHUD_inline__P184266.info = {"start":3888,"length":32,"line":134,"column":31,"endLine":134,"endColumn":63,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["p"]} - -function info_initHUD_inline__P184266_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: info_initHUD_inline__P184266, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, -} } - - - - - -function info_drawTimer__P172373(s) { -let r0 = s.r0, 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.font___184401 = undefined; - s.smallFont___184403 = undefined; - s.seconds___184405 = undefined; - s.width___184409 = undefined; - s.left___184414 = undefined; - s.color1___184424 = undefined; - s.color2___184428 = undefined; - s.temp___184441 = undefined; - s.remainder___184477 = undefined; - s.decimalLeft___184496 = undefined; - s.minutes___184514 = undefined; - s.remainder___184518 = undefined; - 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.arg0 = (0); - case 1: - case 2: - r0 = (s.arg0 | 0); - s.arg0 = (r0); - s.font___184401 = (globals.font8___168502); - s.smallFont___184403 = (globals.font5___168507); - r0 = pxsim.Math_.idiv(s.arg0, 1000); - s.seconds___184405 = (r0); - s.tmp_2 = if_charWidth_1_mk(s); - s.tmp_2.arg0 = s.font___184401; - if (!s.tmp_2.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "charWidth"); + if (!r0) { step = 5; continue; } + r0 = s.arg0.fields["height"]; + s.tmp_3 = r0; + s.tmp_5 = if_charHeight_1_mk(s); + s.tmp_5.arg0 = globals.font8___168502; + if (!s.tmp_5.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "charHeight"); } 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 = 942; s.pc = 11; return s.tmp_2; } + s.tmp_5.fn = s.tmp_5.arg0.vtable.iface["charHeight"]; + if (s.tmp_5.fn == null) { s.retval = s.tmp_5.arg0.fields["charHeight"]; } + else if (!s.tmp_5.fn.isGetter) { s.retval = bind(s.tmp_5); } + else { s.callLocIdx = 1281; s.pc = 8; return s.tmp_5; } } - case 11: + case 8: r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_1 * 5); - s.tmp_0 = r0; - r0 = (s.tmp_0 - 2); - s.width___184409 = (r0); - r0 = pxsim_ImageMethods.width(globals.screen___168559); + 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.width___184409 >> 1); - s.tmp_3 = r0; - r0 = (s.tmp_1 - s.tmp_3); - s.tmp_0 = r0; - r0 = (s.tmp_0 + 1); - s.left___184414 = (r0); - r0 = globals.infoState___172322.fields["fontColor"]; - s.color1___184424 = (r0); - r0 = globals.infoState___172322.fields["bgColor"]; - s.color2___184428 = (r0); - r0 = (s.seconds___184405 < 10); + r0 = (s.tmp_2 - 5); + s.currY___182570 = (r0); + s.tmp_1 = game_GameOverDialog_isNewBestScore__P169478_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 1282; s.pc = 9; return s.tmp_1; + case 9: + r0 = s.retval; 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.seconds___184405 & 1); - case 4: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBool(s.tmp_1); - if (r0) { step = 5; continue; } - r0 = s.tmp_1; - { step = 6; continue; } - case 5: - r0 = pxsim_ImageMethods.isMono(globals.screen___168559); - 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 = 7; continue; } - s.temp___184441 = (s.color1___184424); - s.color1___184424 = (s.color2___184428); - s.color2___184428 = (s.temp___184441); - case 7: - case 8: - s.tmp_0 = helpers_imageFillRect__P168483_mk(s); - s.tmp_0.arg0 = globals.screen___168559; - r0 = (s.left___184414 - 3); - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = 0; - r0 = (s.width___184409 + 6); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + s.label___182579 = ("New Best Score!"); + s.tmp_0 = helpers_imagePrintCenter__P168516_mk(s); + r0 = s.arg0.fields["image"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.label___182579; + s.tmp_0.arg2 = s.currY___182570; + s.tmp_1 = game_screenColor__P172413_mk(s); + s.tmp_1.arg0 = 9; + s.callLocIdx = 1283; s.pc = 11; return s.tmp_1; + case 11: + r0 = s.retval; s.tmp_0.arg3 = r0; - s.tmp_2 = if_charHeight_1_mk(s); - s.tmp_2.arg0 = s.font___184401; - if (!s.tmp_2.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "charHeight"); - } else { - s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["charHeight"]; - if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["charHeight"]; } - else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } - else { s.callLocIdx = 943; s.pc = 13; return s.tmp_2; } - } - case 13: + s.tmp_0.arg4 = globals.font8___168502; + s.callLocIdx = 1284; s.pc = 10; return s.tmp_0; + case 10: r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_1 + 3); - s.tmp_0.arg4 = r0; - r0 = globals.infoState___172322.fields["borderColor"]; - s.tmp_0.arg5 = r0; - s.callLocIdx = 944; s.pc = 12; return s.tmp_0; + s.tmp_3 = game_GameOverDialog_isMultiplayerGame__P169479_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 1285; s.pc = 12; return s.tmp_3; case 12: r0 = s.retval; - s.tmp_0 = helpers_imageFillRect__P168483_mk(s); - s.tmp_0.arg0 = globals.screen___168559; - r0 = (s.left___184414 - 2); - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = 0; - r0 = (s.width___184409 + 4); - s.tmp_0.arg3 = r0; - s.tmp_2 = if_charHeight_1_mk(s); - s.tmp_2.arg0 = s.font___184401; - if (!s.tmp_2.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "charHeight"); - } else { - s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["charHeight"]; - if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["charHeight"]; } - else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } - else { s.callLocIdx = 945; s.pc = 15; return s.tmp_2; } - } - case 15: - r0 = s.retval; + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; - r0 = (s.tmp_1 + 2); - s.tmp_0.arg4 = r0; - s.tmp_0.arg5 = s.color2___184428; - s.callLocIdx = 946; s.pc = 14; return s.tmp_0; - case 14: - r0 = s.retval; - r0 = (s.seconds___184405 < 60); + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 9; continue; } - r0 = (s.arg0 % 1000); - s.tmp_1 = r0; - r0 = pxsim.Math_.idiv(s.tmp_1, 10); - s.remainder___184477 = (r0); - s.tmp_0 = helpers_imagePrint__P168517_mk(s); - s.tmp_0.arg0 = globals.screen___168559; - s.tmp_3 = info_formatDecimal__P172376_mk(s); - s.tmp_3.arg0 = s.seconds___184405; - s.callLocIdx = 947; s.pc = 17; return s.tmp_3; - case 17: - r0 = s.retval; - s.tmp_2 = r0; - if ((s.tmp_2) && (s.tmp_2).vtable) { - setupResume(s, 18); - pxsim_String__stringConv(s.tmp_2); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_2) + ""; } - case 18: - r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_String__concat(s.tmp_1, "."); - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = s.left___184414; - s.tmp_0.arg3 = 1; - s.tmp_0.arg4 = s.color1___184424; - s.tmp_0.arg5 = s.font___184401; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 948; s.pc = 16; return s.tmp_0; - case 16: - r0 = s.retval; - s.tmp_0 = r0 = s.left___184414; - s.tmp_3 = if_charWidth_1_mk(s); - s.tmp_3.arg0 = s.font___184401; - if (!s.tmp_3.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "charWidth"); + if (!r0) { step = 1; continue; } + r0 = pxsim_String_.length(s.label___182579); + s.tmp_5 = r0; + s.tmp_7 = if_charWidth_1_mk(s); + s.tmp_7.arg0 = globals.font8___168502; + if (!s.tmp_7.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_7.arg0, "charWidth"); } else { - s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["charWidth"]; - if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["charWidth"]; } - else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } - else { s.callLocIdx = 949; s.pc = 19; return s.tmp_3; } + s.tmp_7.fn = s.tmp_7.arg0.vtable.iface["charWidth"]; + if (s.tmp_7.fn == null) { s.retval = s.tmp_7.arg0.fields["charWidth"]; } + else if (!s.tmp_7.fn.isGetter) { s.retval = bind(s.tmp_7); } + else { s.callLocIdx = 1286; s.pc = 13; return s.tmp_7; } } - case 19: + case 13: r0 = s.retval; + s.tmp_6 = r0; + r0 = (s.tmp_5 * s.tmp_6); + s.tmp_4 = r0; + r0 = (s.tmp_4 >> 1); + s.halfWidth___182590 = (r0); + r0 = s.arg0.fields["image"]; + s.tmp_0 = r0; + s.tmp_1 = r0 = globals.img_trophy_sm___172432; + r0 = s.arg0.fields["image"]; + s.tmp_7 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_7); + s.tmp_6 = r0; + r0 = (s.tmp_6 >> 1); + s.tmp_5 = r0; + r0 = (s.tmp_5 - s.halfWidth___182590); + s.tmp_4 = r0; + r0 = pxsim_ImageMethods.width(globals.img_trophy_sm___172432); + s.tmp_8 = r0; + r0 = (s.tmp_4 - s.tmp_8); + s.tmp_3 = r0; + r0 = (s.tmp_3 - 2); s.tmp_2 = r0; - r0 = (3 * s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.decimalLeft___184496 = (r0); - s.tmp_0 = helpers_imagePrint__P168517_mk(s); - s.tmp_0.arg0 = globals.screen___168559; - s.tmp_1 = info_formatDecimal__P172376_mk(s); - s.tmp_1.arg0 = s.remainder___184477; - s.callLocIdx = 950; s.pc = 21; return s.tmp_1; - case 21: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = s.decimalLeft___184496; - s.tmp_0.arg3 = 3; - s.tmp_0.arg4 = s.color1___184424; - s.tmp_0.arg5 = s.smallFont___184403; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 951; s.pc = 20; return s.tmp_0; - case 20: - r0 = s.retval; - { step = 10; continue; } - case 9: - r0 = pxsim.Math_.idiv(s.seconds___184405, 60); - s.minutes___184514 = (r0); - r0 = (s.seconds___184405 % 60); - s.remainder___184518 = (r0); - s.tmp_0 = helpers_imagePrint__P168517_mk(s); - s.tmp_0.arg0 = globals.screen___168559; - s.tmp_5 = info_formatDecimal__P172376_mk(s); - s.tmp_5.arg0 = s.minutes___184514; - s.callLocIdx = 952; s.pc = 23; return s.tmp_5; - case 23: - r0 = s.retval; + r0 = pxsim_ImageMethods.drawTransparentImage(s.tmp_0, s.tmp_1, s.tmp_2, s.currY___182570); + r0 = s.arg0.fields["image"]; + s.tmp_0 = r0; + s.tmp_1 = r0 = globals.img_trophy_sm___172432; + r0 = s.arg0.fields["image"]; + s.tmp_5 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_5); s.tmp_4 = r0; - if ((s.tmp_4) && (s.tmp_4).vtable) { - setupResume(s, 24); - pxsim_String__stringConv(s.tmp_4); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_4) + ""; } - case 24: - r0 = s.retval; + r0 = (s.tmp_4 >> 1); s.tmp_3 = r0; - r0 = pxsim_String__concat(s.tmp_3, ":"); + r0 = (s.tmp_3 + s.halfWidth___182590); + s.tmp_2 = r0; + r0 = pxsim_ImageMethods.drawTransparentImage(s.tmp_0, s.tmp_1, s.tmp_2, s.currY___182570); + case 1: + case 2: + { step = 4; continue; } + case 3: + s.tmp_0 = helpers_imagePrintCenter__P168516_mk(s); + r0 = s.arg0.fields["image"]; + s.tmp_0.arg0 = r0; + r0 = s.arg0.fields["bestScore"]; s.tmp_2 = r0; if ((s.tmp_2) && (s.tmp_2).vtable) { - setupResume(s, 25); + setupResume(s, 15); pxsim_String__stringConv(s.tmp_2); checkResumeConsumed(); return; } else { s.retval = (s.tmp_2) + ""; } - case 25: + case 15: r0 = s.retval; s.tmp_1 = r0; - s.tmp_8 = info_formatDecimal__P172376_mk(s); - s.tmp_8.arg0 = s.remainder___184518; - s.callLocIdx = 953; s.pc = 26; return s.tmp_8; - case 26: - r0 = s.retval; - s.tmp_7 = r0; - if ((s.tmp_7) && (s.tmp_7).vtable) { - setupResume(s, 27); - pxsim_String__stringConv(s.tmp_7); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_7) + ""; } - case 27: - r0 = s.retval; - s.tmp_6 = r0; - r0 = pxsim_String__concat(s.tmp_1, s.tmp_6); + r0 = pxsim_String__concat("Best:", s.tmp_1); s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = s.left___184414; - s.tmp_0.arg3 = 1; - s.tmp_0.arg4 = s.color1___184424; - s.tmp_0.arg5 = s.font___184401; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 954; s.pc = 22; return s.tmp_0; - case 22: + s.tmp_0.arg2 = s.currY___182570; + s.tmp_3 = game_screenColor__P172413_mk(s); + s.tmp_3.arg0 = 9; + s.callLocIdx = 1287; s.pc = 16; return s.tmp_3; + case 16: r0 = s.retval; - case 10: + s.tmp_0.arg3 = r0; + s.tmp_0.arg4 = globals.font8___168502; + s.callLocIdx = 1288; s.pc = 14; return s.tmp_0; + case 14: + r0 = s.retval; + case 4: + case 5: + case 6: r0 = undefined; return leave(s, r0) default: oops() } } } -info_drawTimer__P172373.info = {"start":17650,"length":1328,"line":588,"column":4,"endLine":623,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"drawTimer","argumentNames":["millis"]} +game_GameOverDialog_drawBestScore__P169485.info = {"start":22246,"length":1319,"line":600,"column":8,"endLine":627,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"drawBestScore","argumentNames":["this"]} -function info_drawTimer__P172373_mk(s) { +function game_GameOverDialog_drawBestScore__P169485_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_drawTimer__P172373, depth: s.depth + 1, + parent: s, fn: game_GameOverDialog_drawBestScore__P169485, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -30080,18 +29697,9 @@ function info_drawTimer__P172373_mk(s) { tmp_6: undefined, tmp_7: undefined, tmp_8: undefined, - font___184401: undefined, - smallFont___184403: undefined, - seconds___184405: undefined, - width___184409: undefined, - left___184414: undefined, - color1___184424: undefined, - color2___184428: undefined, - temp___184441: undefined, - remainder___184477: undefined, - decimalLeft___184496: undefined, - minutes___184514: undefined, - remainder___184518: undefined, + currY___182570: undefined, + label___182579: undefined, + halfWidth___182590: undefined, arg0: undefined, } } @@ -30099,7 +29707,7 @@ function info_drawTimer__P172373_mk(s) { -function info_formatDecimal__P172376(s) { +function game_screenColor__P172413(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30113,36 +29721,27 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = (s.arg0 | 0); - s.arg0 = (r0); - r0 = (s.arg0 < 10); + r0 = pxsim_ImageMethods.isMono(globals.screen___168559); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - if ((s.arg0) && (s.arg0).vtable) { - setupResume(s, 4); - pxsim_String__stringConv(s.arg0); - checkResumeConsumed(); - return; - } else { s.retval = (s.arg0) + ""; } - case 4: - r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_String__concat("0", s.tmp_1); - { step = 3; continue; } + r0 = 1; + { step = 2; continue; } case 1: + r0 = s.arg0; case 2: - r0 = pxsim_numops.toString(s.arg0); - case 3: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = s.tmp_1; return leave(s, r0) default: oops() } } } -info_formatDecimal__P172376.info = {"start":38543,"length":156,"line":1258,"column":4,"endLine":1264,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"formatDecimal","argumentNames":["val"]} +game_screenColor__P172413.info = {"start":581,"length":85,"line":28,"column":4,"endLine":30,"endColumn":5,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"screenColor","argumentNames":["c"]} -function info_formatDecimal__P172376_mk(s) { +function game_screenColor__P172413_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_formatDecimal__P172376, depth: s.depth + 1, + parent: s, fn: game_screenColor__P172413, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -30153,7 +29752,7 @@ function info_formatDecimal__P172376_mk(s) { -function info_InfoState_constructor__P172320(s) { +function game_GameOverDialog_isMultiplayerGame__P169479(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30168,89 +29767,42 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, info_InfoState__C172319_VT)) failedCast(r0); - r0 = (s.arg0).fields["visibilityFlag"] = (8); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["playerStates"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = info_defaultHeartImage__P172370_mk(s); - s.callLocIdx = 895; s.pc = 7; return s.tmp_2; - case 7: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["heartImage"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim.image.ofBuffer(_hex185316); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["multiplierImage"] = (s.tmp_1); - r0 = pxsim_ImageMethods.isMono(globals.screen___168559); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = 0; - { step = 2; continue; } - case 1: - r0 = 1; - case 2: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = (s.arg0).fields["bgColor"] = (s.tmp_1); - r0 = pxsim_ImageMethods.isMono(globals.screen___168559); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = 1; - { step = 4; continue; } - case 3: - r0 = 3; - case 4: - // jmp value (already in r0) + if (!checkSubtype(r0, game_GameOverDialog__C169473_VT)) failedCast(r0); + r0 = s.arg0.fields["flags"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 & 8); + 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.arg0).fields["borderColor"] = (s.tmp_1); - r0 = pxsim_ImageMethods.isMono(globals.screen___168559); + r0 = pxsim_numops_toBoolDecr(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - r0 = 1; - { step = 6; continue; } - case 5: - r0 = 3; - case 6: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = (s.arg0).fields["fontColor"] = (s.tmp_1); - r0 = (s.arg0).fields["countdownExpired"] = (undefined); - r0 = (s.arg0).fields["countdownEndHandler"] = (undefined); - r0 = (s.arg0).fields["gameEnd"] = (undefined); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["playerStates"] = (s.tmp_1); - r0 = undefined; - return leave(s, r0) + r0 = pxsim_Boolean__bang(s.tmp_0); + return leaveAccessor(s, r0) default: oops() } } } -info_InfoState_constructor__P172320.info = {"start":1744,"length":674,"line":64,"column":8,"endLine":82,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["this"]} +game_GameOverDialog_isMultiplayerGame__P169479.info = {"start":13962,"length":84,"line":422,"column":8,"endLine":422,"endColumn":92,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"isMultiplayerGame","argumentNames":["this"]} +game_GameOverDialog_isMultiplayerGame__P169479.isGetter = true; -function info_InfoState_constructor__P172320_mk(s) { +function game_GameOverDialog_isMultiplayerGame__P169479_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_InfoState_constructor__P172320, depth: s.depth + 1, + parent: s, fn: game_GameOverDialog_isMultiplayerGame__P169479, depth: s.depth + 1, pc: 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, } } -const _hex185316 = pxsim.BufferMethods.createBufferFromHex("87040500050000000100010010100000000100001010000001000100") -function info_defaultHeartImage__P172370(s) { +function game_GameOverDialog_isNewBestScore__P169478(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30260,39 +29812,47 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_ImageMethods.isMono(globals.screen___168559); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = pxsim.image.ofBuffer(_hex185344); - { step = 2; continue; } - case 1: - r0 = pxsim.image.ofBuffer(_hex185346); - 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_GameOverDialog__C169473_VT)) failedCast(r0); + r0 = s.arg0.fields["flags"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 & 4); + 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; - return leave(s, r0) + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_Boolean__bang(s.tmp_0); + return leaveAccessor(s, r0) default: oops() } } } -info_defaultHeartImage__P172370.info = {"start":6093,"length":592,"line":187,"column":4,"endLine":208,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"defaultHeartImage","argumentNames":[]} +game_GameOverDialog_isNewBestScore__P169478.info = {"start":13875,"length":78,"line":421,"column":8,"endLine":421,"endColumn":86,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"isNewBestScore","argumentNames":["this"]} +game_GameOverDialog_isNewBestScore__P169478.isGetter = true; -function info_defaultHeartImage__P172370_mk(s) { +function game_GameOverDialog_isNewBestScore__P169478_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_defaultHeartImage__P172370, depth: s.depth + 1, + parent: s, fn: game_GameOverDialog_isNewBestScore__P169478, depth: s.depth + 1, pc: 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, } } -const _hex185344 = pxsim.BufferMethods.createBufferFromHex("87040800070000001011000001000100010010001000000101001000010001001011000000000000") -const _hex185346 = pxsim.BufferMethods.createBufferFromHex("8704080007000000c0cc00002c220c002222c2002222220c20222202222422004222020020220000") -function game_GameOverConfig_setSound__P169520(s) { +function game_GameOverDialog_hasBestScore__P169477(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30304,73 +29864,45 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_GameOverConfig__C169500_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(s.arg4); + if (!checkSubtype(r0, game_GameOverDialog__C169473_VT)) failedCast(r0); + r0 = s.arg0.fields["flags"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 & 2); + 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_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; } - case 1: - r0 = s.arg0.fields["soundSetByUser"]; - case 2: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 3; continue; } - { step = 9; continue; } - case 3: - case 4: - r0 = pxsim_numops_toBoolDecr(s.arg1); - if (!r0) { step = 5; continue; } - r0 = (s.arg0).fields["winSound"] = (s.arg2); - r0 = (s.arg0).fields["winSoundLooping"] = (s.arg3); - { step = 6; continue; } - case 5: - r0 = (s.arg0).fields["loseSound"] = (s.arg2); - r0 = (s.arg0).fields["loseSoundLooping"] = (s.arg3); - case 6: - r0 = pxsim_numops_toBoolDecr(s.arg4); - if (!r0) { step = 7; continue; } - r0 = (s.arg0).fields["soundSetByUser"] = (true); - case 7: - case 8: - case 9: - r0 = undefined; - return leave(s, r0) + r0 = pxsim_Boolean__bang(s.tmp_0); + return leaveAccessor(s, r0) default: oops() } } } -game_GameOverConfig_setSound__P169520.info = {"start":2303,"length":440,"line":72,"column":8,"endLine":82,"endColumn":9,"fileName":"pxt_modules/game/game.ts","functionName":"setSound","argumentNames":["this","win","sound","looping","explicit"]} +game_GameOverDialog_hasBestScore__P169477.info = {"start":13790,"length":76,"line":420,"column":8,"endLine":420,"endColumn":84,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"hasBestScore","argumentNames":["this"]} +game_GameOverDialog_hasBestScore__P169477.isGetter = true; -function game_GameOverConfig_setSound__P169520_mk(s) { +function game_GameOverDialog_hasBestScore__P169477_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_GameOverConfig_setSound__P169520, depth: s.depth + 1, + parent: s, fn: game_GameOverDialog_hasBestScore__P169477, depth: s.depth + 1, pc: 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 game_GameOverConfig_setEffect__P169518(s) { +function helpers_imagePrintCenter__P168516(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30380,71 +29912,92 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.w___182665 = undefined; + s.x___182671 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.arg2 = (s.lambdaArgs[2]); s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, game_GameOverConfig__C169500_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(s.arg3); + r0 = pxsim_numops_toBoolDecr(s.arg4); 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_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_2 = image_getFontForText__P168504_mk(s); + s.tmp_2.arg0 = s.arg1; + s.callLocIdx = 164; s.pc = 3; return s.tmp_2; + case 3: + r0 = s.retval; + s.arg4 = (r0); case 1: - r0 = s.arg0.fields["effectSetByUser"]; case 2: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 3; continue; } - { step = 9; continue; } - case 3: + 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 = 165; s.pc = 4; return s.tmp_2; } + } case 4: - r0 = pxsim_numops_toBoolDecr(s.arg1); - if (!r0) { step = 5; continue; } - r0 = (s.arg0).fields["winEffect"] = (s.arg2); - { step = 6; continue; } + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0 * s.tmp_1); + s.w___182665 = (r0); + r0 = pxsim_ImageMethods.width(s.arg0); + s.tmp_1 = r0; + r0 = (s.tmp_1 - s.w___182665); + s.tmp_0 = r0; + r0 = (s.tmp_0 / 2); + s.x___182671 = (r0); + s.tmp_0 = helpers_imagePrint__P168517_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.tmp_0.arg2 = s.x___182671; + 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 = 166; s.pc = 5; return s.tmp_0; case 5: - r0 = (s.arg0).fields["loseEffect"] = (s.arg2); - case 6: - r0 = pxsim_numops_toBoolDecr(s.arg3); - if (!r0) { step = 7; continue; } - r0 = (s.arg0).fields["effectSetByUser"] = (true); - case 7: - case 8: - case 9: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -game_GameOverConfig_setEffect__P169518.info = {"start":1899,"length":291,"line":62,"column":8,"endLine":67,"endColumn":9,"fileName":"pxt_modules/game/game.ts","functionName":"setEffect","argumentNames":["this","win","effect","explicit"]} +helpers_imagePrintCenter__P168516.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 game_GameOverConfig_setEffect__P169518_mk(s) { +function helpers_imagePrintCenter__P168516_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_GameOverConfig_setEffect__P169518, depth: s.depth + 1, + parent: s, fn: helpers_imagePrintCenter__P168516, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, + w___182665: undefined, + x___182671: undefined, arg0: undefined, arg1: undefined, arg2: undefined, arg3: undefined, + arg4: undefined, } } -function info_PlayerInfo_constructor__P169146(s) { +function game_GameOverDialog_drawScores__P169484(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30454,202 +30007,614 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.scores___182706 = undefined; + s.currY___182719 = undefined; + s.score___182728 = undefined; + s.x___182760 = undefined; + s.strlens___182787 = undefined; + s.i___182789 = undefined; + s.col___182795 = undefined; + s.score___182798 = undefined; + s.i___182831 = undefined; + s.col___182837 = undefined; + s.score___182840 = undefined; + s.str___182844 = undefined; + s.x___182856 = undefined; + s.score___182937 = undefined; + s.currY___182958 = undefined; + s.currY___182978 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, info_PlayerInfo__C169144_VT)) failedCast(r0); - r0 = (s.arg0).fields["_player"] = (s.arg1); - r0 = pxsim_pxtcore_mkClassInstance(info_PlayerInfoImpl__C169122_VT); + if (!checkSubtype(r0, game_GameOverDialog__C169473_VT)) failedCast(r0); + s.tmp_1 = game_GameOverDialog_hasScores__P169476_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 1260; s.pc = 23; return s.tmp_1; + case 23: + r0 = s.retval; s.tmp_0 = r0; - s.tmp_1 = info_PlayerInfoImpl_constructor__P169130_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = s.arg1; - s.callLocIdx = 968; s.pc = 3; return s.tmp_1; - case 3: + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 19; continue; } + s.tmp_2 = helpers_arrayFilter__P166637_mk(s); + r0 = s.arg0.fields["scores"]; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = scores_inline__P182708; + s.callLocIdx = 1261; s.pc = 24; return s.tmp_2; + case 24: r0 = s.retval; - r0 = (s.arg0).fields["impl"] = (s.tmp_0); - r0 = pxsim_numops_toBoolDecr(globals.players___172323); + s.scores___182706 = (r0); + s.tmp_1 = if_charHeight_1_mk(s); + s.tmp_1.arg0 = globals.font5___168507; + 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 = 1262; s.pc = 25; return s.tmp_1; } + } + case 25: + r0 = s.retval; + s.tmp_0 = r0; + r0 = (s.tmp_0 + 16); + s.currY___182719 = (r0); + s.tmp_1 = game_GameOverDialog_isMultiplayerGame__P169479_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 1263; s.pc = 26; return s.tmp_1; + case 26: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 17; continue; } + r0 = pxsim_Array__length(s.scores___182706); + 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 = pxsim_Array__getAt(s.scores___182706, 0); + s.score___182728 = (r0); + s.tmp_0 = r0 = s.score___182728; + r0 = s.score___182728.fields["player"]; + s.tmp_7 = r0; + if ((s.tmp_7) && (s.tmp_7).vtable) { + setupResume(s, 27); + pxsim_String__stringConv(s.tmp_7); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_7) + ""; } + case 27: + r0 = s.retval; + s.tmp_6 = r0; + r0 = pxsim_String__concat("P", s.tmp_6); + s.tmp_5 = r0; + if ((s.tmp_5) && (s.tmp_5).vtable) { + setupResume(s, 28); + pxsim_String__stringConv(s.tmp_5); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_5) + ""; } + case 28: + 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, 29); + pxsim_String__stringConv(s.tmp_3); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_3) + ""; } + case 29: + r0 = s.retval; + s.tmp_2 = r0; + r0 = s.score___182728.fields["value"]; + s.tmp_9 = r0; + if ((s.tmp_9) && (s.tmp_9).vtable) { + setupResume(s, 30); + pxsim_String__stringConv(s.tmp_9); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_9) + ""; } + case 30: + r0 = s.retval; + s.tmp_8 = r0; + r0 = pxsim_String__concat(s.tmp_2, s.tmp_8); s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = (s.tmp_0).fields["str"] = (s.tmp_1); + s.tmp_0 = helpers_imagePrintCenter__P168516_mk(s); + r0 = s.arg0.fields["image"]; + s.tmp_0.arg0 = r0; + r0 = s.score___182728.fields["str"]; + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = s.currY___182719; + s.tmp_1 = game_screenColor__P172413_mk(s); + s.tmp_1.arg0 = 1; + s.callLocIdx = 1264; s.pc = 32; return s.tmp_1; + case 32: + r0 = s.retval; + s.tmp_0.arg3 = r0; + s.tmp_0.arg4 = globals.font5___168507; + s.callLocIdx = 1265; s.pc = 31; return s.tmp_0; + case 31: + r0 = s.retval; + r0 = s.score___182728.fields["winner"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = pxsim_Array__mk(); - globals.players___172323 = (r0); - case 1: - case 2: - s.tmp_0 = r0 = globals.players___172323; - r0 = s.arg0.fields["_player"]; + r0 = s.arg0.fields["image"]; + s.tmp_3 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_3); s.tmp_2 = r0; - r0 = (s.tmp_2 - 1); + r0 = (s.tmp_2 >> 1); s.tmp_1 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_1, s.arg0); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -info_PlayerInfo_constructor__P169146.info = {"start":25003,"length":213,"line":804,"column":8,"endLine":810,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["this","player"]} - -function info_PlayerInfo_constructor__P169146_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: info_PlayerInfo_constructor__P169146, 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 info_PlayerInfoImpl_constructor__P169130(s) { -let r0 = s.r0, 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.score___182728.fields["str"]; + s.tmp_7 = r0; + r0 = pxsim_String_.length(s.tmp_7); + s.tmp_6 = r0; + s.tmp_9 = if_charWidth_1_mk(s); + s.tmp_9.arg0 = globals.font5___168507; + if (!s.tmp_9.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_9.arg0, "charWidth"); + } else { + s.tmp_9.fn = s.tmp_9.arg0.vtable.iface["charWidth"]; + if (s.tmp_9.fn == null) { s.retval = s.tmp_9.arg0.fields["charWidth"]; } + else if (!s.tmp_9.fn.isGetter) { s.retval = bind(s.tmp_9); } + else { s.callLocIdx = 1266; s.pc = 33; return s.tmp_9; } } - r0 = s.arg0; - if (!checkSubtype(r0, info_PlayerInfoImpl__C169122_VT)) failedCast(r0); - r0 = (s.arg0).fields["_player"] = (s.arg1); - r0 = (s.arg0).fields["border"] = (1); - r0 = (s.arg0).fields["fc"] = (1); - r0 = (s.arg0).fields["left"] = (undefined); - r0 = (s.arg0).fields["up"] = (undefined); - r0 = s.arg0.fields["_player"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 === 1); + case 33: + r0 = s.retval; + s.tmp_8 = r0; + r0 = (s.tmp_6 * s.tmp_8); + s.tmp_5 = r0; + r0 = (s.tmp_5 >> 1); + s.tmp_4 = r0; + r0 = (s.tmp_1 - s.tmp_4); + s.x___182760 = (r0); + r0 = s.arg0.fields["image"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = pxsim_ImageMethods.isMono(globals.screen___168559); + s.tmp_1 = r0 = globals.img_trophy_sm___172432; + s.tmp_4 = r0 = s.x___182760; + r0 = pxsim_ImageMethods.width(globals.img_trophy_sm___172432); + s.tmp_5 = r0; + r0 = (s.tmp_4 - s.tmp_5); + s.tmp_3 = r0; + r0 = (s.tmp_3 - 3); s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 1; continue; } - r0 = 0; - { step = 2; continue; } + r0 = (s.currY___182719 - 2); + s.tmp_6 = r0; + r0 = pxsim_ImageMethods.drawTransparentImage(s.tmp_0, s.tmp_1, s.tmp_2, s.tmp_6); case 1: - r0 = 2; case 2: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = (s.arg0).fields["bg"] = (s.tmp_3); - r0 = (s.arg0).fields["x"] = (0); - r0 = (s.arg0).fields["y"] = (0); - { step = 14; continue; } + { step = 16; continue; } case 3: - r0 = (s.arg1 === 2); + r0 = pxsim_Array__mk(); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 6; continue; } - r0 = pxsim_ImageMethods.isMono(globals.screen___168559); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 4; continue; } - r0 = 0; - { step = 5; continue; } + r0 = pxsim_Array__push(s.tmp_0, 0); + r0 = pxsim_Array__push(s.tmp_0, 0); + s.strlens___182787 = (s.tmp_0); + s.i___182789 = (0); case 4: - r0 = 8; - case 5: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = (s.arg0).fields["bg"] = (s.tmp_2); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_ImageMethods.width(globals.screen___168559); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["x"] = (s.tmp_1); - r0 = (s.arg0).fields["y"] = (0); - r0 = (s.arg0).fields["left"] = (true); - { step = 13; continue; } - case 6: - r0 = (s.arg1 === 3); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 9; continue; } - r0 = pxsim_ImageMethods.isMono(globals.screen___168559); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 7; continue; } - r0 = 0; - { step = 8; continue; } - case 7: - r0 = 4; - case 8: - // jmp value (already in r0) + s.tmp_1 = r0 = s.i___182789; + r0 = pxsim_Array__length(s.scores___182706); s.tmp_2 = r0; - r0 = (s.arg0).fields["bg"] = (s.tmp_2); - r0 = (s.arg0).fields["x"] = (0); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_ImageMethods.height(globals.screen___168559); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["y"] = (s.tmp_1); - r0 = (s.arg0).fields["up"] = (true); - { step = 12; continue; } - case 9: - r0 = pxsim_ImageMethods.isMono(globals.screen___168559); + r0 = (s.tmp_1 < s.tmp_2); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 10; continue; } - r0 = 0; - { step = 11; continue; } - case 10: - r0 = 7; - case 11: - // jmp value (already in r0) + if (!r0) { step = 5; continue; } + r0 = (s.i___182789 % 2); + s.col___182795 = (r0); + r0 = pxsim_Array__getAt(s.scores___182706, s.i___182789); + s.score___182798 = (r0); + s.tmp_0 = r0 = s.score___182798; + r0 = s.score___182798.fields["player"]; + s.tmp_7 = r0; + if ((s.tmp_7) && (s.tmp_7).vtable) { + setupResume(s, 34); + pxsim_String__stringConv(s.tmp_7); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_7) + ""; } + case 34: + r0 = s.retval; + s.tmp_6 = r0; + r0 = pxsim_String__concat("P", s.tmp_6); + s.tmp_5 = r0; + if ((s.tmp_5) && (s.tmp_5).vtable) { + setupResume(s, 35); + pxsim_String__stringConv(s.tmp_5); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_5) + ""; } + case 35: + 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, 36); + pxsim_String__stringConv(s.tmp_3); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_3) + ""; } + case 36: + r0 = s.retval; + s.tmp_2 = r0; + r0 = s.score___182798.fields["value"]; + s.tmp_9 = r0; + if ((s.tmp_9) && (s.tmp_9).vtable) { + setupResume(s, 37); + pxsim_String__stringConv(s.tmp_9); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_9) + ""; } + case 37: + r0 = s.retval; + s.tmp_8 = r0; + r0 = pxsim_String__concat(s.tmp_2, s.tmp_8); s.tmp_1 = r0; - r0 = (s.arg0).fields["bg"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_ImageMethods.width(globals.screen___168559); + r0 = (s.tmp_0).fields["str"] = (s.tmp_1); + s.tmp_0 = r0 = s.strlens___182787; + s.tmp_1 = r0 = s.col___182795; + s.tmp_3 = Math_max__P166657_mk(s); + r0 = pxsim_Array__getAt(s.strlens___182787, s.col___182795); + s.tmp_3.arg0 = r0; + r0 = s.score___182798.fields["str"]; + s.tmp_4 = r0; + r0 = pxsim_String_.length(s.tmp_4); + s.tmp_3.arg1 = r0; + s.callLocIdx = 1267; s.pc = 38; return s.tmp_3; + case 38: + r0 = s.retval; + s.tmp_2 = r0; + r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_1, s.tmp_2); + r0 = (s.i___182789 + 1); + s.i___182789 = (r0); + { step = 4; continue; } + case 5: + s.i___182831 = (0); + case 6: + s.tmp_1 = r0 = s.i___182831; + r0 = pxsim_Array__length(s.scores___182706); + 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.i___182831 % 2); + s.col___182837 = (r0); + r0 = pxsim_Array__getAt(s.scores___182706, s.i___182831); + s.score___182840 = (r0); + s.tmp_0 = game_padStr__P172411_mk(s); + r0 = pxsim_Array__getAt(s.strlens___182787, s.col___182837); + s.tmp_0.arg0 = r0; + s.callLocIdx = 1268; s.pc = 39; return s.tmp_0; + case 39: + r0 = s.retval; + s.str___182844 = (r0); + s.tmp_0 = game_replaceRange__P172412_mk(s); + s.tmp_0.arg0 = s.str___182844; + r0 = s.score___182840.fields["str"]; + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = 0; + r0 = s.score___182840.fields["str"]; 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___168559); + r0 = pxsim_String_.length(s.tmp_1); + s.tmp_0.arg3 = r0; + s.callLocIdx = 1269; s.pc = 40; return s.tmp_0; + case 40: + r0 = s.retval; + s.str___182844 = (r0); + s.x___182856 = (0); + r0 = (s.col___182837 === 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; 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 = pxsim_Array__getAt(s.strlens___182787, s.col___182837); + s.tmp_6 = r0; + s.tmp_8 = if_charWidth_1_mk(s); + s.tmp_8.arg0 = globals.font5___168507; + if (!s.tmp_8.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_8.arg0, "charWidth"); + } else { + s.tmp_8.fn = s.tmp_8.arg0.vtable.iface["charWidth"]; + if (s.tmp_8.fn == null) { s.retval = s.tmp_8.arg0.fields["charWidth"]; } + else if (!s.tmp_8.fn.isGetter) { s.retval = bind(s.tmp_8); } + else { s.callLocIdx = 1270; s.pc = 41; return s.tmp_8; } + } + case 41: + r0 = s.retval; + s.tmp_7 = r0; + r0 = (s.tmp_6 * s.tmp_7); + s.tmp_5 = r0; + r0 = (s.tmp_2 - s.tmp_5); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["y"] = (s.tmp_1); - r0 = (s.arg0).fields["left"] = (true); - r0 = (s.arg0).fields["up"] = (true); + r0 = (s.tmp_1 - 3); + s.x___182856 = (r0); + { step = 8; continue; } + case 7: + r0 = s.arg0.fields["image"]; + s.tmp_2 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_1 >> 1); + s.tmp_0 = r0; + r0 = (s.tmp_0 + 3); + s.x___182856 = (r0); + case 8: + r0 = s.score___182840.fields["winner"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 11; continue; } + r0 = (s.i___182831 % 2); + s.tmp_2 = r0; + r0 = (s.tmp_2 === 0); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 9; continue; } + r0 = s.arg0.fields["image"]; + s.tmp_3 = r0; + s.tmp_4 = r0 = globals.img_trophy_sm___172432; + s.tmp_7 = r0 = s.x___182856; + r0 = pxsim_ImageMethods.width(globals.img_trophy_sm___172432); + s.tmp_8 = r0; + r0 = (s.tmp_7 - s.tmp_8); + s.tmp_6 = r0; + r0 = (s.tmp_6 - 3); + s.tmp_5 = r0; + r0 = (s.currY___182719 - 2); + s.tmp_9 = r0; + r0 = pxsim_ImageMethods.drawTransparentImage(s.tmp_3, s.tmp_4, s.tmp_5, s.tmp_9); + { step = 10; continue; } + case 9: + r0 = s.arg0.fields["image"]; + s.tmp_0 = r0; + s.tmp_1 = r0 = globals.img_trophy_sm___172432; + s.tmp_4 = r0 = s.x___182856; + r0 = s.score___182840.fields["str"]; + s.tmp_7 = r0; + r0 = pxsim_String_.length(s.tmp_7); + s.tmp_6 = r0; + s.tmp_9 = if_charWidth_1_mk(s); + s.tmp_9.arg0 = globals.font5___168507; + if (!s.tmp_9.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_9.arg0, "charWidth"); + } else { + s.tmp_9.fn = s.tmp_9.arg0.vtable.iface["charWidth"]; + if (s.tmp_9.fn == null) { s.retval = s.tmp_9.arg0.fields["charWidth"]; } + else if (!s.tmp_9.fn.isGetter) { s.retval = bind(s.tmp_9); } + else { s.callLocIdx = 1271; s.pc = 42; return s.tmp_9; } + } + case 42: + r0 = s.retval; + s.tmp_8 = r0; + r0 = (s.tmp_6 * s.tmp_8); + s.tmp_5 = r0; + r0 = (s.tmp_4 + s.tmp_5); + s.tmp_3 = r0; + r0 = (s.tmp_3 + 2); + s.tmp_2 = r0; + r0 = (s.currY___182719 - 2); + s.tmp_10 = r0; + r0 = pxsim_ImageMethods.drawTransparentImage(s.tmp_0, s.tmp_1, s.tmp_2, s.tmp_10); + case 10: + case 11: case 12: + s.tmp_0 = helpers_imagePrint__P168517_mk(s); + r0 = s.arg0.fields["image"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.str___182844; + s.tmp_0.arg2 = s.x___182856; + s.tmp_0.arg3 = s.currY___182719; + s.tmp_1 = game_screenColor__P172413_mk(s); + s.tmp_1.arg0 = 1; + s.callLocIdx = 1272; s.pc = 44; return s.tmp_1; + case 44: + r0 = s.retval; + s.tmp_0.arg4 = r0; + s.tmp_0.arg5 = globals.font5___168507; + s.tmp_0.arg6 = undefined; + s.callLocIdx = 1273; s.pc = 43; return s.tmp_0; + case 43: + r0 = s.retval; + r0 = (s.i___182831 % 2); + s.tmp_1 = r0; + r0 = (s.tmp_1 === 1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 13; continue; } + s.tmp_2 = r0 = s.currY___182719; + s.tmp_5 = if_charHeight_1_mk(s); + s.tmp_5.arg0 = globals.font5___168507; + if (!s.tmp_5.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "charHeight"); + } else { + s.tmp_5.fn = s.tmp_5.arg0.vtable.iface["charHeight"]; + if (s.tmp_5.fn == null) { s.retval = s.tmp_5.arg0.fields["charHeight"]; } + else if (!s.tmp_5.fn.isGetter) { s.retval = bind(s.tmp_5); } + else { s.callLocIdx = 1274; s.pc = 45; return s.tmp_5; } + } + case 45: + r0 = s.retval; + s.tmp_4 = r0; + r0 = (s.tmp_4 + 2); + s.tmp_3 = r0; + r0 = (s.tmp_2 + s.tmp_3); + s.currY___182719 = (r0); case 13: case 14: + r0 = (s.i___182831 + 1); + s.i___182831 = (r0); + { step = 6; continue; } + case 15: + case 16: + { step = 18; continue; } + case 17: + r0 = pxsim_Array__getAt(s.scores___182706, 0); + s.score___182937 = (r0); + s.tmp_0 = r0 = s.score___182937; + r0 = s.score___182937.fields["value"]; + s.tmp_3 = r0; + if ((s.tmp_3) && (s.tmp_3).vtable) { + setupResume(s, 46); + pxsim_String__stringConv(s.tmp_3); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_3) + ""; } + case 46: + r0 = s.retval; + s.tmp_2 = r0; + r0 = pxsim_String__concat("Score:", s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["str"] = (s.tmp_1); + s.tmp_0 = helpers_imagePrintCenter__P168516_mk(s); + r0 = s.arg0.fields["image"]; + s.tmp_0.arg0 = r0; + r0 = s.score___182937.fields["str"]; + s.tmp_0.arg1 = r0; + r0 = (s.currY___182719 - 1); + s.tmp_0.arg2 = r0; + s.tmp_1 = game_screenColor__P172413_mk(s); + s.tmp_1.arg0 = 1; + s.callLocIdx = 1275; s.pc = 48; return s.tmp_1; + case 48: + r0 = s.retval; + s.tmp_0.arg3 = r0; + s.tmp_0.arg4 = globals.font8___168502; + s.callLocIdx = 1276; s.pc = 47; return s.tmp_0; + case 47: + r0 = s.retval; + case 18: + { step = 22; continue; } + case 19: + s.tmp_1 = game_GameOverDialog_isWinCondition__P169474_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 1277; s.pc = 49; return s.tmp_1; + case 49: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 20; continue; } + s.tmp_3 = if_charHeight_1_mk(s); + s.tmp_3.arg0 = globals.font5___168507; + 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 = 1278; s.pc = 50; return s.tmp_3; } + } + case 50: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_2 + 14); + s.currY___182958 = (r0); + r0 = s.arg0.fields["image"]; + s.tmp_0 = r0; + s.tmp_1 = r0 = globals.img_trophy_lg___172435; + r0 = s.arg0.fields["image"]; + s.tmp_5 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_5); + s.tmp_4 = r0; + r0 = (s.tmp_4 >> 1); + s.tmp_3 = r0; + r0 = pxsim_ImageMethods.width(globals.img_trophy_lg___172435); + s.tmp_7 = r0; + r0 = (s.tmp_7 >> 1); + s.tmp_6 = r0; + r0 = (s.tmp_3 - s.tmp_6); + s.tmp_2 = r0; + r0 = pxsim_ImageMethods.drawTransparentImage(s.tmp_0, s.tmp_1, s.tmp_2, s.currY___182958); + { step = 21; continue; } + case 20: + s.tmp_1 = if_charHeight_1_mk(s); + s.tmp_1.arg0 = globals.font5___168507; + 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 = 1279; s.pc = 51; return s.tmp_1; } + } + case 51: + r0 = s.retval; + s.tmp_0 = r0; + r0 = (s.tmp_0 + 14); + s.currY___182978 = (r0); + r0 = s.arg0.fields["image"]; + s.tmp_0 = r0; + s.tmp_1 = r0 = globals.img_sleepy_sim___172438; + r0 = s.arg0.fields["image"]; + s.tmp_5 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_5); + s.tmp_4 = r0; + r0 = (s.tmp_4 >> 1); + s.tmp_3 = r0; + r0 = pxsim_ImageMethods.width(globals.img_sleepy_sim___172438); + s.tmp_7 = r0; + r0 = (s.tmp_7 >> 1); + s.tmp_6 = r0; + r0 = (s.tmp_3 - s.tmp_6); + s.tmp_2 = r0; + r0 = pxsim_ImageMethods.drawTransparentImage(s.tmp_0, s.tmp_1, s.tmp_2, s.currY___182978); + case 21: + case 22: r0 = undefined; return leave(s, r0) default: oops() } } } -info_PlayerInfoImpl_constructor__P169130.info = {"start":19832,"length":1116,"line":642,"column":8,"endLine":672,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["this","player"]} +game_GameOverDialog_drawScores__P169484.info = {"start":17805,"length":4431,"line":516,"column":8,"endLine":598,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"drawScores","argumentNames":["this"]} -function info_PlayerInfoImpl_constructor__P169130_mk(s) { +function game_GameOverDialog_drawScores__P169484_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_PlayerInfoImpl_constructor__P169130, depth: s.depth + 1, + parent: s, fn: game_GameOverDialog_drawScores__P169484, depth: s.depth + 1, pc: 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, + scores___182706: undefined, + currY___182719: undefined, + score___182728: undefined, + x___182760: undefined, + strlens___182787: undefined, + i___182789: undefined, + col___182795: undefined, + score___182798: undefined, + i___182831: undefined, + col___182837: undefined, + score___182840: undefined, + str___182844: undefined, + x___182856: undefined, + score___182937: undefined, + currY___182958: undefined, + currY___182978: undefined, arg0: undefined, - arg1: undefined, } } -function info_PlayerInfo_drawLives__P169184(s) { +function scores_inline__P182708(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30659,290 +30624,121 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.state___184555 = undefined; - s.font___184561 = undefined; - s.i___184604 = undefined; - s.num___184626 = undefined; - s.textWidth___184633 = undefined; - s.mult___184685 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, info_PlayerInfo__C169144_VT)) failedCast(r0); - s.tmp_0 = info_PlayerInfo_getState__P169170_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 998; s.pc = 8; return s.tmp_0; - case 8: - r0 = s.retval; - s.state___184555 = (r0); - r0 = s.state___184555.fields["life"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 < 0); + r0 = s.arg0.fields["value"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 7; continue; } + r0 = (s.tmp_0 != null); + return leave(s, r0) + default: oops() +} } } +scores_inline__P182708.info = {"start":17904,"length":28,"line":518,"column":50,"endLine":518,"endColumn":78,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"inline","argumentNames":["score"]} + +function scores_inline__P182708_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: scores_inline__P182708, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function game_replaceRange__P172412(s) { +let r0 = s.r0, 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; + } + s.tmp_4 = helpers_stringSubstr__P166645_mk(s); + s.tmp_4.arg0 = s.arg0; + s.tmp_4.arg1 = 0; + s.tmp_4.arg2 = s.arg2; + s.callLocIdx = 1177; s.pc = 1; return s.tmp_4; case 1: + r0 = s.retval; + s.tmp_3 = r0; + if ((s.tmp_3) && (s.tmp_3).vtable) { + setupResume(s, 2); + pxsim_String__stringConv(s.tmp_3); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_3) + ""; } case 2: - s.font___184561 = (globals.font8___168502); - r0 = s.state___184555.fields["life"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 <= 4); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - s.tmp_2 = helpers_imageFillRect__P168483_mk(s); - s.tmp_2.arg0 = globals.screen___168559; - s.tmp_2.arg1 = 0; - s.tmp_2.arg2 = 0; - r0 = s.state___184555.fields["life"]; - s.tmp_4 = r0; - r0 = globals.infoState___172322.fields["heartImage"]; - s.tmp_7 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_7); + r0 = s.retval; + s.tmp_2 = r0; + s.tmp_7 = helpers_stringSubstr__P166645_mk(s); + s.tmp_7.arg0 = s.arg1; + s.tmp_7.arg1 = 0; + s.tmp_7.arg2 = s.arg3; + s.callLocIdx = 1178; s.pc = 3; return s.tmp_7; + case 3: + r0 = s.retval; s.tmp_6 = r0; - r0 = (s.tmp_6 + 1); + if ((s.tmp_6) && (s.tmp_6).vtable) { + setupResume(s, 4); + pxsim_String__stringConv(s.tmp_6); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_6) + ""; } + case 4: + r0 = s.retval; s.tmp_5 = r0; - r0 = (s.tmp_4 * s.tmp_5); - s.tmp_3 = r0; - r0 = (s.tmp_3 + 3); - s.tmp_2.arg3 = r0; - r0 = globals.infoState___172322.fields["heartImage"]; - s.tmp_9 = r0; - r0 = pxsim_ImageMethods.height(s.tmp_9); - s.tmp_8 = r0; - r0 = (s.tmp_8 + 4); - s.tmp_2.arg4 = r0; - r0 = globals.infoState___172322.fields["borderColor"]; - s.tmp_2.arg5 = r0; - s.callLocIdx = 999; s.pc = 9; return s.tmp_2; - case 9: - r0 = s.retval; - s.tmp_0 = helpers_imageFillRect__P168483_mk(s); - s.tmp_0.arg0 = globals.screen___168559; - s.tmp_0.arg1 = 0; - s.tmp_0.arg2 = 0; - r0 = s.state___184555.fields["life"]; - s.tmp_2 = r0; - r0 = globals.infoState___172322.fields["heartImage"]; - s.tmp_5 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_5); - s.tmp_4 = r0; - r0 = (s.tmp_4 + 1); - s.tmp_3 = r0; - r0 = (s.tmp_2 * s.tmp_3); - s.tmp_1 = r0; - r0 = (s.tmp_1 + 2); - s.tmp_0.arg3 = r0; - r0 = globals.infoState___172322.fields["heartImage"]; - s.tmp_7 = r0; - r0 = pxsim_ImageMethods.height(s.tmp_7); - s.tmp_6 = r0; - r0 = (s.tmp_6 + 3); - s.tmp_0.arg4 = r0; - r0 = globals.infoState___172322.fields["bgColor"]; - s.tmp_0.arg5 = r0; - s.callLocIdx = 1000; s.pc = 10; return s.tmp_0; - case 10: - r0 = s.retval; - s.i___184604 = (0); - case 3: - r0 = s.state___184555.fields["life"]; - s.tmp_1 = r0; - r0 = (s.i___184604 < s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - s.tmp_2 = r0 = globals.screen___168559; - r0 = globals.infoState___172322.fields["heartImage"]; - s.tmp_3 = r0; - s.tmp_6 = r0 = s.i___184604; - r0 = globals.infoState___172322.fields["heartImage"]; - s.tmp_9 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_9); - s.tmp_8 = r0; - r0 = (s.tmp_8 + 1); - s.tmp_7 = r0; - r0 = (s.tmp_6 * s.tmp_7); - s.tmp_5 = r0; - r0 = (1 + s.tmp_5); - s.tmp_4 = r0; - r0 = pxsim_ImageMethods.drawTransparentImage(s.tmp_2, s.tmp_3, s.tmp_4, 1); - r0 = (s.i___184604 + 1); - s.i___184604 = (r0); - { step = 3; continue; } - case 4: - { step = 6; continue; } - case 5: - r0 = s.state___184555.fields["life"]; + r0 = pxsim_String__concat(s.tmp_2, s.tmp_5); s.tmp_1 = r0; if ((s.tmp_1) && (s.tmp_1).vtable) { - setupResume(s, 11); + setupResume(s, 5); pxsim_String__stringConv(s.tmp_1); checkResumeConsumed(); return; } else { s.retval = (s.tmp_1) + ""; } - case 11: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_String_.mkEmpty(); - s.tmp_2 = r0; - r0 = pxsim_String__concat(s.tmp_0, s.tmp_2); - s.num___184626 = (r0); - r0 = pxsim_String_.length(s.num___184626); - s.tmp_1 = r0; - s.tmp_3 = if_charWidth_1_mk(s); - s.tmp_3.arg0 = s.font___184561; - if (!s.tmp_3.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "charWidth"); - } else { - s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["charWidth"]; - if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["charWidth"]; } - else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } - else { s.callLocIdx = 1001; s.pc = 12; return s.tmp_3; } - } - case 12: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_1 * s.tmp_2); - s.tmp_0 = r0; - r0 = (s.tmp_0 - 1); - s.textWidth___184633 = (r0); - s.tmp_0 = helpers_imageFillRect__P168483_mk(s); - s.tmp_0.arg0 = globals.screen___168559; - s.tmp_0.arg1 = 0; - s.tmp_0.arg2 = 0; - r0 = globals.infoState___172322.fields["heartImage"]; - s.tmp_4 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_4); - s.tmp_3 = r0; - r0 = globals.infoState___172322.fields["multiplierImage"]; - s.tmp_6 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_6); - s.tmp_5 = r0; - r0 = (s.tmp_3 + s.tmp_5); - s.tmp_2 = r0; - r0 = (s.tmp_2 + s.textWidth___184633); - s.tmp_1 = r0; - r0 = (s.tmp_1 + 5); - s.tmp_0.arg3 = r0; - r0 = globals.infoState___172322.fields["heartImage"]; - s.tmp_8 = r0; - r0 = pxsim_ImageMethods.height(s.tmp_8); - s.tmp_7 = r0; - r0 = (s.tmp_7 + 4); - s.tmp_0.arg4 = r0; - r0 = globals.infoState___172322.fields["borderColor"]; - s.tmp_0.arg5 = r0; - s.callLocIdx = 1002; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; - s.tmp_0 = helpers_imageFillRect__P168483_mk(s); - s.tmp_0.arg0 = globals.screen___168559; - s.tmp_0.arg1 = 0; - s.tmp_0.arg2 = 0; - r0 = globals.infoState___172322.fields["heartImage"]; - s.tmp_4 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_4); - s.tmp_3 = r0; - r0 = globals.infoState___172322.fields["multiplierImage"]; - s.tmp_6 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_6); - s.tmp_5 = r0; - r0 = (s.tmp_3 + s.tmp_5); - s.tmp_2 = r0; - r0 = (s.tmp_2 + s.textWidth___184633); - s.tmp_1 = r0; - r0 = (s.tmp_1 + 4); - s.tmp_0.arg3 = r0; - r0 = globals.infoState___172322.fields["heartImage"]; - s.tmp_8 = r0; - r0 = pxsim_ImageMethods.height(s.tmp_8); - s.tmp_7 = r0; - r0 = (s.tmp_7 + 3); - s.tmp_0.arg4 = r0; - r0 = globals.infoState___172322.fields["bgColor"]; - s.tmp_0.arg5 = r0; - s.callLocIdx = 1003; s.pc = 14; return s.tmp_0; - case 14: + case 5: r0 = s.retval; - r0 = globals.infoState___172322.fields["heartImage"]; - s.tmp_0 = r0; - r0 = pxsim_ImageMethods.drawTransparentImage(globals.screen___168559, s.tmp_0, 1, 1); - r0 = globals.infoState___172322.fields["multiplierImage"]; - s.tmp_0 = r0; - r0 = pxsim_ImageMethods.clone(s.tmp_0); - s.mult___184685 = (r0); - r0 = globals.infoState___172322.fields["fontColor"]; s.tmp_0 = r0; - r0 = pxsim_ImageMethods.replace(s.mult___184685, 1, s.tmp_0); - s.tmp_0 = r0 = globals.screen___168559; - s.tmp_1 = r0 = s.mult___184685; - r0 = globals.infoState___172322.fields["heartImage"]; - s.tmp_4 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_4); - s.tmp_3 = r0; - r0 = (s.tmp_3 + 2); - s.tmp_2 = r0; - s.tmp_8 = if_charHeight_1_mk(s); - s.tmp_8.arg0 = s.font___184561; - 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 = 1004; s.pc = 15; return s.tmp_8; } - } - case 15: + s.tmp_10 = helpers_stringSubstr__P166645_mk(s); + s.tmp_10.arg0 = s.arg0; + r0 = (s.arg2 + s.arg3); + s.tmp_10.arg1 = r0; + s.tmp_10.arg2 = undefined; + s.callLocIdx = 1179; s.pc = 6; return s.tmp_10; + case 6: r0 = s.retval; - s.tmp_7 = r0; - r0 = globals.infoState___172322.fields["multiplierImage"]; - s.tmp_10 = r0; - r0 = pxsim_ImageMethods.height(s.tmp_10); 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 = pxsim_ImageMethods.drawTransparentImage(s.tmp_0, s.tmp_1, s.tmp_2, s.tmp_5); - s.tmp_0 = helpers_imagePrint__P168517_mk(s); - s.tmp_0.arg0 = globals.screen___168559; - s.tmp_0.arg1 = s.num___184626; - r0 = globals.infoState___172322.fields["heartImage"]; - s.tmp_3 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_3); - s.tmp_2 = r0; - r0 = (s.tmp_2 + 3); - s.tmp_1 = r0; - r0 = globals.infoState___172322.fields["multiplierImage"]; - s.tmp_5 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_5); - s.tmp_4 = r0; - r0 = (s.tmp_1 + s.tmp_4); - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = 1; - r0 = globals.infoState___172322.fields["fontColor"]; - s.tmp_0.arg4 = r0; - s.tmp_0.arg5 = s.font___184561; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 1005; s.pc = 16; return s.tmp_0; - case 16: - r0 = s.retval; - case 6: + if ((s.tmp_9) && (s.tmp_9).vtable) { + setupResume(s, 7); + pxsim_String__stringConv(s.tmp_9); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_9) + ""; } case 7: - r0 = undefined; + r0 = s.retval; + s.tmp_8 = r0; + r0 = pxsim_String__concat(s.tmp_0, s.tmp_8); return leave(s, r0) default: oops() } } } -info_PlayerInfo_drawLives__P169184.info = {"start":36073,"length":2458,"line":1189,"column":8,"endLine":1255,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"drawLives","argumentNames":["this"]} +game_replaceRange__P172412.info = {"start":400,"length":175,"line":24,"column":4,"endLine":26,"endColumn":5,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"replaceRange","argumentNames":["dst","src","start","len"]} -function info_PlayerInfo_drawLives__P169184_mk(s) { +function game_replaceRange__P172412_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_PlayerInfo_drawLives__P169184, depth: s.depth + 1, + parent: s, fn: game_replaceRange__P172412, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -30955,20 +30751,17 @@ function info_PlayerInfo_drawLives__P169184_mk(s) { tmp_8: undefined, tmp_9: undefined, tmp_10: undefined, - state___184555: undefined, - font___184561: undefined, - i___184604: undefined, - num___184626: undefined, - textWidth___184633: undefined, - mult___184685: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function info_PlayerInfo_getState__P169170(s) { +function game_padStr__P172411(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30978,37 +30771,50 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.str___183033 = undefined; + s.i___183034 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, info_PlayerInfo__C169144_VT)) failedCast(r0); - s.tmp_0 = info_PlayerInfo_init__P172375_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 972; s.pc = 1; return s.tmp_0; + r0 = pxsim_String_.mkEmpty(); + s.str___183033 = (r0); + s.i___183034 = (0); case 1: - r0 = s.retval; - r0 = globals.infoState___172322.fields["playerStates"]; + r0 = (s.i___183034 < s.arg0); s.tmp_0 = r0; - r0 = s.arg0.fields["_player"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 - 1); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + if ((s.str___183033) && (s.str___183033).vtable) { + setupResume(s, 3); + pxsim_String__stringConv(s.str___183033); + checkResumeConsumed(); + return; + } else { s.retval = (s.str___183033) + ""; } + case 3: + r0 = s.retval; s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); + r0 = pxsim_String__concat(s.tmp_1, " "); + s.str___183033 = (r0); + r0 = (s.i___183034 + 1); + s.i___183034 = (r0); + { step = 1; continue; } + case 2: + r0 = s.str___183033; return leave(s, r0) default: oops() } } } -info_PlayerInfo_getState__P169170.info = {"start":27499,"length":121,"line":915,"column":8,"endLine":918,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"getState","argumentNames":["this"]} +game_padStr__P172411.info = {"start":234,"length":160,"line":16,"column":4,"endLine":22,"endColumn":5,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"padStr","argumentNames":["len"]} -function info_PlayerInfo_getState__P169170_mk(s) { +function game_padStr__P172411_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_PlayerInfo_getState__P169170, depth: s.depth + 1, + parent: s, fn: game_padStr__P172411, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, + str___183033: undefined, + i___183034: undefined, arg0: undefined, } } @@ -31016,7 +30822,7 @@ function info_PlayerInfo_getState__P169170_mk(s) { -function info_PlayerInfo_init__P172375(s) { +function game_GameOverDialog_hasScores__P169476(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -31031,75 +30837,34 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, info_PlayerInfo__C169144_VT)) failedCast(r0); - s.tmp_0 = info_initHUD__P172368_mk(s); - s.callLocIdx = 969; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - r0 = s.arg0.fields["_player"]; - 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 = info_initMultiHUD__P172369_mk(s); - s.callLocIdx = 970; s.pc = 6; return s.tmp_2; - case 6: - r0 = s.retval; - case 1: - case 2: - r0 = globals.infoState___172322.fields["playerStates"]; - s.tmp_3 = r0; - r0 = s.arg0.fields["_player"]; - s.tmp_5 = r0; - r0 = (s.tmp_5 - 1); + if (!checkSubtype(r0, game_GameOverDialog__C169473_VT)) failedCast(r0); + r0 = s.arg0.fields["flags"]; s.tmp_4 = r0; - r0 = pxsim_Array__getAt(s.tmp_3, s.tmp_4); + r0 = (s.tmp_4 & 16); + s.tmp_3 = r0; + 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_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = pxsim_pxtcore_mkClassInstance(info_PlayerState__C169080_VT); - s.tmp_6 = r0; - s.tmp_7 = info_PlayerState_constructor__P169089_mk(s); - s.tmp_7.arg0 = s.tmp_6; - s.callLocIdx = 971; s.pc = 7; return s.tmp_7; - case 7: - r0 = s.retval; - r0 = globals.infoState___172322.fields["playerStates"]; - s.tmp_8 = r0; - r0 = s.arg0.fields["_player"]; - s.tmp_10 = r0; - r0 = (s.tmp_10 - 1); - s.tmp_9 = r0; - r0 = pxsim_Array_.setAt(s.tmp_8, s.tmp_9, s.tmp_6); - case 3: - case 4: - r0 = undefined; - return leave(s, r0) + r0 = pxsim_Boolean__bang(s.tmp_0); + return leaveAccessor(s, r0) default: oops() } } } -info_PlayerInfo_init__P172375.info = {"start":25226,"length":252,"line":812,"column":8,"endLine":818,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"init","argumentNames":["this"]} +game_GameOverDialog_hasScores__P169476.info = {"start":13706,"length":75,"line":419,"column":8,"endLine":419,"endColumn":83,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"hasScores","argumentNames":["this"]} +game_GameOverDialog_hasScores__P169476.isGetter = true; -function info_PlayerInfo_init__P172375_mk(s) { +function game_GameOverDialog_hasScores__P169476_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_PlayerInfo_init__P172375, depth: s.depth + 1, + parent: s, fn: game_GameOverDialog_hasScores__P169476, depth: s.depth + 1, pc: 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, } } @@ -31107,7 +30872,7 @@ function info_PlayerInfo_init__P172375_mk(s) { -function info_PlayerInfo_drawScore__P169183(s) { +function game_GameOverDialog_isWinCondition__P169474(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -31117,154 +30882,39 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.s___184770 = undefined; - s.font___184776 = undefined; - s.offsetY___184777 = undefined; - s.num___184786 = undefined; - s.width___184790 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, info_PlayerInfo__C169144_VT)) failedCast(r0); - s.tmp_1 = info_PlayerInfoImpl_score__P169133_mk(s); - r0 = s.arg0.fields["impl"]; - s.tmp_1.arg0 = r0; - s.callLocIdx = 991; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; - s.tmp_0 = r0; - r0 = (s.tmp_0 | 0); - s.s___184770 = (r0); - r0 = (s.s___184770 >= 1000000); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.offsetY___184777 = (2); - s.font___184776 = (globals.font5___168507); - { step = 2; continue; } - case 1: - s.offsetY___184777 = (1); - s.font___184776 = (globals.font8___168502); - case 2: - r0 = pxsim_numops.toString(s.s___184770); - s.num___184786 = (r0); - r0 = pxsim_String_.length(s.num___184786); - s.tmp_0 = r0; - s.tmp_2 = if_charWidth_1_mk(s); - s.tmp_2.arg0 = s.font___184776; - 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 = 992; s.pc = 4; return s.tmp_2; } - } - case 4: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0 * s.tmp_1); - s.width___184790 = (r0); - s.tmp_0 = helpers_imageFillRect__P168483_mk(s); - s.tmp_0.arg0 = globals.screen___168559; - r0 = pxsim_ImageMethods.width(globals.screen___168559); - s.tmp_2 = r0; - r0 = (s.tmp_2 - s.width___184790); - s.tmp_1 = r0; - r0 = (s.tmp_1 - 2); - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = 0; - r0 = pxsim_ImageMethods.width(globals.screen___168559); - s.tmp_0.arg3 = r0; - s.tmp_4 = if_charHeight_1_mk(s); - s.tmp_4.arg0 = globals.font8___168502; - 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 = 993; s.pc = 6; return s.tmp_4; } - } - case 6: - r0 = s.retval; + if (!checkSubtype(r0, game_GameOverDialog__C169473_VT)) failedCast(r0); + r0 = s.arg0.fields["flags"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 & 1); s.tmp_3 = r0; - r0 = (s.tmp_3 + 3); - s.tmp_0.arg4 = r0; - r0 = globals.infoState___172322.fields["borderColor"]; - s.tmp_0.arg5 = r0; - s.callLocIdx = 994; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - s.tmp_0 = helpers_imageFillRect__P168483_mk(s); - s.tmp_0.arg0 = globals.screen___168559; - r0 = pxsim_ImageMethods.width(globals.screen___168559); + r0 = pxsim_numops_toBoolDecr(s.tmp_3); s.tmp_2 = r0; - r0 = (s.tmp_2 - s.width___184790); - s.tmp_1 = r0; - r0 = (s.tmp_1 - 1); - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = 0; - r0 = pxsim_ImageMethods.width(globals.screen___168559); - s.tmp_0.arg3 = r0; - s.tmp_4 = if_charHeight_1_mk(s); - s.tmp_4.arg0 = globals.font8___168502; - 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 = 995; s.pc = 8; return s.tmp_4; } - } - case 8: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_3 + 2); - s.tmp_0.arg4 = r0; - r0 = globals.infoState___172322.fields["bgColor"]; - s.tmp_0.arg5 = r0; - s.callLocIdx = 996; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - s.tmp_0 = helpers_imagePrint__P168517_mk(s); - s.tmp_0.arg0 = globals.screen___168559; - s.tmp_0.arg1 = s.num___184786; - r0 = pxsim_ImageMethods.width(globals.screen___168559); + r0 = pxsim_Boolean__bang(s.tmp_2); s.tmp_1 = r0; - r0 = (s.tmp_1 - s.width___184790); - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = s.offsetY___184777; - r0 = globals.infoState___172322.fields["fontColor"]; - s.tmp_0.arg4 = r0; - s.tmp_0.arg5 = s.font___184776; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 997; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_Boolean__bang(s.tmp_0); + return leaveAccessor(s, r0) default: oops() } } } -info_PlayerInfo_drawScore__P169183.info = {"start":35010,"length":1053,"line":1149,"column":8,"endLine":1187,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"drawScore","argumentNames":["this"]} +game_GameOverDialog_isWinCondition__P169474.info = {"start":13573,"length":73,"line":417,"column":8,"endLine":417,"endColumn":81,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"isWinCondition","argumentNames":["this"]} +game_GameOverDialog_isWinCondition__P169474.isGetter = true; -function info_PlayerInfo_drawScore__P169183_mk(s) { +function game_GameOverDialog_isWinCondition__P169474_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_PlayerInfo_drawScore__P169183, depth: s.depth + 1, + parent: s, fn: game_GameOverDialog_isWinCondition__P169474, depth: s.depth + 1, pc: 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___184770: undefined, - font___184776: undefined, - offsetY___184777: undefined, - num___184786: undefined, - width___184790: undefined, arg0: undefined, } } @@ -31272,7 +30922,7 @@ function info_PlayerInfo_drawScore__P169183_mk(s) { -function info_PlayerInfo_drawPlayer__P169182(s) { +function game_GameOverDialog_drawMessage__P169483(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -31282,621 +30932,504 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.state___184968 = undefined; - s.font___184971 = undefined; - s.score___184973 = undefined; - s.life___184974 = undefined; - s.height___184975 = undefined; - s.scoreWidth___184976 = undefined; - s.lifeWidth___184977 = undefined; - s.offsetY___184980 = undefined; - s.showScore___184981 = undefined; - s.showLife___184989 = undefined; - s.width___185057 = undefined; - s.x___185067 = undefined; - s.y___185076 = undefined; - s.bump___185113 = undefined; - s.xLoc___185140 = undefined; - s.mult___185152 = undefined; - s.pNum___185216 = undefined; - s.iconWidth___185223 = undefined; - s.iconHeight___185231 = undefined; - s.iconX___185239 = undefined; - s.iconY___185252 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, info_PlayerInfo__C169144_VT)) failedCast(r0); - s.tmp_0 = info_PlayerInfo_getState__P169170_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 974; s.pc = 43; return s.tmp_0; - case 43: + if (!checkSubtype(r0, game_GameOverDialog__C169473_VT)) failedCast(r0); + s.tmp_0 = helpers_imagePrintCenter__P168516_mk(s); + r0 = s.arg0.fields["image"]; + s.tmp_0.arg0 = r0; + r0 = s.arg0.fields["message"]; + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = 5; + s.tmp_1 = game_screenColor__P172413_mk(s); + s.tmp_1.arg0 = 5; + s.callLocIdx = 1258; s.pc = 2; return s.tmp_1; + case 2: r0 = s.retval; - s.state___184968 = (r0); - s.font___184971 = (globals.font5___168507); - s.height___184975 = (4); - s.scoreWidth___184976 = (0); - s.lifeWidth___184977 = (0); - s.offsetY___184980 = (2); - r0 = s.state___184968.fields["showScore"]; - 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.arg3 = r0; + s.tmp_0.arg4 = globals.font8___168502; + s.callLocIdx = 1259; s.pc = 1; return s.tmp_0; case 1: - r0 = s.state___184968.fields["score"]; + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +game_GameOverDialog_drawMessage__P169483.info = {"start":17577,"length":218,"line":506,"column":8,"endLine":514,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"drawMessage","argumentNames":["this"]} + +function game_GameOverDialog_drawMessage__P169483_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: game_GameOverDialog_drawMessage__P169483, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + arg0: undefined, +} } + + + + + +function game_GameOverDialog_displayCursor__P169481(s) { +let r0 = s.r0, 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_GameOverDialog__C169473_VT)) failedCast(r0); + r0 = (s.arg0).fields["cursorOn"] = (true); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +game_GameOverDialog_displayCursor__P169481.info = {"start":17323,"length":61,"line":493,"column":8,"endLine":495,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"displayCursor","argumentNames":["this"]} + +function game_GameOverDialog_displayCursor__P169481_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: game_GameOverDialog_displayCursor__P169481, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function game_GameOverDialog_constructor__P169480(s) { +let r0 = s.r0, 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.score___183102 = undefined; + s.winner___183157 = undefined; + s.scoresWithValues___183234 = undefined; + s.scoreRows___183266 = 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, game_GameOverDialog__C169473_VT)) failedCast(r0); + r0 = (s.arg0).fields["message"] = (s.arg2); + r0 = (s.arg0).fields["judged"] = (s.arg3); + r0 = (s.arg0).fields["scores"] = (s.arg4); + r0 = (s.arg0).fields["bestScore"] = (s.arg5); + r0 = (s.arg0).fields["winnerOverride"] = (s.arg6); + s.tmp_0 = game_BaseDialog_constructor__P169442_mk(s); + s.tmp_0.arg0 = s.arg0; + r0 = pxsim_ImageMethods.width(globals.screen___168559); + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = 46; + s.tmp_1 = game_defaultSplashFrame__P172442_mk(s); + s.callLocIdx = 1235; s.pc = 34; return s.tmp_1; + case 34: + r0 = s.retval; + s.tmp_0.arg3 = r0; + s.tmp_0.arg4 = undefined; + s.tmp_0.arg5 = undefined; + s.callLocIdx = 1236; s.pc = 33; return s.tmp_0; + case 33: + r0 = s.retval; + r0 = (s.arg0).fields["cursorOn"] = (false); + r0 = (s.arg0).fields["flags"] = (0); + r0 = pxsim_numops_toBoolDecr(s.arg1); + 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 | 1); s.tmp_1 = r0; - r0 = (s.tmp_1 !== undefined); + r0 = (s.tmp_0).fields["flags"] = (s.tmp_1); + case 1: case 2: - // jmp value (already in r0) + r0 = pxsim_numops_toBoolDecr(s.arg6); + if (!r0) { step = 5; continue; } + s.arg1 = (true); + s.tmp_0 = r0 = s.arg0; + r0 = s.tmp_0.fields["flags"]; s.tmp_2 = r0; - s.showScore___184981 = (s.tmp_2); - r0 = s.state___184968.fields["showLife"]; - 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.state___184968.fields["life"]; + r0 = (s.tmp_2 | 1); s.tmp_1 = r0; - r0 = (s.tmp_1 !== undefined); - case 4: - // jmp value (already in r0) + r0 = (s.tmp_0).fields["flags"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = s.tmp_0.fields["flags"]; s.tmp_2 = r0; - s.showLife___184989 = (s.tmp_2); - r0 = pxsim_numops_toBoolDecr(s.showScore___184981); - if (!r0) { step = 5; continue; } - r0 = pxsim_String_.mkEmpty(); + r0 = (s.tmp_2 | 8); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["flags"] = (s.tmp_1); + r0 = pxsim_pxtcore_mkAction(1, score_inline__P183104); s.tmp_0 = r0; - r0 = s.state___184968.fields["score"]; - s.tmp_2 = r0; - if ((s.tmp_2) && (s.tmp_2).vtable) { - setupResume(s, 44); - pxsim_String__stringConv(s.tmp_2); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_2) + ""; } - case 44: + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg6); + s.tmp_1 = helpers_arrayFind__P166638_mk(s); + s.tmp_1.arg0 = s.arg4; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 1237; s.pc = 35; return s.tmp_1; + case 35: r0 = s.retval; + s.score___183102 = (r0); + r0 = pxsim_numops_toBoolDecr(s.score___183102); s.tmp_1 = r0; - r0 = pxsim_String__concat(s.tmp_0, s.tmp_1); - s.score___184973 = (r0); - r0 = pxsim_String_.length(s.score___184973); - s.tmp_1 = r0; - s.tmp_3 = if_charWidth_1_mk(s); - s.tmp_3.arg0 = s.font___184971; - if (!s.tmp_3.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "charWidth"); - } else { - s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["charWidth"]; - if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["charWidth"]; } - else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } - else { s.callLocIdx = 975; s.pc = 45; return s.tmp_3; } - } - case 45: - r0 = s.retval; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = pxsim_pxtcore_mkClassInstance(game_GameOverPlayerScore__C169470_VT); s.tmp_2 = r0; - r0 = (s.tmp_1 * s.tmp_2); + s.tmp_3 = game_GameOverPlayerScore_constructor__P169472_mk(s); + s.tmp_3.arg0 = s.tmp_2; + s.tmp_3.arg1 = s.arg6; + s.tmp_3.arg2 = null; + s.tmp_3.arg3 = true; + s.callLocIdx = 1238; s.pc = 36; return s.tmp_3; + case 36: + r0 = s.retval; + r0 = pxsim_Array__push(s.arg4, s.tmp_2); + s.tmp_0 = helpers_arraySort__P166632_mk(s); + s.tmp_0.arg0 = s.arg4; + s.tmp_0.arg1 = game_GameOverDialog_inline__P183123; + s.callLocIdx = 1239; s.pc = 37; return s.tmp_0; + case 37: + r0 = s.retval; + case 3: + case 4: + r0 = pxsim_pxtcore_mkAction(1, game_GameOverDialog_inline__P183133); s.tmp_0 = r0; - r0 = (s.tmp_0 + 3); - s.scoreWidth___184976 = (r0); - s.tmp_0 = r0 = s.height___184975; - s.tmp_2 = if_charHeight_1_mk(s); - s.tmp_2.arg0 = s.font___184971; - if (!s.tmp_2.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "charHeight"); - } else { - s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["charHeight"]; - if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["charHeight"]; } - else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } - else { s.callLocIdx = 976; s.pc = 46; return s.tmp_2; } - } - case 46: + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg6); + s.tmp_1 = helpers_arrayForEach__P166636_mk(s); + s.tmp_1.arg0 = s.arg4; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 1240; s.pc = 38; return s.tmp_1; + case 38: r0 = s.retval; + case 5: + case 6: + r0 = pxsim_Array__length(s.arg4); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 21; continue; } + r0 = pxsim_pxtcore_mkAction(1, game_GameOverDialog_inline__P183145); s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.height___184975 = (r0); - s.tmp_0 = r0 = s.offsetY___184980; - s.tmp_3 = if_charHeight_1_mk(s); - s.tmp_3.arg0 = s.font___184971; - 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 = 977; s.pc = 47; return s.tmp_3; } - } - case 47: + r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.arg0); + s.tmp_2 = helpers_arrayForEach__P166636_mk(s); + s.tmp_2.arg0 = s.arg4; + s.tmp_2.arg1 = s.tmp_1; + s.callLocIdx = 1241; s.pc = 39; return s.tmp_2; + case 39: r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_2 + 1); + r0 = pxsim_numops_toBoolDecr(s.arg1); + if (!r0) { step = 19; continue; } + s.tmp_0 = helpers_arrayFind__P166638_mk(s); + s.tmp_0.arg0 = s.arg4; + s.tmp_0.arg1 = winner_inline__P183160; + s.callLocIdx = 1242; s.pc = 40; return s.tmp_0; + case 40: + r0 = s.retval; + s.winner___183157 = (r0); + r0 = pxsim_numops_toBoolDecr(s.winner___183157); s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.offsetY___184980 = (r0); - case 5: - case 6: - r0 = pxsim_numops_toBoolDecr(s.showLife___184989); - if (!r0) { step = 9; continue; } - r0 = s.state___184968.fields["life"]; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 7; continue; } + if (r0) { step = 7; continue; } r0 = s.tmp_0; { step = 8; continue; } case 7: - r0 = 0; + r0 = pxsim_Array__length(s.arg4); + s.tmp_2 = r0; + r0 = (s.tmp_2 === 1); case 8: // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 9; continue; } + r0 = pxsim_Array__getAt(s.arg4, 0); + s.winner___183157 = (r0); + case 9: + case 10: + r0 = pxsim_numops_toBoolDecr(s.winner___183157); + if (!r0) { step = 17; continue; } + r0 = s.winner___183157.fields["value"]; s.tmp_1 = r0; - r0 = pxsim_String_.mkEmpty(); + r0 = (s.tmp_1 != null); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 15; continue; } + r0 = (s.arg5 == null); s.tmp_2 = r0; - if ((s.tmp_1) && (s.tmp_1).vtable) { - setupResume(s, 48); - pxsim_String__stringConv(s.tmp_1); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_1) + ""; } - case 48: - r0 = s.retval; - s.tmp_3 = r0; - r0 = pxsim_String__concat(s.tmp_2, s.tmp_3); - s.life___184974 = (r0); - r0 = globals.infoState___172322.fields["heartImage"]; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 11; continue; } + r0 = s.winner___183157.fields["value"]; s.tmp_3 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_3); + r0 = (s.arg0).fields["bestScore"] = (s.tmp_3); + s.tmp_0 = r0 = s.arg0; + r0 = s.tmp_0.fields["flags"]; s.tmp_2 = r0; - r0 = globals.infoState___172322.fields["multiplierImage"]; - s.tmp_5 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_5); - s.tmp_4 = r0; - r0 = (s.tmp_2 + s.tmp_4); + r0 = (s.tmp_2 | 4); s.tmp_1 = r0; - r0 = pxsim_String_.length(s.life___184974); - s.tmp_7 = r0; - s.tmp_9 = if_charWidth_1_mk(s); - s.tmp_9.arg0 = s.font___184971; - if (!s.tmp_9.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_9.arg0, "charWidth"); - } else { - s.tmp_9.fn = s.tmp_9.arg0.vtable.iface["charWidth"]; - if (s.tmp_9.fn == null) { s.retval = s.tmp_9.arg0.fields["charWidth"]; } - else if (!s.tmp_9.fn.isGetter) { s.retval = bind(s.tmp_9); } - else { s.callLocIdx = 978; s.pc = 49; return s.tmp_9; } - } - case 49: + r0 = (s.tmp_0).fields["flags"] = (s.tmp_1); + { step = 14; continue; } + case 11: + s.tmp_1 = info_isBetterScore__P169094_mk(s); + r0 = s.winner___183157.fields["value"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.arg5; + s.callLocIdx = 1243; s.pc = 41; return s.tmp_1; + case 41: r0 = s.retval; - s.tmp_8 = r0; - r0 = (s.tmp_7 * s.tmp_8); - s.tmp_6 = r0; - r0 = (s.tmp_1 + s.tmp_6); s.tmp_0 = r0; - r0 = (s.tmp_0 + 3); - s.lifeWidth___184977 = (r0); - s.tmp_0 = r0 = s.height___184975; - r0 = globals.infoState___172322.fields["heartImage"]; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 12; continue; } + r0 = s.winner___183157.fields["value"]; s.tmp_2 = r0; - r0 = pxsim_ImageMethods.height(s.tmp_2); + r0 = (s.arg0).fields["bestScore"] = (s.tmp_2); + s.tmp_0 = r0 = s.arg0; + r0 = s.tmp_0.fields["flags"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 | 4); s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.height___184975 = (r0); - case 9: - case 10: - s.tmp_0 = Math_max__P166657_mk(s); - s.tmp_0.arg0 = s.scoreWidth___184976; - s.tmp_0.arg1 = s.lifeWidth___184977; - s.callLocIdx = 979; s.pc = 50; return s.tmp_0; - case 50: - r0 = s.retval; - s.width___185057 = (r0); - s.tmp_0 = r0 = s.showScore___184981; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 11; continue; } - r0 = s.tmp_0; - { step = 12; continue; } - case 11: - r0 = s.showLife___184989; + r0 = (s.tmp_0).fields["flags"] = (s.tmp_1); case 12: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 13; continue; } - r0 = (s.height___184975 + 1); - s.height___184975 = (r0); case 13: case 14: - r0 = s.arg0.fields["impl"]; - r0 = r0.fields["left"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 15; continue; } - r0 = s.width___185057; - { step = 16; continue; } case 15: - r0 = 0; case 16: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = s.arg0.fields["impl"]; - r0 = r0.fields["x"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 - s.tmp_1); - s.x___185067 = (r0); - r0 = s.arg0.fields["impl"]; - r0 = r0.fields["up"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 17; continue; } - r0 = s.height___184975; - { step = 18; continue; } - case 17: - r0 = 0; - case 18: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = s.arg0.fields["impl"]; - r0 = r0.fields["y"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 - s.tmp_1); - s.y___185076 = (r0); - s.tmp_0 = r0 = s.showScore___184981; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 19; continue; } - r0 = s.tmp_0; - { step = 20; continue; } - case 19: - r0 = s.showLife___184989; - case 20: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 21; continue; } - s.tmp_2 = helpers_imageFillRect__P168483_mk(s); - s.tmp_2.arg0 = globals.screen___168559; - s.tmp_2.arg1 = s.x___185067; - s.tmp_2.arg2 = s.y___185076; - s.tmp_2.arg3 = s.width___185057; - s.tmp_2.arg4 = s.height___184975; - r0 = s.arg0.fields["impl"]; - r0 = r0.fields["border"]; - s.tmp_2.arg5 = r0; - s.callLocIdx = 980; s.pc = 51; return s.tmp_2; - case 51: + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = helpers_stringReplaceAll__P166644_mk(s); + s.tmp_3 = helpers_stringReplaceAll__P166644_mk(s); + s.tmp_4 = helpers_stringReplaceAll__P166644_mk(s); + s.tmp_5 = helpers_stringReplaceAll__P166644_mk(s); + r0 = s.arg0.fields["message"]; + s.tmp_5.arg0 = r0; + s.tmp_5.arg1 = "${WINNER}"; + r0 = s.winner___183157.fields["player"]; + s.tmp_7 = r0; + if ((s.tmp_7) && (s.tmp_7).vtable) { + setupResume(s, 46); + pxsim_String__stringConv(s.tmp_7); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_7) + ""; } + case 46: r0 = s.retval; - s.tmp_0 = helpers_imageFillRect__P168483_mk(s); - s.tmp_0.arg0 = globals.screen___168559; - r0 = (s.x___185067 + 1); - s.tmp_0.arg1 = r0; - r0 = (s.y___185076 + 1); - s.tmp_0.arg2 = r0; - r0 = (s.width___185057 - 2); - s.tmp_0.arg3 = r0; - r0 = (s.height___184975 - 2); - s.tmp_0.arg4 = r0; - r0 = s.arg0.fields["impl"]; - r0 = r0.fields["bg"]; - s.tmp_0.arg5 = r0; - s.callLocIdx = 981; s.pc = 52; return s.tmp_0; - case 52: + s.tmp_6 = r0; + r0 = pxsim_String__concat("PLAYER ", s.tmp_6); + s.tmp_5.arg2 = r0; + s.callLocIdx = 1244; s.pc = 45; return s.tmp_5; + case 45: + r0 = s.retval; + s.tmp_4.arg0 = r0; + s.tmp_4.arg1 = "${Winner}"; + r0 = s.winner___183157.fields["player"]; + s.tmp_9 = r0; + if ((s.tmp_9) && (s.tmp_9).vtable) { + setupResume(s, 47); + pxsim_String__stringConv(s.tmp_9); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_9) + ""; } + case 47: + r0 = s.retval; + s.tmp_8 = r0; + r0 = pxsim_String__concat("Player ", s.tmp_8); + s.tmp_4.arg2 = r0; + s.callLocIdx = 1245; s.pc = 44; return s.tmp_4; + case 44: + r0 = s.retval; + s.tmp_3.arg0 = r0; + s.tmp_3.arg1 = "${winner}"; + r0 = s.winner___183157.fields["player"]; + s.tmp_11 = r0; + if ((s.tmp_11) && (s.tmp_11).vtable) { + setupResume(s, 48); + pxsim_String__stringConv(s.tmp_11); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_11) + ""; } + case 48: + r0 = s.retval; + s.tmp_10 = r0; + r0 = pxsim_String__concat("player ", s.tmp_10); + s.tmp_3.arg2 = r0; + s.callLocIdx = 1246; s.pc = 43; return s.tmp_3; + case 43: + r0 = s.retval; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = "${winner_short}"; + r0 = s.winner___183157.fields["player"]; + s.tmp_13 = r0; + if ((s.tmp_13) && (s.tmp_13).vtable) { + setupResume(s, 49); + pxsim_String__stringConv(s.tmp_13); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_13) + ""; } + case 49: + r0 = s.retval; + s.tmp_12 = r0; + r0 = pxsim_String__concat("P", s.tmp_12); + s.tmp_2.arg2 = r0; + s.callLocIdx = 1247; s.pc = 42; return s.tmp_2; + case 42: r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["message"] = (s.tmp_1); + case 17: + case 18: + case 19: + case 20: case 21: case 22: - r0 = pxsim_numops_toBoolDecr(s.showScore___184981); - if (!r0) { step = 25; continue; } - r0 = s.arg0.fields["impl"]; - r0 = r0.fields["left"]; + s.tmp_0 = helpers_arrayFilter__P166637_mk(s); + s.tmp_0.arg0 = s.arg4; + s.tmp_0.arg1 = scoresWithValues_inline__P183236; + s.callLocIdx = 1248; s.pc = 50; return s.tmp_0; + case 50: + r0 = s.retval; + s.scoresWithValues___183234 = (r0); + r0 = pxsim_Array__length(s.scoresWithValues___183234); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 23; continue; } - r0 = (s.width___185057 - s.scoreWidth___184976); - { step = 24; continue; } + s.tmp_1 = r0 = s.arg0; + r0 = s.tmp_1.fields["flags"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 | 16); + s.tmp_2 = r0; + r0 = (s.tmp_1).fields["flags"] = (s.tmp_2); case 23: - r0 = 0; case 24: - // jmp value (already in r0) - s.tmp_1 = r0; - s.bump___185113 = (s.tmp_1); - s.tmp_0 = helpers_imagePrint__P168517_mk(s); - s.tmp_0.arg0 = globals.screen___168559; - s.tmp_0.arg1 = s.score___184973; - r0 = (s.x___185067 + 1); - s.tmp_2 = r0; - r0 = (s.tmp_2 + s.bump___185113); - s.tmp_1 = r0; - r0 = (s.tmp_1 + 1); - s.tmp_0.arg2 = r0; - r0 = (s.y___185076 + 2); - s.tmp_0.arg3 = r0; - r0 = s.arg0.fields["impl"]; - r0 = r0.fields["fc"]; - s.tmp_0.arg4 = r0; - s.tmp_0.arg5 = s.font___184971; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 982; s.pc = 53; return s.tmp_0; - case 53: + s.tmp_1 = game_GameOverDialog_isWinCondition__P169474_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 1249; s.pc = 51; return s.tmp_1; + case 51: r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 25; continue; } + r0 = s.tmp_0; + { step = 26; continue; } case 25: + r0 = s.arg0.fields["judged"]; case 26: - r0 = pxsim_numops_toBoolDecr(s.showLife___184989); - if (!r0) { step = 29; continue; } - r0 = s.arg0.fields["impl"]; - r0 = r0.fields["left"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 27; continue; } - r0 = (s.width___185057 - s.lifeWidth___184977); + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = pxsim_numops_toBool(s.tmp_2); + if (r0) { step = 27; continue; } + r0 = s.tmp_2; { step = 28; continue; } case 27: - r0 = 0; + s.tmp_3 = game_GameOverDialog_hasScores__P169476_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 1251; s.pc = 52; return s.tmp_3; + case 52: + r0 = s.retval; case 28: // jmp value (already in r0) - s.tmp_1 = r0; - r0 = (s.x___185067 + 1); - s.tmp_2 = r0; - r0 = (s.tmp_2 + s.tmp_1); - s.xLoc___185140 = (r0); - r0 = globals.infoState___172322.fields["multiplierImage"]; - s.tmp_0 = r0; - r0 = pxsim_ImageMethods.clone(s.tmp_0); - s.mult___185152 = (r0); - r0 = s.arg0.fields["impl"]; - r0 = r0.fields["fc"]; - s.tmp_0 = r0; - r0 = pxsim_ImageMethods.replace(s.mult___185152, 1, s.tmp_0); - s.tmp_0 = r0 = globals.screen___168559; - r0 = globals.infoState___172322.fields["heartImage"]; - s.tmp_1 = r0; - s.tmp_2 = r0 = s.xLoc___185140; - r0 = (s.y___185076 + s.offsetY___184980); - s.tmp_3 = r0; - r0 = pxsim_ImageMethods.drawTransparentImage(s.tmp_0, s.tmp_1, s.tmp_2, s.tmp_3); - s.tmp_0 = r0 = globals.screen___168559; - s.tmp_1 = r0 = s.mult___185152; - s.tmp_3 = r0 = s.xLoc___185140; - r0 = globals.infoState___172322.fields["heartImage"]; - s.tmp_5 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_5); s.tmp_4 = r0; - r0 = (s.tmp_3 + s.tmp_4); - s.tmp_2 = r0; - r0 = (s.y___185076 + s.offsetY___184980); + r0 = pxsim_numops_toBool(s.tmp_4); + if (r0) { step = 29; continue; } + r0 = s.tmp_4; + { step = 30; continue; } + case 29: + r0 = s.arg0.fields["bestScore"]; + s.tmp_5 = r0; + r0 = (s.tmp_5 != null); + case 30: + // jmp value (already in r0) + s.tmp_6 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_6); + if (!r0) { step = 31; continue; } + s.tmp_7 = r0 = s.arg0; + r0 = s.tmp_7.fields["flags"]; s.tmp_9 = r0; - s.tmp_11 = if_charHeight_1_mk(s); - s.tmp_11.arg0 = s.font___184971; - 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 = 983; s.pc = 54; return s.tmp_11; } - } - case 54: - r0 = s.retval; - s.tmp_10 = r0; - r0 = (s.tmp_9 + s.tmp_10); + r0 = (s.tmp_9 | 2); s.tmp_8 = r0; - r0 = globals.infoState___172322.fields["multiplierImage"]; - s.tmp_13 = r0; - r0 = pxsim_ImageMethods.height(s.tmp_13); - s.tmp_12 = r0; - r0 = (s.tmp_8 - s.tmp_12); - s.tmp_7 = r0; - r0 = (s.tmp_7 - 1); - s.tmp_6 = r0; - r0 = pxsim_ImageMethods.drawTransparentImage(s.tmp_0, s.tmp_1, s.tmp_2, s.tmp_6); - s.tmp_0 = helpers_imagePrint__P168517_mk(s); - s.tmp_0.arg0 = globals.screen___168559; - s.tmp_0.arg1 = s.life___184974; - s.tmp_3 = r0 = s.xLoc___185140; - r0 = globals.infoState___172322.fields["heartImage"]; - s.tmp_5 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_5); - s.tmp_4 = r0; - r0 = (s.tmp_3 + s.tmp_4); + r0 = (s.tmp_7).fields["flags"] = (s.tmp_8); + case 31: + case 32: + s.tmp_1 = Math_max__P166657_mk(s); + s.tmp_1.arg0 = 0; + r0 = pxsim_Array__length(s.scoresWithValues___183234); s.tmp_2 = r0; - r0 = globals.infoState___172322.fields["multiplierImage"]; - s.tmp_7 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_7); - s.tmp_6 = r0; - r0 = (s.tmp_2 + s.tmp_6); - s.tmp_1 = r0; - r0 = (s.tmp_1 + 1); - s.tmp_0.arg2 = r0; - r0 = (s.y___185076 + s.offsetY___184980); - s.tmp_0.arg3 = r0; - r0 = s.arg0.fields["impl"]; - r0 = r0.fields["fc"]; - s.tmp_0.arg4 = r0; - s.tmp_0.arg5 = s.font___184971; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 984; s.pc = 55; return s.tmp_0; - case 55: + r0 = (s.tmp_2 - 1); + s.tmp_1.arg1 = r0; + s.callLocIdx = 1252; s.pc = 53; return s.tmp_1; + case 53: r0 = s.retval; - case 29: - case 30: - r0 = s.state___184968.fields["showPlayer"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 41; continue; } - r0 = pxsim_String_.mkEmpty(); - s.tmp_1 = r0; - r0 = s.arg0.fields["_player"]; - s.tmp_3 = r0; - if ((s.tmp_3) && (s.tmp_3).vtable) { - setupResume(s, 56); - pxsim_String__stringConv(s.tmp_3); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_3) + ""; } - case 56: - r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_String__concat(s.tmp_1, s.tmp_2); - s.pNum___185216 = (r0); - r0 = pxsim_String_.length(s.pNum___185216); - s.tmp_1 = r0; - s.tmp_3 = if_charWidth_1_mk(s); - s.tmp_3.arg0 = s.font___184971; - if (!s.tmp_3.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "charWidth"); + r0 = (s.tmp_0 >> 1); + s.scoreRows___183266 = (r0); + s.tmp_0 = r0 = s.arg0; + s.tmp_3 = r0 = s.scoreRows___183266; + s.tmp_5 = if_charHeight_1_mk(s); + s.tmp_5.arg0 = globals.font5___168507; + if (!s.tmp_5.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "charHeight"); } else { - s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["charWidth"]; - if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["charWidth"]; } - else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } - else { s.callLocIdx = 985; s.pc = 57; return s.tmp_3; } + s.tmp_5.fn = s.tmp_5.arg0.vtable.iface["charHeight"]; + if (s.tmp_5.fn == null) { s.retval = s.tmp_5.arg0.fields["charHeight"]; } + else if (!s.tmp_5.fn.isGetter) { s.retval = bind(s.tmp_5); } + else { s.callLocIdx = 1253; s.pc = 54; return s.tmp_5; } } - case 57: + case 54: r0 = s.retval; + s.tmp_4 = r0; + r0 = (s.tmp_3 * s.tmp_4); s.tmp_2 = r0; - r0 = (s.tmp_1 * s.tmp_2); - s.tmp_0 = r0; - r0 = (s.tmp_0 + 1); - s.iconWidth___185223 = (r0); - s.tmp_0 = Math_max__P166657_mk(s); - s.tmp_0.arg0 = s.height___184975; - s.tmp_2 = if_charHeight_1_mk(s); - s.tmp_2.arg0 = s.font___184971; - if (!s.tmp_2.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "charHeight"); - } else { - s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["charHeight"]; - if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["charHeight"]; } - else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } - else { s.callLocIdx = 986; s.pc = 59; return s.tmp_2; } - } - case 59: - r0 = s.retval; + r0 = (47 + s.tmp_2); s.tmp_1 = r0; - r0 = (s.tmp_1 + 2); + r0 = (s.tmp_0).fields["height"] = (s.tmp_1); + s.tmp_0 = game_BaseDialog_resize__P169443_mk(s); + s.tmp_0.arg0 = s.arg0; + r0 = pxsim_ImageMethods.width(globals.screen___168559); s.tmp_0.arg1 = r0; - s.callLocIdx = 987; s.pc = 58; return s.tmp_0; - case 58: - r0 = s.retval; - s.iconHeight___185231 = (r0); - r0 = s.arg0.fields["impl"]; - r0 = r0.fields["left"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 31; continue; } - r0 = (s.x___185067 - s.iconWidth___185223); - s.tmp_1 = r0; - r0 = (s.tmp_1 + 1); - { step = 32; continue; } - case 31: - r0 = (s.x___185067 + s.width___185057); - s.tmp_2 = r0; - r0 = (s.tmp_2 - 1); - case 32: - // jmp value (already in r0) - s.tmp_3 = r0; - s.iconX___185239 = (s.tmp_3); - s.iconY___185252 = (s.y___185076); - r0 = pxsim_numops_toBoolDecr(s.showScore___184981); - 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 = 33; continue; } - r0 = s.tmp_0; - { step = 34; continue; } - case 33: - r0 = pxsim_numops_toBoolDecr(s.showLife___184989); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); - case 34: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 39; continue; } - r0 = s.arg0.fields["impl"]; - r0 = r0.fields["left"]; - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - if (!r0) { step = 35; continue; } - r0 = -1; - { step = 36; continue; } - case 35: - r0 = 1; - case 36: - // jmp value (already in r0) - s.tmp_5 = r0; - r0 = (s.iconX___185239 + s.tmp_5); - s.iconX___185239 = (r0); - r0 = s.arg0.fields["impl"]; - r0 = r0.fields["up"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 37; continue; } - r0 = (s.iconY___185252 - 3); - s.iconY___185252 = (r0); - case 37: - case 38: - case 39: - case 40: - s.tmp_0 = helpers_imageFillRect__P168483_mk(s); - s.tmp_0.arg0 = globals.screen___168559; - s.tmp_0.arg1 = s.iconX___185239; - s.tmp_0.arg2 = s.iconY___185252; - s.tmp_0.arg3 = s.iconWidth___185223; - s.tmp_0.arg4 = s.iconHeight___185231; - r0 = s.arg0.fields["impl"]; - r0 = r0.fields["border"]; - s.tmp_0.arg5 = r0; - s.callLocIdx = 988; s.pc = 60; return s.tmp_0; - case 60: - r0 = s.retval; - s.tmp_0 = helpers_imagePrint__P168517_mk(s); - s.tmp_0.arg0 = globals.screen___168559; - s.tmp_0.arg1 = s.pNum___185216; - r0 = (s.iconX___185239 + 1); + r0 = s.arg0.fields["height"]; s.tmp_0.arg2 = r0; - s.tmp_2 = r0 = s.iconY___185252; - r0 = (s.iconHeight___185231 >> 1); - s.tmp_3 = r0; - r0 = (s.tmp_2 + s.tmp_3); - s.tmp_1 = r0; - s.tmp_6 = if_charHeight_1_mk(s); - s.tmp_6.arg0 = s.font___184971; - if (!s.tmp_6.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_6.arg0, "charHeight"); - } else { - s.tmp_6.fn = s.tmp_6.arg0.vtable.iface["charHeight"]; - if (s.tmp_6.fn == null) { s.retval = s.tmp_6.arg0.fields["charHeight"]; } - else if (!s.tmp_6.fn.isGetter) { s.retval = bind(s.tmp_6); } - else { s.callLocIdx = 989; s.pc = 62; return s.tmp_6; } - } - case 62: + s.tmp_1 = game_defaultSplashFrame__P172442_mk(s); + s.callLocIdx = 1254; s.pc = 56; return s.tmp_1; + case 56: r0 = s.retval; - s.tmp_5 = r0; - r0 = (s.tmp_5 >> 1); - s.tmp_4 = r0; - r0 = (s.tmp_1 - s.tmp_4); s.tmp_0.arg3 = r0; - r0 = s.arg0.fields["impl"]; - r0 = r0.fields["bg"]; - s.tmp_0.arg4 = r0; - s.tmp_0.arg5 = s.font___184971; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 990; s.pc = 61; return s.tmp_0; - case 61: + s.tmp_0.arg4 = undefined; + s.tmp_0.arg5 = undefined; + s.callLocIdx = 1255; s.pc = 55; return s.tmp_0; + case 55: r0 = s.retval; - case 41: - case 42: r0 = undefined; return leave(s, r0) default: oops() } } } -info_PlayerInfo_drawPlayer__P169182.info = {"start":31282,"length":3718,"line":1044,"column":8,"endLine":1147,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"drawPlayer","argumentNames":["this"]} +game_GameOverDialog_constructor__P169480.info = {"start":14056,"length":3257,"line":424,"column":8,"endLine":491,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"inline","argumentNames":["this","win","message","judged","scores","bestScore","winnerOverride"]} -function info_PlayerInfo_drawPlayer__P169182_mk(s) { +function game_GameOverDialog_constructor__P169480_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_PlayerInfo_drawPlayer__P169182, depth: s.depth + 1, + parent: s, fn: game_GameOverDialog_constructor__P169480, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -31912,35 +31445,24 @@ function info_PlayerInfo_drawPlayer__P169182_mk(s) { tmp_11: undefined, tmp_12: undefined, tmp_13: undefined, - state___184968: undefined, - font___184971: undefined, - score___184973: undefined, - life___184974: undefined, - height___184975: undefined, - scoreWidth___184976: undefined, - lifeWidth___184977: undefined, - offsetY___184980: undefined, - showScore___184981: undefined, - showLife___184989: undefined, - width___185057: undefined, - x___185067: undefined, - y___185076: undefined, - bump___185113: undefined, - xLoc___185140: undefined, - mult___185152: undefined, - pNum___185216: undefined, - iconWidth___185223: undefined, - iconHeight___185231: undefined, - iconX___185239: undefined, - iconY___185252: undefined, + score___183102: undefined, + winner___183157: undefined, + scoresWithValues___183234: undefined, + scoreRows___183266: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, + arg5: undefined, + arg6: undefined, } } -function info_PlayerInfoImpl_raiseLifeZero__P169143(s) { +function score_inline__P183104(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -31950,120 +31472,32 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.state___184938 = undefined; - s.goc___184957 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, info_PlayerInfoImpl__C169122_VT)) failedCast(r0); - s.tmp_0 = info_PlayerInfoImpl_getState__P169131_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 962; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; - s.state___184938 = (r0); - r0 = s.state___184938.fields["life"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 !== null); - 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.state___184938.fields["life"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 <= 0); - case 2: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 7; continue; } - r0 = (s.state___184938).fields["life"] = (null); - r0 = s.state___184938.fields["lifeZeroHandler"]; + r0 = s.arg0.fields["player"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_1 = if_lifeZeroHandler_1_mk(s); - s.tmp_1.arg0 = s.state___184938; - if (!s.tmp_1.arg0.vtable.iface) { - setupLambda(s.tmp_1, pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "lifeZeroHandler"), 1); - s.callLocIdx = 963; s.pc = 10; return s.tmp_1; - } else { - s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["lifeZeroHandler"]; - if (s.tmp_1.fn == null) { setupLambda(s.tmp_1, s.tmp_1.arg0.fields["lifeZeroHandler"], 1); s.callLocIdx = 963; s.pc = 10; return s.tmp_1; } - else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 963; s.pc = 10; return s.tmp_1;; } - else { s.callLocIdx = 963; s.pc = 10; return s.tmp_1; } - } - case 10: - r0 = s.retval; - { step = 6; continue; } - case 3: - r0 = pxsim_numops_toBoolDecr(s.arg1); - if (!r0) { step = 4; continue; } - s.tmp_0 = lambda_1_mk(s); - s.tmp_0.argL = globals.gameOverConfig___169525; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 964; s.pc = 11; return s.tmp_0; - case 11: - r0 = s.retval; - s.goc___184957 = (r0); - s.tmp_0 = game_GameOverConfig_setEffect__P169518_mk(s); - s.tmp_0.arg0 = s.goc___184957; - s.tmp_0.arg1 = false; - s.tmp_0.arg2 = null; - s.tmp_0.arg3 = false; - s.callLocIdx = 965; s.pc = 12; return s.tmp_0; - case 12: - r0 = s.retval; - s.tmp_0 = game_GameOverConfig_setSound__P169520_mk(s); - s.tmp_0.arg0 = s.goc___184957; - s.tmp_0.arg1 = false; - s.tmp_0.arg2 = null; - s.tmp_0.arg3 = false; - s.tmp_0.arg4 = false; - s.callLocIdx = 966; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; - s.tmp_0 = game_gameOver__P169540_mk(s); - s.tmp_0.arg0 = false; - s.callLocIdx = 967; s.pc = 14; return s.tmp_0; - case 14: - r0 = s.retval; - case 4: - case 5: - case 6: - case 7: - case 8: - r0 = undefined; + r0 = (s.tmp_0 === s.caps[0]); return leave(s, r0) default: oops() } } } -info_PlayerInfoImpl_raiseLifeZero__P169143.info = {"start":24222,"length":620,"line":781,"column":8,"endLine":795,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"raiseLifeZero","argumentNames":["this","gameOver"]} +score_inline__P183104.info = {"start":14893,"length":40,"line":446,"column":42,"endLine":446,"endColumn":82,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"inline","argumentNames":["score"]} -function info_PlayerInfoImpl_raiseLifeZero__P169143_mk(s) { +function score_inline__P183104_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_PlayerInfoImpl_raiseLifeZero__P169143, depth: s.depth + 1, + parent: s, fn: score_inline__P183104, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - state___184938: undefined, - goc___184957: undefined, arg0: undefined, - arg1: undefined, } } -function info_PlayerInfoImpl_hasLife__P169140(s) { +function game_GameOverDialog_inline__P183123(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -32073,58 +31507,37 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.state___184757 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, info_PlayerInfoImpl__C169122_VT)) failedCast(r0); - s.tmp_0 = info_PlayerInfoImpl_getState__P169131_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 961; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.state___184757 = (r0); - r0 = s.state___184757.fields["life"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 !== undefined); + r0 = s.arg0.fields["player"]; 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.state___184757.fields["life"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 !== null); - case 2: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = s.tmp_3; + r0 = s.arg1.fields["player"]; + s.tmp_1 = r0; + r0 = (s.tmp_0 - s.tmp_1); return leave(s, r0) default: oops() } } } -info_PlayerInfoImpl_hasLife__P169140.info = {"start":23442,"length":141,"line":757,"column":8,"endLine":760,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"hasLife","argumentNames":["this"]} +game_GameOverDialog_inline__P183123.info = {"start":15084,"length":29,"line":449,"column":32,"endLine":449,"endColumn":61,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"inline","argumentNames":["a","b"]} -function info_PlayerInfoImpl_hasLife__P169140_mk(s) { +function game_GameOverDialog_inline__P183123_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_PlayerInfoImpl_hasLife__P169140, depth: s.depth + 1, + parent: s, fn: game_GameOverDialog_inline__P183123, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - state___184757: undefined, arg0: undefined, + arg1: undefined, } } -function info_PlayerInfoImpl_hasScore__P169136(s) { +function game_GameOverDialog_inline__P183133(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -32134,34 +31547,30 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.state___184839 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, info_PlayerInfoImpl__C169122_VT)) failedCast(r0); - s.tmp_0 = info_PlayerInfoImpl_getState__P169131_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 960; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.state___184839 = (r0); - r0 = s.state___184839.fields["score"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 !== undefined); + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["player"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 === s.caps[0]); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["winner"] = (s.tmp_1); + r0 = s.tmp_1; return leave(s, r0) default: oops() } } } -info_PlayerInfoImpl_hasScore__P169136.info = {"start":22541,"length":111,"line":726,"column":8,"endLine":729,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"hasScore","argumentNames":["this"]} +game_GameOverDialog_inline__P183133.info = {"start":15165,"length":55,"line":451,"column":31,"endLine":451,"endColumn":86,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"inline","argumentNames":["score"]} -function info_PlayerInfoImpl_hasScore__P169136_mk(s) { +function game_GameOverDialog_inline__P183133_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_PlayerInfoImpl_hasScore__P169136, depth: s.depth + 1, + parent: s, fn: game_GameOverDialog_inline__P183133, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - state___184839: undefined, + tmp_1: undefined, + tmp_2: undefined, arg0: undefined, } } @@ -32169,7 +31578,7 @@ function info_PlayerInfoImpl_hasScore__P169136_mk(s) { -function info_PlayerState_constructor__P169089(s) { +function game_GameOverDialog_inline__P183145(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -32183,82 +31592,50 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, info_PlayerState__C169080_VT)) failedCast(r0); - r0 = (s.arg0).fields["visibility"] = (0); - r0 = (s.arg0).fields["showScore"] = (undefined); - r0 = (s.arg0).fields["showLife"] = (undefined); - r0 = (s.arg0).fields["showPlayer"] = (undefined); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); + r0 = s.arg0.fields["player"]; s.tmp_1 = r0; - r0 = (s.tmp_0).fields["scoreReachedHandlers"] = (s.tmp_1); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -info_PlayerState_constructor__P169089.info = {"start":1088,"length":236,"line":42,"column":8,"endLine":48,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["this"]} - -function info_PlayerState_constructor__P169089_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: info_PlayerState_constructor__P169089, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, -} } - - - - - -function info_highScore__P169098(s) { -let r0 = s.r0, 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__P168595_mk(s); - s.tmp_1.arg0 = "high-score"; - s.callLocIdx = 941; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; + r0 = (s.tmp_1 > 1); s.tmp_0 = r0; r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } + if (r0) { step = 1; continue; } r0 = s.tmp_0; { step = 2; continue; } case 1: - r0 = 0; + s.tmp_2 = r0 = s.caps[0]; + r0 = s.tmp_2.fields["flags"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 | 8); + s.tmp_3 = r0; + r0 = (s.tmp_2).fields["flags"] = (s.tmp_3); + r0 = s.tmp_3; case 2: // jmp value (already in r0) - s.tmp_2 = r0; - r0 = s.tmp_2; + s.tmp_5 = r0; + r0 = s.tmp_5; return leave(s, r0) default: oops() } } } -info_highScore__P169098.info = {"start":9710,"length":98,"line":322,"column":4,"endLine":324,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"highScore","argumentNames":[]} +game_GameOverDialog_inline__P183145.info = {"start":15393,"length":76,"line":456,"column":31,"endLine":456,"endColumn":107,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"inline","argumentNames":["score"]} -function info_highScore__P169098_mk(s) { +function game_GameOverDialog_inline__P183145_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_highScore__P169098, depth: s.depth + 1, + parent: s, fn: game_GameOverDialog_inline__P183145, depth: s.depth + 1, pc: 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 settings_readNumber__P168595(s) { +function winner_inline__P183160(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -32268,69 +31645,21 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.buf___183704 = undefined; - s.nums___183711 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = pxsim.settings._get(s.arg0); - s.buf___183704 = (r0); - r0 = pxsim_numops_toBoolDecr(s.buf___183704); - 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__P166710_mk(s); - s.tmp_2.arg0 = s.buf___183704; - s.tmp_2.arg1 = 0; - s.callLocIdx = 200; s.pc = 8; return s.tmp_2; - case 8: - r0 = s.retval; - s.nums___183711 = (r0); - s.tmp_0 = r0 = s.nums___183711; - 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___183711); - 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___183711, 0); - { step = 7; continue; } - case 4: - case 5: - r0 = undefined; - { step = 7; continue; } - case 6: - r0 = undefined; - case 7: + r0 = s.arg0.fields["winner"]; return leave(s, r0) default: oops() } } } -settings_readNumber__P168595.info = {"start":3283,"length":313,"line":131,"column":4,"endLine":141,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"readNumber","argumentNames":["key"]} +winner_inline__P183160.info = {"start":15544,"length":21,"line":458,"column":45,"endLine":458,"endColumn":66,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"inline","argumentNames":["score"]} -function settings_readNumber__P168595_mk(s) { +function winner_inline__P183160_mk(s) { checkStack(s.depth); return { - parent: s, fn: settings_readNumber__P168595, depth: s.depth + 1, + parent: s, fn: winner_inline__P183160, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - buf___183704: undefined, - nums___183711: undefined, arg0: undefined, } } @@ -32338,7 +31667,7 @@ function settings_readNumber__P168595_mk(s) { -function settings_readBuffer__P168592(s) { +function scoresWithValues_inline__P183236(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -32352,17 +31681,20 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = pxsim.settings._get(s.arg0); + r0 = s.arg0.fields["value"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 != null); return leave(s, r0) default: oops() } } } -settings_readBuffer__P168592.info = {"start":2694,"length":72,"line":103,"column":4,"endLine":105,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"readBuffer","argumentNames":["key"]} +scoresWithValues_inline__P183236.info = {"start":16752,"length":28,"line":480,"column":51,"endLine":480,"endColumn":79,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"inline","argumentNames":["score"]} -function settings_readBuffer__P168592_mk(s) { +function scoresWithValues_inline__P183236_mk(s) { checkStack(s.depth); return { - parent: s, fn: settings_readBuffer__P168592, depth: s.depth + 1, + parent: s, fn: scoresWithValues_inline__P183236, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, } } @@ -32370,7 +31702,7 @@ function settings_readBuffer__P168592_mk(s) { -function msgpack_unpackNumberArray__P166710(s) { +function game_defaultSplashFrame__P172442(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -32380,120 +31712,39 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.res___183724 = undefined; - s.fmt___183731 = undefined; - s.v___183740 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = pxsim_Array__mk(); - s.res___183724 = (r0); - case 1: - s.tmp_1 = r0 = s.arg1; - r0 = pxsim.BufferMethods.length(s.arg0); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 10; continue; } - s.tmp_3 = r0 = s.arg1; - r0 = (s.tmp_3 + 1); - s.arg1 = (r0); - s.tmp_4 = msgpack_tagFormat__P171893_mk(s); - r0 = pxsim.BufferMethods.getByte(s.arg0, s.tmp_3); - s.tmp_4.arg0 = r0; - s.callLocIdx = 31; s.pc = 12; return s.tmp_4; - case 12: - r0 = s.retval; - s.fmt___183731 = (r0); - r0 = (s.fmt___183731 === null); + r0 = pxsim_ImageMethods.isMono(globals.screen___168559); 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___183740 = (r0); - r0 = (-31 <= s.v___183740); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 2; continue; } - r0 = s.tmp_0; - { step = 3; continue; } + if (!r0) { step = 1; continue; } + r0 = pxsim.image.ofBuffer(_hex183428); + { step = 2; continue; } + case 1: + r0 = pxsim.image.ofBuffer(_hex183430); case 2: - r0 = (s.v___183740 <= 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___183724, s.v___183740); - { step = 5; continue; } - case 4: - r0 = null; - { step = 11; continue; } - case 5: - { step = 7; continue; } - case 6: - s.tmp_0 = r0 = s.res___183724; - r0 = pxsim.BufferMethods.getNumber(s.arg0, s.fmt___183731, 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__P166702_mk(s); - s.tmp_2.arg0 = s.fmt___183731; - s.callLocIdx = 32; s.pc = 13; return s.tmp_2; - case 13: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.arg1 = (r0); - case 7: - case 8: - r0 = pxsim.BufferMethods.getByte(s.arg0, s.arg1); - s.tmp_1 = r0; - r0 = (s.tmp_1 === 193); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 9; continue; } - r0 = (s.arg1 + 1); - s.arg1 = (r0); - { step = 8; continue; } - case 9: - { step = 1; continue; } - case 10: - r0 = s.res___183724; - case 11: + r0 = s.tmp_1; return leave(s, r0) default: oops() } } } -msgpack_unpackNumberArray__P166710.info = {"start":2650,"length":669,"line":91,"column":4,"endLine":111,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"unpackNumberArray","argumentNames":["buf","offset"]} +game_defaultSplashFrame__P172442.info = {"start":27877,"length":220,"line":768,"column":4,"endLine":781,"endColumn":5,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"defaultSplashFrame","argumentNames":[]} -function msgpack_unpackNumberArray__P166710_mk(s) { +function game_defaultSplashFrame__P172442_mk(s) { checkStack(s.depth); return { - parent: s, fn: msgpack_unpackNumberArray__P166710, depth: s.depth + 1, + parent: s, fn: game_defaultSplashFrame__P172442, depth: s.depth + 1, pc: 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___183724: undefined, - fmt___183731: undefined, - v___183740: undefined, - arg0: undefined, - arg1: undefined, } } +const _hex183428 = pxsim.BufferMethods.createBufferFromHex("8704030003000000010100000101000001010000") +const _hex183430 = pxsim.BufferMethods.createBufferFromHex("8704030003000000f1010000f1010000f1010000") -function msgpack_tagFormat__P171893(s) { +function game_GameOverDialog_isJudgedGame__P169475(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -32507,60 +31758,20 @@ 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; } - case 1: - r0 = 16; - { step = 9; continue; } - case 2: - r0 = 7; - { step = 9; continue; } - case 3: - r0 = 9; - { step = 9; continue; } - case 4: - r0 = 12; - { step = 9; continue; } - case 5: - r0 = 6; - { step = 9; continue; } - case 6: - r0 = 8; - { step = 9; continue; } - case 7: - r0 = 10; - { step = 9; continue; } - case 8: - r0 = null; - { step = 9; continue; } - r0 = undefined; - case 9: - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, game_GameOverDialog__C169473_VT)) failedCast(r0); + r0 = s.arg0.fields["judged"]; + return leaveAccessor(s, r0) default: oops() } } } -msgpack_tagFormat__P171893.info = {"start":1145,"length":481,"line":42,"column":4,"endLine":54,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"tagFormat","argumentNames":["tag"]} +game_GameOverDialog_isJudgedGame__P169475.info = {"start":13655,"length":42,"line":418,"column":8,"endLine":418,"endColumn":50,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"isJudgedGame","argumentNames":["this"]} +game_GameOverDialog_isJudgedGame__P169475.isGetter = true; -function msgpack_tagFormat__P171893_mk(s) { +function game_GameOverDialog_isJudgedGame__P169475_mk(s) { checkStack(s.depth); return { - parent: s, fn: msgpack_tagFormat__P171893, depth: s.depth + 1, + parent: s, fn: game_GameOverDialog_isJudgedGame__P169475, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, } } @@ -32568,7 +31779,7 @@ function msgpack_tagFormat__P171893_mk(s) { -function pins_sizeOf__P166702(s) { +function info_isBetterScore__P169094(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -32578,34 +31789,83 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.goc___183382 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = Buffer_sizeOfNumberFormat__P166742_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 28; s.pc = 1; return s.tmp_0; - case 1: + s.tmp_0 = lambda_1_mk(s); + s.tmp_0.argL = globals.gameOverConfig___169525; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 935; s.pc = 9; return s.tmp_0; + case 9: r0 = s.retval; + s.goc___183382 = (r0); + r0 = s.goc___183382.fields["scoringType"]; + s.tmp_0 = r0; + r0 = pxsim_pxtcore.switch_eq(0, s.tmp_0); + if (r0) { step = 1; continue; } + r0 = pxsim_pxtcore.switch_eq(1, s.tmp_0); + if (r0) { step = 4; continue; } + r0 = s.tmp_0; + { step = 7; continue; } + case 1: + r0 = (s.arg1 == null); + s.tmp_1 = r0; + r0 = pxsim_numops_toBool(s.tmp_1); + if (!r0) { step = 2; continue; } + r0 = s.tmp_1; + { step = 3; continue; } + case 2: + r0 = (s.arg0 > s.arg1); + case 3: + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = s.tmp_2; + { step = 8; continue; } + case 4: + r0 = (s.arg1 == null); + s.tmp_3 = r0; + r0 = pxsim_numops_toBool(s.tmp_3); + if (!r0) { step = 5; continue; } + r0 = s.tmp_3; + { step = 6; continue; } + case 5: + r0 = (s.arg0 < s.arg1); + case 6: + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = s.tmp_4; + { step = 8; continue; } + case 7: + r0 = false; + case 8: return leave(s, r0) default: oops() } } } -pins_sizeOf__P166702.info = {"start":42,"length":101,"line":2,"column":4,"endLine":4,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"sizeOf","argumentNames":["format"]} +info_isBetterScore__P169094.info = {"start":8408,"length":446,"line":274,"column":4,"endLine":285,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"isBetterScore","argumentNames":["newScore","prevScore"]} -function pins_sizeOf__P166702_mk(s) { +function info_isBetterScore__P169094_mk(s) { checkStack(s.depth); return { - parent: s, fn: pins_sizeOf__P166702, depth: s.depth + 1, + parent: s, fn: info_isBetterScore__P169094, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + goc___183382: undefined, arg0: undefined, + arg1: undefined, } } -function Buffer_sizeOfNumberFormat__P166742(s) { +function helpers_stringReplaceAll__P166644(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -32615,91 +31875,230 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.split___183301 = undefined; + s.empty___183307 = undefined; + s.output___183311 = undefined; + s.i___183326 = 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 = 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; } + if ((s.arg1) && (s.arg1).vtable) { + setupResume(s, 11); + pxsim_String__stringConv(s.arg1); + checkResumeConsumed(); + return; + } else { s.retval = (s.arg1) + ""; } + case 11: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_String_.mkEmpty(); + s.tmp_1 = r0; + r0 = pxsim_String__concat(s.tmp_0, s.tmp_1); + s.arg1 = (r0); + s.tmp_0 = helpers_stringSplit__P166649_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.tmp_0.arg2 = undefined; + s.callLocIdx = 11; s.pc = 12; return s.tmp_0; + case 12: + r0 = s.retval; + s.split___183301 = (r0); + r0 = pxsim_numops_toBoolDecr(s.arg1); + s.tmp_0 = r0; + r0 = pxsim_Boolean__bang(s.tmp_0); + s.empty___183307 = (r0); + r0 = pxsim_numops_toBoolDecr(s.empty___183307); + if (!r0) { step = 1; continue; } + s.tmp_0 = applyReplace__P183314_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = s.arg2; + s.callLocIdx = 13; s.pc = 13; return s.tmp_0; + case 13: + r0 = s.retval; + { step = 2; continue; } case 1: + r0 = pxsim_String_.mkEmpty(); case 2: + // jmp value (already in r0) + s.tmp_1 = r0; + s.output___183311 = (s.tmp_1); + r0 = pxsim_Array__length(s.split___183301); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + if ((s.output___183311) && (s.output___183311).vtable) { + setupResume(s, 14); + pxsim_String__stringConv(s.output___183311); + checkResumeConsumed(); + return; + } else { s.retval = (s.output___183311) + ""; } + case 14: + r0 = s.retval; + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.split___183301, 0); + 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); + s.output___183311 = (r0); case 3: case 4: - r0 = 1; - { step = 18; continue; } + s.i___183326 = (1); case 5: + s.tmp_1 = r0 = s.i___183326; + r0 = pxsim_Array__length(s.split___183301); + 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; } + if ((s.output___183311) && (s.output___183311).vtable) { + setupResume(s, 16); + pxsim_String__stringConv(s.output___183311); + checkResumeConsumed(); + return; + } else { s.retval = (s.output___183311) + ""; } + case 16: + r0 = s.retval; + s.tmp_3 = r0; + s.tmp_8 = applyReplace__P183314_mk(s); + s.tmp_8.arg0 = s.arg1; + s.tmp_8.arg1 = s.arg2; + s.callLocIdx = 14; s.pc = 17; return s.tmp_8; + case 17: + r0 = s.retval; + s.tmp_7 = r0; + if ((s.tmp_7) && (s.tmp_7).vtable) { + setupResume(s, 18); + pxsim_String__stringConv(s.tmp_7); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_7) + ""; } + case 18: + r0 = s.retval; + s.tmp_6 = r0; + r0 = pxsim_Array__getAt(s.split___183301, s.i___183326); + s.tmp_10 = r0; + if ((s.tmp_10) && (s.tmp_10).vtable) { + setupResume(s, 19); + pxsim_String__stringConv(s.tmp_10); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_10) + ""; } + case 19: + r0 = s.retval; + s.tmp_9 = r0; + r0 = pxsim_String__concat(s.tmp_6, s.tmp_9); + s.tmp_5 = r0; + if ((s.tmp_5) && (s.tmp_5).vtable) { + setupResume(s, 20); + pxsim_String__stringConv(s.tmp_5); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_5) + ""; } + case 20: + r0 = s.retval; + s.tmp_4 = r0; + r0 = pxsim_String__concat(s.tmp_3, s.tmp_4); + s.output___183311 = (r0); + r0 = (s.i___183326 + 1); + s.i___183326 = (r0); + { step = 5; continue; } case 6: + r0 = pxsim_numops_toBoolDecr(s.arg0); + 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_toBool(s.tmp_0); + if (r0) { step = 7; continue; } + r0 = s.tmp_0; + { step = 8; continue; } case 7: + r0 = s.empty___183307; case 8: - r0 = 2; - { step = 18; continue; } + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + if (!r0) { step = 9; continue; } + if ((s.output___183311) && (s.output___183311).vtable) { + setupResume(s, 21); + pxsim_String__stringConv(s.output___183311); + checkResumeConsumed(); + return; + } else { s.retval = (s.output___183311) + ""; } + case 21: + r0 = s.retval; + s.tmp_5 = r0; + s.tmp_8 = applyReplace__P183314_mk(s); + s.tmp_8.arg0 = s.arg1; + s.tmp_8.arg1 = s.arg2; + s.callLocIdx = 16; s.pc = 22; return s.tmp_8; + case 22: + r0 = s.retval; + s.tmp_7 = r0; + if ((s.tmp_7) && (s.tmp_7).vtable) { + setupResume(s, 23); + pxsim_String__stringConv(s.tmp_7); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_7) + ""; } + case 23: + r0 = s.retval; + s.tmp_6 = r0; + r0 = pxsim_String__concat(s.tmp_5, s.tmp_6); + s.output___183311 = (r0); 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.output___183311; return leave(s, r0) default: oops() } } } -Buffer_sizeOfNumberFormat__P166742.info = {"start":14912,"length":856,"line":508,"column":4,"endLine":532,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"sizeOfNumberFormat","argumentNames":["format"]} +helpers_stringReplaceAll__P166644.info = {"start":10239,"length":919,"line":346,"column":4,"endLine":374,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"stringReplaceAll","argumentNames":["s","toReplace","replacer"]} -function Buffer_sizeOfNumberFormat__P166742_mk(s) { +function helpers_stringReplaceAll__P166644_mk(s) { checkStack(s.depth); return { - parent: s, fn: Buffer_sizeOfNumberFormat__P166742, depth: s.depth + 1, + parent: s, fn: helpers_stringReplaceAll__P166644, depth: s.depth + 1, pc: 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, + split___183301: undefined, + empty___183307: undefined, + output___183311: undefined, + i___183326: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function info_saveHighScore__P169095(s) { +function applyReplace__P183314(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -32709,72 +32108,67 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.winner___183541 = undefined; - s.hs___183545 = undefined; - s.curr___183549 = undefined; - s.tmp_0 = info_winningPlayer__P169093_mk(s); - s.callLocIdx = 936; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - s.winner___183541 = (r0); - r0 = pxsim_numops_toBoolDecr(s.winner___183541); - if (!r0) { step = 3; continue; } - s.tmp_0 = info_PlayerInfoImpl_score__P169133_mk(s); - r0 = s.winner___183541.fields["impl"]; - s.tmp_0.arg0 = r0; - s.callLocIdx = 937; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.hs___183545 = (r0); - s.tmp_0 = settings_readNumber__P168595_mk(s); - s.tmp_0.arg0 = "high-score"; - s.callLocIdx = 938; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - s.curr___183549 = (r0); - s.tmp_1 = info_isBetterScore__P169094_mk(s); - s.tmp_1.arg0 = s.hs___183545; - s.tmp_1.arg1 = s.curr___183549; - s.callLocIdx = 939; s.pc = 8; return s.tmp_1; - case 8: - r0 = s.retval; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = pxsim_pxtcore.typeOf(s.arg1); + s.tmp_1 = r0; + r0 = (s.tmp_1 == "string"); 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_2 = settings_writeNumber__P168590_mk(s); - s.tmp_2.arg0 = "high-score"; - s.tmp_2.arg1 = s.hs___183545; - s.callLocIdx = 940; s.pc = 9; return s.tmp_2; - case 9: - r0 = s.retval; + 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.arg1; + { step = 5; continue; } + { step = 4; continue; } case 3: + s.tmp_4 = lambda_2_mk(s); + s.tmp_4.argL = s.arg1; + s.tmp_4.arg0 = s.arg0; + setupLambda(s.tmp_4, s.tmp_4.argL); + s.callLocIdx = 17; s.pc = 6; return s.tmp_4; + case 6: + r0 = s.retval; + { step = 5; continue; } case 4: r0 = undefined; + case 5: return leave(s, r0) default: oops() } } } -info_saveHighScore__P169095.info = {"start":8860,"length":324,"line":287,"column":4,"endLine":296,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"saveHighScore","argumentNames":[]} +applyReplace__P183314.info = {"start":10880,"length":272,"line":367,"column":8,"endLine":373,"endColumn":9,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"applyReplace","argumentNames":["r","replacer"]} -function info_saveHighScore__P169095_mk(s) { +function applyReplace__P183314_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_saveHighScore__P169095, depth: s.depth + 1, + parent: s, fn: applyReplace__P183314, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - winner___183541: undefined, - hs___183545: undefined, - curr___183549: undefined, + tmp_3: undefined, + tmp_4: undefined, + arg0: undefined, + arg1: undefined, } } -function settings_writeNumber__P168590(s) { +function helpers_stringEmpty__P166652(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -32786,46 +32180,30 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_Array__mk(); + r0 = pxsim_numops_toBoolDecr(s.arg0); s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.arg1); - s.tmp_1 = settings_writeBuffer__P168587_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_2 = msgpack_packNumberArray__P166711_mk(s); - s.tmp_2.arg0 = s.tmp_0; - s.callLocIdx = 196; s.pc = 2; return s.tmp_2; - case 2: - r0 = s.retval; - s.tmp_1.arg1 = r0; - s.callLocIdx = 197; s.pc = 1; return s.tmp_1; - case 1: - r0 = s.retval; - r0 = undefined; + r0 = pxsim_Boolean__bang(s.tmp_0); return leave(s, r0) default: oops() } } } -settings_writeNumber__P168590.info = {"start":2265,"length":122,"line":89,"column":4,"endLine":91,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"writeNumber","argumentNames":["key","value"]} +helpers_stringEmpty__P166652.info = {"start":15544,"length":74,"line":522,"column":4,"endLine":524,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"stringEmpty","argumentNames":["S"]} -function settings_writeNumber__P168590_mk(s) { +function helpers_stringEmpty__P166652_mk(s) { checkStack(s.depth); return { - parent: s, fn: settings_writeNumber__P168590, depth: s.depth + 1, + parent: s, fn: helpers_stringEmpty__P166652, 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__P168587(s) { +function helpers_arrayFind__P166638(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -32835,31 +32213,60 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.len___183406 = undefined; + s.i___183409 = undefined; + s.v___183414 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim.settings._set(s.arg0, s.arg1); + r0 = pxsim_Array__length(s.arg0); + s.len___183406 = (r0); + s.i___183409 = (0); + case 1: + r0 = (s.i___183409 < s.len___183406); 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: + if (!r0) { step = 4; continue; } + r0 = pxsim_Array__getAt(s.arg0, s.i___183409); + s.v___183414 = (r0); + s.tmp_1 = lambda_3_mk(s); + s.tmp_1.argL = s.arg1; + s.tmp_1.arg0 = s.v___183414; + s.tmp_1.arg1 = s.i___183409; + setupLambda(s.tmp_1, s.tmp_1.argL); + s.callLocIdx = 8; 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 = 2; continue; } + r0 = s.v___183414; + { step = 5; continue; } case 2: + case 3: + r0 = (s.i___183409 + 1); + s.i___183409 = (r0); + { step = 1; continue; } + case 4: r0 = undefined; + case 5: return leave(s, r0) default: oops() } } } -settings_writeBuffer__P168587.info = {"start":1538,"length":290,"line":63,"column":4,"endLine":70,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"writeBuffer","argumentNames":["key","value"]} +helpers_arrayFind__P166638.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 settings_writeBuffer__P168587_mk(s) { +function helpers_arrayFind__P166638_mk(s) { checkStack(s.depth); return { - parent: s, fn: settings_writeBuffer__P168587, depth: s.depth + 1, + parent: s, fn: helpers_arrayFind__P166638, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + len___183406: undefined, + i___183409: undefined, + v___183414: undefined, arg0: undefined, arg1: undefined, } } @@ -32868,7 +32275,7 @@ function settings_writeBuffer__P168587_mk(s) { -function msgpack_packNumberArray__P166711(s) { +function game_GameOverPlayerScore_constructor__P169472(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -32878,108 +32285,40 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.off___183564 = undefined; - s.n___183566 = undefined; - s.unnamed788___U2 = undefined; - s.unnamed789___U3 = undefined; - s.buf___183576 = undefined; - s.n___183582 = undefined; - s.unnamed790___U6 = undefined; - s.unnamed791___U7 = 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.off___183564 = (0); - s.n___183566 = (undefined); - s.unnamed788___U2 = (s.arg0); - s.unnamed789___U3 = (0); - case 1: - s.tmp_0 = r0 = s.unnamed789___U3; - r0 = pxsim_Array__length(s.unnamed788___U2); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 2; continue; } - r0 = pxsim_Array__getAt(s.unnamed788___U2, s.unnamed789___U3); - s.n___183566 = (r0); - s.tmp_2 = r0 = s.off___183564; - s.tmp_4 = msgpack_packNumberCore__P171894_mk(s); - s.tmp_4.arg0 = null; - s.tmp_4.arg1 = s.off___183564; - s.tmp_4.arg2 = s.n___183566; - s.callLocIdx = 33; 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___183564 = (r0); - r0 = (s.unnamed789___U3 + 1); - s.unnamed789___U3 = (r0); - { step = 1; continue; } - case 2: - s.unnamed788___U2 = (undefined); - r0 = pxsim.control.createBuffer(s.off___183564); - s.buf___183576 = (r0); - s.off___183564 = (0); - s.n___183582 = (undefined); - s.unnamed790___U6 = (s.arg0); - s.unnamed791___U7 = (0); - case 3: - s.tmp_0 = r0 = s.unnamed791___U7; - r0 = pxsim_Array__length(s.unnamed790___U6); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 4; continue; } - r0 = pxsim_Array__getAt(s.unnamed790___U6, s.unnamed791___U7); - s.n___183582 = (r0); - s.tmp_2 = r0 = s.off___183564; - s.tmp_4 = msgpack_packNumberCore__P171894_mk(s); - s.tmp_4.arg0 = s.buf___183576; - s.tmp_4.arg1 = s.off___183564; - s.tmp_4.arg2 = s.n___183582; - s.callLocIdx = 34; 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___183564 = (r0); - r0 = (s.unnamed791___U7 + 1); - s.unnamed791___U7 = (r0); - { step = 3; continue; } - case 4: - s.unnamed790___U6 = (undefined); - r0 = s.buf___183576; + r0 = s.arg0; + if (!checkSubtype(r0, game_GameOverPlayerScore__C169470_VT)) failedCast(r0); + r0 = (s.arg0).fields["player"] = (s.arg1); + r0 = (s.arg0).fields["value"] = (s.arg2); + r0 = (s.arg0).fields["winner"] = (s.arg3); + r0 = undefined; return leave(s, r0) default: oops() } } } -msgpack_packNumberArray__P166711.info = {"start":3427,"length":330,"line":117,"column":4,"endLine":128,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"packNumberArray","argumentNames":["nums"]} +game_GameOverPlayerScore_constructor__P169472.info = {"start":13111,"length":121,"line":398,"column":8,"endLine":401,"endColumn":39,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"inline","argumentNames":["this","player","value","winner"]} -function msgpack_packNumberArray__P166711_mk(s) { +function game_GameOverPlayerScore_constructor__P169472_mk(s) { checkStack(s.depth); return { - parent: s, fn: msgpack_packNumberArray__P166711, depth: s.depth + 1, + parent: s, fn: game_GameOverPlayerScore_constructor__P169472, depth: s.depth + 1, pc: 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___183564: undefined, - n___183566: undefined, - unnamed788___U2: undefined, - unnamed789___U3: undefined, - buf___183576: undefined, - n___183582: undefined, - unnamed790___U6: undefined, - unnamed791___U7: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function msgpack_packNumberCore__P171894(s) { +function scene_Scene_destroy__P169398(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -32989,154 +32328,48 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tag___183596 = undefined; - s.fmt___183639 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - s.tag___183596 = (203); - s.tmp_1 = r0 = s.arg2; - r0 = (s.arg2 << 0); - s.tmp_2 = r0; - r0 = (s.tmp_1 == s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } - case 1: - s.tmp_3 = r0 = s.arg2; - r0 = (s.arg2 >>> 0); - s.tmp_4 = r0; - r0 = (s.tmp_3 == s.tmp_4); - case 2: - // jmp value (already in r0) - s.tmp_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); - if (!r0) { step = 19; continue; } - r0 = (-31 <= s.arg2); - s.tmp_6 = r0; - r0 = pxsim_numops_toBool(s.tmp_6); - if (r0) { step = 3; continue; } - r0 = s.tmp_6; - { step = 4; continue; } - case 3: - r0 = (s.arg2 <= 127); - case 4: - // jmp value (already in r0) - s.tmp_7 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_7); - if (!r0) { step = 7; continue; } - r0 = pxsim_numops_toBoolDecr(s.arg0); - if (!r0) { step = 5; continue; } - r0 = pxsim.BufferMethods.setByte(s.arg0, s.arg1, s.arg2); - case 5: - case 6: - r0 = 1; - { step = 23; continue; } - { step = 18; continue; } - case 7: - r0 = (0 <= s.arg2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 12; continue; } - r0 = (s.arg2 <= 255); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 8; continue; } - s.tag___183596 = (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___183596 = (205); - { step = 10; continue; } - case 9: - s.tag___183596 = (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___183596 = (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___183596 = (209); - { step = 15; continue; } - case 14: - s.tag___183596 = (210); - case 15: - case 16: - case 17: - case 18: - case 19: - case 20: - s.tmp_0 = msgpack_tagFormat__P171893_mk(s); - s.tmp_0.arg0 = s.tag___183596; - s.callLocIdx = 29; s.pc = 24; return s.tmp_0; - case 24: - r0 = s.retval; - s.fmt___183639 = (r0); - r0 = pxsim_numops_toBoolDecr(s.arg0); - if (!r0) { step = 21; continue; } - r0 = pxsim.BufferMethods.setByte(s.arg0, s.arg1, s.tag___183596); - s.tmp_0 = r0 = s.arg0; - s.tmp_1 = r0 = s.fmt___183639; - 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__P166702_mk(s); - s.tmp_1.arg0 = s.fmt___183639; - s.callLocIdx = 30; s.pc = 25; return s.tmp_1; - case 25: - r0 = s.retval; - s.tmp_0 = r0; - r0 = (s.tmp_0 + 1); - case 23: + r0 = s.arg0; + if (!checkSubtype(r0, scene_Scene__C169370_VT)) failedCast(r0); + r0 = (s.arg0).fields["eventContext"] = (undefined); + r0 = (s.arg0).fields["background"] = (undefined); + r0 = (s.arg0).fields["tileMap"] = (undefined); + r0 = (s.arg0).fields["allSprites"] = (undefined); + r0 = (s.arg0).fields["spriteNextId"] = (undefined); + r0 = (s.arg0).fields["spritesByKind"] = (undefined); + r0 = (s.arg0).fields["physicsEngine"] = (undefined); + r0 = (s.arg0).fields["camera"] = (undefined); + r0 = (s.arg0).fields["flags"] = (undefined); + r0 = (s.arg0).fields["destroyedHandlers"] = (undefined); + r0 = (s.arg0).fields["createdHandlers"] = (undefined); + r0 = (s.arg0).fields["overlapHandlers"] = (undefined); + r0 = (s.arg0).fields["tileOverlapHandlers"] = (undefined); + r0 = (s.arg0).fields["collisionHandlers"] = (undefined); + r0 = (s.arg0).fields["wallCollisionHandlers"] = (undefined); + r0 = (s.arg0).fields["gameForeverHandlers"] = (undefined); + r0 = (s.arg0).fields["_data"] = (undefined); + r0 = undefined; return leave(s, r0) default: oops() } } } -msgpack_packNumberCore__P171894.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"]} +scene_Scene_destroy__P169398.info = {"start":7356,"length":764,"line":205,"column":8,"endLine":223,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"destroy","argumentNames":["this"]} -function msgpack_packNumberCore__P171894_mk(s) { +function scene_Scene_destroy__P169398_mk(s) { checkStack(s.depth); return { - parent: s, fn: msgpack_packNumberCore__P171894, depth: s.depth + 1, + parent: s, fn: scene_Scene_destroy__P169398, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tag___183596: undefined, - fmt___183639: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function info_winningPlayer__P169093(s) { +function info_PlayerInfo_number__P169147(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -33146,66 +32379,32 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.winner___185374 = undefined; - s.pws___185376 = undefined; - s.goc___185380 = undefined; - s.hs___185383 = undefined; - r0 = pxsim_pxtrt.mklocRef(); - s.winner___185374 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.winner___185374, null); - s.tmp_0 = info_playersWithScores__P169091_mk(s); - s.callLocIdx = 930; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.pws___185376 = (r0); - r0 = pxsim_numops_toBoolDecr(s.pws___185376); - if (!r0) { step = 1; continue; } - s.tmp_0 = lambda_1_mk(s); - s.tmp_0.argL = globals.gameOverConfig___169525; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 931; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - s.goc___185380 = (r0); - r0 = pxsim_pxtrt.mklocRef(); - s.hs___185383 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.hs___185383, null); - r0 = pxsim_pxtcore_mkAction(2, info_winningPlayer_inline__P185387); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.hs___185383); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.winner___185374); - s.tmp_1 = helpers_arrayForEach__P166636_mk(s); - s.tmp_1.arg0 = s.pws___185376; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 934; s.pc = 5; return s.tmp_1; - case 5: - r0 = s.retval; - case 1: - case 2: - r0 = pxsim_pxtrt_ldlocRef(s.winner___185374); - return leave(s, r0) + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, info_PlayerInfo__C169144_VT)) failedCast(r0); + r0 = s.arg0.fields["_player"]; + return leaveAccessor(s, r0) default: oops() } } } -info_winningPlayer__P169093.info = {"start":7926,"length":476,"line":257,"column":4,"endLine":272,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"winningPlayer","argumentNames":[]} +info_PlayerInfo_number__P169147.info = {"start":25566,"length":57,"line":823,"column":8,"endLine":825,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"number","argumentNames":["this"]} +info_PlayerInfo_number__P169147.isGetter = true; -function info_winningPlayer__P169093_mk(s) { +function info_PlayerInfo_number__P169147_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_winningPlayer__P169093, depth: s.depth + 1, + parent: s, fn: info_PlayerInfo_number__P169147, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - winner___185374: undefined, - pws___185376: undefined, - goc___185380: undefined, - hs___185383: undefined, + arg0: undefined, } } -function info_winningPlayer_inline__P185387(s) { +function info_PlayerInfoImpl_score__P169133(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -33215,46 +32414,60 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.s___185389 = undefined; + s.state___184133 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = info_PlayerInfoImpl_score__P169133_mk(s); - r0 = s.arg0.fields["impl"]; - s.tmp_0.arg0 = r0; - s.callLocIdx = 932; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.s___185389 = (r0); - s.tmp_1 = info_isBetterScore__P169094_mk(s); - s.tmp_1.arg0 = s.s___185389; - r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); - s.tmp_1.arg1 = r0; - s.callLocIdx = 933; s.pc = 4; return s.tmp_1; - case 4: + r0 = s.arg0; + if (!checkSubtype(r0, info_PlayerInfoImpl__C169122_VT)) failedCast(r0); + s.tmp_0 = info_PlayerInfoImpl_getState__P169131_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 959; s.pc = 7; return s.tmp_0; + case 7: r0 = s.retval; + s.state___184133 = (r0); + r0 = s.state___184133.fields["showScore"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 === undefined); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = pxsim_pxtrt_stlocRef(s.caps[0], s.s___185389); - r0 = pxsim_pxtrt_stlocRef(s.caps[1], s.arg0); + r0 = (s.state___184133).fields["showScore"] = (true); case 1: case 2: - r0 = undefined; + r0 = s.state___184133.fields["showPlayer"]; + 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 = (s.state___184133).fields["showPlayer"] = (true); + case 3: + case 4: + r0 = s.state___184133.fields["score"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 == null); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + r0 = (s.state___184133).fields["score"] = (0); + case 5: + case 6: + r0 = s.state___184133.fields["score"]; return leave(s, r0) default: oops() } } } -info_winningPlayer_inline__P185387.info = {"start":8177,"length":184,"line":263,"column":24,"endLine":269,"endColumn":13,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["p"]} +info_PlayerInfoImpl_score__P169133.info = {"start":21458,"length":318,"line":692,"column":8,"endLine":701,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"score","argumentNames":["this"]} -function info_winningPlayer_inline__P185387_mk(s) { +function info_PlayerInfoImpl_score__P169133_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_winningPlayer_inline__P185387, depth: s.depth + 1, + parent: s, fn: info_PlayerInfoImpl_score__P169133, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - s___185389: undefined, + state___184133: undefined, arg0: undefined, } } @@ -33262,7 +32475,7 @@ function info_winningPlayer_inline__P185387_mk(s) { -function info_saveAllScores__P169092(s) { +function info_PlayerInfoImpl_getState__P169131(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -33272,57 +32485,45 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.allScoresKey___183785 = undefined; - s.allScores___183787 = undefined; - s.pws___183788 = undefined; - s.allScoresKey___183785 = ("all-scores"); - s.tmp_0 = info_playersWithScores__P169091_mk(s); - s.callLocIdx = 926; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.pws___183788 = (r0); - r0 = pxsim_numops_toBoolDecr(s.pws___183788); - if (!r0) { step = 1; continue; } - s.tmp_0 = helpers_arrayMap__P166633_mk(s); - s.tmp_0.arg0 = s.pws___183788; - s.tmp_0.arg1 = info_saveAllScores_inline__P183795; - s.callLocIdx = 928; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - s.allScores___183787 = (r0); - { step = 2; continue; } + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, info_PlayerInfoImpl__C169122_VT)) failedCast(r0); + s.tmp_0 = info_PlayerInfoImpl_init__P172374_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 958; s.pc = 1; return s.tmp_0; case 1: - r0 = pxsim_Array__mk(); - s.allScores___183787 = (r0); - case 2: - s.tmp_0 = settings_writeJSON__P168589_mk(s); - s.tmp_0.arg0 = s.allScoresKey___183785; - s.tmp_0.arg1 = s.allScores___183787; - s.callLocIdx = 929; s.pc = 5; return s.tmp_0; - case 5: r0 = s.retval; - r0 = undefined; + r0 = globals.infoState___172322.fields["playerStates"]; + s.tmp_0 = r0; + r0 = s.arg0.fields["_player"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 - 1); + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); return leave(s, r0) default: oops() } } } -info_saveAllScores__P169092.info = {"start":7568,"length":352,"line":243,"column":4,"endLine":255,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"saveAllScores","argumentNames":[]} +info_PlayerInfoImpl_getState__P169131.info = {"start":21220,"length":121,"line":682,"column":8,"endLine":685,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"getState","argumentNames":["this"]} -function info_saveAllScores__P169092_mk(s) { +function info_PlayerInfoImpl_getState__P169131_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_saveAllScores__P169092, depth: s.depth + 1, + parent: s, fn: info_PlayerInfoImpl_getState__P169131, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - allScoresKey___183785: undefined, - allScores___183787: undefined, - pws___183788: undefined, + tmp_1: undefined, + tmp_2: undefined, + arg0: undefined, } } -function info_saveAllScores_inline__P183795(s) { +function info_PlayerInfoImpl_init__P172374(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -33336,23 +32537,76 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = info_PlayerInfoImpl_score__P169133_mk(s); - r0 = s.arg0.fields["impl"]; - s.tmp_0.arg0 = r0; - s.callLocIdx = 927; s.pc = 1; return s.tmp_0; + r0 = s.arg0; + if (!checkSubtype(r0, info_PlayerInfoImpl__C169122_VT)) failedCast(r0); + s.tmp_0 = info_initHUD__P172368_mk(s); + s.callLocIdx = 955; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + r0 = s.arg0.fields["_player"]; + 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 = info_initMultiHUD__P172369_mk(s); + s.callLocIdx = 956; s.pc = 6; return s.tmp_2; + case 6: + r0 = s.retval; case 1: + case 2: + r0 = globals.infoState___172322.fields["playerStates"]; + s.tmp_3 = r0; + r0 = s.arg0.fields["_player"]; + s.tmp_5 = r0; + r0 = (s.tmp_5 - 1); + s.tmp_4 = r0; + r0 = pxsim_Array__getAt(s.tmp_3, s.tmp_4); + 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 = pxsim_pxtcore_mkClassInstance(info_PlayerState__C169080_VT); + s.tmp_6 = r0; + s.tmp_7 = info_PlayerState_constructor__P169089_mk(s); + s.tmp_7.arg0 = s.tmp_6; + s.callLocIdx = 957; s.pc = 7; return s.tmp_7; + case 7: r0 = s.retval; + r0 = globals.infoState___172322.fields["playerStates"]; + s.tmp_8 = r0; + r0 = s.arg0.fields["_player"]; + s.tmp_10 = r0; + r0 = (s.tmp_10 - 1); + s.tmp_9 = r0; + r0 = pxsim_Array_.setAt(s.tmp_8, s.tmp_9, s.tmp_6); + case 3: + case 4: + r0 = undefined; return leave(s, r0) default: oops() } } } -info_saveAllScores_inline__P183795.info = {"start":7770,"length":25,"line":248,"column":32,"endLine":248,"endColumn":57,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["item"]} +info_PlayerInfoImpl_init__P172374.info = {"start":20958,"length":252,"line":674,"column":8,"endLine":680,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"init","argumentNames":["this"]} -function info_saveAllScores_inline__P183795_mk(s) { +function info_PlayerInfoImpl_init__P172374_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_saveAllScores_inline__P183795, depth: s.depth + 1, + parent: s, fn: info_PlayerInfoImpl_init__P172374, depth: s.depth + 1, pc: 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, } } @@ -33360,7 +32614,7 @@ function info_saveAllScores_inline__P183795_mk(s) { -function settings_writeJSON__P168589(s) { +function info_initMultiHUD__P172369(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -33370,46 +32624,71 @@ 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 = settings_writeString__P168588_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_1 = JSON_stringify__P166914_mk(s); - s.tmp_1.arg0 = s.arg1; - s.tmp_1.arg1 = null; - s.tmp_1.arg2 = 0; - s.callLocIdx = 194; s.pc = 2; return s.tmp_1; - case 2: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 195; s.pc = 1; return s.tmp_0; + r0 = globals.infoState___172322.fields["visibilityFlag"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 & 16); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + { step = 5; continue; } case 1: + case 2: + s.tmp_2 = r0 = globals.infoState___172322; + r0 = s.tmp_2.fields["visibilityFlag"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 | 16); + s.tmp_3 = r0; + r0 = (s.tmp_2).fields["visibilityFlag"] = (s.tmp_3); + r0 = globals.infoState___172322.fields["visibilityFlag"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 & 32); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + s.tmp_4 = r0 = globals.infoState___172322; + s.tmp_6 = info_defaultMultiplayerHeartImage__P172371_mk(s); + s.callLocIdx = 921; s.pc = 6; return s.tmp_6; + case 6: r0 = s.retval; + s.tmp_5 = r0; + r0 = (s.tmp_4).fields["heartImage"] = (s.tmp_5); + case 3: + case 4: + s.tmp_0 = r0 = globals.infoState___172322; + r0 = pxsim.image.ofBuffer(_hex184226); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["multiplierImage"] = (s.tmp_1); + case 5: r0 = undefined; return leave(s, r0) default: oops() } } } -settings_writeJSON__P168589.info = {"start":2092,"length":106,"line":82,"column":4,"endLine":84,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"writeJSON","argumentNames":["key","value"]} +info_initMultiHUD__P172369.info = {"start":5694,"length":393,"line":174,"column":4,"endLine":185,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"initMultiHUD","argumentNames":[]} -function settings_writeJSON__P168589_mk(s) { +function info_initMultiHUD__P172369_mk(s) { checkStack(s.depth); return { - parent: s, fn: settings_writeJSON__P168589, depth: s.depth + 1, + parent: s, fn: info_initMultiHUD__P172369, 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, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, } } +const _hex184226 = pxsim.BufferMethods.createBufferFromHex("8704030003000000010100001000000001010000") -function settings_writeString__P168588(s) { +function info_defaultMultiplayerHeartImage__P172371(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -33419,39 +32698,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; - } - s.tmp_0 = settings_writeBuffer__P168587_mk(s); - s.tmp_0.arg0 = s.arg0; - r0 = pxsim.control.createBufferFromUTF8(s.arg1); - s.tmp_0.arg1 = r0; - s.callLocIdx = 193; s.pc = 1; return s.tmp_0; + r0 = pxsim_ImageMethods.isMono(globals.screen___168559); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = pxsim.image.ofBuffer(_hex184230); + { step = 2; continue; } case 1: - r0 = s.retval; - r0 = undefined; + r0 = pxsim.image.ofBuffer(_hex184232); + case 2: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = s.tmp_1; return leave(s, r0) default: oops() } } } -settings_writeString__P168588.info = {"start":1895,"length":125,"line":75,"column":4,"endLine":77,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"writeString","argumentNames":["key","value"]} +info_defaultMultiplayerHeartImage__P172371.info = {"start":6691,"length":503,"line":210,"column":4,"endLine":227,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"defaultMultiplayerHeartImage","argumentNames":[]} -function settings_writeString__P168588_mk(s) { +function info_defaultMultiplayerHeartImage__P172371_mk(s) { checkStack(s.depth); return { - parent: s, fn: settings_writeString__P168588, depth: s.depth + 1, + parent: s, fn: info_defaultMultiplayerHeartImage__P172371, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - arg0: undefined, - arg1: undefined, + tmp_1: undefined, } } +const _hex184230 = pxsim.BufferMethods.createBufferFromHex("870407000500000000000000100100000110000010000100011000001001000000000000") +const _hex184232 = pxsim.BufferMethods.createBufferFromHex("870407000500000000000000100100002112000010240100411200001001000000000000") -function JSON_stringify__P166914(s) { +function info_initHUD__P172368(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -33461,102 +32740,47 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ss___183815 = 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(JSON_Stringifier__C171946_VT); - s.ss___183815 = (r0); - s.tmp_0 = r0 = s.ss___183815; - r0 = pxsim_String_.mkEmpty(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["currIndent"] = (s.tmp_1); - r0 = (s.arg2 | 0); - s.arg2 = (r0); - r0 = (s.arg2 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(globals.infoState___172322); if (!r0) { step = 1; continue; } - s.arg2 = (0); + { step = 3; continue; } case 1: case 2: - r0 = (s.arg2 > 10); + r0 = pxsim_pxtcore_mkClassInstance(info_InfoState__C172319_VT); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.arg2 = (10); - case 3: + s.tmp_1 = info_InfoState_constructor__P172320_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 901; s.pc = 4; return s.tmp_1; case 4: - s.tmp_0 = r0 = s.ss___183815; - r0 = pxsim_String_.mkEmpty(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["indentStep"] = (s.tmp_1); - s.tmp_0 = r0 = s.ss___183815; - r0 = pxsim_String_.mkEmpty(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["currIndent"] = (s.tmp_1); - r0 = (s.ss___183815).fields["indent"] = (s.arg2); - case 5: - s.tmp_0 = r0 = s.arg2; - r0 = (s.tmp_0 - 1); - s.arg2 = (r0); - r0 = (s.tmp_0 > 0); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 6; continue; } - s.tmp_2 = r0 = s.ss___183815; - r0 = s.tmp_2.fields["indentStep"]; - s.tmp_5 = r0; - if ((s.tmp_5) && (s.tmp_5).vtable) { - setupResume(s, 7); - pxsim_String__stringConv(s.tmp_5); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_5) + ""; } - case 7: r0 = s.retval; - s.tmp_4 = r0; - r0 = pxsim_String__concat(s.tmp_4, " "); - s.tmp_3 = r0; - r0 = (s.tmp_2).fields["indentStep"] = (s.tmp_3); - { step = 5; continue; } - case 6: - s.tmp_0 = JSON_Stringifier_go__P171948_mk(s); - s.tmp_0.arg0 = s.ss___183815; - s.tmp_0.arg1 = s.arg0; - s.callLocIdx = 59; s.pc = 8; return s.tmp_0; - case 8: + globals.infoState___172322 = (s.tmp_0); + s.tmp_0 = scene_createRenderable__P169332_mk(s); + s.tmp_0.arg0 = 100; + s.tmp_0.arg1 = info_initHUD_inline__P184240; + s.tmp_0.arg2 = undefined; + s.callLocIdx = 920; s.pc = 5; return s.tmp_0; + case 5: r0 = s.retval; + case 3: + r0 = undefined; return leave(s, r0) default: oops() } } } -JSON_stringify__P166914.info = {"start":8773,"length":414,"line":288,"column":4,"endLine":300,"endColumn":5,"fileName":"pxt_modules/base/json.ts","functionName":"stringify","argumentNames":["value","replacer","indent"]} +info_initHUD__P172368.info = {"start":3294,"length":2394,"line":118,"column":4,"endLine":172,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"initHUD","argumentNames":[]} -function JSON_stringify__P166914_mk(s) { +function info_initHUD__P172368_mk(s) { checkStack(s.depth); return { - parent: s, fn: JSON_stringify__P166914, depth: s.depth + 1, + parent: s, fn: info_initHUD__P172368, depth: s.depth + 1, pc: 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, - ss___183815: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function JSON_Stringifier_go__P171948(s) { +function info_initHUD_inline__P184240(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -33566,602 +32790,246 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.t___183856 = undefined; - s.arr___183880 = undefined; - s.r___183886 = undefined; - s.i___183903 = undefined; - s.keys___183967 = undefined; - s.r___183974 = undefined; - s.i___183991 = undefined; - s.k___183997 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, JSON_Stringifier__C171946_VT)) failedCast(r0); - r0 = pxsim_pxtcore.typeOf(s.arg1); - s.t___183856 = (r0); - r0 = (s.t___183856 == "string"); + s.ps___184249 = undefined; + s.p___184271 = undefined; + s.scene___184308 = undefined; + s.elapsed___184311 = undefined; + s.t___184319 = undefined; + s.goc___184339 = undefined; + r0 = pxsim_numops_toBoolDecr(globals.infoState___172322); + 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 = JSON_Stringifier_doString__P171947_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_1.arg1 = s.arg1; - s.callLocIdx = 53; s.pc = 38; return s.tmp_1; - case 38: - r0 = s.retval; - { step = 37; continue; } - { step = 36; continue; } + { step = 23; continue; } case 1: - r0 = (s.t___183856 == "boolean"); - 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.t___183856 == "number"); + r0 = globals.infoState___172322.fields["visibilityFlag"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 & 16); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + s.tmp_2 = helpers_arrayFilter__P166637_mk(s); + s.tmp_2.arg0 = globals.players___172323; + s.tmp_2.arg1 = ps_inline__P184251; + s.callLocIdx = 902; s.pc = 24; return s.tmp_2; + case 24: + r0 = s.retval; + s.ps___184249 = (r0); + s.tmp_0 = helpers_arrayForEach__P166636_mk(s); + s.tmp_0.arg0 = s.ps___184249; + s.tmp_0.arg1 = info_initHUD_inline__P184260; + s.callLocIdx = 904; s.pc = 25; return s.tmp_0; + case 25: + r0 = s.retval; + s.tmp_0 = helpers_arrayForEach__P166636_mk(s); + s.tmp_0.arg0 = s.ps___184249; + s.tmp_0.arg1 = info_initHUD_inline__P184266; + s.callLocIdx = 906; s.pc = 26; return s.tmp_0; + case 26: + r0 = s.retval; + { step = 12; continue; } case 3: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBool(s.tmp_3); - if (!r0) { step = 4; continue; } - r0 = s.tmp_3; + s.p___184271 = (globals.player1___169188); + s.tmp_1 = info_PlayerInfoImpl_hasScore__P169136_mk(s); + r0 = s.p___184271.fields["impl"]; + s.tmp_1.arg0 = r0; + s.callLocIdx = 907; s.pc = 27; return s.tmp_1; + case 27: + r0 = s.retval; + 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 = (s.arg1 == null); + r0 = globals.infoState___172322.fields["visibilityFlag"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 & 2); case 5: // jmp value (already in r0) - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); if (!r0) { step = 6; continue; } - r0 = pxsim_String_.mkEmpty(); - s.tmp_5 = r0; - if ((s.arg1) && (s.arg1).vtable) { - setupResume(s, 39); - pxsim_String__stringConv(s.arg1); - checkResumeConsumed(); - return; - } else { s.retval = (s.arg1) + ""; } - case 39: + s.tmp_4 = info_PlayerInfo_drawScore__P169183_mk(s); + s.tmp_4.arg0 = s.p___184271; + s.callLocIdx = 908; s.pc = 28; return s.tmp_4; + case 28: r0 = s.retval; - s.tmp_6 = r0; - r0 = pxsim_String__concat(s.tmp_5, s.tmp_6); - { step = 37; continue; } - { step = 35; continue; } case 6: - r0 = pxsim_Array_.isArray(s.arg1); - s.tmp_7 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_7); - if (!r0) { step = 19; continue; } - s.arr___183880 = (s.arg1); - r0 = pxsim_Array__length(s.arr___183880); - s.tmp_1 = r0; - r0 = (s.tmp_1 == 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - r0 = "[]"; - { step = 37; continue; } - { step = 18; continue; } case 7: - s.r___183886 = ("["); - r0 = s.arg0.fields["indent"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 8; continue; } - s.tmp_1 = r0 = s.arg0; - r0 = s.tmp_1.fields["currIndent"]; - s.tmp_4 = r0; - if ((s.tmp_4) && (s.tmp_4).vtable) { - setupResume(s, 40); - pxsim_String__stringConv(s.tmp_4); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_4) + ""; } - case 40: - r0 = s.retval; - s.tmp_3 = r0; - r0 = s.arg0.fields["indentStep"]; - s.tmp_6 = r0; - if ((s.tmp_6) && (s.tmp_6).vtable) { - setupResume(s, 41); - pxsim_String__stringConv(s.tmp_6); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_6) + ""; } - case 41: - r0 = s.retval; - s.tmp_5 = r0; - r0 = pxsim_String__concat(s.tmp_3, s.tmp_5); - s.tmp_2 = r0; - r0 = (s.tmp_1).fields["currIndent"] = (s.tmp_2); - if ((s.r___183886) && (s.r___183886).vtable) { - setupResume(s, 42); - pxsim_String__stringConv(s.r___183886); - checkResumeConsumed(); - return; - } else { s.retval = (s.r___183886) + ""; } - case 42: + s.tmp_1 = info_PlayerInfoImpl_hasLife__P169140_mk(s); + r0 = s.p___184271.fields["impl"]; + s.tmp_1.arg0 = r0; + s.callLocIdx = 909; s.pc = 29; return s.tmp_1; + case 29: r0 = s.retval; s.tmp_0 = r0; - r0 = pxsim_String__concat(s.tmp_0, "\n"); - s.r___183886 = (r0); + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 8; continue; } + r0 = s.tmp_0; + { step = 9; continue; } case 8: - case 9: - s.i___183903 = (0); - case 10: - s.tmp_1 = r0 = s.i___183903; - r0 = pxsim_Array__length(s.arr___183880); + r0 = globals.infoState___172322.fields["visibilityFlag"]; 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; } - if ((s.r___183886) && (s.r___183886).vtable) { - setupResume(s, 43); - pxsim_String__stringConv(s.r___183886); - checkResumeConsumed(); - return; - } else { s.retval = (s.r___183886) + ""; } - case 43: - r0 = s.retval; + r0 = (s.tmp_2 & 4); + case 9: + // jmp value (already in r0) s.tmp_3 = r0; - r0 = s.arg0.fields["currIndent"]; - s.tmp_7 = r0; - if ((s.tmp_7) && (s.tmp_7).vtable) { - setupResume(s, 44); - pxsim_String__stringConv(s.tmp_7); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_7) + ""; } - case 44: + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 10; continue; } + s.tmp_4 = info_PlayerInfo_drawLives__P169184_mk(s); + s.tmp_4.arg0 = s.p___184271; + s.callLocIdx = 910; s.pc = 30; return s.tmp_4; + case 30: r0 = s.retval; - s.tmp_6 = r0; - s.tmp_10 = JSON_Stringifier_go__P171948_mk(s); - s.tmp_10.arg0 = s.arg0; - r0 = pxsim_Array__getAt(s.arr___183880, s.i___183903); - s.tmp_10.arg1 = r0; - s.callLocIdx = 54; s.pc = 45; return s.tmp_10; - case 45: + case 10: + case 11: + s.tmp_0 = info_PlayerInfoImpl_raiseLifeZero__P169143_mk(s); + r0 = s.p___184271.fields["impl"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = true; + s.callLocIdx = 911; s.pc = 31; return s.tmp_0; + case 31: r0 = s.retval; - s.tmp_9 = r0; - if ((s.tmp_9) && (s.tmp_9).vtable) { - setupResume(s, 46); - pxsim_String__stringConv(s.tmp_9); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_9) + ""; } - case 46: + case 12: + r0 = globals.infoState___172322.fields["gameEnd"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 !== undefined); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 13; continue; } + r0 = s.tmp_0; + { step = 14; continue; } + case 13: + r0 = globals.infoState___172322.fields["visibilityFlag"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 & 1); + case 14: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 21; continue; } + s.tmp_4 = game_currentScene__P169526_mk(s); + s.callLocIdx = 912; s.pc = 32; return s.tmp_4; + case 32: r0 = s.retval; - s.tmp_8 = r0; - r0 = pxsim_String__concat(s.tmp_6, s.tmp_8); - s.tmp_5 = r0; - if ((s.tmp_5) && (s.tmp_5).vtable) { - setupResume(s, 47); - pxsim_String__stringConv(s.tmp_5); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_5) + ""; } - case 47: + s.scene___184308 = (r0); + r0 = globals.infoState___172322.fields["gameEnd"]; + s.tmp_0 = r0; + r0 = s.scene___184308.fields["_millis"]; + s.tmp_1 = r0; + r0 = (s.tmp_0 - s.tmp_1); + s.elapsed___184311 = (r0); + s.tmp_0 = info_drawTimer__P172373_mk(s); + s.tmp_0.arg0 = s.elapsed___184311; + s.callLocIdx = 914; s.pc = 33; return s.tmp_0; + case 33: r0 = s.retval; - s.tmp_4 = r0; - r0 = pxsim_String__concat(s.tmp_3, s.tmp_4); - s.r___183886 = (r0); - s.tmp_1 = r0 = s.i___183903; - r0 = pxsim_Array__length(s.arr___183880); - s.tmp_3 = r0; - r0 = (s.tmp_3 - 1); + r0 = (s.elapsed___184311 / 1000); + s.t___184319 = (r0); + r0 = (s.t___184319 <= 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 19; continue; } + s.t___184319 = (0); + r0 = globals.infoState___172322.fields["countdownExpired"]; s.tmp_2 = r0; - r0 = (s.tmp_1 != s.tmp_2); + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 11; continue; } - if ((s.r___183886) && (s.r___183886).vtable) { - setupResume(s, 48); - pxsim_String__stringConv(s.r___183886); - checkResumeConsumed(); - return; - } else { s.retval = (s.r___183886) + ""; } - case 48: - r0 = s.retval; - s.tmp_4 = r0; - r0 = pxsim_String__concat(s.tmp_4, ","); - s.r___183886 = (r0); - case 11: - case 12: - r0 = s.arg0.fields["indent"]; + if (!r0) { step = 17; continue; } + r0 = (globals.infoState___172322).fields["countdownExpired"] = (true); + r0 = (globals.infoState___172322).fields["gameEnd"] = (undefined); + r0 = globals.infoState___172322.fields["countdownEndHandler"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 13; continue; } - if ((s.r___183886) && (s.r___183886).vtable) { - setupResume(s, 49); - pxsim_String__stringConv(s.r___183886); - checkResumeConsumed(); - return; - } else { s.retval = (s.r___183886) + ""; } - case 49: + if (!r0) { step = 15; continue; } + s.tmp_1 = if_countdownEndHandler_1_mk(s); + s.tmp_1.arg0 = globals.infoState___172322; + if (!s.tmp_1.arg0.vtable.iface) { + setupLambda(s.tmp_1, pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "countdownEndHandler"), 1); + s.callLocIdx = 915; s.pc = 34; return s.tmp_1; + } else { + s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["countdownEndHandler"]; + if (s.tmp_1.fn == null) { setupLambda(s.tmp_1, s.tmp_1.arg0.fields["countdownEndHandler"], 1); s.callLocIdx = 915; s.pc = 34; return s.tmp_1; } + else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 915; s.pc = 34; return s.tmp_1;; } + else { s.callLocIdx = 915; s.pc = 34; return s.tmp_1; } + } + case 34: r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_String__concat(s.tmp_1, "\n"); - s.r___183886 = (r0); - case 13: - case 14: - r0 = (s.i___183903 + 1); - s.i___183903 = (r0); - { step = 10; continue; } + { step = 16; continue; } case 15: - r0 = s.arg0.fields["indent"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 16; continue; } - s.tmp_1 = r0 = s.arg0; - s.tmp_3 = helpers_stringSlice__P166646_mk(s); - r0 = s.arg0.fields["currIndent"]; - s.tmp_3.arg0 = r0; - r0 = s.arg0.fields["indent"]; - s.tmp_3.arg1 = r0; - s.tmp_3.arg2 = undefined; - s.callLocIdx = 55; s.pc = 50; return s.tmp_3; - case 50: + s.tmp_0 = lambda_1_mk(s); + s.tmp_0.argL = globals.gameOverConfig___169525; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 916; s.pc = 35; return s.tmp_0; + case 35: r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_1).fields["currIndent"] = (s.tmp_2); - case 16: - case 17: - if ((s.r___183886) && (s.r___183886).vtable) { - setupResume(s, 51); - pxsim_String__stringConv(s.r___183886); - checkResumeConsumed(); - return; - } else { s.retval = (s.r___183886) + ""; } - case 51: + s.goc___184339 = (r0); + s.tmp_0 = game_GameOverConfig_setEffect__P169518_mk(s); + s.tmp_0.arg0 = s.goc___184339; + s.tmp_0.arg1 = false; + s.tmp_0.arg2 = null; + s.tmp_0.arg3 = false; + s.callLocIdx = 917; s.pc = 36; return s.tmp_0; + case 36: r0 = s.retval; - s.tmp_0 = r0; - r0 = s.arg0.fields["currIndent"]; - s.tmp_4 = r0; - if ((s.tmp_4) && (s.tmp_4).vtable) { - setupResume(s, 52); - pxsim_String__stringConv(s.tmp_4); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_4) + ""; } - case 52: + s.tmp_0 = game_GameOverConfig_setSound__P169520_mk(s); + s.tmp_0.arg0 = s.goc___184339; + s.tmp_0.arg1 = false; + s.tmp_0.arg2 = null; + s.tmp_0.arg3 = false; + s.tmp_0.arg4 = false; + s.callLocIdx = 918; s.pc = 37; return s.tmp_0; + case 37: r0 = s.retval; - s.tmp_3 = r0; - r0 = pxsim_String__concat(s.tmp_3, "]"); - s.tmp_2 = r0; - if ((s.tmp_2) && (s.tmp_2).vtable) { - setupResume(s, 53); - pxsim_String__stringConv(s.tmp_2); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_2) + ""; } - case 53: + s.tmp_0 = game_gameOver__P169540_mk(s); + s.tmp_0.arg0 = false; + s.callLocIdx = 919; s.pc = 38; return s.tmp_0; + case 38: r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_String__concat(s.tmp_0, s.tmp_1); - s.r___183886 = (r0); - r0 = s.r___183886; - { step = 37; continue; } + case 16: + case 17: case 18: - { step = 34; continue; } case 19: - r0 = pxsim_pxtrt.keysOf(s.arg1); - s.keys___183967 = (r0); - r0 = pxsim_Array__length(s.keys___183967); - 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; } - r0 = "{}"; - { step = 37; continue; } case 20: case 21: - s.r___183974 = ("{"); - r0 = s.arg0.fields["indent"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 22; continue; } - s.tmp_1 = r0 = s.arg0; - r0 = s.tmp_1.fields["currIndent"]; - s.tmp_4 = r0; - if ((s.tmp_4) && (s.tmp_4).vtable) { - setupResume(s, 54); - pxsim_String__stringConv(s.tmp_4); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_4) + ""; } - case 54: - r0 = s.retval; - s.tmp_3 = r0; - r0 = s.arg0.fields["indentStep"]; - s.tmp_6 = r0; - if ((s.tmp_6) && (s.tmp_6).vtable) { - setupResume(s, 55); - pxsim_String__stringConv(s.tmp_6); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_6) + ""; } - case 55: - r0 = s.retval; - s.tmp_5 = r0; - r0 = pxsim_String__concat(s.tmp_3, s.tmp_5); - s.tmp_2 = r0; - r0 = (s.tmp_1).fields["currIndent"] = (s.tmp_2); - if ((s.r___183974) && (s.r___183974).vtable) { - setupResume(s, 56); - pxsim_String__stringConv(s.r___183974); - checkResumeConsumed(); - return; - } else { s.retval = (s.r___183974) + ""; } - case 56: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_String__concat(s.tmp_0, "\n"); - s.r___183974 = (r0); case 22: case 23: - s.i___183991 = (0); - case 24: - s.tmp_1 = r0 = s.i___183991; - r0 = pxsim_Array__length(s.keys___183967); - 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 = 31; continue; } - r0 = pxsim_Array__getAt(s.keys___183967, s.i___183991); - s.k___183997 = (r0); - if ((s.r___183974) && (s.r___183974).vtable) { - setupResume(s, 57); - pxsim_String__stringConv(s.r___183974); - checkResumeConsumed(); - return; - } else { s.retval = (s.r___183974) + ""; } - case 57: - r0 = s.retval; - s.tmp_0 = r0; - r0 = s.arg0.fields["currIndent"]; - s.tmp_4 = r0; - if ((s.tmp_4) && (s.tmp_4).vtable) { - setupResume(s, 58); - pxsim_String__stringConv(s.tmp_4); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_4) + ""; } - case 58: - r0 = s.retval; - s.tmp_3 = r0; - s.tmp_7 = JSON_Stringifier_doString__P171947_mk(s); - s.tmp_7.arg0 = s.arg0; - s.tmp_7.arg1 = s.k___183997; - s.callLocIdx = 56; s.pc = 59; return s.tmp_7; - case 59: - r0 = s.retval; - s.tmp_6 = r0; - if ((s.tmp_6) && (s.tmp_6).vtable) { - setupResume(s, 60); - pxsim_String__stringConv(s.tmp_6); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_6) + ""; } - case 60: - r0 = s.retval; - s.tmp_5 = r0; - r0 = pxsim_String__concat(s.tmp_3, s.tmp_5); - s.tmp_2 = r0; - if ((s.tmp_2) && (s.tmp_2).vtable) { - setupResume(s, 61); - pxsim_String__stringConv(s.tmp_2); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_2) + ""; } - case 61: - r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_String__concat(s.tmp_0, s.tmp_1); - s.r___183974 = (r0); - r0 = s.arg0.fields["indent"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 25; continue; } - if ((s.r___183974) && (s.r___183974).vtable) { - setupResume(s, 62); - pxsim_String__stringConv(s.r___183974); - checkResumeConsumed(); - return; - } else { s.retval = (s.r___183974) + ""; } - case 62: - r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_String__concat(s.tmp_1, ": "); - s.r___183974 = (r0); - { step = 26; continue; } - case 25: - if ((s.r___183974) && (s.r___183974).vtable) { - setupResume(s, 63); - pxsim_String__stringConv(s.r___183974); - checkResumeConsumed(); - return; - } else { s.retval = (s.r___183974) + ""; } - case 63: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_String__concat(s.tmp_0, ":"); - s.r___183974 = (r0); - case 26: - if ((s.r___183974) && (s.r___183974).vtable) { - setupResume(s, 64); - pxsim_String__stringConv(s.r___183974); - checkResumeConsumed(); - return; - } else { s.retval = (s.r___183974) + ""; } - case 64: - r0 = s.retval; - s.tmp_0 = r0; - s.tmp_3 = JSON_Stringifier_go__P171948_mk(s); - s.tmp_3.arg0 = s.arg0; - r0 = pxsim_pxtrt.mapGetGeneric(s.arg1, s.k___183997); - s.tmp_3.arg1 = r0; - s.callLocIdx = 57; s.pc = 65; return s.tmp_3; - case 65: - r0 = s.retval; - s.tmp_2 = r0; - if ((s.tmp_2) && (s.tmp_2).vtable) { - setupResume(s, 66); - pxsim_String__stringConv(s.tmp_2); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_2) + ""; } - case 66: - r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_String__concat(s.tmp_0, s.tmp_1); - s.r___183974 = (r0); - s.tmp_1 = r0 = s.i___183991; - r0 = pxsim_Array__length(s.keys___183967); - 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 = 27; continue; } - if ((s.r___183974) && (s.r___183974).vtable) { - setupResume(s, 67); - pxsim_String__stringConv(s.r___183974); - checkResumeConsumed(); - return; - } else { s.retval = (s.r___183974) + ""; } - case 67: - r0 = s.retval; - s.tmp_4 = r0; - r0 = pxsim_String__concat(s.tmp_4, ","); - s.r___183974 = (r0); - case 27: - case 28: - r0 = s.arg0.fields["indent"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 29; continue; } - if ((s.r___183974) && (s.r___183974).vtable) { - setupResume(s, 68); - pxsim_String__stringConv(s.r___183974); - checkResumeConsumed(); - return; - } else { s.retval = (s.r___183974) + ""; } - case 68: - r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_String__concat(s.tmp_1, "\n"); - s.r___183974 = (r0); - case 29: - case 30: - r0 = (s.i___183991 + 1); - s.i___183991 = (r0); - { step = 24; continue; } - case 31: - r0 = s.arg0.fields["indent"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 32; continue; } - s.tmp_1 = r0 = s.arg0; - s.tmp_3 = helpers_stringSlice__P166646_mk(s); - r0 = s.arg0.fields["currIndent"]; - s.tmp_3.arg0 = r0; - r0 = s.arg0.fields["indent"]; - s.tmp_3.arg1 = r0; - s.tmp_3.arg2 = undefined; - s.callLocIdx = 58; s.pc = 69; return s.tmp_3; - case 69: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_1).fields["currIndent"] = (s.tmp_2); - case 32: - case 33: - if ((s.r___183974) && (s.r___183974).vtable) { - setupResume(s, 70); - pxsim_String__stringConv(s.r___183974); - checkResumeConsumed(); - return; - } else { s.retval = (s.r___183974) + ""; } - case 70: - r0 = s.retval; - s.tmp_0 = r0; - r0 = s.arg0.fields["currIndent"]; - s.tmp_4 = r0; - if ((s.tmp_4) && (s.tmp_4).vtable) { - setupResume(s, 71); - pxsim_String__stringConv(s.tmp_4); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_4) + ""; } - case 71: - r0 = s.retval; - s.tmp_3 = r0; - r0 = pxsim_String__concat(s.tmp_3, "}"); - s.tmp_2 = r0; - if ((s.tmp_2) && (s.tmp_2).vtable) { - setupResume(s, 72); - pxsim_String__stringConv(s.tmp_2); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_2) + ""; } - case 72: - r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_String__concat(s.tmp_0, s.tmp_1); - s.r___183974 = (r0); - r0 = s.r___183974; - { step = 37; continue; } - case 34: - case 35: - case 36: r0 = undefined; - case 37: return leave(s, r0) default: oops() } } } -JSON_Stringifier_go__P171948.info = {"start":6319,"length":2076,"line":223,"column":8,"endLine":279,"endColumn":9,"fileName":"pxt_modules/base/json.ts","functionName":"go","argumentNames":["this","v"]} +info_initHUD_inline__P184240.info = {"start":3454,"length":2217,"line":125,"column":12,"endLine":170,"endColumn":13,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":[]} -function JSON_Stringifier_go__P171948_mk(s) { +function info_initHUD_inline__P184240_mk(s) { checkStack(s.depth); return { - parent: s, fn: JSON_Stringifier_go__P171948, depth: s.depth + 1, + parent: s, fn: info_initHUD_inline__P184240, depth: s.depth + 1, pc: 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, - t___183856: undefined, - arr___183880: undefined, - r___183886: undefined, - i___183903: undefined, - keys___183967: undefined, - r___183974: undefined, - i___183991: undefined, - k___183997: undefined, - arg0: undefined, - arg1: undefined, + ps___184249: undefined, + p___184271: undefined, + scene___184308: undefined, + elapsed___184311: undefined, + t___184319: undefined, + goc___184339: undefined, } } -function JSON_Stringifier_doString__P171947(s) { +function ps_inline__P184251(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -34171,134 +33039,38 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.r___184083 = undefined; - s.i___184084 = undefined; - s.c___184090 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, JSON_Stringifier__C171946_VT)) failedCast(r0); - s.r___184083 = ("\""); - s.i___184084 = (0); - case 1: - s.tmp_1 = r0 = s.i___184084; - r0 = pxsim_String_.length(s.arg1); + r0 = pxsim_numops_toBoolDecr(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 = 14; continue; } - r0 = pxsim_String_.charAt(s.arg1, s.i___184084); - s.c___184090 = (r0); - r0 = (s.c___184090 == "\n"); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.c___184090 = ("\\n"); - { step = 13; continue; } - case 2: - r0 = (s.c___184090 == "\r"); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.c___184090 = ("\\r"); - { step = 12; continue; } - case 3: - r0 = (s.c___184090 == "\t"); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - s.c___184090 = ("\\t"); - { step = 11; continue; } - case 4: - r0 = (s.c___184090 == "\b"); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - s.c___184090 = ("\\b"); - { step = 10; continue; } - case 5: - r0 = (s.c___184090 == "\\"); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 6; continue; } - s.c___184090 = ("\\\\"); - { step = 9; continue; } - case 6: - r0 = (s.c___184090 == "\""); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - s.c___184090 = ("\\\""); - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - if ((s.r___184083) && (s.r___184083).vtable) { - setupResume(s, 15); - pxsim_String__stringConv(s.r___184083); - checkResumeConsumed(); - return; - } else { s.retval = (s.r___184083) + ""; } - case 15: - r0 = s.retval; - s.tmp_0 = r0; - if ((s.c___184090) && (s.c___184090).vtable) { - setupResume(s, 16); - pxsim_String__stringConv(s.c___184090); - checkResumeConsumed(); - return; - } else { s.retval = (s.c___184090) + ""; } - case 16: - r0 = s.retval; + r0 = pxsim_Boolean__bang(s.tmp_2); s.tmp_1 = r0; - r0 = pxsim_String__concat(s.tmp_0, s.tmp_1); - s.r___184083 = (r0); - r0 = (s.i___184084 + 1); - s.i___184084 = (r0); - { step = 1; continue; } - case 14: - if ((s.r___184083) && (s.r___184083).vtable) { - setupResume(s, 17); - pxsim_String__stringConv(s.r___184083); - checkResumeConsumed(); - return; - } else { s.retval = (s.r___184083) + ""; } - case 17: - r0 = s.retval; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_String__concat(s.tmp_0, "\""); + r0 = pxsim_Boolean__bang(s.tmp_0); return leave(s, r0) default: oops() } } } -JSON_Stringifier_doString__P171947.info = {"start":5837,"length":472,"line":208,"column":8,"endLine":221,"endColumn":9,"fileName":"pxt_modules/base/json.ts","functionName":"doString","argumentNames":["this","s"]} +ps_inline__P184251.info = {"start":3702,"length":8,"line":130,"column":46,"endLine":130,"endColumn":54,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["p"]} -function JSON_Stringifier_doString__P171947_mk(s) { +function ps_inline__P184251_mk(s) { checkStack(s.depth); return { - parent: s, fn: JSON_Stringifier_doString__P171947, depth: s.depth + 1, + parent: s, fn: ps_inline__P184251, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - r___184083: undefined, - i___184084: undefined, - c___184090: undefined, arg0: undefined, - arg1: undefined, } } -function info_playersWithScores__P169091(s) { +function info_initHUD_inline__P184260(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -34308,40 +33080,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.players___172323); - if (!r0) { step = 1; continue; } - s.tmp_0 = helpers_arrayFilter__P166637_mk(s); - s.tmp_0.arg0 = globals.players___172323; - s.tmp_0.arg1 = info_playersWithScores_inline__P185409; - s.callLocIdx = 925; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - { step = 2; continue; } + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + s.tmp_0 = info_PlayerInfo_drawPlayer__P169182_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 903; s.pc = 1; return s.tmp_0; case 1: - r0 = pxsim_Array__mk(); - case 2: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = s.tmp_1; + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -info_playersWithScores__P169091.info = {"start":7429,"length":133,"line":239,"column":4,"endLine":241,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"playersWithScores","argumentNames":[]} +info_initHUD_inline__P184260.info = {"start":3786,"length":19,"line":132,"column":31,"endLine":132,"endColumn":50,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["p"]} -function info_playersWithScores__P169091_mk(s) { +function info_initHUD_inline__P184260_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_playersWithScores__P169091, depth: s.depth + 1, + parent: s, fn: info_initHUD_inline__P184260, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, + arg0: undefined, } } -function info_playersWithScores_inline__P185409(s) { +function info_initHUD_inline__P184266(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -34355,21 +33122,23 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = info_PlayerInfoImpl_hasScore__P169136_mk(s); + s.tmp_0 = info_PlayerInfoImpl_raiseLifeZero__P169143_mk(s); r0 = s.arg0.fields["impl"]; s.tmp_0.arg0 = r0; - s.callLocIdx = 924; s.pc = 1; return s.tmp_0; + s.tmp_0.arg1 = false; + s.callLocIdx = 905; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -info_playersWithScores_inline__P185409.info = {"start":7521,"length":28,"line":240,"column":40,"endLine":240,"endColumn":68,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["item"]} +info_initHUD_inline__P184266.info = {"start":3888,"length":32,"line":134,"column":31,"endLine":134,"endColumn":63,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["p"]} -function info_playersWithScores_inline__P185409_mk(s) { +function info_initHUD_inline__P184266_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_playersWithScores_inline__P185409, depth: s.depth + 1, + parent: s, fn: info_initHUD_inline__P184266, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -34379,7 +33148,7 @@ function info_playersWithScores_inline__P185409_mk(s) { -function info_multiplayerScoring__P169090(s) { +function info_drawTimer__P172373(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -34389,68 +33158,319 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.pws___183532 = undefined; - s.p___183536 = undefined; - s.unnamed824___U2 = undefined; - s.unnamed825___U3 = undefined; - s.tmp_0 = info_playersWithScores__P169091_mk(s); - s.callLocIdx = 922; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.pws___183532 = (r0); - s.p___183536 = (undefined); - s.unnamed824___U2 = (s.pws___183532); - s.unnamed825___U3 = (0); + s.font___184401 = undefined; + s.smallFont___184403 = undefined; + s.seconds___184405 = undefined; + s.width___184409 = undefined; + s.left___184414 = undefined; + s.color1___184424 = undefined; + s.color2___184428 = undefined; + s.temp___184441 = undefined; + s.remainder___184477 = undefined; + s.decimalLeft___184496 = undefined; + s.minutes___184514 = undefined; + s.remainder___184518 = undefined; + 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.arg0 = (0); case 1: - s.tmp_0 = r0 = s.unnamed825___U3; - r0 = pxsim_Array__length(s.unnamed824___U2); + case 2: + r0 = (s.arg0 | 0); + s.arg0 = (r0); + s.font___184401 = (globals.font8___168502); + s.smallFont___184403 = (globals.font5___168507); + r0 = pxsim.Math_.idiv(s.arg0, 1000); + s.seconds___184405 = (r0); + s.tmp_2 = if_charWidth_1_mk(s); + s.tmp_2.arg0 = s.font___184401; + 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 = 942; s.pc = 11; return s.tmp_2; } + } + case 11: + r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 4; continue; } - r0 = pxsim_Array__getAt(s.unnamed824___U2, s.unnamed825___U3); - s.p___183536 = (r0); - r0 = s.p___183536.fields["_player"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 > 1); + r0 = (s.tmp_1 * 5); + s.tmp_0 = r0; + r0 = (s.tmp_0 - 2); + s.width___184409 = (r0); + r0 = pxsim_ImageMethods.width(globals.screen___168559); s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 2; continue; } - r0 = true; - { step = 5; continue; } - case 2: - case 3: - r0 = (s.unnamed825___U3 + 1); - s.unnamed825___U3 = (r0); - { step = 1; continue; } + r0 = (s.tmp_2 >> 1); + s.tmp_1 = r0; + r0 = (s.width___184409 >> 1); + s.tmp_3 = r0; + r0 = (s.tmp_1 - s.tmp_3); + s.tmp_0 = r0; + r0 = (s.tmp_0 + 1); + s.left___184414 = (r0); + r0 = globals.infoState___172322.fields["fontColor"]; + s.color1___184424 = (r0); + r0 = globals.infoState___172322.fields["bgColor"]; + s.color2___184428 = (r0); + r0 = (s.seconds___184405 < 10); + 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.seconds___184405 & 1); case 4: - s.unnamed824___U2 = (undefined); - r0 = false; + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBool(s.tmp_1); + if (r0) { step = 5; continue; } + r0 = s.tmp_1; + { step = 6; continue; } case 5: + r0 = pxsim_ImageMethods.isMono(globals.screen___168559); + 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 = 7; continue; } + s.temp___184441 = (s.color1___184424); + s.color1___184424 = (s.color2___184428); + s.color2___184428 = (s.temp___184441); + case 7: + case 8: + s.tmp_0 = helpers_imageFillRect__P168483_mk(s); + s.tmp_0.arg0 = globals.screen___168559; + r0 = (s.left___184414 - 3); + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = 0; + r0 = (s.width___184409 + 6); + s.tmp_0.arg3 = r0; + s.tmp_2 = if_charHeight_1_mk(s); + s.tmp_2.arg0 = s.font___184401; + if (!s.tmp_2.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "charHeight"); + } else { + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["charHeight"]; + if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["charHeight"]; } + else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } + else { s.callLocIdx = 943; s.pc = 13; return s.tmp_2; } + } + case 13: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_1 + 3); + s.tmp_0.arg4 = r0; + r0 = globals.infoState___172322.fields["borderColor"]; + s.tmp_0.arg5 = r0; + s.callLocIdx = 944; s.pc = 12; return s.tmp_0; + case 12: + r0 = s.retval; + s.tmp_0 = helpers_imageFillRect__P168483_mk(s); + s.tmp_0.arg0 = globals.screen___168559; + r0 = (s.left___184414 - 2); + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = 0; + r0 = (s.width___184409 + 4); + s.tmp_0.arg3 = r0; + s.tmp_2 = if_charHeight_1_mk(s); + s.tmp_2.arg0 = s.font___184401; + if (!s.tmp_2.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "charHeight"); + } else { + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["charHeight"]; + if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["charHeight"]; } + else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } + else { s.callLocIdx = 945; s.pc = 15; return s.tmp_2; } + } + case 15: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_1 + 2); + s.tmp_0.arg4 = r0; + s.tmp_0.arg5 = s.color2___184428; + s.callLocIdx = 946; s.pc = 14; return s.tmp_0; + case 14: + r0 = s.retval; + r0 = (s.seconds___184405 < 60); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 9; continue; } + r0 = (s.arg0 % 1000); + s.tmp_1 = r0; + r0 = pxsim.Math_.idiv(s.tmp_1, 10); + s.remainder___184477 = (r0); + s.tmp_0 = helpers_imagePrint__P168517_mk(s); + s.tmp_0.arg0 = globals.screen___168559; + s.tmp_3 = info_formatDecimal__P172376_mk(s); + s.tmp_3.arg0 = s.seconds___184405; + s.callLocIdx = 947; s.pc = 17; return s.tmp_3; + case 17: + r0 = s.retval; + s.tmp_2 = r0; + if ((s.tmp_2) && (s.tmp_2).vtable) { + setupResume(s, 18); + pxsim_String__stringConv(s.tmp_2); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_2) + ""; } + case 18: + r0 = s.retval; + s.tmp_1 = r0; + r0 = pxsim_String__concat(s.tmp_1, "."); + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = s.left___184414; + s.tmp_0.arg3 = 1; + s.tmp_0.arg4 = s.color1___184424; + s.tmp_0.arg5 = s.font___184401; + s.tmp_0.arg6 = undefined; + s.callLocIdx = 948; s.pc = 16; return s.tmp_0; + case 16: + r0 = s.retval; + s.tmp_0 = r0 = s.left___184414; + s.tmp_3 = if_charWidth_1_mk(s); + s.tmp_3.arg0 = s.font___184401; + if (!s.tmp_3.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "charWidth"); + } else { + s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["charWidth"]; + if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["charWidth"]; } + else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } + else { s.callLocIdx = 949; s.pc = 19; return s.tmp_3; } + } + case 19: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (3 * s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); + s.decimalLeft___184496 = (r0); + s.tmp_0 = helpers_imagePrint__P168517_mk(s); + s.tmp_0.arg0 = globals.screen___168559; + s.tmp_1 = info_formatDecimal__P172376_mk(s); + s.tmp_1.arg0 = s.remainder___184477; + s.callLocIdx = 950; s.pc = 21; return s.tmp_1; + case 21: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = s.decimalLeft___184496; + s.tmp_0.arg3 = 3; + s.tmp_0.arg4 = s.color1___184424; + s.tmp_0.arg5 = s.smallFont___184403; + s.tmp_0.arg6 = undefined; + s.callLocIdx = 951; s.pc = 20; return s.tmp_0; + case 20: + r0 = s.retval; + { step = 10; continue; } + case 9: + r0 = pxsim.Math_.idiv(s.seconds___184405, 60); + s.minutes___184514 = (r0); + r0 = (s.seconds___184405 % 60); + s.remainder___184518 = (r0); + s.tmp_0 = helpers_imagePrint__P168517_mk(s); + s.tmp_0.arg0 = globals.screen___168559; + s.tmp_5 = info_formatDecimal__P172376_mk(s); + s.tmp_5.arg0 = s.minutes___184514; + s.callLocIdx = 952; s.pc = 23; return s.tmp_5; + case 23: + r0 = s.retval; + s.tmp_4 = r0; + if ((s.tmp_4) && (s.tmp_4).vtable) { + setupResume(s, 24); + pxsim_String__stringConv(s.tmp_4); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_4) + ""; } + case 24: + r0 = s.retval; + s.tmp_3 = r0; + r0 = pxsim_String__concat(s.tmp_3, ":"); + s.tmp_2 = r0; + if ((s.tmp_2) && (s.tmp_2).vtable) { + setupResume(s, 25); + pxsim_String__stringConv(s.tmp_2); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_2) + ""; } + case 25: + r0 = s.retval; + s.tmp_1 = r0; + s.tmp_8 = info_formatDecimal__P172376_mk(s); + s.tmp_8.arg0 = s.remainder___184518; + s.callLocIdx = 953; s.pc = 26; return s.tmp_8; + case 26: + r0 = s.retval; + s.tmp_7 = r0; + if ((s.tmp_7) && (s.tmp_7).vtable) { + setupResume(s, 27); + pxsim_String__stringConv(s.tmp_7); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_7) + ""; } + case 27: + r0 = s.retval; + s.tmp_6 = r0; + r0 = pxsim_String__concat(s.tmp_1, s.tmp_6); + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = s.left___184414; + s.tmp_0.arg3 = 1; + s.tmp_0.arg4 = s.color1___184424; + s.tmp_0.arg5 = s.font___184401; + s.tmp_0.arg6 = undefined; + s.callLocIdx = 954; s.pc = 22; return s.tmp_0; + case 22: + r0 = s.retval; + case 10: + r0 = undefined; return leave(s, r0) default: oops() } } } -info_multiplayerScoring__P169090.info = {"start":7200,"length":223,"line":229,"column":4,"endLine":237,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"multiplayerScoring","argumentNames":[]} +info_drawTimer__P172373.info = {"start":17650,"length":1328,"line":588,"column":4,"endLine":623,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"drawTimer","argumentNames":["millis"]} -function info_multiplayerScoring__P169090_mk(s) { +function info_drawTimer__P172373_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_multiplayerScoring__P169090, depth: s.depth + 1, + parent: s, fn: info_drawTimer__P172373, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - pws___183532: undefined, - p___183536: undefined, - unnamed824___U2: undefined, - unnamed825___U3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + font___184401: undefined, + smallFont___184403: undefined, + seconds___184405: undefined, + width___184409: undefined, + left___184414: undefined, + color1___184424: undefined, + color2___184428: undefined, + temp___184441: undefined, + remainder___184477: undefined, + decimalLeft___184496: undefined, + minutes___184514: undefined, + remainder___184518: undefined, + arg0: undefined, } } -function music_play__P168449(s) { +function info_formatDecimal__P172376(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -34462,38 +33482,49 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = music_Playable__C168438_v0_2_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - if (!checkSubtype(s.tmp_0.arg0, music_Playable__C168438_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.play; - s.pc = 1; return s.tmp_0; - case 1: + r0 = (s.arg0 | 0); + s.arg0 = (r0); + r0 = (s.arg0 < 10); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + if ((s.arg0) && (s.arg0).vtable) { + setupResume(s, 4); + pxsim_String__stringConv(s.arg0); + checkResumeConsumed(); + return; + } else { s.retval = (s.arg0) + ""; } + case 4: r0 = s.retval; - r0 = undefined; + s.tmp_1 = r0; + r0 = pxsim_String__concat("0", s.tmp_1); + { step = 3; continue; } + case 1: + case 2: + r0 = pxsim_numops.toString(s.arg0); + case 3: return leave(s, r0) default: oops() } } } -music_play__P168449.info = {"start":2835,"length":109,"line":110,"column":4,"endLine":112,"endColumn":5,"fileName":"pxt_modules/mixer/playable.ts","functionName":"play","argumentNames":["toPlay","playbackMode"]} +info_formatDecimal__P172376.info = {"start":38543,"length":156,"line":1258,"column":4,"endLine":1264,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"formatDecimal","argumentNames":["val"]} -function music_play__P168449_mk(s) { +function info_formatDecimal__P172376_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_play__P168449, depth: s.depth + 1, + parent: s, fn: info_formatDecimal__P172376, 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 music_Playable_play__P168441(s) { +function info_InfoState_constructor__P172320(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -34505,31 +33536,92 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, music_Playable__C168438_VT)) failedCast(r0); + if (!checkSubtype(r0, info_InfoState__C172319_VT)) failedCast(r0); + r0 = (s.arg0).fields["visibilityFlag"] = (8); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["playerStates"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = info_defaultHeartImage__P172370_mk(s); + s.callLocIdx = 895; s.pc = 7; return s.tmp_2; + case 7: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["heartImage"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim.image.ofBuffer(_hex185316); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["multiplierImage"] = (s.tmp_1); + r0 = pxsim_ImageMethods.isMono(globals.screen___168559); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = 0; + { step = 2; continue; } + case 1: + r0 = 1; + case 2: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = (s.arg0).fields["bgColor"] = (s.tmp_1); + r0 = pxsim_ImageMethods.isMono(globals.screen___168559); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = 1; + { step = 4; continue; } + case 3: + r0 = 3; + case 4: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = (s.arg0).fields["borderColor"] = (s.tmp_1); + r0 = pxsim_ImageMethods.isMono(globals.screen___168559); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + r0 = 1; + { step = 6; continue; } + case 5: + r0 = 3; + case 6: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = (s.arg0).fields["fontColor"] = (s.tmp_1); + r0 = (s.arg0).fields["countdownExpired"] = (undefined); + r0 = (s.arg0).fields["countdownEndHandler"] = (undefined); + r0 = (s.arg0).fields["gameEnd"] = (undefined); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["playerStates"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -music_Playable_play__P168441.info = {"start":1122,"length":68,"line":51,"column":8,"endLine":53,"endColumn":9,"fileName":"pxt_modules/mixer/playable.ts","functionName":"play","argumentNames":["this","playbackMode"]} +info_InfoState_constructor__P172320.info = {"start":1744,"length":674,"line":64,"column":8,"endLine":82,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["this"]} -function music_Playable_play__P168441_mk(s) { +function info_InfoState_constructor__P172320_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_Playable_play__P168441, depth: s.depth + 1, + parent: s, fn: info_InfoState_constructor__P172320, 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, } } +const _hex185316 = pxsim.BufferMethods.createBufferFromHex("87040500050000000100010010100000000100001010000001000100") -function helpers_arrayMap__P166633(s) { +function info_defaultHeartImage__P172370(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -34539,67 +33631,39 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.res___185353 = undefined; - s.len___185355 = undefined; - s.i___185358 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = pxsim_Array__mk(); - s.res___185353 = (r0); - r0 = pxsim_Array__length(s.arg0); - s.len___185355 = (r0); - s.i___185358 = (0); - case 1: - r0 = (s.i___185358 < s.len___185355); + r0 = pxsim_ImageMethods.isMono(globals.screen___168559); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.tmp_1 = r0 = s.res___185353; - s.tmp_3 = lambda_3_mk(s); - s.tmp_3.argL = s.arg1; - r0 = pxsim_Array__getAt(s.arg0, s.i___185358); - s.tmp_3.arg0 = r0; - s.tmp_3.arg1 = s.i___185358; - setupLambda(s.tmp_3, s.tmp_3.argL); - s.callLocIdx = 4; s.pc = 3; return s.tmp_3; - case 3: - r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_Array__push(s.tmp_1, s.tmp_2); - r0 = (s.i___185358 + 1); - s.i___185358 = (r0); - { step = 1; continue; } + if (!r0) { step = 1; continue; } + r0 = pxsim.image.ofBuffer(_hex185344); + { step = 2; continue; } + case 1: + r0 = pxsim.image.ofBuffer(_hex185346); case 2: - r0 = s.res___185353; + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = s.tmp_1; return leave(s, r0) default: oops() } } } -helpers_arrayMap__P166633.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"]} +info_defaultHeartImage__P172370.info = {"start":6093,"length":592,"line":187,"column":4,"endLine":208,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"defaultHeartImage","argumentNames":[]} -function helpers_arrayMap__P166633_mk(s) { +function info_defaultHeartImage__P172370_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arrayMap__P166633, depth: s.depth + 1, + parent: s, fn: info_defaultHeartImage__P172370, depth: s.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___185353: undefined, - len___185355: undefined, - i___185358: undefined, - arg0: undefined, - arg1: undefined, } } +const _hex185344 = pxsim.BufferMethods.createBufferFromHex("87040800070000001011000001000100010010001000000101001000010001001011000000000000") +const _hex185346 = pxsim.BufferMethods.createBufferFromHex("8704080007000000c0cc00002c220c002222c2002222220c20222202222422004222020020220000") -function game_setGameOverMessage__P169536(s) { +function game_GameOverConfig_setSound__P169520(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -34609,54 +33673,75 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.goc___185419 = 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; } - s.tmp_0 = game_init__P172465_mk(s); - s.tmp_0.arg0 = undefined; - s.callLocIdx = 1348; s.pc = 1; return s.tmp_0; + r0 = s.arg0; + if (!checkSubtype(r0, game_GameOverConfig__C169500_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(s.arg4); + 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.retval; - s.tmp_0 = lambda_1_mk(s); - s.tmp_0.argL = globals.gameOverConfig___169525; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 1349; s.pc = 2; return s.tmp_0; + r0 = s.arg0.fields["soundSetByUser"]; case 2: - r0 = s.retval; - s.goc___185419 = (r0); - s.tmp_0 = game_GameOverConfig_setMessage__P169523_mk(s); - s.tmp_0.arg0 = s.goc___185419; - s.tmp_0.arg1 = s.arg0; - s.tmp_0.arg2 = s.arg1; - s.tmp_0.arg3 = true; - s.callLocIdx = 1350; s.pc = 3; return s.tmp_0; + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 3; continue; } + { step = 9; continue; } case 3: - r0 = s.retval; + case 4: + r0 = pxsim_numops_toBoolDecr(s.arg1); + if (!r0) { step = 5; continue; } + r0 = (s.arg0).fields["winSound"] = (s.arg2); + r0 = (s.arg0).fields["winSoundLooping"] = (s.arg3); + { step = 6; continue; } + case 5: + r0 = (s.arg0).fields["loseSound"] = (s.arg2); + r0 = (s.arg0).fields["loseSoundLooping"] = (s.arg3); + case 6: + r0 = pxsim_numops_toBoolDecr(s.arg4); + if (!r0) { step = 7; continue; } + r0 = (s.arg0).fields["soundSetByUser"] = (true); + case 7: + case 8: + case 9: r0 = undefined; return leave(s, r0) default: oops() } } } -game_setGameOverMessage__P169536.info = {"start":9455,"length":176,"line":289,"column":4,"endLine":293,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"setGameOverMessage","argumentNames":["win","message"]} +game_GameOverConfig_setSound__P169520.info = {"start":2303,"length":440,"line":72,"column":8,"endLine":82,"endColumn":9,"fileName":"pxt_modules/game/game.ts","functionName":"setSound","argumentNames":["this","win","sound","looping","explicit"]} -function game_setGameOverMessage__P169536_mk(s) { +function game_GameOverConfig_setSound__P169520_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_setGameOverMessage__P169536, depth: s.depth + 1, + parent: s, fn: game_GameOverConfig_setSound__P169520, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - goc___185419: undefined, + tmp_1: undefined, + tmp_2: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, } } -function game_GameOverConfig_setMessage__P169523(s) { +function game_GameOverConfig_setEffect__P169518(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -34684,7 +33769,7 @@ switch (step) { r0 = s.tmp_0; { step = 2; continue; } case 1: - r0 = s.arg0.fields["messageSetByUser"]; + r0 = s.arg0.fields["effectSetByUser"]; case 2: // jmp value (already in r0) s.tmp_2 = r0; @@ -34695,14 +33780,14 @@ switch (step) { case 4: r0 = pxsim_numops_toBoolDecr(s.arg1); if (!r0) { step = 5; continue; } - r0 = (s.arg0).fields["winMessage"] = (s.arg2); + r0 = (s.arg0).fields["winEffect"] = (s.arg2); { step = 6; continue; } case 5: - r0 = (s.arg0).fields["loseMessage"] = (s.arg2); + r0 = (s.arg0).fields["loseEffect"] = (s.arg2); case 6: r0 = pxsim_numops_toBoolDecr(s.arg3); if (!r0) { step = 7; continue; } - r0 = (s.arg0).fields["messageSetByUser"] = (true); + r0 = (s.arg0).fields["effectSetByUser"] = (true); case 7: case 8: case 9: @@ -34710,12 +33795,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -game_GameOverConfig_setMessage__P169523.info = {"start":2974,"length":281,"line":90,"column":8,"endLine":95,"endColumn":9,"fileName":"pxt_modules/game/game.ts","functionName":"setMessage","argumentNames":["this","win","message","explicit"]} +game_GameOverConfig_setEffect__P169518.info = {"start":1899,"length":291,"line":62,"column":8,"endLine":67,"endColumn":9,"fileName":"pxt_modules/game/game.ts","functionName":"setEffect","argumentNames":["this","win","effect","explicit"]} -function game_GameOverConfig_setMessage__P169523_mk(s) { +function game_GameOverConfig_setEffect__P169518_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_GameOverConfig_setMessage__P169523, depth: s.depth + 1, + parent: s, fn: game_GameOverConfig_setEffect__P169518, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -34730,7 +33815,7 @@ function game_GameOverConfig_setMessage__P169523_mk(s) { -function sprites_onOverlap__P168985(s) { +function info_PlayerInfo_constructor__P169146(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -34740,163 +33825,53 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sc___185458 = undefined; - s.overlapHandlers___185461 = undefined; - s.overlapMap___185464 = undefined; - s.associate___185467 = 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 == 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 == undefined); - case 2: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBool(s.tmp_1); - if (!r0) { step = 3; continue; } - r0 = s.tmp_1; - { step = 4; continue; } - case 3: - r0 = pxsim_numops_toBoolDecr(s.arg2); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); - case 4: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 5; continue; } - { step = 7; continue; } - case 5: - case 6: - s.tmp_4 = game_currentScene__P169526_mk(s); - s.callLocIdx = 619; s.pc = 8; return s.tmp_4; - case 8: - r0 = s.retval; - s.sc___185458 = (r0); - r0 = s.sc___185458.fields["overlapHandlers"]; - s.overlapHandlers___185461 = (r0); - r0 = s.sc___185458.fields["overlapMap"]; - s.overlapMap___185464 = (r0); - r0 = pxsim_pxtcore_mkAction(1, associate__P185467); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.overlapMap___185464); - s.associate___185467 = (s.tmp_0); - s.tmp_1 = lambda_3_mk(s); - s.tmp_1.argL = s.associate___185467; - s.tmp_1.arg0 = s.arg0; - s.tmp_1.arg1 = s.arg1; - setupLambda(s.tmp_1, s.tmp_1.argL); - s.callLocIdx = 620; s.pc = 9; return s.tmp_1; - case 9: - r0 = s.retval; - s.tmp_0 = lambda_3_mk(s); - s.tmp_0.argL = s.associate___185467; - s.tmp_0.arg0 = s.arg1; - s.tmp_0.arg1 = s.arg0; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 621; s.pc = 10; return s.tmp_0; - case 10: - r0 = s.retval; - r0 = pxsim_pxtcore_mkClassInstance(scene_OverlapHandler__C169341_VT); + r0 = s.arg0; + if (!checkSubtype(r0, info_PlayerInfo__C169144_VT)) failedCast(r0); + r0 = (s.arg0).fields["_player"] = (s.arg1); + r0 = pxsim_pxtcore_mkClassInstance(info_PlayerInfoImpl__C169122_VT); s.tmp_0 = r0; - s.tmp_1 = scene_OverlapHandler_constructor__P169342_mk(s); + s.tmp_1 = info_PlayerInfoImpl_constructor__P169130_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.arg2; - s.callLocIdx = 622; s.pc = 11; return s.tmp_1; - case 11: + s.tmp_1.arg1 = s.arg1; + s.callLocIdx = 968; s.pc = 3; return s.tmp_1; + case 3: r0 = s.retval; - r0 = pxsim_Array__push(s.overlapHandlers___185461, s.tmp_0); - case 7: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -sprites_onOverlap__P168985.info = {"start":1603,"length":755,"line":50,"column":4,"endLine":74,"endColumn":5,"fileName":"pxt_modules/game/spriteevents.ts","functionName":"onOverlap","argumentNames":["kind","otherKind","handler"]} - -function sprites_onOverlap__P168985_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: sprites_onOverlap__P168985, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - sc___185458: undefined, - overlapHandlers___185461: undefined, - overlapMap___185464: undefined, - associate___185467: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, -} } - - - - - -function associate__P185467(s) { -let r0 = s.r0, 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_pxtrt.mapGetGeneric(s.caps[0], s.arg0); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + r0 = (s.arg0).fields["impl"] = (s.tmp_0); + r0 = pxsim_numops_toBoolDecr(globals.players___172323); 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.caps[0]; - s.tmp_4 = r0 = s.arg0; r0 = pxsim_Array__mk(); - s.tmp_5 = r0; - r0 = pxsim_pxtrt.mapSetGeneric(s.tmp_3, s.tmp_4, s.tmp_5); + globals.players___172323 = (r0); case 1: case 2: - r0 = pxsim_pxtrt.mapGetGeneric(s.caps[0], s.arg0); - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.arg1); + s.tmp_0 = r0 = globals.players___172323; + r0 = s.arg0.fields["_player"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 - 1); + s.tmp_1 = r0; + r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_1, s.arg0); r0 = undefined; return leave(s, r0) default: oops() } } } -associate__P185467.info = {"start":1940,"length":172,"line":56,"column":8,"endLine":62,"endColumn":9,"fileName":"pxt_modules/game/spriteevents.ts","functionName":"associate","argumentNames":["a","b"]} +info_PlayerInfo_constructor__P169146.info = {"start":25003,"length":213,"line":804,"column":8,"endLine":810,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["this","player"]} -function associate__P185467_mk(s) { +function info_PlayerInfo_constructor__P169146_mk(s) { checkStack(s.depth); return { - parent: s, fn: associate__P185467, depth: s.depth + 1, + parent: s, fn: info_PlayerInfo_constructor__P169146, depth: s.depth + 1, pc: 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, } } @@ -34905,7 +33880,7 @@ function associate__P185467_mk(s) { -function scene_OverlapHandler_constructor__P169342(s) { +function info_PlayerInfoImpl_constructor__P169130(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -34918,149 +33893,134 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_OverlapHandler__C169341_VT)) failedCast(r0); - r0 = (s.arg0).fields["kind"] = (s.arg1); - r0 = (s.arg0).fields["otherKind"] = (s.arg2); - r0 = (s.arg0).fields["handler"] = (s.arg3); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -scene_OverlapHandler_constructor__P169342.info = {"start":655,"length":171,"line":22,"column":8,"endLine":26,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":["this","kind","otherKind","handler"]} - -function scene_OverlapHandler_constructor__P169342_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: scene_OverlapHandler_constructor__P169342, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, -} } - - - - - -function tiles_createTilemap__P169289(s) { -let r0 = s.r0, 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 = pxsim_pxtcore_mkClassInstance(tiles_TileMapData__C169244_VT); + if (!checkSubtype(r0, info_PlayerInfoImpl__C169122_VT)) failedCast(r0); + r0 = (s.arg0).fields["_player"] = (s.arg1); + r0 = (s.arg0).fields["border"] = (1); + r0 = (s.arg0).fields["fc"] = (1); + r0 = (s.arg0).fields["left"] = (undefined); + r0 = (s.arg0).fields["up"] = (undefined); + r0 = s.arg0.fields["_player"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 === 1); s.tmp_0 = r0; - s.tmp_1 = tiles_TileMapData_constructor__P169245_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.arg2; - s.tmp_1.arg4 = s.arg3; - s.callLocIdx = 1100; s.pc = 1; return s.tmp_1; - case 1: - r0 = s.retval; - r0 = s.tmp_0; - return leave(s, r0) - default: oops() -} } } -tiles_createTilemap__P169289.info = {"start":18693,"length":170,"line":587,"column":4,"endLine":589,"endColumn":5,"fileName":"pxt_modules/game/tilemap.ts","functionName":"createTilemap","argumentNames":["data","layer","tiles","scale"]} - -function tiles_createTilemap__P169289_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_createTilemap__P169289, 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 tiles_TileMapData_constructor__P169245(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMapData__C169244_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__P169249_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg4; - s.callLocIdx = 1028; s.pc = 1; return s.tmp_0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = pxsim_ImageMethods.isMono(globals.screen___168559); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 1; continue; } + r0 = 0; + { step = 2; continue; } case 1: - r0 = s.retval; + r0 = 2; + case 2: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = (s.arg0).fields["bg"] = (s.tmp_3); + r0 = (s.arg0).fields["x"] = (0); + r0 = (s.arg0).fields["y"] = (0); + { step = 14; continue; } + case 3: + r0 = (s.arg1 === 2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 6; continue; } + r0 = pxsim_ImageMethods.isMono(globals.screen___168559); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 4; continue; } + r0 = 0; + { step = 5; continue; } + case 4: + r0 = 8; + case 5: + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = (s.arg0).fields["bg"] = (s.tmp_2); s.tmp_0 = r0 = s.arg0; - r0 = pxsim.BufferMethods.getNumber(s.arg1, 4, 0); + r0 = pxsim_ImageMethods.width(globals.screen___168559); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_width"] = (s.tmp_1); + r0 = (s.tmp_0).fields["x"] = (s.tmp_1); + r0 = (s.arg0).fields["y"] = (0); + r0 = (s.arg0).fields["left"] = (true); + { step = 13; continue; } + case 6: + r0 = (s.arg1 === 3); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 9; continue; } + r0 = pxsim_ImageMethods.isMono(globals.screen___168559); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 7; continue; } + r0 = 0; + { step = 8; continue; } + case 7: + r0 = 4; + case 8: + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = (s.arg0).fields["bg"] = (s.tmp_2); + r0 = (s.arg0).fields["x"] = (0); s.tmp_0 = r0 = s.arg0; - r0 = pxsim.BufferMethods.getNumber(s.arg1, 4, 2); + r0 = pxsim_ImageMethods.height(globals.screen___168559); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_height"] = (s.tmp_1); + r0 = (s.tmp_0).fields["y"] = (s.tmp_1); + r0 = (s.arg0).fields["up"] = (true); + { step = 12; continue; } + case 9: + r0 = pxsim_ImageMethods.isMono(globals.screen___168559); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 10; continue; } + r0 = 0; + { step = 11; continue; } + case 10: + r0 = 7; + case 11: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = (s.arg0).fields["bg"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_ImageMethods.width(globals.screen___168559); + 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___168559); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["y"] = (s.tmp_1); + r0 = (s.arg0).fields["left"] = (true); + r0 = (s.arg0).fields["up"] = (true); + case 12: + case 13: + case 14: r0 = undefined; return leave(s, r0) default: oops() } } } -tiles_TileMapData_constructor__P169245.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"]} +info_PlayerInfoImpl_constructor__P169130.info = {"start":19832,"length":1116,"line":642,"column":8,"endLine":672,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["this","player"]} -function tiles_TileMapData_constructor__P169245_mk(s) { +function info_PlayerInfoImpl_constructor__P169130_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMapData_constructor__P169245, depth: s.depth + 1, + parent: s, fn: info_PlayerInfoImpl_constructor__P169130, depth: s.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 helpers_stringTrim__P166650(s) { +function info_PlayerInfo_drawLives__P169184(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -35070,86 +34030,308 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.start___185565 = undefined; - s.end___185566 = undefined; + s.state___184555 = undefined; + s.font___184561 = undefined; + s.i___184604 = undefined; + s.num___184626 = undefined; + s.textWidth___184633 = undefined; + s.mult___184685 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.start___185565 = (0); - r0 = pxsim_String_.length(s.arg0); + r0 = s.arg0; + if (!checkSubtype(r0, info_PlayerInfo__C169144_VT)) failedCast(r0); + s.tmp_0 = info_PlayerInfo_getState__P169170_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 998; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + s.state___184555 = (r0); + r0 = s.state___184555.fields["life"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 < 0); s.tmp_0 = r0; - r0 = (s.tmp_0 - 1); - s.end___185566 = (r0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + { step = 7; continue; } case 1: - r0 = (s.start___185565 <= s.end___185566); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 2; continue; } - r0 = s.tmp_0; - { step = 3; continue; } case 2: - s.tmp_1 = helpers_isWhitespace__P166651_mk(s); - r0 = pxsim_String_.charCodeAt(s.arg0, s.start___185565); - s.tmp_1.arg0 = r0; - s.callLocIdx = 23; s.pc = 9; return s.tmp_1; + s.font___184561 = (globals.font8___168502); + r0 = s.state___184555.fields["life"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 <= 4); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + s.tmp_2 = helpers_imageFillRect__P168483_mk(s); + s.tmp_2.arg0 = globals.screen___168559; + s.tmp_2.arg1 = 0; + s.tmp_2.arg2 = 0; + r0 = s.state___184555.fields["life"]; + s.tmp_4 = r0; + r0 = globals.infoState___172322.fields["heartImage"]; + s.tmp_7 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_7); + s.tmp_6 = r0; + r0 = (s.tmp_6 + 1); + s.tmp_5 = r0; + r0 = (s.tmp_4 * s.tmp_5); + s.tmp_3 = r0; + r0 = (s.tmp_3 + 3); + s.tmp_2.arg3 = r0; + r0 = globals.infoState___172322.fields["heartImage"]; + s.tmp_9 = r0; + r0 = pxsim_ImageMethods.height(s.tmp_9); + s.tmp_8 = r0; + r0 = (s.tmp_8 + 4); + s.tmp_2.arg4 = r0; + r0 = globals.infoState___172322.fields["borderColor"]; + s.tmp_2.arg5 = r0; + s.callLocIdx = 999; s.pc = 9; return s.tmp_2; case 9: r0 = s.retval; - case 3: - // jmp value (already in r0) + s.tmp_0 = helpers_imageFillRect__P168483_mk(s); + s.tmp_0.arg0 = globals.screen___168559; + s.tmp_0.arg1 = 0; + s.tmp_0.arg2 = 0; + r0 = s.state___184555.fields["life"]; s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + r0 = globals.infoState___172322.fields["heartImage"]; + s.tmp_5 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_5); + s.tmp_4 = r0; + r0 = (s.tmp_4 + 1); + s.tmp_3 = r0; + r0 = (s.tmp_2 * s.tmp_3); + s.tmp_1 = r0; + r0 = (s.tmp_1 + 2); + s.tmp_0.arg3 = r0; + r0 = globals.infoState___172322.fields["heartImage"]; + s.tmp_7 = r0; + r0 = pxsim_ImageMethods.height(s.tmp_7); + s.tmp_6 = r0; + r0 = (s.tmp_6 + 3); + s.tmp_0.arg4 = r0; + r0 = globals.infoState___172322.fields["bgColor"]; + s.tmp_0.arg5 = r0; + s.callLocIdx = 1000; s.pc = 10; return s.tmp_0; + case 10: + r0 = s.retval; + s.i___184604 = (0); + case 3: + r0 = s.state___184555.fields["life"]; + s.tmp_1 = r0; + r0 = (s.i___184604 < s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 4; continue; } - r0 = (s.start___185565 + 1); - s.start___185565 = (r0); - { step = 1; continue; } + s.tmp_2 = r0 = globals.screen___168559; + r0 = globals.infoState___172322.fields["heartImage"]; + s.tmp_3 = r0; + s.tmp_6 = r0 = s.i___184604; + r0 = globals.infoState___172322.fields["heartImage"]; + s.tmp_9 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_9); + s.tmp_8 = r0; + r0 = (s.tmp_8 + 1); + s.tmp_7 = r0; + r0 = (s.tmp_6 * s.tmp_7); + s.tmp_5 = r0; + r0 = (1 + s.tmp_5); + s.tmp_4 = r0; + r0 = pxsim_ImageMethods.drawTransparentImage(s.tmp_2, s.tmp_3, s.tmp_4, 1); + r0 = (s.i___184604 + 1); + s.i___184604 = (r0); + { step = 3; continue; } case 4: + { step = 6; continue; } case 5: - r0 = (s.end___185566 > s.start___185565); + r0 = s.state___184555.fields["life"]; + s.tmp_1 = r0; + if ((s.tmp_1) && (s.tmp_1).vtable) { + setupResume(s, 11); + pxsim_String__stringConv(s.tmp_1); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_1) + ""; } + case 11: + 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_1 = helpers_isWhitespace__P166651_mk(s); - r0 = pxsim_String_.charCodeAt(s.arg0, s.end___185566); - s.tmp_1.arg0 = r0; - s.callLocIdx = 24; s.pc = 10; return s.tmp_1; - case 10: + r0 = pxsim_String_.mkEmpty(); + s.tmp_2 = r0; + r0 = pxsim_String__concat(s.tmp_0, s.tmp_2); + s.num___184626 = (r0); + r0 = pxsim_String_.length(s.num___184626); + s.tmp_1 = r0; + s.tmp_3 = if_charWidth_1_mk(s); + s.tmp_3.arg0 = s.font___184561; + if (!s.tmp_3.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "charWidth"); + } else { + s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["charWidth"]; + if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["charWidth"]; } + else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } + else { s.callLocIdx = 1001; s.pc = 12; return s.tmp_3; } + } + case 12: r0 = s.retval; - case 7: - // jmp value (already in r0) s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 8; continue; } - r0 = (s.end___185566 - 1); - s.end___185566 = (r0); - { step = 5; continue; } - case 8: - s.tmp_0 = helpers_stringSlice__P166646_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.start___185565; - r0 = (s.end___185566 + 1); + r0 = (s.tmp_1 * s.tmp_2); + s.tmp_0 = r0; + r0 = (s.tmp_0 - 1); + s.textWidth___184633 = (r0); + s.tmp_0 = helpers_imageFillRect__P168483_mk(s); + s.tmp_0.arg0 = globals.screen___168559; + s.tmp_0.arg1 = 0; + s.tmp_0.arg2 = 0; + r0 = globals.infoState___172322.fields["heartImage"]; + s.tmp_4 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_4); + s.tmp_3 = r0; + r0 = globals.infoState___172322.fields["multiplierImage"]; + s.tmp_6 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_6); + s.tmp_5 = r0; + r0 = (s.tmp_3 + s.tmp_5); + s.tmp_2 = r0; + r0 = (s.tmp_2 + s.textWidth___184633); + s.tmp_1 = r0; + r0 = (s.tmp_1 + 5); + s.tmp_0.arg3 = r0; + r0 = globals.infoState___172322.fields["heartImage"]; + s.tmp_8 = r0; + r0 = pxsim_ImageMethods.height(s.tmp_8); + s.tmp_7 = r0; + r0 = (s.tmp_7 + 4); + s.tmp_0.arg4 = r0; + r0 = globals.infoState___172322.fields["borderColor"]; + s.tmp_0.arg5 = r0; + s.callLocIdx = 1002; s.pc = 13; return s.tmp_0; + case 13: + r0 = s.retval; + s.tmp_0 = helpers_imageFillRect__P168483_mk(s); + s.tmp_0.arg0 = globals.screen___168559; + s.tmp_0.arg1 = 0; + s.tmp_0.arg2 = 0; + r0 = globals.infoState___172322.fields["heartImage"]; + s.tmp_4 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_4); + s.tmp_3 = r0; + r0 = globals.infoState___172322.fields["multiplierImage"]; + s.tmp_6 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_6); + s.tmp_5 = r0; + r0 = (s.tmp_3 + s.tmp_5); + s.tmp_2 = r0; + r0 = (s.tmp_2 + s.textWidth___184633); + s.tmp_1 = r0; + r0 = (s.tmp_1 + 4); + s.tmp_0.arg3 = r0; + r0 = globals.infoState___172322.fields["heartImage"]; + s.tmp_8 = r0; + r0 = pxsim_ImageMethods.height(s.tmp_8); + s.tmp_7 = r0; + r0 = (s.tmp_7 + 3); + s.tmp_0.arg4 = r0; + r0 = globals.infoState___172322.fields["bgColor"]; + s.tmp_0.arg5 = r0; + s.callLocIdx = 1003; s.pc = 14; return s.tmp_0; + case 14: + r0 = s.retval; + r0 = globals.infoState___172322.fields["heartImage"]; + s.tmp_0 = r0; + r0 = pxsim_ImageMethods.drawTransparentImage(globals.screen___168559, s.tmp_0, 1, 1); + r0 = globals.infoState___172322.fields["multiplierImage"]; + s.tmp_0 = r0; + r0 = pxsim_ImageMethods.clone(s.tmp_0); + s.mult___184685 = (r0); + r0 = globals.infoState___172322.fields["fontColor"]; + s.tmp_0 = r0; + r0 = pxsim_ImageMethods.replace(s.mult___184685, 1, s.tmp_0); + s.tmp_0 = r0 = globals.screen___168559; + s.tmp_1 = r0 = s.mult___184685; + r0 = globals.infoState___172322.fields["heartImage"]; + s.tmp_4 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_4); + s.tmp_3 = r0; + r0 = (s.tmp_3 + 2); + s.tmp_2 = r0; + s.tmp_8 = if_charHeight_1_mk(s); + s.tmp_8.arg0 = s.font___184561; + 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 = 1004; s.pc = 15; return s.tmp_8; } + } + case 15: + r0 = s.retval; + s.tmp_7 = r0; + r0 = globals.infoState___172322.fields["multiplierImage"]; + s.tmp_10 = r0; + r0 = pxsim_ImageMethods.height(s.tmp_10); + 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 = pxsim_ImageMethods.drawTransparentImage(s.tmp_0, s.tmp_1, s.tmp_2, s.tmp_5); + s.tmp_0 = helpers_imagePrint__P168517_mk(s); + s.tmp_0.arg0 = globals.screen___168559; + s.tmp_0.arg1 = s.num___184626; + r0 = globals.infoState___172322.fields["heartImage"]; + s.tmp_3 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_3); + s.tmp_2 = r0; + r0 = (s.tmp_2 + 3); + s.tmp_1 = r0; + r0 = globals.infoState___172322.fields["multiplierImage"]; + s.tmp_5 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_5); + s.tmp_4 = r0; + r0 = (s.tmp_1 + s.tmp_4); s.tmp_0.arg2 = r0; - s.callLocIdx = 25; s.pc = 11; return s.tmp_0; - case 11: + s.tmp_0.arg3 = 1; + r0 = globals.infoState___172322.fields["fontColor"]; + s.tmp_0.arg4 = r0; + s.tmp_0.arg5 = s.font___184561; + s.tmp_0.arg6 = undefined; + s.callLocIdx = 1005; s.pc = 16; return s.tmp_0; + case 16: r0 = s.retval; + case 6: + case 7: + r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_stringTrim__P166650.info = {"start":14539,"length":319,"line":491,"column":4,"endLine":501,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"stringTrim","argumentNames":["s"]} +info_PlayerInfo_drawLives__P169184.info = {"start":36073,"length":2458,"line":1189,"column":8,"endLine":1255,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"drawLives","argumentNames":["this"]} -function helpers_stringTrim__P166650_mk(s) { +function info_PlayerInfo_drawLives__P169184_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_stringTrim__P166650, depth: s.depth + 1, + parent: s, fn: info_PlayerInfo_drawLives__P169184, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - start___185565: undefined, - end___185566: 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, + state___184555: undefined, + font___184561: undefined, + i___184604: undefined, + num___184626: undefined, + textWidth___184633: undefined, + mult___184685: undefined, arg0: undefined, } } @@ -35157,7 +34339,7 @@ function helpers_stringTrim__P166650_mk(s) { -function helpers_isWhitespace__P166651(s) { +function info_PlayerInfo_getState__P169170(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -35171,57 +34353,33 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_pxtcore.switch_eq(9, s.tmp_0); - if (r0) { step = 1; continue; } - r0 = pxsim_pxtcore.switch_eq(11, s.tmp_0); - if (r0) { step = 2; continue; } - r0 = pxsim_pxtcore.switch_eq(12, s.tmp_0); - if (r0) { step = 3; continue; } - r0 = pxsim_pxtcore.switch_eq(32, s.tmp_0); - if (r0) { step = 4; continue; } - r0 = pxsim_pxtcore.switch_eq(160, s.tmp_0); - if (r0) { step = 5; continue; } - r0 = pxsim_pxtcore.switch_eq(65279, s.tmp_0); - if (r0) { step = 6; continue; } - r0 = pxsim_pxtcore.switch_eq(10, s.tmp_0); - if (r0) { step = 7; continue; } - r0 = pxsim_pxtcore.switch_eq(13, s.tmp_0); - if (r0) { step = 8; continue; } - r0 = pxsim_pxtcore.switch_eq(8232, s.tmp_0); - if (r0) { step = 9; continue; } - r0 = pxsim_pxtcore.switch_eq(8233, s.tmp_0); - if (r0) { step = 10; continue; } - r0 = s.tmp_0; - { step = 11; continue; } + r0 = s.arg0; + if (!checkSubtype(r0, info_PlayerInfo__C169144_VT)) failedCast(r0); + s.tmp_0 = info_PlayerInfo_init__P172375_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 972; s.pc = 1; return s.tmp_0; case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - r0 = true; - { step = 12; continue; } - case 11: - r0 = false; - { step = 12; continue; } - r0 = undefined; - case 12: + r0 = s.retval; + r0 = globals.infoState___172322.fields["playerStates"]; + s.tmp_0 = r0; + r0 = s.arg0.fields["_player"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 - 1); + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); return leave(s, r0) default: oops() } } } -helpers_isWhitespace__P166651.info = {"start":14864,"length":674,"line":503,"column":4,"endLine":520,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"isWhitespace","argumentNames":["c"]} +info_PlayerInfo_getState__P169170.info = {"start":27499,"length":121,"line":915,"column":8,"endLine":918,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"getState","argumentNames":["this"]} -function helpers_isWhitespace__P166651_mk(s) { +function info_PlayerInfo_getState__P169170_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_isWhitespace__P166651, depth: s.depth + 1, + parent: s, fn: info_PlayerInfo_getState__P169170, 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, } } @@ -35229,7 +34387,7 @@ function helpers_isWhitespace__P166651_mk(s) { -function helpers__registerFactory__P169859(s) { +function info_PlayerInfo_init__P172375(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -35241,46 +34399,86 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(globals.factories___172876); + r0 = s.arg0; + if (!checkSubtype(r0, info_PlayerInfo__C169144_VT)) failedCast(r0); + s.tmp_0 = info_initHUD__P172368_mk(s); + s.callLocIdx = 969; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + r0 = s.arg0.fields["_player"]; s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = (s.tmp_1 > 1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = pxsim_Array__mk(); - globals.factories___172876 = (r0); + s.tmp_2 = info_initMultiHUD__P172369_mk(s); + s.callLocIdx = 970; s.pc = 6; return s.tmp_2; + case 6: + r0 = s.retval; case 1: case 2: - r0 = pxsim_pxtrt.mkMap(); + r0 = globals.infoState___172322.fields["playerStates"]; + s.tmp_3 = r0; + r0 = s.arg0.fields["_player"]; + s.tmp_5 = r0; + r0 = (s.tmp_5 - 1); + s.tmp_4 = r0; + r0 = pxsim_Array__getAt(s.tmp_3, s.tmp_4); + 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.mapSetByString(s.tmp_0, "kind", s.arg0); - r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "factory", s.arg1); - r0 = pxsim_Array__push(globals.factories___172876, s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = pxsim_pxtcore_mkClassInstance(info_PlayerState__C169080_VT); + s.tmp_6 = r0; + s.tmp_7 = info_PlayerState_constructor__P169089_mk(s); + s.tmp_7.arg0 = s.tmp_6; + s.callLocIdx = 971; s.pc = 7; return s.tmp_7; + case 7: + r0 = s.retval; + r0 = globals.infoState___172322.fields["playerStates"]; + s.tmp_8 = r0; + r0 = s.arg0.fields["_player"]; + s.tmp_10 = r0; + r0 = (s.tmp_10 - 1); + s.tmp_9 = r0; + r0 = pxsim_Array_.setAt(s.tmp_8, s.tmp_9, s.tmp_6); + case 3: + case 4: r0 = undefined; return leave(s, r0) default: oops() } } } -helpers__registerFactory__P169859.info = {"start":2019,"length":201,"line":58,"column":4,"endLine":64,"endColumn":5,"fileName":"pxt_modules/game/assetTemplates.ts","functionName":"_registerFactory","argumentNames":["kind","factory"]} +info_PlayerInfo_init__P172375.info = {"start":25226,"length":252,"line":812,"column":8,"endLine":818,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"init","argumentNames":["this"]} -function helpers__registerFactory__P169859_mk(s) { +function info_PlayerInfo_init__P172375_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers__registerFactory__P169859, depth: s.depth + 1, + parent: s, fn: info_PlayerInfo_init__P172375, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, arg0: undefined, - arg1: undefined, } } -function helpers_arrayForEach__P166636(s) { +function info_PlayerInfo_drawScore__P169183(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -35290,58 +34488,162 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.len___185618 = undefined; - s.i___185621 = undefined; + s.s___184770 = undefined; + s.font___184776 = undefined; + s.offsetY___184777 = undefined; + s.num___184786 = undefined; + s.width___184790 = 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___185618 = (r0); - s.i___185621 = (0); - case 1: - r0 = (s.i___185621 < s.len___185618); - 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___185621); + r0 = s.arg0; + if (!checkSubtype(r0, info_PlayerInfo__C169144_VT)) failedCast(r0); + s.tmp_1 = info_PlayerInfoImpl_score__P169133_mk(s); + r0 = s.arg0.fields["impl"]; s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.i___185621; - setupLambda(s.tmp_1, s.tmp_1.argL); - s.callLocIdx = 6; s.pc = 3; return s.tmp_1; + s.callLocIdx = 991; s.pc = 3; return s.tmp_1; case 3: r0 = s.retval; - r0 = (s.i___185621 + 1); - s.i___185621 = (r0); - { step = 1; continue; } + s.tmp_0 = r0; + r0 = (s.tmp_0 | 0); + s.s___184770 = (r0); + r0 = (s.s___184770 >= 1000000); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.offsetY___184777 = (2); + s.font___184776 = (globals.font5___168507); + { step = 2; continue; } + case 1: + s.offsetY___184777 = (1); + s.font___184776 = (globals.font8___168502); case 2: + r0 = pxsim_numops.toString(s.s___184770); + s.num___184786 = (r0); + r0 = pxsim_String_.length(s.num___184786); + s.tmp_0 = r0; + s.tmp_2 = if_charWidth_1_mk(s); + s.tmp_2.arg0 = s.font___184776; + 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 = 992; s.pc = 4; return s.tmp_2; } + } + case 4: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0 * s.tmp_1); + s.width___184790 = (r0); + s.tmp_0 = helpers_imageFillRect__P168483_mk(s); + s.tmp_0.arg0 = globals.screen___168559; + r0 = pxsim_ImageMethods.width(globals.screen___168559); + s.tmp_2 = r0; + r0 = (s.tmp_2 - s.width___184790); + s.tmp_1 = r0; + r0 = (s.tmp_1 - 2); + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = 0; + r0 = pxsim_ImageMethods.width(globals.screen___168559); + s.tmp_0.arg3 = r0; + s.tmp_4 = if_charHeight_1_mk(s); + s.tmp_4.arg0 = globals.font8___168502; + 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 = 993; s.pc = 6; return s.tmp_4; } + } + case 6: + r0 = s.retval; + s.tmp_3 = r0; + r0 = (s.tmp_3 + 3); + s.tmp_0.arg4 = r0; + r0 = globals.infoState___172322.fields["borderColor"]; + s.tmp_0.arg5 = r0; + s.callLocIdx = 994; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.tmp_0 = helpers_imageFillRect__P168483_mk(s); + s.tmp_0.arg0 = globals.screen___168559; + r0 = pxsim_ImageMethods.width(globals.screen___168559); + s.tmp_2 = r0; + r0 = (s.tmp_2 - s.width___184790); + s.tmp_1 = r0; + r0 = (s.tmp_1 - 1); + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = 0; + r0 = pxsim_ImageMethods.width(globals.screen___168559); + s.tmp_0.arg3 = r0; + s.tmp_4 = if_charHeight_1_mk(s); + s.tmp_4.arg0 = globals.font8___168502; + 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 = 995; s.pc = 8; return s.tmp_4; } + } + case 8: + r0 = s.retval; + s.tmp_3 = r0; + r0 = (s.tmp_3 + 2); + s.tmp_0.arg4 = r0; + r0 = globals.infoState___172322.fields["bgColor"]; + s.tmp_0.arg5 = r0; + s.callLocIdx = 996; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + s.tmp_0 = helpers_imagePrint__P168517_mk(s); + s.tmp_0.arg0 = globals.screen___168559; + s.tmp_0.arg1 = s.num___184786; + r0 = pxsim_ImageMethods.width(globals.screen___168559); + s.tmp_1 = r0; + r0 = (s.tmp_1 - s.width___184790); + s.tmp_0.arg2 = r0; + s.tmp_0.arg3 = s.offsetY___184777; + r0 = globals.infoState___172322.fields["fontColor"]; + s.tmp_0.arg4 = r0; + s.tmp_0.arg5 = s.font___184776; + s.tmp_0.arg6 = undefined; + s.callLocIdx = 997; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_arrayForEach__P166636.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"]} +info_PlayerInfo_drawScore__P169183.info = {"start":35010,"length":1053,"line":1149,"column":8,"endLine":1187,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"drawScore","argumentNames":["this"]} -function helpers_arrayForEach__P166636_mk(s) { +function info_PlayerInfo_drawScore__P169183_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arrayForEach__P166636, depth: s.depth + 1, + parent: s, fn: info_PlayerInfo_drawScore__P169183, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - len___185618: undefined, - i___185621: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + s___184770: undefined, + font___184776: undefined, + offsetY___184777: undefined, + num___184786: undefined, + width___184790: undefined, arg0: undefined, - arg1: undefined, } } -function imagesFlipX__P171847(s) { +function info_PlayerInfo_drawPlayer__P169182(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -35351,336 +34653,621 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.state___184968 = undefined; + s.font___184971 = undefined; + s.score___184973 = undefined; + s.life___184974 = undefined; + s.height___184975 = undefined; + s.scoreWidth___184976 = undefined; + s.lifeWidth___184977 = undefined; + s.offsetY___184980 = undefined; + s.showScore___184981 = undefined; + s.showLife___184989 = undefined; + s.width___185057 = undefined; + s.x___185067 = undefined; + s.y___185076 = undefined; + s.bump___185113 = undefined; + s.xLoc___185140 = undefined; + s.mult___185152 = undefined; + s.pNum___185216 = undefined; + s.iconWidth___185223 = undefined; + s.iconHeight___185231 = undefined; + s.iconX___185239 = undefined; + s.iconY___185252 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = pxsim_pxtcore_mkAction(1, imagesFlipX_inline__P185728); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = helpers_arrayForEach__P166636_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 2083; s.pc = 1; return s.tmp_1; - case 1: + r0 = s.arg0; + if (!checkSubtype(r0, info_PlayerInfo__C169144_VT)) failedCast(r0); + s.tmp_0 = info_PlayerInfo_getState__P169170_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 974; s.pc = 43; return s.tmp_0; + case 43: r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -imagesFlipX__P171847.info = {"start":5260,"length":204,"line":99,"column":0,"endLine":104,"endColumn":1,"fileName":"pxt_modules/pxt-raycasting/animation.ts","functionName":"imagesFlipX","argumentNames":["ani"]} - -function imagesFlipX__P171847_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: imagesFlipX__P171847, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, -} } - - - - - -function imagesFlipX_inline__P185728(s) { -let r0 = s.r0, 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 = r0 = s.caps[0]; - s.tmp_1 = r0 = s.arg1; - r0 = pxsim_ImageMethods.clone(s.arg0); - s.tmp_2 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_1, s.tmp_2); - r0 = pxsim_Array__getAt(s.caps[0], s.arg1); + s.state___184968 = (r0); + s.font___184971 = (globals.font5___168507); + s.height___184975 = (4); + s.scoreWidth___184976 = (0); + s.lifeWidth___184977 = (0); + s.offsetY___184980 = (2); + r0 = s.state___184968.fields["showScore"]; s.tmp_0 = r0; - r0 = pxsim_ImageMethods.flipX(s.tmp_0); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -imagesFlipX_inline__P185728.info = {"start":5313,"length":148,"line":100,"column":16,"endLine":103,"endColumn":5,"fileName":"pxt_modules/pxt-raycasting/animation.ts","functionName":"inline","argumentNames":["img","i"]} - -function imagesFlipX_inline__P185728_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: imagesFlipX_inline__P185728, 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 Render_RayCastingRender_constructor__P171787(s) { -let r0 = s.r0, 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.sc___185832 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim.image.create(globals.SW___174806, globals.SH___174800); + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + r0 = s.state___184968.fields["score"]; s.tmp_1 = r0; - r0 = (s.tmp_0).fields["tempScreen"] = (s.tmp_1); - r0 = (s.arg0).fields["velocityAngle"] = (2); - r0 = (s.arg0).fields["velocity"] = (3); - r0 = (s.arg0).fields["_viewMode"] = (1); - r0 = (s.arg0).fields["_wallZScale"] = (1); - r0 = (s.arg0).fields["cameraSway"] = (0); - r0 = (s.arg0).fields["isWalking"] = (false); - r0 = (s.arg0).fields["cameraOffsetX"] = (0); - r0 = (s.arg0).fields["cameraOffsetZ_fpx"] = (0); - s.tmp_2 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_3 = r0; - r0 = (s.tmp_2).fields["sprites"] = (s.tmp_3); - s.tmp_4 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_5 = r0; - r0 = (s.tmp_4).fields["sprites2D"] = (s.tmp_5); - s.tmp_6 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_7 = r0; - r0 = (s.tmp_6).fields["spriteParticles"] = (s.tmp_7); - s.tmp_8 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_9 = r0; - r0 = (s.tmp_8).fields["spriteLikes"] = (s.tmp_9); - s.tmp_10 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_11 = r0; - r0 = (s.tmp_10).fields["spriteAnimations"] = (s.tmp_11); - s.tmp_12 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_13 = r0; - r0 = (s.tmp_12).fields["spriteMotionZ"] = (s.tmp_13); - s.tmp_14 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_15 = r0; - r0 = (s.tmp_14).fields["sayRederers"] = (s.tmp_15); - s.tmp_16 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_17 = r0; - r0 = (s.tmp_16).fields["sayEndTimes"] = (s.tmp_17); - r0 = (s.arg0).fields["tilemapScaleSize"] = (16); - s.tmp_18 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_19 = r0; - r0 = (s.tmp_18).fields["dist"] = (s.tmp_19); - s.tmp_20 = r0 = s.arg0; - s.tmp_22 = sprites_create__P168802_mk(s); - r0 = pxsim.image.ofBuffer(_hex185817); - s.tmp_22.arg0 = r0; - s.tmp_22.arg1 = undefined; - s.callLocIdx = 1986; s.pc = 3; return s.tmp_22; + r0 = (s.tmp_1 !== undefined); + case 2: + // jmp value (already in r0) + s.tmp_2 = r0; + s.showScore___184981 = (s.tmp_2); + r0 = s.state___184968.fields["showLife"]; + 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.retval; - s.tmp_21 = r0; - r0 = (s.tmp_20).fields["tempSprite"] = (s.tmp_21); - s.tmp_23 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_24 = r0; - r0 = (s.tmp_23).fields["transformX"] = (s.tmp_24); - s.tmp_25 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_26 = r0; - r0 = (s.tmp_25).fields["transformY"] = (s.tmp_26); - s.tmp_27 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_28 = r0; - r0 = (s.tmp_27).fields["angleSelfToSpr"] = (s.tmp_28); - r0 = (s.arg0).fields["_angle"] = (0); - s.tmp_0 = Render_RayCastingRender_fov__P171768_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = globals.defaultFov___171737; - s.callLocIdx = 1987; s.pc = 4; return s.tmp_0; + r0 = s.state___184968.fields["life"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 !== undefined); case 4: + // jmp value (already in r0) + s.tmp_2 = r0; + s.showLife___184989 = (s.tmp_2); + r0 = pxsim_numops_toBoolDecr(s.showScore___184981); + if (!r0) { step = 5; continue; } + r0 = pxsim_String_.mkEmpty(); + s.tmp_0 = r0; + r0 = s.state___184968.fields["score"]; + s.tmp_2 = r0; + if ((s.tmp_2) && (s.tmp_2).vtable) { + setupResume(s, 44); + pxsim_String__stringConv(s.tmp_2); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_2) + ""; } + case 44: r0 = s.retval; - r0 = pxsim_pxtcore_mkClassInstance(scene_Camera__C169308_VT); + s.tmp_1 = r0; + r0 = pxsim_String__concat(s.tmp_0, s.tmp_1); + s.score___184973 = (r0); + r0 = pxsim_String_.length(s.score___184973); + s.tmp_1 = r0; + s.tmp_3 = if_charWidth_1_mk(s); + s.tmp_3.arg0 = s.font___184971; + if (!s.tmp_3.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "charWidth"); + } else { + s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["charWidth"]; + if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["charWidth"]; } + else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } + else { s.callLocIdx = 975; s.pc = 45; return s.tmp_3; } + } + case 45: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_1 * s.tmp_2); s.tmp_0 = r0; - s.tmp_1 = scene_Camera_constructor__P169312_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 1988; s.pc = 5; return s.tmp_1; - case 5: + r0 = (s.tmp_0 + 3); + s.scoreWidth___184976 = (r0); + s.tmp_0 = r0 = s.height___184975; + s.tmp_2 = if_charHeight_1_mk(s); + s.tmp_2.arg0 = s.font___184971; + if (!s.tmp_2.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "charHeight"); + } else { + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["charHeight"]; + if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["charHeight"]; } + else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } + else { s.callLocIdx = 976; s.pc = 46; return s.tmp_2; } + } + case 46: r0 = s.retval; - r0 = (s.arg0).fields["camera"] = (s.tmp_0); - s.tmp_0 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1989; s.pc = 6; return s.tmp_0; - case 6: + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); + s.height___184975 = (r0); + s.tmp_0 = r0 = s.offsetY___184980; + s.tmp_3 = if_charHeight_1_mk(s); + s.tmp_3.arg0 = s.font___184971; + 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 = 977; s.pc = 47; return s.tmp_3; } + } + case 47: r0 = s.retval; - s.sc___185832 = (r0); - r0 = s.sc___185832.fields["tileMap"]; s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + r0 = (s.tmp_2 + 1); s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = (s.tmp_0 + s.tmp_1); + s.offsetY___184980 = (r0); + case 5: + case 6: + r0 = pxsim_numops_toBoolDecr(s.showLife___184989); + if (!r0) { step = 9; continue; } + r0 = s.state___184968.fields["life"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = pxsim_pxtcore_mkClassInstance(tiles_TileMap__C169262_VT); - s.tmp_3 = r0; - s.tmp_4 = tiles_TileMap_constructor__P169264_mk(s); - s.tmp_4.arg0 = s.tmp_3; - s.tmp_4.arg1 = 4; - s.callLocIdx = 1990; s.pc = 7; return s.tmp_4; + 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 = (s.sc___185832).fields["tileMap"] = (s.tmp_3); - { step = 2; continue; } - case 1: - s.tmp_0 = Render_RayCastingRender_tilemapLoaded__P171786_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1991; s.pc = 8; return s.tmp_0; + r0 = 0; case 8: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_String_.mkEmpty(); + s.tmp_2 = r0; + if ((s.tmp_1) && (s.tmp_1).vtable) { + setupResume(s, 48); + pxsim_String__stringConv(s.tmp_1); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_1) + ""; } + case 48: r0 = s.retval; - case 2: - r0 = pxsim_pxtcore_mkAction(1, Render_RayCastingRender_inline__P185848); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = tiles_TileMap_addEventListener__P169287_mk(s); - s.tmp_2 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1992; s.pc = 10; return s.tmp_2; - case 10: - r0 = s.retval; - r0 = r0.fields["tileMap"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 0; - s.tmp_1.arg2 = s.tmp_0; - s.callLocIdx = 1994; s.pc = 9; return s.tmp_1; - case 9: - r0 = s.retval; - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = sprites_create__P168802_mk(s); - r0 = s.arg0.fields["tilemapScaleSize"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 >> 1); s.tmp_3 = r0; - r0 = s.arg0.fields["tilemapScaleSize"]; - s.tmp_6 = r0; - r0 = (s.tmp_6 >> 1); + r0 = pxsim_String__concat(s.tmp_2, s.tmp_3); + s.life___184974 = (r0); + r0 = globals.infoState___172322.fields["heartImage"]; + s.tmp_3 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_3); + s.tmp_2 = r0; + r0 = globals.infoState___172322.fields["multiplierImage"]; s.tmp_5 = r0; - r0 = pxsim.image.create(s.tmp_3, s.tmp_5); - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = globals.Player___169007; - s.callLocIdx = 1995; s.pc = 11; return s.tmp_2; - case 11: - r0 = s.retval; + r0 = pxsim_ImageMethods.width(s.tmp_5); + s.tmp_4 = r0; + r0 = (s.tmp_2 + s.tmp_4); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["sprSelf"] = (s.tmp_1); - s.tmp_0 = Render_RayCastingRender_takeoverSceneSprites__P171784_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1996; s.pc = 12; return s.tmp_0; - case 12: + r0 = pxsim_String_.length(s.life___184974); + s.tmp_7 = r0; + s.tmp_9 = if_charWidth_1_mk(s); + s.tmp_9.arg0 = s.font___184971; + if (!s.tmp_9.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_9.arg0, "charWidth"); + } else { + s.tmp_9.fn = s.tmp_9.arg0.vtable.iface["charWidth"]; + if (s.tmp_9.fn == null) { s.retval = s.tmp_9.arg0.fields["charWidth"]; } + else if (!s.tmp_9.fn.isGetter) { s.retval = bind(s.tmp_9); } + else { s.callLocIdx = 978; s.pc = 49; return s.tmp_9; } + } + case 49: r0 = s.retval; - r0 = s.arg0.fields["sprites"]; + s.tmp_8 = r0; + r0 = (s.tmp_7 * s.tmp_8); + s.tmp_6 = r0; + r0 = (s.tmp_1 + s.tmp_6); s.tmp_0 = r0; - r0 = s.arg0.fields["sprSelf"]; + r0 = (s.tmp_0 + 3); + s.lifeWidth___184977 = (r0); + s.tmp_0 = r0 = s.height___184975; + r0 = globals.infoState___172322.fields["heartImage"]; + s.tmp_2 = r0; + r0 = pxsim_ImageMethods.height(s.tmp_2); s.tmp_1 = r0; - r0 = pxsim_Array_.removeElement(s.tmp_0, s.tmp_1); - s.tmp_0 = Render_RayCastingRender_updateViewZPos__P171783_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1997; s.pc = 13; return s.tmp_0; - case 13: + r0 = (s.tmp_0 + s.tmp_1); + s.height___184975 = (r0); + case 9: + case 10: + s.tmp_0 = Math_max__P166657_mk(s); + s.tmp_0.arg0 = s.scoreWidth___184976; + s.tmp_0.arg1 = s.lifeWidth___184977; + s.callLocIdx = 979; s.pc = 50; return s.tmp_0; + case 50: r0 = s.retval; - s.tmp_0 = scene_cameraFollowSprite__P169417_mk(s); - r0 = s.arg0.fields["sprSelf"]; - s.tmp_0.arg0 = r0; - s.callLocIdx = 1998; s.pc = 14; return s.tmp_0; + s.width___185057 = (r0); + s.tmp_0 = r0 = s.showScore___184981; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 11; continue; } + r0 = s.tmp_0; + { step = 12; continue; } + case 11: + r0 = s.showLife___184989; + case 12: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 13; continue; } + r0 = (s.height___184975 + 1); + s.height___184975 = (r0); + case 13: case 14: - r0 = s.retval; - s.tmp_0 = Render_RayCastingRender_updateSelfImage__P171788_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1999; s.pc = 15; return s.tmp_0; - case 15: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, Render_RayCastingRender_inline__P185876); + r0 = s.arg0.fields["impl"]; + r0 = r0.fields["left"]; s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = game_onUpdate__P169550_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 2001; s.pc = 16; return s.tmp_1; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 15; continue; } + r0 = s.width___185057; + { step = 16; continue; } + case 15: + r0 = 0; case 16: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, Render_RayCastingRender_inline__P185880); + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = s.arg0.fields["impl"]; + r0 = r0.fields["x"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 - s.tmp_1); + s.x___185067 = (r0); + r0 = s.arg0.fields["impl"]; + r0 = r0.fields["up"]; s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = game_onUpdateInterval__P169551_mk(s); - s.tmp_1.arg0 = 400; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 2003; s.pc = 17; return s.tmp_1; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 17; continue; } + r0 = s.height___184975; + { step = 18; continue; } case 17: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, Render_RayCastingRender_inline__P185941); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = game_onUpdateInterval__P169551_mk(s); - s.tmp_1.arg0 = 25; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 2005; s.pc = 18; return s.tmp_1; + r0 = 0; case 18: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, Render_RayCastingRender_inline__P185974); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = control___screen_setupUpdate__P168521_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 2007; s.pc = 19; return s.tmp_1; + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = s.arg0.fields["impl"]; + r0 = r0.fields["y"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 - s.tmp_1); + s.y___185076 = (r0); + s.tmp_0 = r0 = s.showScore___184981; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 19; continue; } + r0 = s.tmp_0; + { step = 20; continue; } case 19: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, Render_RayCastingRender_inline__P185986); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = game_addScenePushHandler__P169545_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 2010; s.pc = 20; return s.tmp_1; + r0 = s.showLife___184989; case 20: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 21; continue; } + s.tmp_2 = helpers_imageFillRect__P168483_mk(s); + s.tmp_2.arg0 = globals.screen___168559; + s.tmp_2.arg1 = s.x___185067; + s.tmp_2.arg2 = s.y___185076; + s.tmp_2.arg3 = s.width___185057; + s.tmp_2.arg4 = s.height___184975; + r0 = s.arg0.fields["impl"]; + r0 = r0.fields["border"]; + s.tmp_2.arg5 = r0; + s.callLocIdx = 980; s.pc = 51; return s.tmp_2; + case 51: r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, Render_RayCastingRender_inline__P186003); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = game_addScenePopHandler__P169547_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 2014; s.pc = 21; return s.tmp_1; - case 21: + s.tmp_0 = helpers_imageFillRect__P168483_mk(s); + s.tmp_0.arg0 = globals.screen___168559; + r0 = (s.x___185067 + 1); + s.tmp_0.arg1 = r0; + r0 = (s.y___185076 + 1); + s.tmp_0.arg2 = r0; + r0 = (s.width___185057 - 2); + s.tmp_0.arg3 = r0; + r0 = (s.height___184975 - 2); + s.tmp_0.arg4 = r0; + r0 = s.arg0.fields["impl"]; + r0 = r0.fields["bg"]; + s.tmp_0.arg5 = r0; + s.callLocIdx = 981; s.pc = 52; return s.tmp_0; + case 52: r0 = s.retval; - r0 = undefined; + case 21: + case 22: + r0 = pxsim_numops_toBoolDecr(s.showScore___184981); + if (!r0) { step = 25; continue; } + r0 = s.arg0.fields["impl"]; + r0 = r0.fields["left"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 23; continue; } + r0 = (s.width___185057 - s.scoreWidth___184976); + { step = 24; continue; } + case 23: + r0 = 0; + case 24: + // jmp value (already in r0) + s.tmp_1 = r0; + s.bump___185113 = (s.tmp_1); + s.tmp_0 = helpers_imagePrint__P168517_mk(s); + s.tmp_0.arg0 = globals.screen___168559; + s.tmp_0.arg1 = s.score___184973; + r0 = (s.x___185067 + 1); + s.tmp_2 = r0; + r0 = (s.tmp_2 + s.bump___185113); + s.tmp_1 = r0; + r0 = (s.tmp_1 + 1); + s.tmp_0.arg2 = r0; + r0 = (s.y___185076 + 2); + s.tmp_0.arg3 = r0; + r0 = s.arg0.fields["impl"]; + r0 = r0.fields["fc"]; + s.tmp_0.arg4 = r0; + s.tmp_0.arg5 = s.font___184971; + s.tmp_0.arg6 = undefined; + s.callLocIdx = 982; s.pc = 53; return s.tmp_0; + case 53: + r0 = s.retval; + case 25: + case 26: + r0 = pxsim_numops_toBoolDecr(s.showLife___184989); + if (!r0) { step = 29; continue; } + r0 = s.arg0.fields["impl"]; + r0 = r0.fields["left"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 27; continue; } + r0 = (s.width___185057 - s.lifeWidth___184977); + { step = 28; continue; } + case 27: + r0 = 0; + case 28: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = (s.x___185067 + 1); + s.tmp_2 = r0; + r0 = (s.tmp_2 + s.tmp_1); + s.xLoc___185140 = (r0); + r0 = globals.infoState___172322.fields["multiplierImage"]; + s.tmp_0 = r0; + r0 = pxsim_ImageMethods.clone(s.tmp_0); + s.mult___185152 = (r0); + r0 = s.arg0.fields["impl"]; + r0 = r0.fields["fc"]; + s.tmp_0 = r0; + r0 = pxsim_ImageMethods.replace(s.mult___185152, 1, s.tmp_0); + s.tmp_0 = r0 = globals.screen___168559; + r0 = globals.infoState___172322.fields["heartImage"]; + s.tmp_1 = r0; + s.tmp_2 = r0 = s.xLoc___185140; + r0 = (s.y___185076 + s.offsetY___184980); + s.tmp_3 = r0; + r0 = pxsim_ImageMethods.drawTransparentImage(s.tmp_0, s.tmp_1, s.tmp_2, s.tmp_3); + s.tmp_0 = r0 = globals.screen___168559; + s.tmp_1 = r0 = s.mult___185152; + s.tmp_3 = r0 = s.xLoc___185140; + r0 = globals.infoState___172322.fields["heartImage"]; + s.tmp_5 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_5); + s.tmp_4 = r0; + r0 = (s.tmp_3 + s.tmp_4); + s.tmp_2 = r0; + r0 = (s.y___185076 + s.offsetY___184980); + s.tmp_9 = r0; + s.tmp_11 = if_charHeight_1_mk(s); + s.tmp_11.arg0 = s.font___184971; + 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 = 983; s.pc = 54; return s.tmp_11; } + } + case 54: + r0 = s.retval; + s.tmp_10 = r0; + r0 = (s.tmp_9 + s.tmp_10); + s.tmp_8 = r0; + r0 = globals.infoState___172322.fields["multiplierImage"]; + s.tmp_13 = r0; + r0 = pxsim_ImageMethods.height(s.tmp_13); + s.tmp_12 = r0; + r0 = (s.tmp_8 - s.tmp_12); + s.tmp_7 = r0; + r0 = (s.tmp_7 - 1); + s.tmp_6 = r0; + r0 = pxsim_ImageMethods.drawTransparentImage(s.tmp_0, s.tmp_1, s.tmp_2, s.tmp_6); + s.tmp_0 = helpers_imagePrint__P168517_mk(s); + s.tmp_0.arg0 = globals.screen___168559; + s.tmp_0.arg1 = s.life___184974; + s.tmp_3 = r0 = s.xLoc___185140; + r0 = globals.infoState___172322.fields["heartImage"]; + s.tmp_5 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_5); + s.tmp_4 = r0; + r0 = (s.tmp_3 + s.tmp_4); + s.tmp_2 = r0; + r0 = globals.infoState___172322.fields["multiplierImage"]; + s.tmp_7 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_7); + s.tmp_6 = r0; + r0 = (s.tmp_2 + s.tmp_6); + s.tmp_1 = r0; + r0 = (s.tmp_1 + 1); + s.tmp_0.arg2 = r0; + r0 = (s.y___185076 + s.offsetY___184980); + s.tmp_0.arg3 = r0; + r0 = s.arg0.fields["impl"]; + r0 = r0.fields["fc"]; + s.tmp_0.arg4 = r0; + s.tmp_0.arg5 = s.font___184971; + s.tmp_0.arg6 = undefined; + s.callLocIdx = 984; s.pc = 55; return s.tmp_0; + case 55: + r0 = s.retval; + case 29: + case 30: + r0 = s.state___184968.fields["showPlayer"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 41; continue; } + r0 = pxsim_String_.mkEmpty(); + s.tmp_1 = r0; + r0 = s.arg0.fields["_player"]; + s.tmp_3 = r0; + if ((s.tmp_3) && (s.tmp_3).vtable) { + setupResume(s, 56); + pxsim_String__stringConv(s.tmp_3); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_3) + ""; } + case 56: + r0 = s.retval; + s.tmp_2 = r0; + r0 = pxsim_String__concat(s.tmp_1, s.tmp_2); + s.pNum___185216 = (r0); + r0 = pxsim_String_.length(s.pNum___185216); + s.tmp_1 = r0; + s.tmp_3 = if_charWidth_1_mk(s); + s.tmp_3.arg0 = s.font___184971; + if (!s.tmp_3.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "charWidth"); + } else { + s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["charWidth"]; + if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["charWidth"]; } + else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } + else { s.callLocIdx = 985; s.pc = 57; return s.tmp_3; } + } + case 57: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_1 * s.tmp_2); + s.tmp_0 = r0; + r0 = (s.tmp_0 + 1); + s.iconWidth___185223 = (r0); + s.tmp_0 = Math_max__P166657_mk(s); + s.tmp_0.arg0 = s.height___184975; + s.tmp_2 = if_charHeight_1_mk(s); + s.tmp_2.arg0 = s.font___184971; + if (!s.tmp_2.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "charHeight"); + } else { + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["charHeight"]; + if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["charHeight"]; } + else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } + else { s.callLocIdx = 986; s.pc = 59; return s.tmp_2; } + } + case 59: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_1 + 2); + s.tmp_0.arg1 = r0; + s.callLocIdx = 987; s.pc = 58; return s.tmp_0; + case 58: + r0 = s.retval; + s.iconHeight___185231 = (r0); + r0 = s.arg0.fields["impl"]; + r0 = r0.fields["left"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 31; continue; } + r0 = (s.x___185067 - s.iconWidth___185223); + s.tmp_1 = r0; + r0 = (s.tmp_1 + 1); + { step = 32; continue; } + case 31: + r0 = (s.x___185067 + s.width___185057); + s.tmp_2 = r0; + r0 = (s.tmp_2 - 1); + case 32: + // jmp value (already in r0) + s.tmp_3 = r0; + s.iconX___185239 = (s.tmp_3); + s.iconY___185252 = (s.y___185076); + r0 = pxsim_numops_toBoolDecr(s.showScore___184981); + 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 = 33; continue; } + r0 = s.tmp_0; + { step = 34; continue; } + case 33: + r0 = pxsim_numops_toBoolDecr(s.showLife___184989); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); + case 34: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 39; continue; } + r0 = s.arg0.fields["impl"]; + r0 = r0.fields["left"]; + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + if (!r0) { step = 35; continue; } + r0 = -1; + { step = 36; continue; } + case 35: + r0 = 1; + case 36: + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = (s.iconX___185239 + s.tmp_5); + s.iconX___185239 = (r0); + r0 = s.arg0.fields["impl"]; + r0 = r0.fields["up"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 37; continue; } + r0 = (s.iconY___185252 - 3); + s.iconY___185252 = (r0); + case 37: + case 38: + case 39: + case 40: + s.tmp_0 = helpers_imageFillRect__P168483_mk(s); + s.tmp_0.arg0 = globals.screen___168559; + s.tmp_0.arg1 = s.iconX___185239; + s.tmp_0.arg2 = s.iconY___185252; + s.tmp_0.arg3 = s.iconWidth___185223; + s.tmp_0.arg4 = s.iconHeight___185231; + r0 = s.arg0.fields["impl"]; + r0 = r0.fields["border"]; + s.tmp_0.arg5 = r0; + s.callLocIdx = 988; s.pc = 60; return s.tmp_0; + case 60: + r0 = s.retval; + s.tmp_0 = helpers_imagePrint__P168517_mk(s); + s.tmp_0.arg0 = globals.screen___168559; + s.tmp_0.arg1 = s.pNum___185216; + r0 = (s.iconX___185239 + 1); + s.tmp_0.arg2 = r0; + s.tmp_2 = r0 = s.iconY___185252; + r0 = (s.iconHeight___185231 >> 1); + s.tmp_3 = r0; + r0 = (s.tmp_2 + s.tmp_3); + s.tmp_1 = r0; + s.tmp_6 = if_charHeight_1_mk(s); + s.tmp_6.arg0 = s.font___184971; + if (!s.tmp_6.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_6.arg0, "charHeight"); + } else { + s.tmp_6.fn = s.tmp_6.arg0.vtable.iface["charHeight"]; + if (s.tmp_6.fn == null) { s.retval = s.tmp_6.arg0.fields["charHeight"]; } + else if (!s.tmp_6.fn.isGetter) { s.retval = bind(s.tmp_6); } + else { s.callLocIdx = 989; s.pc = 62; return s.tmp_6; } + } + case 62: + r0 = s.retval; + s.tmp_5 = r0; + r0 = (s.tmp_5 >> 1); + s.tmp_4 = r0; + r0 = (s.tmp_1 - s.tmp_4); + s.tmp_0.arg3 = r0; + r0 = s.arg0.fields["impl"]; + r0 = r0.fields["bg"]; + s.tmp_0.arg4 = r0; + s.tmp_0.arg5 = s.font___184971; + s.tmp_0.arg6 = undefined; + s.callLocIdx = 990; s.pc = 61; return s.tmp_0; + case 61: + r0 = s.retval; + case 41: + case 42: + r0 = undefined; return leave(s, r0) default: oops() } } } -Render_RayCastingRender_constructor__P171787.info = {"start":12269,"length":3037,"line":337,"column":8,"endLine":408,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":["this"]} +info_PlayerInfo_drawPlayer__P169182.info = {"start":31282,"length":3718,"line":1044,"column":8,"endLine":1147,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"drawPlayer","argumentNames":["this"]} -function Render_RayCastingRender_constructor__P171787_mk(s) { +function info_PlayerInfo_drawPlayer__P169182_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_constructor__P171787, depth: s.depth + 1, + parent: s, fn: info_PlayerInfo_drawPlayer__P169182, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -35696,31 +35283,35 @@ function Render_RayCastingRender_constructor__P171787_mk(s) { 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, - sc___185832: undefined, + state___184968: undefined, + font___184971: undefined, + score___184973: undefined, + life___184974: undefined, + height___184975: undefined, + scoreWidth___184976: undefined, + lifeWidth___184977: undefined, + offsetY___184980: undefined, + showScore___184981: undefined, + showLife___184989: undefined, + width___185057: undefined, + x___185067: undefined, + y___185076: undefined, + bump___185113: undefined, + xLoc___185140: undefined, + mult___185152: undefined, + pNum___185216: undefined, + iconWidth___185223: undefined, + iconHeight___185231: undefined, + iconX___185239: undefined, + iconY___185252: undefined, arg0: undefined, } } -const _hex185817 = pxsim.BufferMethods.createBufferFromHex("870401000100000000000000") -function Render_RayCastingRender_inline__P185848(s) { +function info_PlayerInfoImpl_raiseLifeZero__P169143(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -35730,35 +35321,120 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.state___184938 = undefined; + s.goc___184957 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = Render_RayCastingRender_tilemapLoaded__P171786_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.callLocIdx = 1993; s.pc = 1; return s.tmp_0; + r0 = s.arg0; + if (!checkSubtype(r0, info_PlayerInfoImpl__C169122_VT)) failedCast(r0); + s.tmp_0 = info_PlayerInfoImpl_getState__P169131_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 962; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; + s.state___184938 = (r0); + r0 = s.state___184938.fields["life"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 !== null); + 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.state___184938.fields["life"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 <= 0); + case 2: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 7; continue; } + r0 = (s.state___184938).fields["life"] = (null); + r0 = s.state___184938.fields["lifeZeroHandler"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + s.tmp_1 = if_lifeZeroHandler_1_mk(s); + s.tmp_1.arg0 = s.state___184938; + if (!s.tmp_1.arg0.vtable.iface) { + setupLambda(s.tmp_1, pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "lifeZeroHandler"), 1); + s.callLocIdx = 963; s.pc = 10; return s.tmp_1; + } else { + s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["lifeZeroHandler"]; + if (s.tmp_1.fn == null) { setupLambda(s.tmp_1, s.tmp_1.arg0.fields["lifeZeroHandler"], 1); s.callLocIdx = 963; s.pc = 10; return s.tmp_1; } + else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 963; s.pc = 10; return s.tmp_1;; } + else { s.callLocIdx = 963; s.pc = 10; return s.tmp_1; } + } + case 10: + r0 = s.retval; + { step = 6; continue; } + case 3: + r0 = pxsim_numops_toBoolDecr(s.arg1); + if (!r0) { step = 4; continue; } + s.tmp_0 = lambda_1_mk(s); + s.tmp_0.argL = globals.gameOverConfig___169525; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 964; s.pc = 11; return s.tmp_0; + case 11: + r0 = s.retval; + s.goc___184957 = (r0); + s.tmp_0 = game_GameOverConfig_setEffect__P169518_mk(s); + s.tmp_0.arg0 = s.goc___184957; + s.tmp_0.arg1 = false; + s.tmp_0.arg2 = null; + s.tmp_0.arg3 = false; + s.callLocIdx = 965; s.pc = 12; return s.tmp_0; + case 12: + r0 = s.retval; + s.tmp_0 = game_GameOverConfig_setSound__P169520_mk(s); + s.tmp_0.arg0 = s.goc___184957; + s.tmp_0.arg1 = false; + s.tmp_0.arg2 = null; + s.tmp_0.arg3 = false; + s.tmp_0.arg4 = false; + s.callLocIdx = 966; s.pc = 13; return s.tmp_0; + case 13: + r0 = s.retval; + s.tmp_0 = game_gameOver__P169540_mk(s); + s.tmp_0.arg0 = false; + s.callLocIdx = 967; s.pc = 14; return s.tmp_0; + case 14: r0 = s.retval; + case 4: + case 5: + case 6: + case 7: + case 8: r0 = undefined; return leave(s, r0) default: oops() } } } -Render_RayCastingRender_inline__P185848.info = {"start":12673,"length":28,"line":348,"column":84,"endLine":348,"endColumn":112,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":["data"]} +info_PlayerInfoImpl_raiseLifeZero__P169143.info = {"start":24222,"length":620,"line":781,"column":8,"endLine":795,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"raiseLifeZero","argumentNames":["this","gameOver"]} -function Render_RayCastingRender_inline__P185848_mk(s) { +function info_PlayerInfoImpl_raiseLifeZero__P169143_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_inline__P185848, depth: s.depth + 1, + parent: s, fn: info_PlayerInfoImpl_raiseLifeZero__P169143, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + state___184938: undefined, + goc___184957: undefined, arg0: undefined, + arg1: undefined, } } -function Render_RayCastingRender_inline__P185876(s) { +function info_PlayerInfoImpl_hasLife__P169140(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -35768,38 +35444,58 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = if_updateControls_1_mk(s); - s.tmp_0.arg0 = s.caps[0]; - if (!s.tmp_0.arg0.vtable.iface) { - setupLambda(s.tmp_0, pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "updateControls"), 1); - s.callLocIdx = 2000; s.pc = 1; return s.tmp_0; - } else { - s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["updateControls"]; - if (s.tmp_0.fn == null) { setupLambda(s.tmp_0, s.tmp_0.arg0.fields["updateControls"], 1); s.callLocIdx = 2000; s.pc = 1; return s.tmp_0; } - else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 2000; s.pc = 1; return s.tmp_0;; } - else { s.callLocIdx = 2000; s.pc = 1; return s.tmp_0; } + s.state___184757 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; } - case 1: + r0 = s.arg0; + if (!checkSubtype(r0, info_PlayerInfoImpl__C169122_VT)) failedCast(r0); + s.tmp_0 = info_PlayerInfoImpl_getState__P169131_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 961; s.pc = 3; return s.tmp_0; + case 3: r0 = s.retval; - r0 = undefined; + s.state___184757 = (r0); + r0 = s.state___184757.fields["life"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 !== undefined); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + r0 = s.state___184757.fields["life"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 !== null); + case 2: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = s.tmp_3; return leave(s, r0) default: oops() } } } -Render_RayCastingRender_inline__P185876.info = {"start":13101,"length":65,"line":358,"column":26,"endLine":360,"endColumn":13,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":[]} +info_PlayerInfoImpl_hasLife__P169140.info = {"start":23442,"length":141,"line":757,"column":8,"endLine":760,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"hasLife","argumentNames":["this"]} -function Render_RayCastingRender_inline__P185876_mk(s) { +function info_PlayerInfoImpl_hasLife__P169140_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_inline__P185876, depth: s.depth + 1, + parent: s, fn: info_PlayerInfoImpl_hasLife__P169140, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + state___184757: undefined, + arg0: undefined, } } -function Render_RayCastingRender_inline__P185880(s) { +function info_PlayerInfoImpl_hasScore__P169136(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -35809,114 +35505,42 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.i___185881 = undefined; - s.spr___185888 = undefined; - s.i___185909 = undefined; - s.spr___185916 = undefined; - s.i___185881 = (0); - case 1: - s.tmp_1 = r0 = s.i___185881; - r0 = s.caps[0].fields["sprites"]; - 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 = 4; continue; } - r0 = s.caps[0].fields["sprites"]; - s.tmp_4 = r0; - r0 = pxsim_Array__getAt(s.tmp_4, s.i___185881); - s.spr___185888 = (r0); - r0 = s.spr___185888.fields["flags"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 512); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - r0 = s.caps[0].fields["sprites"]; - s.tmp_2 = r0; - r0 = pxsim_Array_.removeElement(s.tmp_2, s.spr___185888); - r0 = s.caps[0].fields["sprites2D"]; - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.spr___185888); - { step = 3; continue; } - case 2: - r0 = (s.i___185881 + 1); - s.i___185881 = (r0); - case 3: - { step = 1; continue; } - case 4: - s.i___185909 = (0); - case 5: - s.tmp_1 = r0 = s.i___185909; - r0 = s.caps[0].fields["sprites2D"]; - 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 = 8; continue; } - r0 = s.caps[0].fields["sprites2D"]; - s.tmp_4 = r0; - r0 = pxsim_Array__getAt(s.tmp_4, s.i___185909); - s.spr___185916 = (r0); - r0 = s.spr___185916.fields["flags"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 & 512); - 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 = 6; continue; } - r0 = s.caps[0].fields["sprites2D"]; - s.tmp_4 = r0; - r0 = pxsim_Array_.removeElement(s.tmp_4, s.spr___185916); - r0 = s.caps[0].fields["sprites"]; - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.spr___185916); - { step = 7; continue; } - case 6: - r0 = (s.i___185909 + 1); - s.i___185909 = (r0); - case 7: - { step = 5; continue; } - case 8: - s.tmp_0 = Render_RayCastingRender_takeoverSceneSprites__P171784_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.callLocIdx = 2002; s.pc = 9; return s.tmp_0; - case 9: + s.state___184839 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, info_PlayerInfoImpl__C169122_VT)) failedCast(r0); + s.tmp_0 = info_PlayerInfoImpl_getState__P169131_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 960; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - r0 = undefined; + s.state___184839 = (r0); + r0 = s.state___184839.fields["score"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 !== undefined); return leave(s, r0) default: oops() } } } -Render_RayCastingRender_inline__P185880.info = {"start":13208,"length":760,"line":362,"column":39,"endLine":378,"endColumn":13,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":[]} +info_PlayerInfoImpl_hasScore__P169136.info = {"start":22541,"length":111,"line":726,"column":8,"endLine":729,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"hasScore","argumentNames":["this"]} -function Render_RayCastingRender_inline__P185880_mk(s) { +function info_PlayerInfoImpl_hasScore__P169136_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_inline__P185880, depth: s.depth + 1, + parent: s, fn: info_PlayerInfoImpl_hasScore__P169136, depth: s.depth + 1, pc: 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___185881: undefined, - spr___185888: undefined, - i___185909: undefined, - spr___185916: undefined, + state___184839: undefined, + arg0: undefined, } } -function Render_RayCastingRender_inline__P185941(s) { +function info_PlayerState_constructor__P169089(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -35926,83 +35550,41 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = s.caps[0].fields["cameraSway"]; - 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["isWalking"]; - case 2: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 3; continue; } - s.tmp_2 = r0 = s.caps[0]; - r0 = pxsim.control.millis(); - s.tmp_8 = r0; - r0 = (s.tmp_8 / 150); - s.tmp_7 = r0; - r0 = pxsim.Math_.sin(s.tmp_7); - s.tmp_6 = r0; - r0 = s.caps[0].fields["cameraSway"]; - s.tmp_9 = r0; - r0 = (s.tmp_6 * s.tmp_9); - s.tmp_5 = r0; - r0 = (s.tmp_5 * 3); - s.tmp_4 = r0; - r0 = (s.tmp_4 | 0); - s.tmp_3 = r0; - r0 = (s.tmp_2).fields["cameraOffsetX"] = (s.tmp_3); - s.tmp_0 = r0 = s.caps[0]; - r0 = pxsim.control.millis(); - s.tmp_6 = r0; - r0 = (s.tmp_6 / 75); - s.tmp_5 = r0; - r0 = pxsim.Math_.cos(s.tmp_5); - s.tmp_4 = r0; - r0 = s.caps[0].fields["cameraSway"]; - s.tmp_7 = r0; - r0 = (s.tmp_4 * s.tmp_7); - s.tmp_3 = r0; - r0 = (s.tmp_3 * 256); - s.tmp_8 = r0; - r0 = (s.tmp_8 | 0); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, info_PlayerState__C169080_VT)) failedCast(r0); + r0 = (s.arg0).fields["visibility"] = (0); + r0 = (s.arg0).fields["showScore"] = (undefined); + r0 = (s.arg0).fields["showLife"] = (undefined); + r0 = (s.arg0).fields["showPlayer"] = (undefined); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["cameraOffsetZ_fpx"] = (s.tmp_1); - case 3: - case 4: + r0 = (s.tmp_0).fields["scoreReachedHandlers"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -Render_RayCastingRender_inline__P185941.info = {"start":14010,"length":296,"line":381,"column":38,"endLine":386,"endColumn":13,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":[]} +info_PlayerState_constructor__P169089.info = {"start":1088,"length":236,"line":42,"column":8,"endLine":48,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["this"]} -function Render_RayCastingRender_inline__P185941_mk(s) { +function info_PlayerState_constructor__P169089_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_inline__P185941, depth: s.depth + 1, + parent: s, fn: info_PlayerState_constructor__P169089, depth: s.depth + 1, pc: 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 Render_RayCastingRender_inline__P185974(s) { +function info_highScore__P169098(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36012,29 +35594,31 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = s.caps[0].fields["_viewMode"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 == 1); + s.tmp_1 = settings_readNumber__P168595_mk(s); + s.tmp_1.arg0 = "high-score"; + s.callLocIdx = 941; s.pc = 3; return s.tmp_1; + case 3: + r0 = s.retval; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + r0 = pxsim_numops_toBool(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = s.caps[0].fields["tempScreen"]; - s.tmp_2 = r0; - r0 = pxsim_pxtcore.updateScreen(s.tmp_2); + r0 = s.tmp_0; { step = 2; continue; } case 1: - r0 = pxsim_pxtcore.updateScreen(globals.screen___168559); + r0 = 0; case 2: - r0 = undefined; + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = s.tmp_2; return leave(s, r0) default: oops() } } } -Render_RayCastingRender_inline__P185974.info = {"start":14350,"length":192,"line":387,"column":41,"endLine":392,"endColumn":13,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":[]} +info_highScore__P169098.info = {"start":9710,"length":98,"line":322,"column":4,"endLine":324,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"highScore","argumentNames":[]} -function Render_RayCastingRender_inline__P185974_mk(s) { +function info_highScore__P169098_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_inline__P185974, depth: s.depth + 1, + parent: s, fn: info_highScore__P169098, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -36045,7 +35629,7 @@ function Render_RayCastingRender_inline__P185974_mk(s) { -function Render_RayCastingRender_inline__P185986(s) { +function settings_readNumber__P168595(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36055,42 +35639,69 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.buf___183704 = undefined; + s.nums___183711 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = r0 = s.caps[0]; - s.tmp_2 = scene_Background_addLayer__P169201_mk(s); - r0 = s.arg0.fields["background"]; - s.tmp_2.arg0 = r0; - r0 = s.caps[0].fields["tempScreen"]; - s.tmp_2.arg1 = r0; - s.tmp_2.arg2 = 0; - s.tmp_2.arg3 = 5; - s.callLocIdx = 2008; s.pc = 1; return s.tmp_2; + r0 = pxsim.settings._get(s.arg0); + s.buf___183704 = (r0); + r0 = pxsim_numops_toBoolDecr(s.buf___183704); + 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__P166710_mk(s); + s.tmp_2.arg0 = s.buf___183704; + s.tmp_2.arg1 = 0; + s.callLocIdx = 200; s.pc = 8; return s.tmp_2; + case 8: r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["tempBackground"] = (s.tmp_1); - s.tmp_0 = control___screen_setupUpdate__P168521_mk(s); - s.tmp_0.arg0 = Render_RayCastingRender_inline__P185998; - s.callLocIdx = 2009; s.pc = 2; return s.tmp_0; + s.nums___183711 = (r0); + s.tmp_0 = r0 = s.nums___183711; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 2; continue; } + r0 = s.tmp_0; + { step = 3; continue; } case 2: - r0 = s.retval; + r0 = pxsim_Array__length(s.nums___183711); + 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___183711, 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() } } } -Render_RayCastingRender_inline__P185986.info = {"start":14582,"length":221,"line":394,"column":37,"endLine":397,"endColumn":13,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":["oldScene"]} +settings_readNumber__P168595.info = {"start":3283,"length":313,"line":131,"column":4,"endLine":141,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"readNumber","argumentNames":["key"]} -function Render_RayCastingRender_inline__P185986_mk(s) { +function settings_readNumber__P168595_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_inline__P185986, depth: s.depth + 1, + parent: s, fn: settings_readNumber__P168595, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, + buf___183704: undefined, + nums___183711: undefined, arg0: undefined, } } @@ -36098,7 +35709,7 @@ function Render_RayCastingRender_inline__P185986_mk(s) { -function Render_RayCastingRender_inline__P185998(s) { +function settings_readBuffer__P168592(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36108,25 +35719,29 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_pxtcore.updateScreen(globals.screen___168559); - r0 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = pxsim.settings._get(s.arg0); return leave(s, r0) default: oops() } } } -Render_RayCastingRender_inline__P185998.info = {"start":14758,"length":30,"line":396,"column":45,"endLine":396,"endColumn":75,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":[]} +settings_readBuffer__P168592.info = {"start":2694,"length":72,"line":103,"column":4,"endLine":105,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"readBuffer","argumentNames":["key"]} -function Render_RayCastingRender_inline__P185998_mk(s) { +function settings_readBuffer__P168592_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_inline__P185998, depth: s.depth + 1, + parent: s, fn: settings_readBuffer__P168592, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, } } -function Render_RayCastingRender_inline__P186003(s) { +function msgpack_unpackNumberArray__P166710(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36136,58 +35751,120 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.res___183724 = undefined; + s.fmt___183731 = undefined; + s.v___183740 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_1 = if__layers_1_mk(s); - r0 = s.arg0.fields["background"]; - s.tmp_1.arg0 = r0; - if (!s.tmp_1.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "_layers"); - } else { - s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["_layers"]; - if (s.tmp_1.fn == null) { s.retval = s.tmp_1.arg0.fields["_layers"]; } - else if (!s.tmp_1.fn.isGetter) { s.retval = bind(s.tmp_1); } - else { s.callLocIdx = 2011; s.pc = 1; return s.tmp_1; } - } + r0 = pxsim_Array__mk(); + s.res___183724 = (r0); case 1: + s.tmp_1 = r0 = s.arg1; + r0 = pxsim.BufferMethods.length(s.arg0); + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 10; continue; } + s.tmp_3 = r0 = s.arg1; + r0 = (s.tmp_3 + 1); + s.arg1 = (r0); + s.tmp_4 = msgpack_tagFormat__P171893_mk(s); + r0 = pxsim.BufferMethods.getByte(s.arg0, s.tmp_3); + s.tmp_4.arg0 = r0; + s.callLocIdx = 31; s.pc = 12; return s.tmp_4; + case 12: r0 = s.retval; + s.fmt___183731 = (r0); + r0 = (s.fmt___183731 === null); s.tmp_0 = r0; - r0 = s.caps[0].fields["tempBackground"]; + 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_Array_.removeElement(s.tmp_0, s.tmp_2); - r0 = (s.caps[0]).fields["tempBackground"] = (undefined); - r0 = pxsim_pxtcore_mkAction(1, Render_RayCastingRender_inline__P186017); + r0 = pxsim.BufferMethods.getNumber(s.tmp_1, 6, s.tmp_2); + s.v___183740 = (r0); + r0 = (-31 <= s.v___183740); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.caps[0]); - s.tmp_1 = control___screen_setupUpdate__P168521_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 2013; s.pc = 2; return s.tmp_1; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 2; continue; } + r0 = s.tmp_0; + { step = 3; continue; } case 2: + r0 = (s.v___183740 <= 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___183724, s.v___183740); + { step = 5; continue; } + case 4: + r0 = null; + { step = 11; continue; } + case 5: + { step = 7; continue; } + case 6: + s.tmp_0 = r0 = s.res___183724; + r0 = pxsim.BufferMethods.getNumber(s.arg0, s.fmt___183731, 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__P166702_mk(s); + s.tmp_2.arg0 = s.fmt___183731; + s.callLocIdx = 32; s.pc = 13; return s.tmp_2; + case 13: r0 = s.retval; - r0 = undefined; + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); + s.arg1 = (r0); + case 7: + case 8: + r0 = pxsim.BufferMethods.getByte(s.arg0, s.arg1); + s.tmp_1 = r0; + r0 = (s.tmp_1 === 193); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 9; continue; } + r0 = (s.arg1 + 1); + s.arg1 = (r0); + { step = 8; continue; } + case 9: + { step = 1; continue; } + case 10: + r0 = s.res___183724; + case 11: return leave(s, r0) default: oops() } } } -Render_RayCastingRender_inline__P186003.info = {"start":14841,"length":454,"line":398,"column":36,"endLine":407,"endColumn":13,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":["oldScene"]} +msgpack_unpackNumberArray__P166710.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 Render_RayCastingRender_inline__P186003_mk(s) { +function msgpack_unpackNumberArray__P166710_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_inline__P186003, depth: s.depth + 1, + parent: s, fn: msgpack_unpackNumberArray__P166710, depth: s.depth + 1, pc: 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___183724: undefined, + fmt___183731: undefined, + v___183740: undefined, arg0: undefined, + arg1: undefined, } } -function Render_RayCastingRender_inline__P186017(s) { +function msgpack_tagFormat__P171893(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36197,40 +35874,72 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = s.caps[0].fields["_viewMode"]; - 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; } - r0 = s.caps[0].fields["tempScreen"]; - s.tmp_2 = r0; - r0 = pxsim_pxtcore.updateScreen(s.tmp_2); - { step = 2; continue; } + if (s.lambdaArgs) { + 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; } case 1: - r0 = pxsim_pxtcore.updateScreen(globals.screen___168559); + 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() } } } -Render_RayCastingRender_inline__P186017.info = {"start":15065,"length":215,"line":401,"column":45,"endLine":406,"endColumn":17,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":[]} +msgpack_tagFormat__P171893.info = {"start":1145,"length":481,"line":42,"column":4,"endLine":54,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"tagFormat","argumentNames":["tag"]} -function Render_RayCastingRender_inline__P186017_mk(s) { +function msgpack_tagFormat__P171893_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_inline__P186017, depth: s.depth + 1, + parent: s, fn: msgpack_tagFormat__P171893, 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 Render_RayCastingRender_tilemapLoaded__P171786(s) { +function pins_sizeOf__P166702(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36240,138 +35949,120 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sc___186338 = undefined; - s.frameCallback_update___186386 = undefined; - s.frameCallback_draw___186413 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); - s.tmp_0 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1960; s.pc = 1; return s.tmp_0; + s.tmp_0 = Buffer_sizeOfNumberFormat__P166742_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 28; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - s.sc___186338 = (r0); + return leave(s, r0) + default: oops() +} } } +pins_sizeOf__P166702.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__P166702_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: pins_sizeOf__P166702, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function Buffer_sizeOfNumberFormat__P166742(s) { +let r0 = s.r0, 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 = s.sc___186338.fields["tileMap"]; - s.tmp_2 = r0; - r0 = s.tmp_2.fields["_map"]; - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["map"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = helpers_bufferToArray__P166719_mk(s); - s.tmp_3 = if_data_1_mk(s); - r0 = s.arg0.fields["map"]; - s.tmp_3.arg0 = r0; - if (!s.tmp_3.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "data"); - } else { - s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["data"]; - if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["data"]; } - else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } - else { s.callLocIdx = 1962; s.pc = 3; return s.tmp_3; } - } - case 3: - r0 = s.retval; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = 1; - s.callLocIdx = 1963; s.pc = 2; return s.tmp_2; + 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: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["mapData"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = s.sc___186338.fields["tileMap"]; - s.tmp_4 = r0; - r0 = s.tmp_4.fields["_map"]; - s.tmp_3 = r0; - r0 = s.tmp_3.fields["_scale"]; - s.tmp_2 = r0; - r0 = (1 << s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["tilemapScaleSize"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = s.sc___186338.fields["tileMap"]; - s.tmp_3 = r0; - r0 = s.tmp_3.fields["_map"]; - s.tmp_2 = r0; - r0 = s.tmp_2.fields["tileset"]; - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["textures"] = (s.tmp_1); - r0 = s.sc___186338.fields["tileMap"]; - r0 = r0.fields["renderable"]; - s.tmp_0 = r0; - r0 = (s.arg0).fields["oldRender"] = (s.tmp_0); - r0 = s.arg0.fields["spriteLikes"]; - s.tmp_0 = r0; - r0 = s.arg0.fields["oldRender"]; - s.tmp_1 = r0; - r0 = pxsim_Array_.removeElement(s.tmp_0, s.tmp_1); - r0 = s.sc___186338.fields["allSprites"]; - s.tmp_0 = r0; - r0 = s.arg0.fields["oldRender"]; - s.tmp_1 = r0; - r0 = pxsim_Array_.removeElement(s.tmp_0, s.tmp_1); - r0 = pxsim_pxtcore_mkAction(2, frameCallback_update_inline__P186393); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.sc___186338); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.arg0); - s.tmp_1 = control_EventContext_registerFrameHandler__P166930_mk(s); - r0 = s.sc___186338.fields["eventContext"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 56; - s.tmp_1.arg2 = s.tmp_0; - s.callLocIdx = 1969; s.pc = 4; return s.tmp_1; + case 3: case 4: - r0 = s.retval; - s.frameCallback_update___186386 = (r0); - r0 = pxsim_pxtcore_mkAction(2, frameCallback_draw_inline__P186420); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.sc___186338); - s.tmp_1 = control_EventContext_registerFrameHandler__P166930_mk(s); - r0 = s.sc___186338.fields["eventContext"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 91; - s.tmp_1.arg2 = s.tmp_0; - s.callLocIdx = 1982; s.pc = 5; return s.tmp_1; + r0 = 1; + { step = 18; continue; } case 5: - r0 = s.retval; - s.frameCallback_draw___186413 = (r0); - r0 = pxsim_pxtcore_mkAction(3, Render_RayCastingRender_tilemapLoaded_inline__P186511); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.sc___186338); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.frameCallback_update___186386); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.frameCallback_draw___186413); - s.tmp_1 = tiles_TileMap_addEventListener__P169287_mk(s); - r0 = s.sc___186338.fields["tileMap"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 1; - s.tmp_1.arg2 = s.tmp_0; - s.callLocIdx = 1985; s.pc = 6; return s.tmp_1; case 6: - r0 = s.retval; - r0 = undefined; + 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() } } } -Render_RayCastingRender_tilemapLoaded__P171786.info = {"start":10003,"length":2256,"line":293,"column":8,"endLine":335,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"tilemapLoaded","argumentNames":["this"]} +Buffer_sizeOfNumberFormat__P166742.info = {"start":14912,"length":856,"line":508,"column":4,"endLine":532,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"sizeOfNumberFormat","argumentNames":["format"]} -function Render_RayCastingRender_tilemapLoaded__P171786_mk(s) { +function Buffer_sizeOfNumberFormat__P166742_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_tilemapLoaded__P171786, depth: s.depth + 1, + parent: s, fn: Buffer_sizeOfNumberFormat__P166742, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - sc___186338: undefined, - frameCallback_update___186386: undefined, - frameCallback_draw___186413: undefined, arg0: undefined, } } @@ -36379,7 +36070,7 @@ function Render_RayCastingRender_tilemapLoaded__P171786_mk(s) { -function frameCallback_update_inline__P186393(s) { +function info_saveHighScore__P169095(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36389,240 +36080,72 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.dt___186394 = undefined; - s.s___186399 = undefined; - s.unnamed848___U2 = undefined; - s.unnamed849___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___186394 = (r0); - s.s___186399 = (undefined); - r0 = s.caps[1].fields["sprites"]; - s.unnamed848___U2 = (r0); - s.unnamed849___U3 = (0); - case 1: - s.tmp_0 = r0 = s.unnamed849___U3; - r0 = pxsim_Array__length(s.unnamed848___U2); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 2; continue; } - r0 = pxsim_Array__getAt(s.unnamed848___U2, s.unnamed849___U3); - s.s___186399 = (r0); - s.tmp_2 = Sprite__C168868_v3_3_mk(s); - s.tmp_2.arg0 = s.s___186399; - r0 = s.caps[0].fields["camera"]; - s.tmp_2.arg1 = r0; - s.tmp_2.arg2 = s.dt___186394; - if (!checkSubtype(s.tmp_2.arg0, Sprite__C168868_VT)) failedCast(s.tmp_2.arg0); - s.tmp_2.fn = s.tmp_2.arg0.vtable.methods.__update; - s.pc = 3; return s.tmp_2; - case 3: - r0 = s.retval; - r0 = (s.unnamed849___U3 + 1); - s.unnamed849___U3 = (r0); - { step = 1; continue; } - case 2: - s.unnamed848___U2 = (undefined); - s.tmp_0 = Sprite__C168868_v3_3_mk(s); - r0 = s.caps[1].fields["sprSelf"]; - s.tmp_0.arg0 = r0; - r0 = s.caps[0].fields["camera"]; - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = s.dt___186394; - if (!checkSubtype(s.tmp_0.arg0, Sprite__C168868_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.__update; - s.pc = 4; return s.tmp_0; - case 4: + s.winner___183541 = undefined; + s.hs___183545 = undefined; + s.curr___183549 = undefined; + s.tmp_0 = info_winningPlayer__P169093_mk(s); + s.callLocIdx = 936; s.pc = 5; return s.tmp_0; + case 5: r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -frameCallback_update_inline__P186393.info = {"start":10595,"length":285,"line":303,"column":114,"endLine":309,"endColumn":13,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":[]} - -function frameCallback_update_inline__P186393_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: frameCallback_update_inline__P186393, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - dt___186394: undefined, - s___186399: undefined, - unnamed848___U2: undefined, - unnamed849___U3: undefined, -} } - - - - - -function frameCallback_draw_inline__P186420(s) { -let r0 = s.r0, 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["_viewMode"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 == 1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + s.winner___183541 = (r0); + r0 = pxsim_numops_toBoolDecr(s.winner___183541); if (!r0) { step = 3; continue; } - r0 = s.caps[0].fields["tempBackground"]; - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - s.tmp_3 = r0; - r0 = pxsim_Boolean__bang(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 1; continue; } - r0 = s.caps[0].fields["tempScreen"]; - s.tmp_5 = r0; - s.tmp_7 = scene_Background_image__P169202_mk(s); - s.tmp_8 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1970; s.pc = 6; return s.tmp_8; + s.tmp_0 = info_PlayerInfoImpl_score__P169133_mk(s); + r0 = s.winner___183541.fields["impl"]; + s.tmp_0.arg0 = r0; + s.callLocIdx = 937; s.pc = 6; return s.tmp_0; case 6: r0 = s.retval; - r0 = r0.fields["background"]; - s.tmp_7.arg0 = r0; - s.callLocIdx = 1971; s.pc = 5; return s.tmp_7; - case 5: - r0 = s.retval; - s.tmp_6 = r0; - r0 = pxsim_ImageMethods.drawImage(s.tmp_5, s.tmp_6, 0, 0); - s.tmp_0 = Render_RayCastingRender_render__P171791_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.callLocIdx = 1972; s.pc = 7; return s.tmp_0; + s.hs___183545 = (r0); + s.tmp_0 = settings_readNumber__P168595_mk(s); + s.tmp_0.arg0 = "high-score"; + s.callLocIdx = 938; s.pc = 7; return s.tmp_0; case 7: r0 = s.retval; - r0 = pxsim_ImageMethods.fill(globals.screen___168559, 0); - r0 = pxsim_pxtcore_mkAction(1, frameCallback_draw_inline__P186443); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.caps[1]); - s.tmp_1 = helpers_arrayForEach__P166636_mk(s); - r0 = s.caps[0].fields["sprites2D"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 1973; s.pc = 8; return s.tmp_1; + s.curr___183549 = (r0); + s.tmp_1 = info_isBetterScore__P169094_mk(s); + s.tmp_1.arg0 = s.hs___183545; + s.tmp_1.arg1 = s.curr___183549; + s.callLocIdx = 939; s.pc = 8; return s.tmp_1; case 8: r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, frameCallback_draw_inline__P186452); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.caps[1]); - s.tmp_1 = helpers_arrayForEach__P166636_mk(s); - r0 = s.caps[0].fields["spriteLikes"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 1975; s.pc = 9; return s.tmp_1; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_2 = settings_writeNumber__P168590_mk(s); + s.tmp_2.arg0 = "high-score"; + s.tmp_2.arg1 = s.hs___183545; + s.callLocIdx = 940; s.pc = 9; return s.tmp_2; case 9: r0 = s.retval; - r0 = s.caps[0].fields["tempScreen"]; - s.tmp_0 = r0; - r0 = pxsim_ImageMethods.drawTransparentImage(s.tmp_0, globals.screen___168559, 0, 0); case 1: case 2: - { step = 4; continue; } case 3: - s.tmp_0 = r0 = globals.screen___168559; - s.tmp_2 = scene_Background_image__P169202_mk(s); - s.tmp_3 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1976; s.pc = 11; return s.tmp_3; - case 11: - r0 = s.retval; - r0 = r0.fields["background"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 1977; s.pc = 10; return s.tmp_2; - case 10: - r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_ImageMethods.drawImage(s.tmp_0, s.tmp_1, 0, 0); - s.tmp_0 = scene_Renderable__C169327_v2_2_mk(s); - r0 = s.caps[0].fields["oldRender"]; - s.tmp_0.arg0 = r0; - r0 = s.caps[1].fields["camera"]; - s.tmp_0.arg1 = r0; - if (!checkSubtype(s.tmp_0.arg0, scene_Renderable__C169327_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.__drawCore; - s.pc = 12; return s.tmp_0; - case 12: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, frameCallback_draw_inline__P186478); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.caps[1]); - s.tmp_1 = helpers_arrayForEach__P166636_mk(s); - r0 = s.caps[0].fields["sprites"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 1978; s.pc = 13; return s.tmp_1; - case 13: - r0 = s.retval; - s.tmp_0 = sprites_BaseSprite__C168621_v1_2_mk(s); - r0 = s.caps[0].fields["sprSelf"]; - s.tmp_0.arg0 = r0; - r0 = s.caps[1].fields["camera"]; - s.tmp_0.arg1 = r0; - if (!checkSubtype(s.tmp_0.arg0, sprites_BaseSprite__C168621_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.__draw; - s.pc = 14; return s.tmp_0; - case 14: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, frameCallback_draw_inline__P186492); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.caps[1]); - s.tmp_1 = helpers_arrayForEach__P166636_mk(s); - r0 = s.caps[0].fields["sprites2D"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 1979; s.pc = 15; return s.tmp_1; - case 15: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, frameCallback_draw_inline__P186501); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.caps[1]); - s.tmp_1 = helpers_arrayForEach__P166636_mk(s); - r0 = s.caps[0].fields["spriteLikes"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 1981; s.pc = 16; return s.tmp_1; - case 16: - r0 = s.retval; case 4: r0 = undefined; return leave(s, r0) default: oops() } } } -frameCallback_draw_inline__P186420.info = {"start":10992,"length":1009,"line":311,"column":109,"endLine":329,"endColumn":13,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":[]} +info_saveHighScore__P169095.info = {"start":8860,"length":324,"line":287,"column":4,"endLine":296,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"saveHighScore","argumentNames":[]} -function frameCallback_draw_inline__P186420_mk(s) { +function info_saveHighScore__P169095_mk(s) { checkStack(s.depth); return { - parent: s, fn: frameCallback_draw_inline__P186420, depth: s.depth + 1, + parent: s, fn: info_saveHighScore__P169095, depth: s.depth + 1, pc: 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, + winner___183541: undefined, + hs___183545: undefined, + curr___183549: undefined, } } -function frameCallback_draw_inline__P186443(s) { +function settings_writeNumber__P168590(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36634,37 +36157,46 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = sprites_BaseSprite__C168621_v1_2_mk(s); - s.tmp_0.arg0 = s.arg0; - r0 = s.caps[0].fields["camera"]; - s.tmp_0.arg1 = r0; - if (!checkSubtype(s.tmp_0.arg0, sprites_BaseSprite__C168621_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.__draw; - s.pc = 1; return s.tmp_0; + r0 = pxsim_Array__mk(); + s.tmp_0 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.arg1); + s.tmp_1 = settings_writeBuffer__P168587_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_2 = msgpack_packNumberArray__P166711_mk(s); + s.tmp_2.arg0 = s.tmp_0; + s.callLocIdx = 196; s.pc = 2; return s.tmp_2; + case 2: + r0 = s.retval; + s.tmp_1.arg1 = r0; + s.callLocIdx = 197; s.pc = 1; return s.tmp_1; case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -frameCallback_draw_inline__P186443.info = {"start":11331,"length":28,"line":317,"column":47,"endLine":317,"endColumn":75,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":["spr"]} +settings_writeNumber__P168590.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 frameCallback_draw_inline__P186443_mk(s) { +function settings_writeNumber__P168590_mk(s) { checkStack(s.depth); return { - parent: s, fn: frameCallback_draw_inline__P186443, depth: s.depth + 1, + parent: s, fn: settings_writeNumber__P168590, 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 frameCallback_draw_inline__P186452(s) { +function settings_writeBuffer__P168587(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36676,43 +36208,38 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = if___draw_2_mk(s); - s.tmp_0.arg0 = s.arg0; - r0 = s.caps[0].fields["camera"]; - s.tmp_0.arg1 = r0; - if (!s.tmp_0.arg0.vtable.iface) { - setupLambda(s.tmp_0, pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "__draw"), 2); - s.callLocIdx = 1974; s.pc = 1; return s.tmp_0; - } else { - s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["__draw"]; - if (s.tmp_0.fn == null) { setupLambda(s.tmp_0, s.tmp_0.arg0.fields["__draw"], 2); s.callLocIdx = 1974; s.pc = 1; return s.tmp_0; } - else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 1974; s.pc = 1; return s.tmp_0;; } - else { s.callLocIdx = 1974; s.pc = 1; return s.tmp_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 = pxsim.settings._userClean(); + r0 = pxsim_pxtrt.panic(920); case 1: - r0 = s.retval; + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -frameCallback_draw_inline__P186452.info = {"start":11410,"length":28,"line":318,"column":49,"endLine":318,"endColumn":77,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":["spr"]} +settings_writeBuffer__P168587.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 frameCallback_draw_inline__P186452_mk(s) { +function settings_writeBuffer__P168587_mk(s) { checkStack(s.depth); return { - parent: s, fn: frameCallback_draw_inline__P186452, depth: s.depth + 1, + parent: s, fn: settings_writeBuffer__P168587, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, + arg1: undefined, } } -function frameCallback_draw_inline__P186478(s) { +function msgpack_packNumberArray__P166711(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36722,39 +36249,108 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.off___183564 = undefined; + s.n___183566 = undefined; + s.unnamed788___U2 = undefined; + s.unnamed789___U3 = undefined; + s.buf___183576 = undefined; + s.n___183582 = undefined; + s.unnamed790___U6 = undefined; + s.unnamed791___U7 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = sprites_BaseSprite__C168621_v1_2_mk(s); - s.tmp_0.arg0 = s.arg0; - r0 = s.caps[0].fields["camera"]; - s.tmp_0.arg1 = r0; - if (!checkSubtype(s.tmp_0.arg0, sprites_BaseSprite__C168621_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.__draw; - s.pc = 1; return s.tmp_0; + s.off___183564 = (0); + s.n___183566 = (undefined); + s.unnamed788___U2 = (s.arg0); + s.unnamed789___U3 = (0); case 1: + s.tmp_0 = r0 = s.unnamed789___U3; + r0 = pxsim_Array__length(s.unnamed788___U2); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 2; continue; } + r0 = pxsim_Array__getAt(s.unnamed788___U2, s.unnamed789___U3); + s.n___183566 = (r0); + s.tmp_2 = r0 = s.off___183564; + s.tmp_4 = msgpack_packNumberCore__P171894_mk(s); + s.tmp_4.arg0 = null; + s.tmp_4.arg1 = s.off___183564; + s.tmp_4.arg2 = s.n___183566; + s.callLocIdx = 33; s.pc = 5; return s.tmp_4; + case 5: r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -frameCallback_draw_inline__P186478.info = {"start":11741,"length":28,"line":324,"column":41,"endLine":324,"endColumn":69,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":["spr"]} - -function frameCallback_draw_inline__P186478_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: frameCallback_draw_inline__P186478, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, -} } - - + s.tmp_3 = r0; + r0 = (s.tmp_2 + s.tmp_3); + s.off___183564 = (r0); + r0 = (s.unnamed789___U3 + 1); + s.unnamed789___U3 = (r0); + { step = 1; continue; } + case 2: + s.unnamed788___U2 = (undefined); + r0 = pxsim.control.createBuffer(s.off___183564); + s.buf___183576 = (r0); + s.off___183564 = (0); + s.n___183582 = (undefined); + s.unnamed790___U6 = (s.arg0); + s.unnamed791___U7 = (0); + case 3: + s.tmp_0 = r0 = s.unnamed791___U7; + r0 = pxsim_Array__length(s.unnamed790___U6); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 4; continue; } + r0 = pxsim_Array__getAt(s.unnamed790___U6, s.unnamed791___U7); + s.n___183582 = (r0); + s.tmp_2 = r0 = s.off___183564; + s.tmp_4 = msgpack_packNumberCore__P171894_mk(s); + s.tmp_4.arg0 = s.buf___183576; + s.tmp_4.arg1 = s.off___183564; + s.tmp_4.arg2 = s.n___183582; + s.callLocIdx = 34; 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___183564 = (r0); + r0 = (s.unnamed791___U7 + 1); + s.unnamed791___U7 = (r0); + { step = 3; continue; } + case 4: + s.unnamed790___U6 = (undefined); + r0 = s.buf___183576; + return leave(s, r0) + default: oops() +} } } +msgpack_packNumberArray__P166711.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__P166711_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: msgpack_packNumberArray__P166711, depth: s.depth + 1, + pc: 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___183564: undefined, + n___183566: undefined, + unnamed788___U2: undefined, + unnamed789___U3: undefined, + buf___183576: undefined, + n___183582: undefined, + unnamed790___U6: undefined, + unnamed791___U7: undefined, + arg0: undefined, +} } -function frameCallback_draw_inline__P186492(s) { + + + +function msgpack_packNumberCore__P171894(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36764,39 +36360,223 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.tag___183596 = undefined; + s.fmt___183639 = 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 = sprites_BaseSprite__C168621_v1_2_mk(s); - s.tmp_0.arg0 = s.arg0; - r0 = s.caps[0].fields["camera"]; - s.tmp_0.arg1 = r0; - if (!checkSubtype(s.tmp_0.arg0, sprites_BaseSprite__C168621_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.__draw; - s.pc = 1; return s.tmp_0; + s.tag___183596 = (203); + s.tmp_1 = r0 = s.arg2; + r0 = (s.arg2 << 0); + s.tmp_2 = r0; + r0 = (s.tmp_1 == s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: + s.tmp_3 = r0 = s.arg2; + r0 = (s.arg2 >>> 0); + s.tmp_4 = r0; + r0 = (s.tmp_3 == s.tmp_4); + case 2: + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + if (!r0) { step = 19; continue; } + r0 = (-31 <= s.arg2); + s.tmp_6 = r0; + r0 = pxsim_numops_toBool(s.tmp_6); + if (r0) { step = 3; continue; } + r0 = s.tmp_6; + { step = 4; continue; } + case 3: + r0 = (s.arg2 <= 127); + case 4: + // jmp value (already in r0) + s.tmp_7 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_7); + if (!r0) { step = 7; continue; } + r0 = pxsim_numops_toBoolDecr(s.arg0); + if (!r0) { step = 5; continue; } + r0 = pxsim.BufferMethods.setByte(s.arg0, s.arg1, s.arg2); + case 5: + case 6: + r0 = 1; + { step = 23; continue; } + { step = 18; continue; } + case 7: + r0 = (0 <= s.arg2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 12; continue; } + r0 = (s.arg2 <= 255); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 8; continue; } + s.tag___183596 = (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___183596 = (205); + { step = 10; continue; } + case 9: + s.tag___183596 = (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___183596 = (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___183596 = (209); + { step = 15; continue; } + case 14: + s.tag___183596 = (210); + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + s.tmp_0 = msgpack_tagFormat__P171893_mk(s); + s.tmp_0.arg0 = s.tag___183596; + s.callLocIdx = 29; s.pc = 24; return s.tmp_0; + case 24: r0 = s.retval; - r0 = undefined; + s.fmt___183639 = (r0); + r0 = pxsim_numops_toBoolDecr(s.arg0); + if (!r0) { step = 21; continue; } + r0 = pxsim.BufferMethods.setByte(s.arg0, s.arg1, s.tag___183596); + s.tmp_0 = r0 = s.arg0; + s.tmp_1 = r0 = s.fmt___183639; + 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__P166702_mk(s); + s.tmp_1.arg0 = s.fmt___183639; + s.callLocIdx = 30; s.pc = 25; return s.tmp_1; + case 25: + r0 = s.retval; + s.tmp_0 = r0; + r0 = (s.tmp_0 + 1); + case 23: return leave(s, r0) default: oops() } } } -frameCallback_draw_inline__P186492.info = {"start":11865,"length":28,"line":326,"column":43,"endLine":326,"endColumn":71,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":["spr"]} +msgpack_packNumberCore__P171894.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 frameCallback_draw_inline__P186492_mk(s) { +function msgpack_packNumberCore__P171894_mk(s) { checkStack(s.depth); return { - parent: s, fn: frameCallback_draw_inline__P186492, depth: s.depth + 1, + parent: s, fn: msgpack_packNumberCore__P171894, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tag___183596: undefined, + fmt___183639: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function frameCallback_draw_inline__P186501(s) { +function info_winningPlayer__P169093(s) { +let r0 = s.r0, 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.winner___185374 = undefined; + s.pws___185376 = undefined; + s.goc___185380 = undefined; + s.hs___185383 = undefined; + r0 = pxsim_pxtrt.mklocRef(); + s.winner___185374 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.winner___185374, null); + s.tmp_0 = info_playersWithScores__P169091_mk(s); + s.callLocIdx = 930; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.pws___185376 = (r0); + r0 = pxsim_numops_toBoolDecr(s.pws___185376); + if (!r0) { step = 1; continue; } + s.tmp_0 = lambda_1_mk(s); + s.tmp_0.argL = globals.gameOverConfig___169525; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 931; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + s.goc___185380 = (r0); + r0 = pxsim_pxtrt.mklocRef(); + s.hs___185383 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.hs___185383, null); + r0 = pxsim_pxtcore_mkAction(2, info_winningPlayer_inline__P185387); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.hs___185383); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.winner___185374); + s.tmp_1 = helpers_arrayForEach__P166636_mk(s); + s.tmp_1.arg0 = s.pws___185376; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 934; s.pc = 5; return s.tmp_1; + case 5: + r0 = s.retval; + case 1: + case 2: + r0 = pxsim_pxtrt_ldlocRef(s.winner___185374); + return leave(s, r0) + default: oops() +} } } +info_winningPlayer__P169093.info = {"start":7926,"length":476,"line":257,"column":4,"endLine":272,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"winningPlayer","argumentNames":[]} + +function info_winningPlayer__P169093_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: info_winningPlayer__P169093, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + winner___185374: undefined, + pws___185376: undefined, + goc___185380: undefined, + hs___185383: undefined, +} } + + + + + +function info_winningPlayer_inline__P185387(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36806,37 +36586,46 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.s___185389 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = if___draw_2_mk(s); - s.tmp_0.arg0 = s.arg0; - r0 = s.caps[0].fields["camera"]; - s.tmp_0.arg1 = r0; - if (!s.tmp_0.arg0.vtable.iface) { - setupLambda(s.tmp_0, pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "__draw"), 2); - s.callLocIdx = 1980; s.pc = 1; return s.tmp_0; - } else { - s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["__draw"]; - if (s.tmp_0.fn == null) { setupLambda(s.tmp_0, s.tmp_0.arg0.fields["__draw"], 2); s.callLocIdx = 1980; s.pc = 1; return s.tmp_0; } - else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 1980; s.pc = 1; return s.tmp_0;; } - else { s.callLocIdx = 1980; s.pc = 1; return s.tmp_0; } - } - case 1: + s.tmp_0 = info_PlayerInfoImpl_score__P169133_mk(s); + r0 = s.arg0.fields["impl"]; + s.tmp_0.arg0 = r0; + s.callLocIdx = 932; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.s___185389 = (r0); + s.tmp_1 = info_isBetterScore__P169094_mk(s); + s.tmp_1.arg0 = s.s___185389; + r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); + s.tmp_1.arg1 = r0; + s.callLocIdx = 933; s.pc = 4; return s.tmp_1; + case 4: r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = pxsim_pxtrt_stlocRef(s.caps[0], s.s___185389); + r0 = pxsim_pxtrt_stlocRef(s.caps[1], s.arg0); + case 1: + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -frameCallback_draw_inline__P186501.info = {"start":11940,"length":28,"line":327,"column":45,"endLine":327,"endColumn":73,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":["spr"]} +info_winningPlayer_inline__P185387.info = {"start":8177,"length":184,"line":263,"column":24,"endLine":269,"endColumn":13,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["p"]} -function frameCallback_draw_inline__P186501_mk(s) { +function info_winningPlayer_inline__P185387_mk(s) { checkStack(s.depth); return { - parent: s, fn: frameCallback_draw_inline__P186501, depth: s.depth + 1, + parent: s, fn: info_winningPlayer_inline__P185387, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + s___185389: undefined, arg0: undefined, } } @@ -36844,7 +36633,67 @@ function frameCallback_draw_inline__P186501_mk(s) { -function Render_RayCastingRender_tilemapLoaded_inline__P186511(s) { +function info_saveAllScores__P169092(s) { +let r0 = s.r0, 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.allScoresKey___183785 = undefined; + s.allScores___183787 = undefined; + s.pws___183788 = undefined; + s.allScoresKey___183785 = ("all-scores"); + s.tmp_0 = info_playersWithScores__P169091_mk(s); + s.callLocIdx = 926; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.pws___183788 = (r0); + r0 = pxsim_numops_toBoolDecr(s.pws___183788); + if (!r0) { step = 1; continue; } + s.tmp_0 = helpers_arrayMap__P166633_mk(s); + s.tmp_0.arg0 = s.pws___183788; + s.tmp_0.arg1 = info_saveAllScores_inline__P183795; + s.callLocIdx = 928; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + s.allScores___183787 = (r0); + { step = 2; continue; } + case 1: + r0 = pxsim_Array__mk(); + s.allScores___183787 = (r0); + case 2: + s.tmp_0 = settings_writeJSON__P168589_mk(s); + s.tmp_0.arg0 = s.allScoresKey___183785; + s.tmp_0.arg1 = s.allScores___183787; + s.callLocIdx = 929; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +info_saveAllScores__P169092.info = {"start":7568,"length":352,"line":243,"column":4,"endLine":255,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"saveAllScores","argumentNames":[]} + +function info_saveAllScores__P169092_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: info_saveAllScores__P169092, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + allScoresKey___183785: undefined, + allScores___183787: undefined, + pws___183788: undefined, +} } + + + + + +function info_saveAllScores_inline__P183795(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36858,40 +36707,80 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = control_EventContext_unregisterFrameHandler__P166931_mk(s); - r0 = s.caps[0].fields["eventContext"]; + s.tmp_0 = info_PlayerInfoImpl_score__P169133_mk(s); + r0 = s.arg0.fields["impl"]; s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.caps[1]; - s.callLocIdx = 1983; s.pc = 1; return s.tmp_0; + s.callLocIdx = 927; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - s.tmp_0 = control_EventContext_unregisterFrameHandler__P166931_mk(s); - r0 = s.caps[0].fields["eventContext"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.caps[2]; - s.callLocIdx = 1984; s.pc = 2; return s.tmp_0; + return leave(s, r0) + default: oops() +} } } +info_saveAllScores_inline__P183795.info = {"start":7770,"length":25,"line":248,"column":32,"endLine":248,"endColumn":57,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["item"]} + +function info_saveAllScores_inline__P183795_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: info_saveAllScores_inline__P183795, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function settings_writeJSON__P168589(s) { +let r0 = s.r0, 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_writeString__P168588_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = JSON_stringify__P166914_mk(s); + s.tmp_1.arg0 = s.arg1; + s.tmp_1.arg1 = null; + s.tmp_1.arg2 = 0; + s.callLocIdx = 194; s.pc = 2; return s.tmp_1; case 2: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 195; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -Render_RayCastingRender_tilemapLoaded_inline__P186511.info = {"start":12073,"length":175,"line":331,"column":69,"endLine":334,"endColumn":13,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":["data"]} +settings_writeJSON__P168589.info = {"start":2092,"length":106,"line":82,"column":4,"endLine":84,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"writeJSON","argumentNames":["key","value"]} -function Render_RayCastingRender_tilemapLoaded_inline__P186511_mk(s) { +function settings_writeJSON__P168589_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_tilemapLoaded_inline__P186511, depth: s.depth + 1, + parent: s, fn: settings_writeJSON__P168589, 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 Render_RayCastingRender_render__P171791(s) { +function settings_writeString__P168588(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36901,519 +36790,720 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.drawStart___186564 = undefined; - s.drawHeight___186565 = undefined; - s.lastDist___186566 = undefined; - s.lastTexX___186569 = undefined; - s.lastMapX___186572 = undefined; - s.lastMapY___186575 = undefined; - s.cameraRangeAngle___186599 = undefined; - s.ms___186605 = undefined; - s.x___186755 = undefined; - s.cameraX___186760 = undefined; - s.rayDirX___186775 = undefined; - s.rayDirY___186786 = undefined; - s.mapX___186803 = undefined; - s.mapY___186808 = undefined; - s.sideDistX___186813 = undefined; - s.sideDistY___186814 = undefined; - s.deltaDistX___186815 = undefined; - s.deltaDistY___186822 = undefined; - s.mapStepX___186829 = undefined; - s.mapStepY___186830 = undefined; - s.sideWallHit___186831 = undefined; - s.color___186902 = undefined; - s.isOutsideMap___186903 = undefined; - s.perpWallDist___186954 = undefined; - s.wallX___186955 = undefined; - s.tex___187028 = undefined; - s.texX___187035 = undefined; - s.lineHeight___187058 = undefined; - s.drawEnd___187064 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = Render_RayCastingRender_xFpx__P171759_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 2036; s.pc = 36; return s.tmp_2; - case 36: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["selfXFpx"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = Render_RayCastingRender_yFpx__P171760_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 2037; s.pc = 37; return s.tmp_2; - case 37: + s.tmp_0 = settings_writeBuffer__P168587_mk(s); + s.tmp_0.arg0 = s.arg0; + r0 = pxsim.control.createBufferFromUTF8(s.arg1); + s.tmp_0.arg1 = r0; + s.callLocIdx = 193; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +settings_writeString__P168588.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__P168588_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: settings_writeString__P168588, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function JSON_stringify__P166914(s) { +let r0 = s.r0, 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.ss___183815 = 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(JSON_Stringifier__C171946_VT); + s.ss___183815 = (r0); + s.tmp_0 = r0 = s.ss___183815; + r0 = pxsim_String_.mkEmpty(); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["selfYFpx"] = (s.tmp_1); - s.drawStart___186564 = (0); - s.drawHeight___186565 = (0); - s.lastDist___186566 = (-1); - s.lastTexX___186569 = (-1); - s.lastMapX___186572 = (-1); - s.lastMapY___186575 = (-1); - s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["spriteMotionZ"]; - s.tmp_5 = r0; - r0 = s.arg0.fields["sprSelf"]; - r0 = r0.fields["id"]; - s.tmp_6 = r0; - r0 = pxsim_Array__getAt(s.tmp_5, s.tmp_6); - r0 = r0.fields["p"]; - s.tmp_4 = r0; - r0 = s.arg0.fields["sprSelf"]; - r0 = r0.fields["_height"]; - s.tmp_7 = r0; - r0 = (s.tmp_4 + s.tmp_7); - s.tmp_3 = r0; - r0 = (s.tmp_3 - 512); - s.tmp_2 = r0; - r0 = s.arg0.fields["cameraOffsetZ_fpx"]; - s.tmp_8 = r0; - r0 = (s.tmp_2 + s.tmp_8); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["viewZPos"] = (s.tmp_1); - r0 = s.arg0.fields["_fov"]; - s.tmp_1 = r0; - r0 = pxsim.Math_.atan(s.tmp_1); + r0 = (s.tmp_0).fields["currIndent"] = (s.tmp_1); + r0 = (s.arg2 | 0); + s.arg2 = (r0); + r0 = (s.arg2 < 0); s.tmp_0 = r0; - r0 = (s.tmp_0 + 0.1); - s.cameraRangeAngle___186599 = (r0); - r0 = pxsim_numops_toBoolDecr(0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = pxsim_pxtcore_mkAction(1, Render_RayCastingRender_render_inline__P186608); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = control_benchmark__P166874_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 2040; s.pc = 38; return s.tmp_1; - case 38: - r0 = s.retval; - s.ms___186605 = (r0); - s.tmp_0 = helpers_imagePrint__P168517_mk(s); - r0 = s.arg0.fields["tempScreen"]; - s.tmp_0.arg0 = r0; - r0 = pxsim_numops.toString(s.ms___186605); - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = 0; - s.tmp_0.arg3 = 10; - s.tmp_0.arg4 = undefined; - s.tmp_0.arg5 = undefined; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 2041; s.pc = 39; return s.tmp_0; - case 39: - r0 = s.retval; + s.arg2 = (0); case 1: case 2: - s.x___186755 = (0); - case 3: - r0 = (s.x___186755 < globals.SW___174806); + r0 = (s.arg2 > 10); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 35; continue; } - r0 = s.arg0.fields["cameraOffsetX"]; + if (!r0) { step = 3; continue; } + s.arg2 = (10); + case 3: + case 4: + s.tmp_0 = r0 = s.ss___183815; + r0 = pxsim_String_.mkEmpty(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["indentStep"] = (s.tmp_1); + s.tmp_0 = r0 = s.ss___183815; + r0 = pxsim_String_.mkEmpty(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["currIndent"] = (s.tmp_1); + r0 = (s.ss___183815).fields["indent"] = (s.arg2); + case 5: + s.tmp_0 = r0 = s.arg2; + r0 = (s.tmp_0 - 1); + s.arg2 = (r0); + r0 = (s.tmp_0 > 0); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 6; continue; } + s.tmp_2 = r0 = s.ss___183815; + r0 = s.tmp_2.fields["indentStep"]; s.tmp_5 = r0; - r0 = (s.x___186755 + s.tmp_5); + if ((s.tmp_5) && (s.tmp_5).vtable) { + setupResume(s, 7); + pxsim_String__stringConv(s.tmp_5); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_5) + ""; } + case 7: + r0 = s.retval; s.tmp_4 = r0; - r0 = (s.tmp_4 << 8); + r0 = pxsim_String__concat(s.tmp_4, " "); s.tmp_3 = r0; - r0 = (s.tmp_3 << 1); - s.tmp_2 = r0; - r0 = pxsim.Math_.idiv(s.tmp_2, globals.SW___174806); - s.tmp_1 = r0; - r0 = (256 - s.tmp_1); - s.cameraX___186760 = (r0); - r0 = s.arg0.fields["dirXFpx"]; + r0 = (s.tmp_2).fields["indentStep"] = (s.tmp_3); + { step = 5; continue; } + case 6: + s.tmp_0 = JSON_Stringifier_go__P171948_mk(s); + s.tmp_0.arg0 = s.ss___183815; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 59; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + return leave(s, r0) + default: oops() +} } } +JSON_stringify__P166914.info = {"start":8773,"length":414,"line":288,"column":4,"endLine":300,"endColumn":5,"fileName":"pxt_modules/base/json.ts","functionName":"stringify","argumentNames":["value","replacer","indent"]} + +function JSON_stringify__P166914_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: JSON_stringify__P166914, depth: s.depth + 1, + pc: 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, + ss___183815: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, +} } + + + + + +function JSON_Stringifier_go__P171948(s) { +let r0 = s.r0, 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.t___183856 = undefined; + s.arr___183880 = undefined; + s.r___183886 = undefined; + s.i___183903 = undefined; + s.keys___183967 = undefined; + s.r___183974 = undefined; + s.i___183991 = undefined; + s.k___183997 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, JSON_Stringifier__C171946_VT)) failedCast(r0); + r0 = pxsim_pxtcore.typeOf(s.arg1); + s.t___183856 = (r0); + r0 = (s.t___183856 == "string"); s.tmp_0 = r0; - r0 = s.arg0.fields["planeX"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 * s.cameraX___186760); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_1 = JSON_Stringifier_doString__P171947_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_1.arg1 = s.arg1; + s.callLocIdx = 53; s.pc = 38; return s.tmp_1; + case 38: + r0 = s.retval; + { step = 37; continue; } + { step = 36; continue; } + case 1: + r0 = (s.t___183856 == "boolean"); s.tmp_2 = r0; - r0 = (s.tmp_2 >> 8); - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.rayDirX___186775 = (r0); - r0 = s.arg0.fields["dirYFpx"]; - s.tmp_0 = r0; - r0 = s.arg0.fields["planeY"]; + r0 = pxsim_numops_toBool(s.tmp_2); + if (!r0) { step = 2; continue; } + r0 = s.tmp_2; + { step = 3; continue; } + case 2: + r0 = (s.t___183856 == "number"); + case 3: + // jmp value (already in r0) s.tmp_3 = r0; - r0 = (s.tmp_3 * s.cameraX___186760); - s.tmp_2 = r0; - r0 = (s.tmp_2 >> 8); - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.rayDirY___186786 = (r0); - r0 = (s.rayDirX___186775 == 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + r0 = pxsim_numops_toBool(s.tmp_3); if (!r0) { step = 4; continue; } - s.rayDirX___186775 = (1); + r0 = s.tmp_3; + { step = 5; continue; } case 4: + r0 = (s.arg1 == null); case 5: - r0 = (s.rayDirY___186786 == 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); if (!r0) { step = 6; continue; } - s.rayDirY___186786 = (1); + r0 = pxsim_String_.mkEmpty(); + s.tmp_5 = r0; + if ((s.arg1) && (s.arg1).vtable) { + setupResume(s, 39); + pxsim_String__stringConv(s.arg1); + checkResumeConsumed(); + return; + } else { s.retval = (s.arg1) + ""; } + case 39: + r0 = s.retval; + s.tmp_6 = r0; + r0 = pxsim_String__concat(s.tmp_5, s.tmp_6); + { step = 37; continue; } + { step = 35; continue; } case 6: - case 7: - r0 = s.arg0.fields["selfXFpx"]; + r0 = pxsim_Array_.isArray(s.arg1); + s.tmp_7 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_7); + if (!r0) { step = 19; continue; } + s.arr___183880 = (s.arg1); + r0 = pxsim_Array__length(s.arr___183880); + s.tmp_1 = r0; + r0 = (s.tmp_1 == 0); s.tmp_0 = r0; - r0 = (s.tmp_0 >> 8); - s.mapX___186803 = (r0); - r0 = s.arg0.fields["selfYFpx"]; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; continue; } + r0 = "[]"; + { step = 37; continue; } + { step = 18; continue; } + case 7: + s.r___183886 = ("["); + r0 = s.arg0.fields["indent"]; s.tmp_0 = r0; - r0 = (s.tmp_0 >> 8); - s.mapY___186808 = (r0); - s.sideDistX___186813 = (0); - s.sideDistY___186814 = (0); - s.tmp_0 = Math_abs__P166655_mk(s); - r0 = pxsim.Math_.idiv(globals.one2___174831, s.rayDirX___186775); - s.tmp_0.arg0 = r0; - s.callLocIdx = 2042; s.pc = 40; return s.tmp_0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 8; continue; } + s.tmp_1 = r0 = s.arg0; + r0 = s.tmp_1.fields["currIndent"]; + s.tmp_4 = r0; + if ((s.tmp_4) && (s.tmp_4).vtable) { + setupResume(s, 40); + pxsim_String__stringConv(s.tmp_4); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_4) + ""; } case 40: r0 = s.retval; - s.deltaDistX___186815 = (r0); - s.tmp_0 = Math_abs__P166655_mk(s); - r0 = pxsim.Math_.idiv(globals.one2___174831, s.rayDirY___186786); - s.tmp_0.arg0 = r0; - s.callLocIdx = 2043; s.pc = 41; return s.tmp_0; + s.tmp_3 = r0; + r0 = s.arg0.fields["indentStep"]; + s.tmp_6 = r0; + if ((s.tmp_6) && (s.tmp_6).vtable) { + setupResume(s, 41); + pxsim_String__stringConv(s.tmp_6); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_6) + ""; } case 41: r0 = s.retval; - s.deltaDistY___186822 = (r0); - s.mapStepX___186829 = (0); - s.mapStepY___186830 = (0); - s.sideWallHit___186831 = (false); - r0 = (s.rayDirX___186775 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 8; continue; } - s.mapStepX___186829 = (-1); - r0 = s.arg0.fields["selfXFpx"]; + s.tmp_5 = r0; + r0 = pxsim_String__concat(s.tmp_3, s.tmp_5); s.tmp_2 = r0; - r0 = (s.mapX___186803 << 8); - s.tmp_3 = r0; - r0 = (s.tmp_2 - s.tmp_3); - s.tmp_1 = r0; - r0 = (s.tmp_1 * s.deltaDistX___186815); + r0 = (s.tmp_1).fields["currIndent"] = (s.tmp_2); + if ((s.r___183886) && (s.r___183886).vtable) { + setupResume(s, 42); + pxsim_String__stringConv(s.r___183886); + checkResumeConsumed(); + return; + } else { s.retval = (s.r___183886) + ""; } + case 42: + r0 = s.retval; s.tmp_0 = r0; - r0 = (s.tmp_0 >> 8); - s.sideDistX___186813 = (r0); - { step = 9; continue; } + r0 = pxsim_String__concat(s.tmp_0, "\n"); + s.r___183886 = (r0); case 8: - s.mapStepX___186829 = (1); - r0 = (s.mapX___186803 << 8); - s.tmp_3 = r0; - r0 = (s.tmp_3 + 256); - s.tmp_2 = r0; - r0 = s.arg0.fields["selfXFpx"]; - s.tmp_4 = r0; - r0 = (s.tmp_2 - s.tmp_4); - s.tmp_1 = r0; - r0 = (s.tmp_1 * s.deltaDistX___186815); - s.tmp_0 = r0; - r0 = (s.tmp_0 >> 8); - s.sideDistX___186813 = (r0); case 9: - r0 = (s.rayDirY___186786 < 0); + s.i___183903 = (0); + case 10: + s.tmp_1 = r0 = s.i___183903; + r0 = pxsim_Array__length(s.arr___183880); + 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.mapStepY___186830 = (-1); - r0 = s.arg0.fields["selfYFpx"]; - s.tmp_2 = r0; - r0 = (s.mapY___186808 << 8); + if (!r0) { step = 15; continue; } + if ((s.r___183886) && (s.r___183886).vtable) { + setupResume(s, 43); + pxsim_String__stringConv(s.r___183886); + checkResumeConsumed(); + return; + } else { s.retval = (s.r___183886) + ""; } + case 43: + r0 = s.retval; s.tmp_3 = r0; - r0 = (s.tmp_2 - s.tmp_3); - s.tmp_1 = r0; - r0 = (s.tmp_1 * s.deltaDistY___186822); - s.tmp_0 = r0; - r0 = (s.tmp_0 >> 8); - s.sideDistY___186814 = (r0); - { step = 11; continue; } - case 10: - s.mapStepY___186830 = (1); - r0 = (s.mapY___186808 << 8); + r0 = s.arg0.fields["currIndent"]; + s.tmp_7 = r0; + if ((s.tmp_7) && (s.tmp_7).vtable) { + setupResume(s, 44); + pxsim_String__stringConv(s.tmp_7); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_7) + ""; } + case 44: + r0 = s.retval; + s.tmp_6 = r0; + s.tmp_10 = JSON_Stringifier_go__P171948_mk(s); + s.tmp_10.arg0 = s.arg0; + r0 = pxsim_Array__getAt(s.arr___183880, s.i___183903); + s.tmp_10.arg1 = r0; + s.callLocIdx = 54; s.pc = 45; return s.tmp_10; + case 45: + r0 = s.retval; + s.tmp_9 = r0; + if ((s.tmp_9) && (s.tmp_9).vtable) { + setupResume(s, 46); + pxsim_String__stringConv(s.tmp_9); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_9) + ""; } + case 46: + r0 = s.retval; + s.tmp_8 = r0; + r0 = pxsim_String__concat(s.tmp_6, s.tmp_8); + s.tmp_5 = r0; + if ((s.tmp_5) && (s.tmp_5).vtable) { + setupResume(s, 47); + pxsim_String__stringConv(s.tmp_5); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_5) + ""; } + case 47: + r0 = s.retval; + s.tmp_4 = r0; + r0 = pxsim_String__concat(s.tmp_3, s.tmp_4); + s.r___183886 = (r0); + s.tmp_1 = r0 = s.i___183903; + r0 = pxsim_Array__length(s.arr___183880); s.tmp_3 = r0; - r0 = (s.tmp_3 + 256); + r0 = (s.tmp_3 - 1); s.tmp_2 = r0; - r0 = s.arg0.fields["selfYFpx"]; - s.tmp_4 = r0; - r0 = (s.tmp_2 - s.tmp_4); - s.tmp_1 = r0; - r0 = (s.tmp_1 * s.deltaDistY___186822); + r0 = (s.tmp_1 != s.tmp_2); s.tmp_0 = r0; - r0 = (s.tmp_0 >> 8); - s.sideDistY___186814 = (r0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 11; continue; } + if ((s.r___183886) && (s.r___183886).vtable) { + setupResume(s, 48); + pxsim_String__stringConv(s.r___183886); + checkResumeConsumed(); + return; + } else { s.retval = (s.r___183886) + ""; } + case 48: + r0 = s.retval; + s.tmp_4 = r0; + r0 = pxsim_String__concat(s.tmp_4, ","); + s.r___183886 = (r0); case 11: - s.color___186902 = (0); - s.isOutsideMap___186903 = (false); case 12: - r0 = pxsim_numops_toBoolDecr(true); - if (!r0) { step = 19; continue; } - r0 = (s.sideDistX___186813 < s.sideDistY___186814); + r0 = s.arg0.fields["indent"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 13; continue; } - r0 = (s.sideDistX___186813 + s.deltaDistX___186815); - s.sideDistX___186813 = (r0); - r0 = (s.mapX___186803 + s.mapStepX___186829); - s.mapX___186803 = (r0); - s.sideWallHit___186831 = (false); - { step = 14; continue; } + if ((s.r___183886) && (s.r___183886).vtable) { + setupResume(s, 49); + pxsim_String__stringConv(s.r___183886); + checkResumeConsumed(); + return; + } else { s.retval = (s.r___183886) + ""; } + case 49: + r0 = s.retval; + s.tmp_1 = r0; + r0 = pxsim_String__concat(s.tmp_1, "\n"); + s.r___183886 = (r0); case 13: - r0 = (s.sideDistY___186814 + s.deltaDistY___186822); - s.sideDistY___186814 = (r0); - r0 = (s.mapY___186808 + s.mapStepY___186830); - s.mapY___186808 = (r0); - s.sideWallHit___186831 = (true); case 14: - s.tmp_1 = tiles_TileMapData_isOutsideMap__P169256_mk(s); - r0 = s.arg0.fields["map"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.mapX___186803; - s.tmp_1.arg2 = s.mapY___186808; - s.callLocIdx = 2044; s.pc = 42; return s.tmp_1; - case 42: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 15; continue; } - s.isOutsideMap___186903 = (true); - { step = 19; continue; } + r0 = (s.i___183903 + 1); + s.i___183903 = (r0); + { step = 10; continue; } case 15: - case 16: - r0 = s.arg0.fields["map"]; - s.tmp_1 = r0; - r0 = s.tmp_1.fields["layers"]; - s.tmp_3 = r0; - r0 = pxsim_ImageMethods.getPixel(s.tmp_3, s.mapX___186803, s.mapY___186808); - s.tmp_2 = r0; - r0 = (s.tmp_2 === 2); + r0 = s.arg0.fields["indent"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 17; continue; } - r0 = s.arg0.fields["mapData"]; - s.tmp_4 = r0; - r0 = (s.mapX___186803 | 0); - s.tmp_7 = r0; - r0 = (4 + s.tmp_7); - s.tmp_6 = r0; - r0 = (s.mapY___186808 | 0); - s.tmp_9 = r0; - r0 = s.arg0.fields["map"]; - s.tmp_11 = r0; - r0 = s.tmp_11.fields["_width"]; - s.tmp_10 = r0; - r0 = (s.tmp_9 * s.tmp_10); - s.tmp_8 = r0; - r0 = (s.tmp_6 + s.tmp_8); - s.tmp_5 = r0; - r0 = pxsim_Array__getAt(s.tmp_4, s.tmp_5); - s.color___186902 = (r0); - { step = 19; continue; } + if (!r0) { step = 16; continue; } + s.tmp_1 = r0 = s.arg0; + s.tmp_3 = helpers_stringSlice__P166646_mk(s); + r0 = s.arg0.fields["currIndent"]; + s.tmp_3.arg0 = r0; + r0 = s.arg0.fields["indent"]; + s.tmp_3.arg1 = r0; + s.tmp_3.arg2 = undefined; + s.callLocIdx = 55; s.pc = 50; return s.tmp_3; + case 50: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_1).fields["currIndent"] = (s.tmp_2); + case 16: case 17: + if ((s.r___183886) && (s.r___183886).vtable) { + setupResume(s, 51); + pxsim_String__stringConv(s.r___183886); + checkResumeConsumed(); + return; + } else { s.retval = (s.r___183886) + ""; } + case 51: + r0 = s.retval; + s.tmp_0 = r0; + r0 = s.arg0.fields["currIndent"]; + s.tmp_4 = r0; + if ((s.tmp_4) && (s.tmp_4).vtable) { + setupResume(s, 52); + pxsim_String__stringConv(s.tmp_4); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_4) + ""; } + case 52: + r0 = s.retval; + s.tmp_3 = r0; + r0 = pxsim_String__concat(s.tmp_3, "]"); + s.tmp_2 = r0; + if ((s.tmp_2) && (s.tmp_2).vtable) { + setupResume(s, 53); + pxsim_String__stringConv(s.tmp_2); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_2) + ""; } + case 53: + r0 = s.retval; + s.tmp_1 = r0; + r0 = pxsim_String__concat(s.tmp_0, s.tmp_1); + s.r___183886 = (r0); + r0 = s.r___183886; + { step = 37; continue; } case 18: - { step = 12; continue; } + { step = 34; continue; } case 19: - r0 = pxsim_numops_toBoolDecr(s.isOutsideMap___186903); + r0 = pxsim_pxtrt.keysOf(s.arg1); + s.keys___183967 = (r0); + r0 = pxsim_Array__length(s.keys___183967); + 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; } - { step = 34; continue; } + r0 = "{}"; + { step = 37; continue; } case 20: case 21: - s.perpWallDist___186954 = (undefined); - s.wallX___186955 = (0); - r0 = pxsim_numops_toBoolDecr(s.sideWallHit___186831); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + s.r___183974 = ("{"); + r0 = s.arg0.fields["indent"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 22; continue; } - r0 = (s.mapX___186803 << 8); - s.tmp_5 = r0; - r0 = s.arg0.fields["selfXFpx"]; - s.tmp_6 = r0; - r0 = (s.tmp_5 - s.tmp_6); + s.tmp_1 = r0 = s.arg0; + r0 = s.tmp_1.fields["currIndent"]; s.tmp_4 = r0; - r0 = (1 - s.mapStepX___186829); - s.tmp_8 = r0; - r0 = (s.tmp_8 << 7); - s.tmp_7 = r0; - r0 = (s.tmp_4 + s.tmp_7); + if ((s.tmp_4) && (s.tmp_4).vtable) { + setupResume(s, 54); + pxsim_String__stringConv(s.tmp_4); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_4) + ""; } + case 54: + r0 = s.retval; s.tmp_3 = r0; - r0 = (s.tmp_3 << 8); + r0 = s.arg0.fields["indentStep"]; + s.tmp_6 = r0; + if ((s.tmp_6) && (s.tmp_6).vtable) { + setupResume(s, 55); + pxsim_String__stringConv(s.tmp_6); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_6) + ""; } + case 55: + r0 = s.retval; + s.tmp_5 = r0; + r0 = pxsim_String__concat(s.tmp_3, s.tmp_5); s.tmp_2 = r0; - r0 = pxsim.Math_.idiv(s.tmp_2, s.rayDirX___186775); - s.perpWallDist___186954 = (r0); - r0 = s.arg0.fields["selfYFpx"]; + r0 = (s.tmp_1).fields["currIndent"] = (s.tmp_2); + if ((s.r___183974) && (s.r___183974).vtable) { + setupResume(s, 56); + pxsim_String__stringConv(s.r___183974); + checkResumeConsumed(); + return; + } else { s.retval = (s.r___183974) + ""; } + case 56: + r0 = s.retval; s.tmp_0 = r0; - r0 = (s.perpWallDist___186954 * s.rayDirY___186786); - s.tmp_2 = r0; - r0 = (s.tmp_2 >> 8); - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.wallX___186955 = (r0); - { step = 23; continue; } + r0 = pxsim_String__concat(s.tmp_0, "\n"); + s.r___183974 = (r0); case 22: - r0 = (s.mapY___186808 << 8); - s.tmp_3 = r0; - r0 = s.arg0.fields["selfYFpx"]; - s.tmp_4 = r0; - r0 = (s.tmp_3 - s.tmp_4); + case 23: + s.i___183991 = (0); + case 24: + s.tmp_1 = r0 = s.i___183991; + r0 = pxsim_Array__length(s.keys___183967); s.tmp_2 = r0; - r0 = (1 - s.mapStepY___186830); - s.tmp_6 = r0; - r0 = (s.tmp_6 << 7); - s.tmp_5 = r0; - r0 = (s.tmp_2 + s.tmp_5); - s.tmp_1 = r0; - r0 = (s.tmp_1 << 8); + r0 = (s.tmp_1 < s.tmp_2); s.tmp_0 = r0; - r0 = pxsim.Math_.idiv(s.tmp_0, s.rayDirY___186786); - s.perpWallDist___186954 = (r0); - r0 = s.arg0.fields["selfXFpx"]; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 31; continue; } + r0 = pxsim_Array__getAt(s.keys___183967, s.i___183991); + s.k___183997 = (r0); + if ((s.r___183974) && (s.r___183974).vtable) { + setupResume(s, 57); + pxsim_String__stringConv(s.r___183974); + checkResumeConsumed(); + return; + } else { s.retval = (s.r___183974) + ""; } + case 57: + r0 = s.retval; s.tmp_0 = r0; - r0 = (s.perpWallDist___186954 * s.rayDirX___186775); + r0 = s.arg0.fields["currIndent"]; + s.tmp_4 = r0; + if ((s.tmp_4) && (s.tmp_4).vtable) { + setupResume(s, 58); + pxsim_String__stringConv(s.tmp_4); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_4) + ""; } + case 58: + r0 = s.retval; + s.tmp_3 = r0; + s.tmp_7 = JSON_Stringifier_doString__P171947_mk(s); + s.tmp_7.arg0 = s.arg0; + s.tmp_7.arg1 = s.k___183997; + s.callLocIdx = 56; s.pc = 59; return s.tmp_7; + case 59: + r0 = s.retval; + s.tmp_6 = r0; + if ((s.tmp_6) && (s.tmp_6).vtable) { + setupResume(s, 60); + pxsim_String__stringConv(s.tmp_6); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_6) + ""; } + case 60: + r0 = s.retval; + s.tmp_5 = r0; + r0 = pxsim_String__concat(s.tmp_3, s.tmp_5); s.tmp_2 = r0; - r0 = (s.tmp_2 >> 8); - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.wallX___186955 = (r0); - case 23: - r0 = (s.wallX___186955 & globals.FPX_MAX___174837); - s.wallX___186955 = (r0); - r0 = s.arg0.fields["textures"]; - s.tmp_0 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.color___186902); - s.tex___187028 = (r0); - r0 = pxsim_numops_toBoolDecr(s.tex___187028); + if ((s.tmp_2) && (s.tmp_2).vtable) { + setupResume(s, 61); + pxsim_String__stringConv(s.tmp_2); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_2) + ""; } + case 61: + r0 = s.retval; s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = pxsim_String__concat(s.tmp_0, s.tmp_1); + s.r___183974 = (r0); + r0 = s.arg0.fields["indent"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 24; continue; } - { step = 34; continue; } - case 24: + if (!r0) { step = 25; continue; } + if ((s.r___183974) && (s.r___183974).vtable) { + setupResume(s, 62); + pxsim_String__stringConv(s.r___183974); + checkResumeConsumed(); + return; + } else { s.retval = (s.r___183974) + ""; } + case 62: + r0 = s.retval; + s.tmp_1 = r0; + r0 = pxsim_String__concat(s.tmp_1, ": "); + s.r___183974 = (r0); + { step = 26; continue; } case 25: - s.tmp_3 = r0 = s.wallX___186955; - r0 = pxsim_ImageMethods.width(s.tex___187028); - s.tmp_4 = r0; - r0 = (s.tmp_3 * s.tmp_4); - s.tmp_2 = r0; - r0 = (s.tmp_2 >> 8); - s.texX___187035 = (r0); - r0 = (s.perpWallDist___186954 !== s.lastDist___186566); + if ((s.r___183974) && (s.r___183974).vtable) { + setupResume(s, 63); + pxsim_String__stringConv(s.r___183974); + checkResumeConsumed(); + return; + } else { s.retval = (s.r___183974) + ""; } + case 63: + r0 = s.retval; s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 26; continue; } - r0 = s.tmp_0; - { step = 31; continue; } + r0 = pxsim_String__concat(s.tmp_0, ":"); + s.r___183974 = (r0); case 26: - r0 = (s.texX___187035 !== s.lastTexX___186569); + if ((s.r___183974) && (s.r___183974).vtable) { + setupResume(s, 64); + pxsim_String__stringConv(s.r___183974); + checkResumeConsumed(); + return; + } else { s.retval = (s.r___183974) + ""; } + case 64: + r0 = s.retval; + s.tmp_0 = r0; + s.tmp_3 = JSON_Stringifier_go__P171948_mk(s); + s.tmp_3.arg0 = s.arg0; + r0 = pxsim_pxtrt.mapGetGeneric(s.arg1, s.k___183997); + s.tmp_3.arg1 = r0; + s.callLocIdx = 57; s.pc = 65; return s.tmp_3; + case 65: + r0 = s.retval; + s.tmp_2 = r0; + if ((s.tmp_2) && (s.tmp_2).vtable) { + setupResume(s, 66); + pxsim_String__stringConv(s.tmp_2); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_2) + ""; } + case 66: + r0 = s.retval; s.tmp_1 = r0; - r0 = pxsim_numops_toBool(s.tmp_1); + r0 = pxsim_String__concat(s.tmp_0, s.tmp_1); + s.r___183974 = (r0); + s.tmp_1 = r0 = s.i___183991; + r0 = pxsim_Array__length(s.keys___183967); + 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 = 27; continue; } - r0 = s.tmp_1; - { step = 28; continue; } + if ((s.r___183974) && (s.r___183974).vtable) { + setupResume(s, 67); + pxsim_String__stringConv(s.r___183974); + checkResumeConsumed(); + return; + } else { s.retval = (s.r___183974) + ""; } + case 67: + r0 = s.retval; + s.tmp_4 = r0; + r0 = pxsim_String__concat(s.tmp_4, ","); + s.r___183974 = (r0); case 27: - r0 = (s.mapX___186803 !== s.lastMapX___186572); case 28: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = pxsim_numops_toBool(s.tmp_2); + r0 = s.arg0.fields["indent"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 29; continue; } - r0 = s.tmp_2; - { step = 30; continue; } + if ((s.r___183974) && (s.r___183974).vtable) { + setupResume(s, 68); + pxsim_String__stringConv(s.r___183974); + checkResumeConsumed(); + return; + } else { s.retval = (s.r___183974) + ""; } + case 68: + r0 = s.retval; + s.tmp_1 = r0; + r0 = pxsim_String__concat(s.tmp_1, "\n"); + s.r___183974 = (r0); case 29: - r0 = (s.mapY___186808 !== s.lastMapY___186575); case 30: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = s.tmp_3; + r0 = (s.i___183991 + 1); + s.i___183991 = (r0); + { step = 24; continue; } case 31: - // jmp value (already in r0) - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - if (!r0) { step = 32; continue; } - r0 = s.arg0.fields["wallHeightInView"]; - s.tmp_5 = r0; - r0 = (s.tmp_5 / s.perpWallDist___186954); - s.lineHeight___187058 = (r0); - r0 = s.arg0.fields["viewZPos"]; - s.tmp_2 = r0; - r0 = (s.lineHeight___187058 * s.tmp_2); - s.tmp_1 = r0; - r0 = s.arg0.fields["tilemapScaleSize"]; - s.tmp_3 = r0; - r0 = (s.tmp_1 / s.tmp_3); - s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - s.drawEnd___187064 = (r0); - s.tmp_1 = r0 = s.drawEnd___187064; - r0 = s.arg0.fields["_wallZScale"]; - s.tmp_3 = r0; - r0 = (s.lineHeight___187058 * s.tmp_3); - s.tmp_2 = r0; - r0 = (s.tmp_1 - s.tmp_2); + r0 = s.arg0.fields["indent"]; s.tmp_0 = r0; - r0 = (s.tmp_0 + 1); - s.drawStart___186564 = (r0); - r0 = pxsim.Math_.ceil(s.drawEnd___187064); - s.tmp_1 = r0; - r0 = pxsim.Math_.ceil(s.drawStart___186564); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 32; continue; } + s.tmp_1 = r0 = s.arg0; + s.tmp_3 = helpers_stringSlice__P166646_mk(s); + r0 = s.arg0.fields["currIndent"]; + s.tmp_3.arg0 = r0; + r0 = s.arg0.fields["indent"]; + s.tmp_3.arg1 = r0; + s.tmp_3.arg2 = undefined; + s.callLocIdx = 58; s.pc = 69; return s.tmp_3; + case 69: + r0 = s.retval; s.tmp_2 = r0; - r0 = (s.tmp_1 - s.tmp_2); - s.tmp_0 = r0; - r0 = (s.tmp_0 + 1); - s.drawHeight___186565 = (r0); - r0 = (s.drawStart___186564 + globals.SHHalf___174804); - s.drawStart___186564 = (r0); - s.lastDist___186566 = (s.perpWallDist___186954); - s.lastTexX___186569 = (s.texX___187035); - s.lastMapX___186572 = (s.mapX___186803); - s.lastMapY___186575 = (s.mapY___186808); + r0 = (s.tmp_1).fields["currIndent"] = (s.tmp_2); case 32: case 33: - s.tmp_0 = helpers_imageBlitRow__P168481_mk(s); - r0 = s.arg0.fields["tempScreen"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.x___186755; - s.tmp_0.arg2 = s.drawStart___186564; - s.tmp_0.arg3 = s.tex___187028; - s.tmp_0.arg4 = s.texX___187035; - s.tmp_0.arg5 = s.drawHeight___186565; - s.callLocIdx = 2047; s.pc = 43; return s.tmp_0; - case 43: + if ((s.r___183974) && (s.r___183974).vtable) { + setupResume(s, 70); + pxsim_String__stringConv(s.r___183974); + checkResumeConsumed(); + return; + } else { s.retval = (s.r___183974) + ""; } + case 70: r0 = s.retval; - r0 = s.arg0.fields["dist"]; s.tmp_0 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, s.x___186755, s.perpWallDist___186954); + r0 = s.arg0.fields["currIndent"]; + s.tmp_4 = r0; + if ((s.tmp_4) && (s.tmp_4).vtable) { + setupResume(s, 71); + pxsim_String__stringConv(s.tmp_4); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_4) + ""; } + case 71: + r0 = s.retval; + s.tmp_3 = r0; + r0 = pxsim_String__concat(s.tmp_3, "}"); + s.tmp_2 = r0; + if ((s.tmp_2) && (s.tmp_2).vtable) { + setupResume(s, 72); + pxsim_String__stringConv(s.tmp_2); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_2) + ""; } + case 72: + r0 = s.retval; + s.tmp_1 = r0; + r0 = pxsim_String__concat(s.tmp_0, s.tmp_1); + s.r___183974 = (r0); + r0 = s.r___183974; + { step = 37; continue; } case 34: - r0 = (s.x___186755 + 1); - s.x___186755 = (r0); - { step = 3; continue; } case 35: - s.tmp_0 = Render_RayCastingRender_drawSprites__P171792_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 2048; s.pc = 44; return s.tmp_0; - case 44: - r0 = s.retval; + case 36: r0 = undefined; + case 37: return leave(s, r0) default: oops() } } } -Render_RayCastingRender_render__P171791.info = {"start":17614,"length":7237,"line":469,"column":8,"endLine":628,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"render","argumentNames":["this"]} +JSON_Stringifier_go__P171948.info = {"start":6319,"length":2076,"line":223,"column":8,"endLine":279,"endColumn":9,"fileName":"pxt_modules/base/json.ts","functionName":"go","argumentNames":["this","v"]} -function Render_RayCastingRender_render__P171791_mk(s) { +function JSON_Stringifier_go__P171948_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_render__P171791, depth: s.depth + 1, + parent: s, fn: JSON_Stringifier_go__P171948, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -37426,44 +37516,23 @@ function Render_RayCastingRender_render__P171791_mk(s) { tmp_8: undefined, tmp_9: undefined, tmp_10: undefined, - tmp_11: undefined, - drawStart___186564: undefined, - drawHeight___186565: undefined, - lastDist___186566: undefined, - lastTexX___186569: undefined, - lastMapX___186572: undefined, - lastMapY___186575: undefined, - cameraRangeAngle___186599: undefined, - ms___186605: undefined, - x___186755: undefined, - cameraX___186760: undefined, - rayDirX___186775: undefined, - rayDirY___186786: undefined, - mapX___186803: undefined, - mapY___186808: undefined, - sideDistX___186813: undefined, - sideDistY___186814: undefined, - deltaDistX___186815: undefined, - deltaDistY___186822: undefined, - mapStepX___186829: undefined, - mapStepY___186830: undefined, - sideWallHit___186831: undefined, - color___186902: undefined, - isOutsideMap___186903: undefined, - perpWallDist___186954: undefined, - wallX___186955: undefined, - tex___187028: undefined, - texX___187035: undefined, - lineHeight___187058: undefined, - drawEnd___187064: undefined, + t___183856: undefined, + arr___183880: undefined, + r___183886: undefined, + i___183903: undefined, + keys___183967: undefined, + r___183974: undefined, + i___183991: undefined, + k___183997: undefined, arg0: undefined, + arg1: undefined, } } -function Render_RayCastingRender_render_inline__P186608(s) { +function JSON_Stringifier_doString__P171947(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -37473,275 +37542,134 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.posZ___186609 = undefined; - s.yFloor___186619 = undefined; - s.rowDistance___186625 = undefined; - s.floorX___186633 = undefined; - s.floorY___186647 = undefined; - s.floorStepX___186661 = undefined; - s.floorStepY___186670 = undefined; - s.xFloor___186679 = undefined; - s.tileType___186684 = undefined; - s.floorTex___186703 = undefined; - s.tx___186709 = undefined; - s.ty___186715 = undefined; - s.c___186721 = undefined; - r0 = s.caps[0].fields["viewZPos"]; - s.tmp_2 = r0; - r0 = (globals.SH___174800 * s.tmp_2); - s.tmp_1 = r0; - r0 = s.caps[0].fields["tilemapScaleSize"]; - s.tmp_3 = r0; - r0 = (s.tmp_1 / s.tmp_3); - s.tmp_0 = r0; - r0 = (s.tmp_0 | 0); - s.posZ___186609 = (r0); - s.yFloor___186619 = (globals.SHHalf___174804); + s.r___184083 = undefined; + s.i___184084 = undefined; + s.c___184090 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, JSON_Stringifier__C171946_VT)) failedCast(r0); + s.r___184083 = ("\""); + s.i___184084 = (0); case 1: - r0 = (s.yFloor___186619 < globals.SH___174800); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 6; continue; } - s.tmp_2 = r0 = s.posZ___186609; - r0 = (s.yFloor___186619 - globals.SHHalf___174804); - s.tmp_3 = r0; - r0 = (s.tmp_2 / s.tmp_3); - s.tmp_1 = r0; - r0 = (s.tmp_1 | 0); - s.rowDistance___186625 = (r0); - r0 = s.caps[0].fields["selfXFpx"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 * 256); - s.tmp_0 = r0; - s.tmp_3 = r0 = s.rowDistance___186625; - r0 = s.caps[0].fields["dirXFpx"]; - s.tmp_5 = r0; - r0 = s.caps[0].fields["planeX"]; - s.tmp_6 = r0; - r0 = (s.tmp_5 + s.tmp_6); - s.tmp_4 = r0; - r0 = (s.tmp_3 * s.tmp_4); - s.tmp_2 = r0; - r0 = (s.tmp_0 + s.tmp_2); - s.floorX___186633 = (r0); - r0 = s.caps[0].fields["selfYFpx"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 * 256); - s.tmp_0 = r0; - s.tmp_3 = r0 = s.rowDistance___186625; - r0 = s.caps[0].fields["dirYFpx"]; - s.tmp_5 = r0; - r0 = s.caps[0].fields["planeY"]; - s.tmp_6 = r0; - r0 = (s.tmp_5 + s.tmp_6); - s.tmp_4 = r0; - r0 = (s.tmp_3 * s.tmp_4); - s.tmp_2 = r0; - r0 = (s.tmp_0 + s.tmp_2); - s.floorY___186647 = (r0); - r0 = s.caps[0].fields["planeX"]; + s.tmp_1 = r0 = s.i___184084; + r0 = pxsim_String_.length(s.arg1); s.tmp_2 = r0; - r0 = (s.rowDistance___186625 * s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim.Math_.idiv(s.tmp_1, globals.SWHalf___174810); + r0 = (s.tmp_1 < s.tmp_2); s.tmp_0 = r0; - r0 = (0 - s.tmp_0); - s.floorStepX___186661 = (r0); - r0 = s.caps[0].fields["planeY"]; - s.tmp_2 = r0; - r0 = (s.rowDistance___186625 * s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim.Math_.idiv(s.tmp_1, globals.SWHalf___174810); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 14; continue; } + r0 = pxsim_String_.charAt(s.arg1, s.i___184084); + s.c___184090 = (r0); + r0 = (s.c___184090 == "\n"); s.tmp_0 = r0; - r0 = (0 - s.tmp_0); - s.floorStepY___186670 = (r0); - s.xFloor___186679 = (0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + s.c___184090 = ("\\n"); + { step = 13; continue; } case 2: - r0 = (s.xFloor___186679 < globals.SW___174806); + r0 = (s.c___184090 == "\r"); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - r0 = s.caps[0].fields["mapData"]; - s.tmp_1 = r0; - r0 = (s.floorX___186633 >> 16); - s.tmp_4 = r0; - r0 = (4 + s.tmp_4); - s.tmp_3 = r0; - r0 = (s.floorY___186647 >> 16); - s.tmp_6 = r0; - r0 = s.caps[0].fields["map"]; - s.tmp_8 = r0; - r0 = s.tmp_8.fields["_width"]; - s.tmp_7 = r0; - r0 = (s.tmp_6 * s.tmp_7); - s.tmp_5 = r0; - r0 = (s.tmp_3 + s.tmp_5); - s.tmp_2 = r0; - r0 = pxsim_Array__getAt(s.tmp_1, s.tmp_2); - s.tileType___186684 = (r0); - r0 = s.caps[0].fields["textures"]; - s.tmp_0 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tileType___186684); - s.floorTex___186703 = (r0); - r0 = pxsim_numops_toBoolDecr(s.floorTex___186703); if (!r0) { step = 3; continue; } - r0 = (s.floorX___186633 >> 12); - s.tmp_0 = r0; - r0 = (s.tmp_0 & 15); - s.tx___186709 = (r0); - r0 = (s.floorY___186647 >> 12); - s.tmp_0 = r0; - r0 = (s.tmp_0 & 15); - s.ty___186715 = (r0); - r0 = pxsim_ImageMethods.getPixel(s.floorTex___186703, s.tx___186709, s.ty___186715); - s.c___186721 = (r0); - r0 = s.caps[0].fields["tempScreen"]; - s.tmp_0 = r0; - r0 = pxsim_ImageMethods.setPixel(s.tmp_0, s.xFloor___186679, s.yFloor___186619, s.c___186721); + s.c___184090 = ("\\r"); + { step = 12; continue; } case 3: + r0 = (s.c___184090 == "\t"); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + s.c___184090 = ("\\t"); + { step = 11; continue; } case 4: - r0 = (s.floorX___186633 + s.floorStepX___186661); - s.floorX___186633 = (r0); - r0 = (s.floorY___186647 + s.floorStepY___186670); - s.floorY___186647 = (r0); - r0 = (s.xFloor___186679 + 1); - s.xFloor___186679 = (r0); - { step = 2; continue; } + r0 = (s.c___184090 == "\b"); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + s.c___184090 = ("\\b"); + { step = 10; continue; } case 5: - r0 = (s.yFloor___186619 + 1); - s.yFloor___186619 = (r0); - { step = 1; continue; } + r0 = (s.c___184090 == "\\"); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 6; continue; } + s.c___184090 = ("\\\\"); + { step = 9; continue; } case 6: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -Render_RayCastingRender_render_inline__P186608.info = {"start":18321,"length":1578,"line":486,"column":39,"endLine":509,"endColumn":17,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":[]} - -function Render_RayCastingRender_render_inline__P186608_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Render_RayCastingRender_render_inline__P186608, depth: s.depth + 1, - pc: 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, - posZ___186609: undefined, - yFloor___186619: undefined, - rowDistance___186625: undefined, - floorX___186633: undefined, - floorY___186647: undefined, - floorStepX___186661: undefined, - floorStepY___186670: undefined, - xFloor___186679: undefined, - tileType___186684: undefined, - floorTex___186703: undefined, - tx___186709: undefined, - ty___186715: undefined, - c___186721: undefined, -} } - - - - - -function Render_RayCastingRender_drawSprites__P171792(s) { -let r0 = s.r0, 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.invDet___187122 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); - s.tmp_0 = r0 = globals.one2___174831; - r0 = s.arg0.fields["planeX"]; - s.tmp_3 = r0; - r0 = s.arg0.fields["dirYFpx"]; - s.tmp_4 = r0; - r0 = (s.tmp_3 * s.tmp_4); - s.tmp_2 = r0; - r0 = s.arg0.fields["dirXFpx"]; - s.tmp_6 = r0; - r0 = s.arg0.fields["planeY"]; - s.tmp_7 = r0; - r0 = (s.tmp_6 * s.tmp_7); - s.tmp_5 = r0; - r0 = (s.tmp_2 - s.tmp_5); - s.tmp_1 = r0; - r0 = (s.tmp_0 / s.tmp_1); - s.invDet___187122 = (r0); - r0 = pxsim_pxtcore_mkAction(2, sort_inline__P187141); + r0 = (s.c___184090 == "\""); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.invDet___187122); - r0 = pxsim_pxtcore_mkAction(1, forEach_inline__P187226); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.arg0); - r0 = pxsim_pxtcore_mkAction(1, Render_RayCastingRender_drawSprites_inline__P187239); - s.tmp_2 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_2, 0, s.arg0); - s.tmp_3 = helpers_arrayForEach__P166636_mk(s); - s.tmp_4 = helpers_arraySort__P166632_mk(s); - s.tmp_5 = helpers_arrayFilter__P166637_mk(s); - r0 = s.arg0.fields["sprites"]; - s.tmp_5.arg0 = r0; - s.tmp_5.arg1 = s.tmp_0; - s.callLocIdx = 2054; s.pc = 3; return s.tmp_5; - case 3: + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; continue; } + s.c___184090 = ("\\\""); + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + if ((s.r___184083) && (s.r___184083).vtable) { + setupResume(s, 15); + pxsim_String__stringConv(s.r___184083); + checkResumeConsumed(); + return; + } else { s.retval = (s.r___184083) + ""; } + case 15: r0 = s.retval; - s.tmp_4.arg0 = r0; - s.tmp_4.arg1 = s.tmp_1; - s.callLocIdx = 2055; s.pc = 2; return s.tmp_4; - case 2: + s.tmp_0 = r0; + if ((s.c___184090) && (s.c___184090).vtable) { + setupResume(s, 16); + pxsim_String__stringConv(s.c___184090); + checkResumeConsumed(); + return; + } else { s.retval = (s.c___184090) + ""; } + case 16: r0 = s.retval; - s.tmp_3.arg0 = r0; - s.tmp_3.arg1 = s.tmp_2; - s.callLocIdx = 2057; s.pc = 1; return s.tmp_3; - case 1: + s.tmp_1 = r0; + r0 = pxsim_String__concat(s.tmp_0, s.tmp_1); + s.r___184083 = (r0); + r0 = (s.i___184084 + 1); + s.i___184084 = (r0); + { step = 1; continue; } + case 14: + if ((s.r___184083) && (s.r___184083).vtable) { + setupResume(s, 17); + pxsim_String__stringConv(s.r___184083); + checkResumeConsumed(); + return; + } else { s.retval = (s.r___184083) + ""; } + case 17: r0 = s.retval; - r0 = undefined; + s.tmp_0 = r0; + r0 = pxsim_String__concat(s.tmp_0, "\""); return leave(s, r0) default: oops() } } } -Render_RayCastingRender_drawSprites__P171792.info = {"start":24869,"length":1815,"line":630,"column":8,"endLine":659,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"drawSprites","argumentNames":["this"]} +JSON_Stringifier_doString__P171947.info = {"start":5837,"length":472,"line":208,"column":8,"endLine":221,"endColumn":9,"fileName":"pxt_modules/base/json.ts","functionName":"doString","argumentNames":["this","s"]} -function Render_RayCastingRender_drawSprites__P171792_mk(s) { +function JSON_Stringifier_doString__P171947_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_drawSprites__P171792, depth: s.depth + 1, + parent: s, fn: JSON_Stringifier_doString__P171947, depth: s.depth + 1, pc: 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, - invDet___187122: undefined, + r___184083: undefined, + i___184084: undefined, + c___184090: undefined, arg0: undefined, + arg1: undefined, } } -function sort_inline__P187141(s) { +function info_playersWithScores__P169091(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -37751,163 +37679,40 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.spriteX___187144 = undefined; - s.spriteY___187150 = undefined; - s.angleInCamera___187202 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - s.tmp_1 = Render_RayCastingRender_sprXFx8__P171765_mk(s); - s.tmp_1.arg0 = s.caps[0]; - s.tmp_1.arg1 = s.arg0; - s.callLocIdx = 2049; s.pc = 3; return s.tmp_1; + r0 = pxsim_numops_toBoolDecr(globals.players___172323); + if (!r0) { step = 1; continue; } + s.tmp_0 = helpers_arrayFilter__P166637_mk(s); + s.tmp_0.arg0 = globals.players___172323; + s.tmp_0.arg1 = info_playersWithScores_inline__P185409; + s.callLocIdx = 925; s.pc = 3; return s.tmp_0; case 3: r0 = s.retval; - s.tmp_0 = r0; - s.tmp_3 = Render_RayCastingRender_xFpx__P171759_mk(s); - s.tmp_3.arg0 = s.caps[0]; - s.callLocIdx = 2050; s.pc = 4; return s.tmp_3; - case 4: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_0 - s.tmp_2); - s.spriteX___187144 = (r0); - s.tmp_1 = Render_RayCastingRender_sprYFx8__P171766_mk(s); - s.tmp_1.arg0 = s.caps[0]; - s.tmp_1.arg1 = s.arg0; - s.callLocIdx = 2051; s.pc = 5; return s.tmp_1; - case 5: - r0 = s.retval; - s.tmp_0 = r0; - s.tmp_3 = Render_RayCastingRender_yFpx__P171760_mk(s); - s.tmp_3.arg0 = s.caps[0]; - s.callLocIdx = 2052; s.pc = 6; return s.tmp_3; - case 6: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_0 - s.tmp_2); - s.spriteY___187150 = (r0); - r0 = s.caps[0].fields["angleSelfToSpr"]; - s.tmp_0 = r0; - r0 = s.arg0.fields["id"]; - s.tmp_1 = r0; - r0 = pxsim.Math_.atan2(s.spriteX___187144, s.spriteY___187150); - s.tmp_2 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_1, s.tmp_2); - r0 = s.caps[0].fields["transformX"]; - s.tmp_0 = r0; - r0 = s.arg0.fields["id"]; - s.tmp_1 = r0; - s.tmp_4 = r0 = s.caps[1]; - r0 = s.caps[0].fields["dirYFpx"]; - s.tmp_7 = r0; - r0 = (s.tmp_7 * s.spriteX___187144); - s.tmp_6 = r0; - r0 = s.caps[0].fields["dirXFpx"]; - s.tmp_9 = r0; - r0 = (s.tmp_9 * s.spriteY___187150); - s.tmp_8 = r0; - r0 = (s.tmp_6 - s.tmp_8); - s.tmp_5 = r0; - r0 = (s.tmp_4 * s.tmp_5); - s.tmp_3 = r0; - r0 = (s.tmp_3 >> 8); - s.tmp_2 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_1, s.tmp_2); - r0 = s.caps[0].fields["transformY"]; - s.tmp_0 = r0; - r0 = s.arg0.fields["id"]; - s.tmp_1 = r0; - s.tmp_4 = r0 = s.caps[1]; - r0 = s.caps[0].fields["planeY"]; - s.tmp_8 = r0; - r0 = (0 - s.tmp_8); - s.tmp_7 = r0; - r0 = (s.tmp_7 * s.spriteX___187144); - s.tmp_6 = r0; - r0 = s.caps[0].fields["planeX"]; - s.tmp_10 = r0; - r0 = (s.tmp_10 * s.spriteY___187150); - s.tmp_9 = r0; - r0 = (s.tmp_6 + s.tmp_9); - s.tmp_5 = r0; - r0 = (s.tmp_4 * s.tmp_5); - s.tmp_3 = r0; - r0 = (s.tmp_3 >> 8); - s.tmp_2 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_1, s.tmp_2); - r0 = s.caps[0].fields["transformX"]; - s.tmp_2 = r0; - r0 = s.arg0.fields["id"]; - s.tmp_3 = r0; - r0 = pxsim_Array__getAt(s.tmp_2, s.tmp_3); - s.tmp_1 = r0; - r0 = s.caps[0].fields["_fov"]; - s.tmp_4 = r0; - r0 = (s.tmp_1 * s.tmp_4); - s.tmp_0 = r0; - r0 = s.caps[0].fields["transformY"]; - s.tmp_6 = r0; - r0 = s.arg0.fields["id"]; - s.tmp_7 = r0; - r0 = pxsim_Array__getAt(s.tmp_6, s.tmp_7); - s.tmp_5 = r0; - r0 = pxsim.Math_.atan2(s.tmp_0, s.tmp_5); - s.angleInCamera___187202 = (r0); - s.tmp_1 = r0 = s.angleInCamera___187202; - r0 = s.caps[0].fields["cameraRangeAngle"]; - s.tmp_3 = r0; - r0 = (0 - s.tmp_3); - 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.caps[0].fields["cameraRangeAngle"]; - s.tmp_4 = r0; - r0 = (s.angleInCamera___187202 < s.tmp_4); + r0 = pxsim_Array__mk(); case 2: // jmp value (already in r0) - s.tmp_5 = r0; - r0 = s.tmp_5; + s.tmp_1 = r0; + r0 = s.tmp_1; return leave(s, r0) default: oops() } } } -sort_inline__P187141.info = {"start":25221,"length":819,"line":639,"column":24,"endLine":647,"endColumn":17,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":["spr","i"]} +info_playersWithScores__P169091.info = {"start":7429,"length":133,"line":239,"column":4,"endLine":241,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"playersWithScores","argumentNames":[]} -function sort_inline__P187141_mk(s) { +function info_playersWithScores__P169091_mk(s) { checkStack(s.depth); return { - parent: s, fn: sort_inline__P187141, depth: s.depth + 1, + parent: s, fn: info_playersWithScores__P169091, depth: s.depth + 1, pc: 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, - spriteX___187144: undefined, - spriteY___187150: undefined, - angleInCamera___187202: undefined, - arg0: undefined, - arg1: undefined, } } -function forEach_inline__P187226(s) { +function info_playersWithScores_inline__P185409(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -37919,47 +37724,33 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.caps[0].fields["transformY"]; - s.tmp_1 = r0; - r0 = s.arg1.fields["id"]; - s.tmp_2 = r0; - r0 = pxsim_Array__getAt(s.tmp_1, s.tmp_2); - s.tmp_0 = r0; - r0 = s.caps[0].fields["transformY"]; - s.tmp_4 = r0; - r0 = s.arg0.fields["id"]; - s.tmp_5 = r0; - r0 = pxsim_Array__getAt(s.tmp_4, s.tmp_5); - s.tmp_3 = r0; - r0 = (s.tmp_0 - s.tmp_3); + s.tmp_0 = info_PlayerInfoImpl_hasScore__P169136_mk(s); + r0 = s.arg0.fields["impl"]; + s.tmp_0.arg0 = r0; + s.callLocIdx = 924; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; return leave(s, r0) default: oops() } } } -forEach_inline__P187226.info = {"start":26047,"length":133,"line":647,"column":24,"endLine":649,"endColumn":17,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":["spr1","spr2"]} +info_playersWithScores_inline__P185409.info = {"start":7521,"length":28,"line":240,"column":40,"endLine":240,"endColumn":68,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["item"]} -function forEach_inline__P187226_mk(s) { +function info_playersWithScores_inline__P185409_mk(s) { checkStack(s.depth); return { - parent: s, fn: forEach_inline__P187226, depth: s.depth + 1, + parent: s, fn: info_playersWithScores_inline__P185409, depth: s.depth + 1, pc: 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 Render_RayCastingRender_drawSprites_inline__P187239(s) { +function info_multiplayerScoring__P169090(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -37969,54 +37760,208 @@ 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 = Render_RayCastingRender_drawSprite__P171794_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_0.arg1 = s.arg0; - s.tmp_0.arg2 = s.arg1; - r0 = s.caps[0].fields["transformX"]; - s.tmp_1 = r0; - r0 = s.arg0.fields["id"]; - s.tmp_2 = r0; - r0 = pxsim_Array__getAt(s.tmp_1, s.tmp_2); - s.tmp_0.arg3 = r0; - r0 = s.caps[0].fields["transformY"]; + s.pws___183532 = undefined; + s.p___183536 = undefined; + s.unnamed824___U2 = undefined; + s.unnamed825___U3 = undefined; + s.tmp_0 = info_playersWithScores__P169091_mk(s); + s.callLocIdx = 922; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + s.pws___183532 = (r0); + s.p___183536 = (undefined); + s.unnamed824___U2 = (s.pws___183532); + s.unnamed825___U3 = (0); + case 1: + s.tmp_0 = r0 = s.unnamed825___U3; + r0 = pxsim_Array__length(s.unnamed824___U2); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 4; continue; } + r0 = pxsim_Array__getAt(s.unnamed824___U2, s.unnamed825___U3); + s.p___183536 = (r0); + r0 = s.p___183536.fields["_player"]; s.tmp_3 = r0; - r0 = s.arg0.fields["id"]; - s.tmp_4 = r0; - r0 = pxsim_Array__getAt(s.tmp_3, s.tmp_4); - s.tmp_0.arg4 = r0; - r0 = s.caps[0].fields["angleSelfToSpr"]; - s.tmp_5 = r0; - r0 = s.arg0.fields["id"]; - s.tmp_6 = r0; - r0 = pxsim_Array__getAt(s.tmp_5, s.tmp_6); - s.tmp_0.arg5 = r0; - s.callLocIdx = 2056; s.pc = 1; return s.tmp_0; + r0 = (s.tmp_3 > 1); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 2; continue; } + r0 = true; + { step = 5; continue; } + case 2: + case 3: + r0 = (s.unnamed825___U3 + 1); + s.unnamed825___U3 = (r0); + { step = 1; continue; } + case 4: + s.unnamed824___U2 = (undefined); + r0 = false; + case 5: + return leave(s, r0) + default: oops() +} } } +info_multiplayerScoring__P169090.info = {"start":7200,"length":223,"line":229,"column":4,"endLine":237,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"multiplayerScoring","argumentNames":[]} + +function info_multiplayerScoring__P169090_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: info_multiplayerScoring__P169090, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + pws___183532: undefined, + p___183536: undefined, + unnamed824___U2: undefined, + unnamed825___U3: undefined, +} } + + + + + +function music_play__P168449(s) { +let r0 = s.r0, 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 = music_Playable__C168438_v0_2_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + if (!checkSubtype(s.tmp_0.arg0, music_Playable__C168438_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.play; + s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -Render_RayCastingRender_drawSprites_inline__P187239.info = {"start":26190,"length":315,"line":649,"column":27,"endLine":653,"endColumn":17,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":["spr","index"]} +music_play__P168449.info = {"start":2835,"length":109,"line":110,"column":4,"endLine":112,"endColumn":5,"fileName":"pxt_modules/mixer/playable.ts","functionName":"play","argumentNames":["toPlay","playbackMode"]} -function Render_RayCastingRender_drawSprites_inline__P187239_mk(s) { +function music_play__P168449_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_drawSprites_inline__P187239, depth: s.depth + 1, + parent: s, fn: music_play__P168449, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function music_Playable_play__P168441(s) { +let r0 = s.r0, 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, music_Playable__C168438_VT)) failedCast(r0); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +music_Playable_play__P168441.info = {"start":1122,"length":68,"line":51,"column":8,"endLine":53,"endColumn":9,"fileName":"pxt_modules/mixer/playable.ts","functionName":"play","argumentNames":["this","playbackMode"]} + +function music_Playable_play__P168441_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: music_Playable_play__P168441, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, + arg1: undefined, +} } + + + + + +function helpers_arrayMap__P166633(s) { +let r0 = s.r0, 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.res___185353 = undefined; + s.len___185355 = undefined; + s.i___185358 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = pxsim_Array__mk(); + s.res___185353 = (r0); + r0 = pxsim_Array__length(s.arg0); + s.len___185355 = (r0); + s.i___185358 = (0); + case 1: + r0 = (s.i___185358 < s.len___185355); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + s.tmp_1 = r0 = s.res___185353; + s.tmp_3 = lambda_3_mk(s); + s.tmp_3.argL = s.arg1; + r0 = pxsim_Array__getAt(s.arg0, s.i___185358); + s.tmp_3.arg0 = r0; + s.tmp_3.arg1 = s.i___185358; + setupLambda(s.tmp_3, s.tmp_3.argL); + s.callLocIdx = 4; s.pc = 3; return s.tmp_3; + case 3: + r0 = s.retval; + s.tmp_2 = r0; + r0 = pxsim_Array__push(s.tmp_1, s.tmp_2); + r0 = (s.i___185358 + 1); + s.i___185358 = (r0); + { step = 1; continue; } + case 2: + r0 = s.res___185353; + return leave(s, r0) + default: oops() +} } } +helpers_arrayMap__P166633.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_arrayMap__P166633_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: helpers_arrayMap__P166633, depth: s.depth + 1, pc: 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, + res___185353: undefined, + len___185355: undefined, + i___185358: undefined, arg0: undefined, arg1: undefined, } } @@ -38025,7 +37970,64 @@ function Render_RayCastingRender_drawSprites_inline__P187239_mk(s) { -function Render_RayCastingRender_drawSprite__P171794(s) { +function game_setGameOverMessage__P169536(s) { +let r0 = s.r0, 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.goc___185419 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + s.tmp_0 = game_init__P172465_mk(s); + s.tmp_0.arg0 = undefined; + s.callLocIdx = 1348; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + s.tmp_0 = lambda_1_mk(s); + s.tmp_0.argL = globals.gameOverConfig___169525; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 1349; s.pc = 2; return s.tmp_0; + case 2: + r0 = s.retval; + s.goc___185419 = (r0); + s.tmp_0 = game_GameOverConfig_setMessage__P169523_mk(s); + s.tmp_0.arg0 = s.goc___185419; + s.tmp_0.arg1 = s.arg0; + s.tmp_0.arg2 = s.arg1; + s.tmp_0.arg3 = true; + s.callLocIdx = 1350; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +game_setGameOverMessage__P169536.info = {"start":9455,"length":176,"line":289,"column":4,"endLine":293,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"setGameOverMessage","argumentNames":["win","message"]} + +function game_setGameOverMessage__P169536_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: game_setGameOverMessage__P169536, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + goc___185419: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function game_GameOverConfig_setMessage__P169523(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -38035,559 +38037,230 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.spriteScreenX___187263 = undefined; - s.spriteScreenHalfWidth___187277 = undefined; - s.spriteScreenLeft___187291 = undefined; - s.spriteScreenRight___187295 = undefined; - s.blitX___187299 = undefined; - s.blitWidth___187300 = undefined; - s.sprX___187301 = undefined; - s.blitXSpr___187335 = undefined; - s.blitWidthSpr___187340 = undefined; - s.lineHeight___187351 = undefined; - s.drawStart___187357 = undefined; - s.texSpr___187400 = undefined; - s.sprTexRatio___187430 = undefined; - s.sayRender___187463 = undefined; - s.particle___187469 = undefined; - s.sayOrParticle___187475 = undefined; - s.fpx_div_transformy___187560 = undefined; - s.height___187567 = undefined; - s.blitXSaySrc___187572 = undefined; - s.blitWidthSaySrc___187582 = 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, Render_RayCastingRender__C171738_VT)) failedCast(r0); - s.tmp_2 = r0 = globals.SWHalf___174810; - r0 = (s.arg3 / s.arg4); - s.tmp_4 = r0; - r0 = (1 - s.tmp_4); - s.tmp_3 = r0; - r0 = (s.tmp_2 * s.tmp_3); - s.tmp_1 = r0; - r0 = pxsim.Math_.ceil(s.tmp_1); - s.tmp_0 = r0; - r0 = s.arg0.fields["cameraOffsetX"]; - s.tmp_5 = r0; - r0 = (s.tmp_0 - s.tmp_5); - s.spriteScreenX___187263 = (r0); - r0 = s.arg1.fields["_width"]; - s.tmp_3 = r0; - r0 = s.arg0.fields["tilemapScaleSize"]; - s.tmp_4 = r0; - r0 = (s.tmp_3 / s.tmp_4); - s.tmp_2 = r0; - r0 = (s.tmp_2 / 2); + if (!checkSubtype(r0, game_GameOverConfig__C169500_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(s.arg3); s.tmp_1 = r0; - r0 = s.arg0.fields["wallWidthInView"]; - s.tmp_5 = r0; - r0 = (s.tmp_1 * s.tmp_5); + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim.Math_.idiv(s.tmp_0, s.arg4); - s.spriteScreenHalfWidth___187277 = (r0); - r0 = (s.spriteScreenX___187263 - s.spriteScreenHalfWidth___187277); - s.spriteScreenLeft___187291 = (r0); - r0 = (s.spriteScreenX___187263 + s.spriteScreenHalfWidth___187277); - s.spriteScreenRight___187295 = (r0); - s.blitX___187299 = (0); - s.blitWidth___187300 = (0); - s.sprX___187301 = (0); + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: - r0 = (s.sprX___187301 < globals.SW___174806); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 12; continue; } - r0 = s.arg0.fields["dist"]; - s.tmp_3 = r0; - r0 = pxsim_Array__getAt(s.tmp_3, s.sprX___187301); - s.tmp_2 = r0; - r0 = (s.tmp_2 > s.arg4); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 4; continue; } - r0 = (s.blitWidth___187300 == 0); - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - if (!r0) { step = 2; continue; } - s.blitX___187299 = (s.sprX___187301); + r0 = s.arg0.fields["messageSetByUser"]; case 2: + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 3; continue; } + { step = 9; continue; } case 3: - r0 = (s.blitWidth___187300 + 1); - s.blitWidth___187300 = (r0); - { step = 11; continue; } case 4: - r0 = (s.blitWidth___187300 > 0); + r0 = pxsim_numops_toBoolDecr(s.arg1); + if (!r0) { step = 5; continue; } + r0 = (s.arg0).fields["winMessage"] = (s.arg2); + { step = 6; continue; } + case 5: + r0 = (s.arg0).fields["loseMessage"] = (s.arg2); + case 6: + r0 = pxsim_numops_toBoolDecr(s.arg3); + if (!r0) { step = 7; continue; } + r0 = (s.arg0).fields["messageSetByUser"] = (true); + case 7: + case 8: + case 9: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +game_GameOverConfig_setMessage__P169523.info = {"start":2974,"length":281,"line":90,"column":8,"endLine":95,"endColumn":9,"fileName":"pxt_modules/game/game.ts","functionName":"setMessage","argumentNames":["this","win","message","explicit"]} + +function game_GameOverConfig_setMessage__P169523_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: game_GameOverConfig_setMessage__P169523, 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 sprites_onOverlap__P168985(s) { +let r0 = s.r0, 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.sc___185458 = undefined; + s.overlapHandlers___185461 = undefined; + s.overlapMap___185464 = undefined; + s.associate___185467 = 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 == undefined); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 9; continue; } - r0 = (s.blitX___187299 <= s.spriteScreenRight___187295); + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + r0 = (s.arg1 == undefined); + case 2: + // jmp value (already in r0) s.tmp_1 = r0; r0 = pxsim_numops_toBool(s.tmp_1); - if (r0) { step = 5; continue; } + if (!r0) { step = 3; continue; } r0 = s.tmp_1; - { step = 6; continue; } - case 5: - r0 = (s.blitX___187299 + s.blitWidth___187300); + { step = 4; continue; } + case 3: + r0 = pxsim_numops_toBoolDecr(s.arg2); s.tmp_2 = r0; - r0 = (s.tmp_2 >= s.spriteScreenLeft___187291); - case 6: + r0 = pxsim_Boolean__bang(s.tmp_2); + case 4: // jmp value (already in r0) s.tmp_3 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 7; continue; } - { step = 12; continue; } - { step = 8; continue; } - case 7: - s.blitX___187299 = (0); - s.blitWidth___187300 = (0); - r0 = 0; + if (!r0) { step = 5; continue; } + { step = 7; continue; } + case 5: + case 6: + s.tmp_4 = game_currentScene__P169526_mk(s); + s.callLocIdx = 619; s.pc = 8; return s.tmp_4; case 8: + r0 = s.retval; + s.sc___185458 = (r0); + r0 = s.sc___185458.fields["overlapHandlers"]; + s.overlapHandlers___185461 = (r0); + r0 = s.sc___185458.fields["overlapMap"]; + s.overlapMap___185464 = (r0); + r0 = pxsim_pxtcore_mkAction(1, associate__P185467); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.overlapMap___185464); + s.associate___185467 = (s.tmp_0); + s.tmp_1 = lambda_3_mk(s); + s.tmp_1.argL = s.associate___185467; + s.tmp_1.arg0 = s.arg0; + s.tmp_1.arg1 = s.arg1; + setupLambda(s.tmp_1, s.tmp_1.argL); + s.callLocIdx = 620; s.pc = 9; return s.tmp_1; case 9: - case 10: - case 11: - r0 = (s.sprX___187301 + 1); - s.sprX___187301 = (r0); - { step = 1; continue; } - case 12: - s.tmp_0 = Math_max__P166657_mk(s); - s.tmp_0.arg0 = s.blitX___187299; - s.tmp_0.arg1 = s.spriteScreenLeft___187291; - s.callLocIdx = 2058; s.pc = 36; return s.tmp_0; - case 36: r0 = s.retval; - s.blitXSpr___187335 = (r0); - s.tmp_1 = Math_min__P166658_mk(s); - r0 = (s.blitX___187299 + s.blitWidth___187300); - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.spriteScreenRight___187295; - s.callLocIdx = 2059; s.pc = 37; return s.tmp_1; - case 37: + s.tmp_0 = lambda_3_mk(s); + s.tmp_0.argL = s.associate___185467; + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = s.arg0; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 621; s.pc = 10; return s.tmp_0; + case 10: r0 = s.retval; + r0 = pxsim_pxtcore_mkClassInstance(scene_OverlapHandler__C169341_VT); s.tmp_0 = r0; - r0 = (s.tmp_0 - s.blitXSpr___187335); - s.blitWidthSpr___187340 = (r0); - r0 = (s.blitWidthSpr___187340 <= 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 13; continue; } - { step = 35; continue; } - case 13: - case 14: - r0 = s.arg0.fields["wallHeightInView"]; - s.tmp_1 = r0; - r0 = pxsim.Math_.idiv(s.tmp_1, s.arg4); - s.lineHeight___187351 = (r0); - s.tmp_0 = r0 = globals.SHHalf___174804; - s.tmp_3 = r0 = s.lineHeight___187351; - r0 = s.arg0.fields["viewZPos"]; - s.tmp_7 = r0; - r0 = s.arg0.fields["spriteMotionZ"]; - s.tmp_9 = r0; - r0 = s.arg1.fields["id"]; - s.tmp_10 = r0; - r0 = pxsim_Array__getAt(s.tmp_9, s.tmp_10); - r0 = r0.fields["p"]; - s.tmp_8 = r0; - r0 = (s.tmp_7 - s.tmp_8); - s.tmp_6 = r0; - r0 = s.arg1.fields["_height"]; - s.tmp_11 = r0; - r0 = (s.tmp_6 - s.tmp_11); - s.tmp_5 = r0; - r0 = s.arg0.fields["tilemapScaleSize"]; - s.tmp_12 = r0; - r0 = (s.tmp_5 / s.tmp_12); - s.tmp_4 = r0; - r0 = (s.tmp_3 * s.tmp_4); - s.tmp_2 = r0; - r0 = (s.tmp_2 >> 8); - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.drawStart___187357 = (r0); - r0 = s.arg0.fields["onSpriteDirectionUpdateHandler"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 15; continue; } - s.tmp_1 = if_onSpriteDirectionUpdateHandler_3_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_1.arg1 = s.arg1; - r0 = s.arg1.fields["_vx"]; - s.tmp_7 = r0; - r0 = s.arg1.fields["_vy"]; - s.tmp_8 = r0; - r0 = pxsim.Math_.atan2(s.tmp_7, s.tmp_8); - s.tmp_6 = r0; - r0 = (s.tmp_6 - s.arg5); - s.tmp_5 = r0; - r0 = (s.tmp_5 / 3.141592653589793); - s.tmp_4 = r0; - r0 = (s.tmp_4 / 2); - s.tmp_3 = r0; - r0 = (s.tmp_3 + 2); - s.tmp_2 = r0; - r0 = (s.tmp_2 - 0.25); - s.tmp_1.arg2 = r0; - if (!s.tmp_1.arg0.vtable.iface) { - setupLambda(s.tmp_1, pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "onSpriteDirectionUpdateHandler"), 3); - s.callLocIdx = 2060; s.pc = 38; return s.tmp_1; - } else { - s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["onSpriteDirectionUpdateHandler"]; - if (s.tmp_1.fn == null) { setupLambda(s.tmp_1, s.tmp_1.arg0.fields["onSpriteDirectionUpdateHandler"], 3); s.callLocIdx = 2060; s.pc = 38; return s.tmp_1; } - else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 2060; s.pc = 38; return s.tmp_1;; } - else { s.callLocIdx = 2060; s.pc = 38; return s.tmp_1; } - } - case 38: + s.tmp_1 = scene_OverlapHandler_constructor__P169342_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.arg2; + s.callLocIdx = 622; s.pc = 11; return s.tmp_1; + case 11: r0 = s.retval; - case 15: - case 16: - r0 = s.arg0.fields["spriteAnimations"]; - s.tmp_3 = r0; - r0 = s.arg1.fields["id"]; - s.tmp_4 = r0; - r0 = pxsim_Array__getAt(s.tmp_3, s.tmp_4); + r0 = pxsim_Array__push(s.overlapHandlers___185461, s.tmp_0); + case 7: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +sprites_onOverlap__P168985.info = {"start":1603,"length":755,"line":50,"column":4,"endLine":74,"endColumn":5,"fileName":"pxt_modules/game/spriteevents.ts","functionName":"onOverlap","argumentNames":["kind","otherKind","handler"]} + +function sprites_onOverlap__P168985_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: sprites_onOverlap__P168985, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + sc___185458: undefined, + overlapHandlers___185461: undefined, + overlapMap___185464: undefined, + associate___185467: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, +} } + + + + + +function associate__P185467(s) { +let r0 = s.r0, 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_pxtrt.mapGetGeneric(s.caps[0], s.arg0); 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; } - r0 = s.arg1.fields["_image"]; - { step = 18; continue; } - case 17: - s.tmp_5 = Render_Animations_getFrameByDir__P171812_mk(s); - r0 = s.arg0.fields["spriteAnimations"]; - s.tmp_6 = r0; - r0 = s.arg1.fields["id"]; - s.tmp_7 = r0; - r0 = pxsim_Array__getAt(s.tmp_6, s.tmp_7); - s.tmp_5.arg0 = r0; - r0 = s.arg1.fields["_vx"]; - s.tmp_13 = r0; - r0 = s.arg1.fields["_vy"]; - s.tmp_14 = r0; - r0 = pxsim.Math_.atan2(s.tmp_13, s.tmp_14); - s.tmp_12 = r0; - r0 = (s.tmp_12 - s.arg5); - s.tmp_11 = r0; - r0 = (s.tmp_11 / 3.141592653589793); - s.tmp_10 = r0; - r0 = (s.tmp_10 / 2); - s.tmp_9 = r0; - r0 = (s.tmp_9 + 2); - s.tmp_8 = r0; - r0 = (s.tmp_8 - 0.25); - s.tmp_5.arg1 = r0; - s.callLocIdx = 2062; s.pc = 39; return s.tmp_5; - case 39: - r0 = s.retval; - case 18: - // jmp value (already in r0) - s.tmp_15 = r0; - s.texSpr___187400 = (s.tmp_15); - r0 = pxsim_ImageMethods.width(s.texSpr___187400); - s.tmp_1 = r0; - r0 = (s.tmp_1 / s.spriteScreenHalfWidth___187277); - s.tmp_0 = r0; - r0 = (s.tmp_0 / 2); - s.sprTexRatio___187430 = (r0); - s.tmp_0 = helpers_imageBlit__P168480_mk(s); - r0 = s.arg0.fields["tempScreen"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.blitXSpr___187335; - s.tmp_0.arg2 = s.drawStart___187357; - s.tmp_0.arg3 = s.blitWidthSpr___187340; - s.tmp_2 = r0 = s.lineHeight___187351; - s.tmp_4 = Sprite_height__P168925_mk(s); - s.tmp_4.arg0 = s.arg1; - s.callLocIdx = 2063; s.pc = 41; return s.tmp_4; - case 41: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_2 * s.tmp_3); - s.tmp_1 = r0; - r0 = s.arg0.fields["tilemapScaleSize"]; - s.tmp_5 = r0; - r0 = (s.tmp_1 / s.tmp_5); - s.tmp_0.arg4 = r0; - s.tmp_0.arg5 = s.texSpr___187400; - s.tmp_7 = r0 = s.blitXSpr___187335; - r0 = (s.spriteScreenX___187263 - s.spriteScreenHalfWidth___187277); - s.tmp_8 = r0; - r0 = (s.tmp_7 - s.tmp_8); - s.tmp_6 = r0; - r0 = (s.tmp_6 * s.sprTexRatio___187430); - s.tmp_0.arg6 = r0; - s.tmp_0.arg7 = 0; - r0 = (s.blitWidthSpr___187340 * s.sprTexRatio___187430); - s.tmp_0.arg8 = r0; - r0 = pxsim_ImageMethods.height(s.texSpr___187400); - s.tmp_0.arg9 = r0; - s.tmp_0.arg10 = true; - s.tmp_0.arg11 = false; - s.callLocIdx = 2064; s.pc = 40; return s.tmp_0; - case 40: - r0 = s.retval; - r0 = s.arg0.fields["sayRederers"]; - s.tmp_0 = r0; - r0 = s.arg1.fields["id"]; - s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); - s.sayRender___187463 = (r0); - r0 = s.arg0.fields["spriteParticles"]; - s.tmp_0 = r0; - r0 = s.arg1.fields["id"]; - s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); - s.particle___187469 = (r0); - r0 = pxsim_numops_toBoolDecr(s.sayRender___187463); - 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_toBool(s.tmp_0); - if (!r0) { step = 19; continue; } - r0 = s.tmp_0; - { step = 20; continue; } - case 19: - r0 = pxsim_numops_toBoolDecr(s.particle___187469); - s.tmp_6 = r0; - r0 = pxsim_Boolean__bang(s.tmp_6); - s.tmp_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); - s.tmp_4 = r0; - r0 = pxsim_Boolean__bang(s.tmp_4); - case 20: - // jmp value (already in r0) - s.tmp_7 = r0; - s.sayOrParticle___187475 = (s.tmp_7); - r0 = pxsim_numops_toBoolDecr(s.sayOrParticle___187475); - if (!r0) { step = 33; continue; } - r0 = pxsim_ImageMethods.fill(globals.screen___168559, 0); - r0 = pxsim_numops_toBoolDecr(s.sayRender___187463); - if (!r0) { step = 25; continue; } - r0 = s.arg0.fields["sayEndTimes"]; - s.tmp_1 = r0; - r0 = s.arg1.fields["id"]; - s.tmp_2 = r0; - r0 = pxsim_Array__getAt(s.tmp_1, s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 21; continue; } - r0 = s.tmp_0; - { step = 22; continue; } - case 21: - r0 = pxsim.control.millis(); - s.tmp_3 = r0; - r0 = s.arg0.fields["sayEndTimes"]; + if (!r0) { step = 1; continue; } + s.tmp_3 = r0 = s.caps[0]; + s.tmp_4 = r0 = s.arg0; + r0 = pxsim_Array__mk(); s.tmp_5 = r0; - r0 = s.arg1.fields["id"]; - s.tmp_6 = r0; - r0 = pxsim_Array__getAt(s.tmp_5, s.tmp_6); - s.tmp_4 = r0; - r0 = (s.tmp_3 > s.tmp_4); - case 22: - // jmp value (already in r0) - s.tmp_7 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_7); - if (!r0) { step = 23; continue; } - r0 = s.arg0.fields["sayRederers"]; - s.tmp_8 = r0; - r0 = s.arg1.fields["id"]; - s.tmp_9 = r0; - r0 = pxsim_Array_.setAt(s.tmp_8, s.tmp_9, undefined); - { step = 24; continue; } - case 23: - s.tmp_0 = Sprite_x__P168882_mk(s); - r0 = s.arg0.fields["tempSprite"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = globals.SWHalf___174810; - s.callLocIdx = 2065; s.pc = 42; return s.tmp_0; - case 42: - r0 = s.retval; - s.tmp_0 = Sprite_y__P168884_mk(s); - r0 = s.arg0.fields["tempSprite"]; - s.tmp_0.arg0 = r0; - r0 = (globals.SHHalf___174804 + 2); - s.tmp_0.arg1 = r0; - s.callLocIdx = 2066; s.pc = 43; return s.tmp_0; - case 43: - r0 = s.retval; - r0 = s.arg0.fields["camera"]; - s.tmp_0 = r0; - r0 = (s.tmp_0).fields["drawOffsetX"] = (0); - r0 = s.arg0.fields["camera"]; - s.tmp_0 = r0; - r0 = (s.tmp_0).fields["drawOffsetY"] = (0); - s.tmp_0 = sprites_BaseSpriteSayRenderer__C168786_v0_4_mk(s); - s.tmp_0.arg0 = s.sayRender___187463; - s.tmp_0.arg1 = globals.screen___168559; - r0 = s.arg0.fields["camera"]; - s.tmp_0.arg2 = r0; - r0 = s.arg0.fields["tempSprite"]; - s.tmp_0.arg3 = r0; - if (!checkSubtype(s.tmp_0.arg0, sprites_BaseSpriteSayRenderer__C168786_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.draw; - s.pc = 44; return s.tmp_0; - case 44: - r0 = s.retval; - case 24: - case 25: - case 26: - r0 = pxsim_numops_toBoolDecr(s.particle___187469); - if (!r0) { step = 29; continue; } - r0 = s.particle___187469.fields["lifespan"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 27; continue; } - s.tmp_1 = Sprite_x__P168882_mk(s); - r0 = s.arg0.fields["tempSprite"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = globals.SWHalf___174810; - s.callLocIdx = 2067; s.pc = 45; return s.tmp_1; - case 45: - r0 = s.retval; - s.tmp_0 = Sprite_y__P168884_mk(s); - r0 = s.arg0.fields["tempSprite"]; - s.tmp_0.arg0 = r0; - s.tmp_1 = r0 = globals.SHHalf___174804; - s.tmp_3 = Sprite_height__P168925_mk(s); - s.tmp_3.arg0 = s.arg1; - s.callLocIdx = 2068; s.pc = 47; return s.tmp_3; - case 47: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_1 + s.tmp_2); - s.tmp_0.arg1 = r0; - s.callLocIdx = 2069; s.pc = 46; return s.tmp_0; - case 46: - r0 = s.retval; - r0 = s.arg0.fields["camera"]; - s.tmp_0 = r0; - r0 = (s.tmp_0).fields["drawOffsetX"] = (0); - r0 = s.arg0.fields["camera"]; - s.tmp_0 = r0; - r0 = (s.tmp_0).fields["drawOffsetY"] = (0); - s.tmp_0 = particles_ParticleSource__C169678_v1_2_mk(s); - s.tmp_0.arg0 = s.particle___187469; - r0 = s.arg0.fields["camera"]; - s.tmp_0.arg1 = r0; - if (!checkSubtype(s.tmp_0.arg0, particles_ParticleSource__C169678_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.__draw; - s.pc = 48; return s.tmp_0; - case 48: - r0 = s.retval; - { step = 28; continue; } - case 27: - r0 = s.arg0.fields["spriteParticles"]; - s.tmp_0 = r0; - r0 = s.arg1.fields["id"]; - s.tmp_1 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_1, undefined); - case 28: - case 29: - case 30: - s.tmp_0 = Math_roundWithPrecision__P166659_mk(s); - r0 = (s.arg4 / 4); - s.tmp_1 = r0; - r0 = (s.tmp_1 / 256); - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = 2; - s.callLocIdx = 2070; s.pc = 49; return s.tmp_0; - case 49: - r0 = s.retval; - s.fpx_div_transformy___187560 = (r0); - r0 = (globals.SH___174800 / s.fpx_div_transformy___187560); - s.height___187567 = (r0); - r0 = (s.blitX___187299 - s.spriteScreenX___187263); - s.tmp_1 = r0; - r0 = (s.tmp_1 * s.fpx_div_transformy___187560); - s.tmp_0 = r0; - r0 = (s.tmp_0 + globals.SWHalf___174810); - s.blitXSaySrc___187572 = (r0); - r0 = (s.blitWidth___187300 * s.fpx_div_transformy___187560); - s.blitWidthSaySrc___187582 = (r0); - r0 = (s.blitXSaySrc___187572 <= 0); + r0 = pxsim_pxtrt.mapSetGeneric(s.tmp_3, s.tmp_4, s.tmp_5); + case 1: + case 2: + r0 = pxsim_pxtrt.mapGetGeneric(s.caps[0], s.arg0); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 31; continue; } - s.tmp_1 = helpers_imageBlit__P168480_mk(s); - r0 = s.arg0.fields["tempScreen"]; - s.tmp_1.arg0 = r0; - s.tmp_2 = r0 = s.spriteScreenX___187263; - r0 = (globals.SWHalf___174810 / s.fpx_div_transformy___187560); - s.tmp_3 = r0; - r0 = (s.tmp_2 - s.tmp_3); - s.tmp_1.arg1 = r0; - s.tmp_4 = r0 = s.drawStart___187357; - r0 = (s.height___187567 / 2); - s.tmp_5 = r0; - r0 = (s.tmp_4 - s.tmp_5); - s.tmp_1.arg2 = r0; - r0 = (s.blitWidthSaySrc___187582 + s.blitXSaySrc___187572); - s.tmp_6 = r0; - r0 = (s.tmp_6 / s.fpx_div_transformy___187560); - s.tmp_1.arg3 = r0; - s.tmp_1.arg4 = s.height___187567; - s.tmp_1.arg5 = globals.screen___168559; - s.tmp_1.arg6 = 0; - s.tmp_1.arg7 = 0; - r0 = (s.blitWidthSaySrc___187582 + s.blitXSaySrc___187572); - s.tmp_1.arg8 = r0; - s.tmp_1.arg9 = globals.SH___174800; - s.tmp_1.arg10 = true; - s.tmp_1.arg11 = false; - s.callLocIdx = 2071; s.pc = 50; return s.tmp_1; - case 50: - r0 = s.retval; - { step = 32; continue; } - case 31: - s.tmp_0 = helpers_imageBlit__P168480_mk(s); - r0 = s.arg0.fields["tempScreen"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.blitX___187299; - s.tmp_1 = r0 = s.drawStart___187357; - r0 = (s.height___187567 / 2); - s.tmp_2 = r0; - r0 = (s.tmp_1 - s.tmp_2); - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = s.blitWidth___187300; - s.tmp_0.arg4 = s.height___187567; - s.tmp_0.arg5 = globals.screen___168559; - s.tmp_0.arg6 = s.blitXSaySrc___187572; - s.tmp_0.arg7 = 0; - s.tmp_0.arg8 = s.blitWidthSaySrc___187582; - s.tmp_0.arg9 = globals.SH___174800; - s.tmp_0.arg10 = true; - s.tmp_0.arg11 = false; - s.callLocIdx = 2072; s.pc = 51; return s.tmp_0; - case 51: - r0 = s.retval; - case 32: - case 33: - case 34: - case 35: + r0 = pxsim_Array__push(s.tmp_0, s.arg1); r0 = undefined; return leave(s, r0) default: oops() } } } -Render_RayCastingRender_drawSprite__P171794.info = {"start":26856,"length":6171,"line":665,"column":8,"endLine":773,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"drawSprite","argumentNames":["this","spr","index","transformX","transformY","myAngle"]} +associate__P185467.info = {"start":1940,"length":172,"line":56,"column":8,"endLine":62,"endColumn":9,"fileName":"pxt_modules/game/spriteevents.ts","functionName":"associate","argumentNames":["a","b"]} -function Render_RayCastingRender_drawSprite__P171794_mk(s) { +function associate__P185467_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_drawSprite__P171794, depth: s.depth + 1, + parent: s, fn: associate__P185467, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -38595,49 +38268,15 @@ function Render_RayCastingRender_drawSprite__P171794_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, - spriteScreenX___187263: undefined, - spriteScreenHalfWidth___187277: undefined, - spriteScreenLeft___187291: undefined, - spriteScreenRight___187295: undefined, - blitX___187299: undefined, - blitWidth___187300: undefined, - sprX___187301: undefined, - blitXSpr___187335: undefined, - blitWidthSpr___187340: undefined, - lineHeight___187351: undefined, - drawStart___187357: undefined, - texSpr___187400: undefined, - sprTexRatio___187430: undefined, - sayRender___187463: undefined, - particle___187469: undefined, - sayOrParticle___187475: undefined, - fpx_div_transformy___187560: undefined, - height___187567: undefined, - blitXSaySrc___187572: undefined, - blitWidthSaySrc___187582: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, - arg5: undefined, } } -function Render_Animations_getFrameByDir__P171812(s) { +function scene_OverlapHandler_constructor__P169342(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -38650,105 +38289,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, Render_Animations__C171807_VT)) failedCast(r0); - r0 = pxsim.control.millis(); - s.tmp_2 = r0; - r0 = s.arg0.fields["msLast"]; - s.tmp_3 = r0; - r0 = (s.tmp_2 - s.tmp_3); - s.tmp_1 = r0; - r0 = s.arg0.fields["frameInterval"]; - s.tmp_4 = r0; - r0 = (s.tmp_1 > s.tmp_4); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_5 = r0 = s.arg0; - r0 = pxsim.control.millis(); - s.tmp_6 = r0; - r0 = (s.tmp_5).fields["msLast"] = (s.tmp_6); - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["index"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 + 1); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["index"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - s.tmp_4 = r0 = s.arg1; - r0 = s.arg0.fields["animations"]; - s.tmp_6 = r0; - r0 = pxsim_Array__length(s.tmp_6); - s.tmp_5 = r0; - r0 = (s.tmp_4 * s.tmp_5); - s.tmp_3 = r0; - r0 = pxsim.Math_.round(s.tmp_3); - s.tmp_2 = r0; - r0 = s.arg0.fields["animations"]; - s.tmp_8 = r0; - r0 = pxsim_Array__length(s.tmp_8); - s.tmp_7 = r0; - r0 = (s.tmp_2 % s.tmp_7); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["iAnimation"] = (s.tmp_1); - r0 = s.arg0.fields["index"]; - s.tmp_1 = r0; - r0 = s.arg0.fields["animations"]; - s.tmp_4 = r0; - r0 = s.arg0.fields["iAnimation"]; - s.tmp_5 = r0; - r0 = pxsim_Array__getAt(s.tmp_4, s.tmp_5); - 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 = 1; continue; } - r0 = (s.arg0).fields["index"] = (0); - case 1: - case 2: - case 3: - case 4: - r0 = s.arg0.fields["animations"]; - s.tmp_1 = r0; - r0 = s.arg0.fields["iAnimation"]; - s.tmp_2 = r0; - r0 = pxsim_Array__getAt(s.tmp_1, s.tmp_2); - s.tmp_0 = r0; - r0 = s.arg0.fields["index"]; - s.tmp_3 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_3); + if (!checkSubtype(r0, scene_OverlapHandler__C169341_VT)) failedCast(r0); + r0 = (s.arg0).fields["kind"] = (s.arg1); + r0 = (s.arg0).fields["otherKind"] = (s.arg2); + r0 = (s.arg0).fields["handler"] = (s.arg3); + r0 = undefined; return leave(s, r0) default: oops() } } } -Render_Animations_getFrameByDir__P171812.info = {"start":613,"length":482,"line":27,"column":8,"endLine":36,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_blocks.ts","functionName":"getFrameByDir","argumentNames":["this","dir"]} +scene_OverlapHandler_constructor__P169342.info = {"start":655,"length":171,"line":22,"column":8,"endLine":26,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":["this","kind","otherKind","handler"]} -function Render_Animations_getFrameByDir__P171812_mk(s) { +function scene_OverlapHandler_constructor__P169342_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_Animations_getFrameByDir__P171812, depth: s.depth + 1, + parent: s, fn: scene_OverlapHandler_constructor__P169342, depth: s.depth + 1, pc: 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, } } -function particles_ParticleSource___draw__P169684(s) { +function tiles_createTilemap__P169289(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -38758,105 +38329,48 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.current___187663 = undefined; - s.left___187666 = undefined; - s.top___187676 = 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__C169678_VT)) failedCast(r0); - r0 = s.arg0.fields["head"]; - s.current___187663 = (r0); - r0 = s.arg0.fields["pFlags"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 4); + r0 = pxsim_pxtcore_mkClassInstance(tiles_TileMapData__C169244_VT); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = 0; - { step = 2; continue; } + s.tmp_1 = tiles_TileMapData_constructor__P169245_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.arg2; + s.tmp_1.arg4 = s.arg3; + s.callLocIdx = 1100; s.pc = 1; return s.tmp_1; 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___187666 = (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___187676 = (s.tmp_4); - case 5: - r0 = pxsim_numops_toBoolDecr(s.current___187663); - if (!r0) { step = 8; continue; } - r0 = s.current___187663.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__P172799_mk(s); - s.tmp_2.arg0 = s.arg0; - s.tmp_2.arg1 = s.current___187663; - s.tmp_2.arg2 = s.left___187666; - s.tmp_2.arg3 = s.top___187676; - s.callLocIdx = 1575; s.pc = 9; return s.tmp_2; - case 9: r0 = s.retval; - case 6: - case 7: - r0 = s.current___187663.fields["next"]; - s.current___187663 = (r0); - { step = 5; continue; } - case 8: - r0 = undefined; + r0 = s.tmp_0; return leave(s, r0) default: oops() } } } -particles_ParticleSource___draw__P169684.info = {"start":3216,"length":468,"line":112,"column":8,"endLine":122,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"__draw","argumentNames":["this","camera"]} +tiles_createTilemap__P169289.info = {"start":18693,"length":170,"line":587,"column":4,"endLine":589,"endColumn":5,"fileName":"pxt_modules/game/tilemap.ts","functionName":"createTilemap","argumentNames":["data","layer","tiles","scale"]} -function particles_ParticleSource___draw__P169684_mk(s) { +function tiles_createTilemap__P169289_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource___draw__P169684, depth: s.depth + 1, + parent: s, fn: tiles_createTilemap__P169289, depth: s.depth + 1, pc: 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___187663: undefined, - left___187666: undefined, - top___187676: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function particles_ParticleSource_drawParticle__P172799(s) { +function tiles_TileMapData_constructor__P169245(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -38871,52 +38385,53 @@ switch (step) { 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_ParticleSource__C169678_VT)) failedCast(r0); - s.tmp_0 = particles_ParticleFactory__C169714_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__C169714_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.drawParticle; - s.pc = 1; return s.tmp_0; + if (!checkSubtype(r0, tiles_TileMapData__C169244_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__P169249_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg4; + s.callLocIdx = 1028; 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() } } } -particles_ParticleSource_drawParticle__P172799.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"]} +tiles_TileMapData_constructor__P169245.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 particles_ParticleSource_drawParticle__P172799_mk(s) { +function tiles_TileMapData_constructor__P169245_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_drawParticle__P172799, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_constructor__P169245, 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 particles_ParticleFactory_drawParticle__P169717(s) { +function helpers_stringTrim__P166650(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -38926,52 +38441,94 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.start___185565 = undefined; + s.end___185566 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleFactory__C169714_VT)) failedCast(r0); - s.tmp_0 = r0 = globals.screen___168559; - r0 = (s.arg2 + 128); + s.start___185565 = (0); + r0 = pxsim_String_.length(s.arg0); + s.tmp_0 = r0; + r0 = (s.tmp_0 - 1); + s.end___185566 = (r0); + case 1: + r0 = (s.start___185565 <= s.end___185566); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 2; continue; } + r0 = s.tmp_0; + { step = 3; continue; } + case 2: + s.tmp_1 = helpers_isWhitespace__P166651_mk(s); + r0 = pxsim_String_.charCodeAt(s.arg0, s.start___185565); + s.tmp_1.arg0 = r0; + s.callLocIdx = 23; s.pc = 9; return s.tmp_1; + case 9: + r0 = s.retval; + case 3: + // jmp value (already in r0) s.tmp_2 = r0; - r0 = (s.tmp_2 >> 8); - s.tmp_1 = r0; - r0 = (s.arg3 + 128); - s.tmp_4 = r0; - r0 = (s.tmp_4 >> 8); - s.tmp_3 = r0; - r0 = pxsim_ImageMethods.setPixel(s.tmp_0, s.tmp_1, s.tmp_3, 1); - r0 = undefined; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 4; continue; } + r0 = (s.start___185565 + 1); + s.start___185565 = (r0); + { step = 1; continue; } + case 4: + case 5: + r0 = (s.end___185566 > s.start___185565); + 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_1 = helpers_isWhitespace__P166651_mk(s); + r0 = pxsim_String_.charCodeAt(s.arg0, s.end___185566); + s.tmp_1.arg0 = r0; + s.callLocIdx = 24; s.pc = 10; return s.tmp_1; + case 10: + r0 = s.retval; + case 7: + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 8; continue; } + r0 = (s.end___185566 - 1); + s.end___185566 = (r0); + { step = 5; continue; } + case 8: + s.tmp_0 = helpers_stringSlice__P166646_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.start___185565; + r0 = (s.end___185566 + 1); + s.tmp_0.arg2 = r0; + s.callLocIdx = 25; s.pc = 11; return s.tmp_0; + case 11: + r0 = s.retval; return leave(s, r0) default: oops() } } } -particles_ParticleFactory_drawParticle__P169717.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"]} +helpers_stringTrim__P166650.info = {"start":14539,"length":319,"line":491,"column":4,"endLine":501,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"stringTrim","argumentNames":["s"]} -function particles_ParticleFactory_drawParticle__P169717_mk(s) { +function helpers_stringTrim__P166650_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleFactory_drawParticle__P169717, depth: s.depth + 1, + parent: s, fn: helpers_stringTrim__P166650, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, + start___185565: undefined, + end___185566: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function Sprite_height__P168925(s) { +function helpers_isWhitespace__P166651(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -38985,21 +38542,55 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - r0 = s.arg0.fields["_height"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_pxtcore.switch_eq(9, s.tmp_0); + if (r0) { step = 1; continue; } + r0 = pxsim_pxtcore.switch_eq(11, s.tmp_0); + if (r0) { step = 2; continue; } + r0 = pxsim_pxtcore.switch_eq(12, s.tmp_0); + if (r0) { step = 3; continue; } + r0 = pxsim_pxtcore.switch_eq(32, s.tmp_0); + if (r0) { step = 4; continue; } + r0 = pxsim_pxtcore.switch_eq(160, s.tmp_0); + if (r0) { step = 5; continue; } + r0 = pxsim_pxtcore.switch_eq(65279, s.tmp_0); + if (r0) { step = 6; continue; } + r0 = pxsim_pxtcore.switch_eq(10, s.tmp_0); + if (r0) { step = 7; continue; } + r0 = pxsim_pxtcore.switch_eq(13, s.tmp_0); + if (r0) { step = 8; continue; } + r0 = pxsim_pxtcore.switch_eq(8232, s.tmp_0); + if (r0) { step = 9; continue; } + r0 = pxsim_pxtcore.switch_eq(8233, s.tmp_0); + if (r0) { step = 10; continue; } + r0 = s.tmp_0; + { step = 11; continue; } + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + r0 = true; + { step = 12; continue; } + case 11: + r0 = false; + { step = 12; continue; } + r0 = undefined; + case 12: + return leave(s, r0) default: oops() } } } -Sprite_height__P168925.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__P168925.isGetter = true; +helpers_isWhitespace__P166651.info = {"start":14864,"length":674,"line":503,"column":4,"endLine":520,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"isWhitespace","argumentNames":["c"]} -function Sprite_height__P168925_mk(s) { +function helpers_isWhitespace__P166651_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_height__P168925, depth: s.depth + 1, + parent: s, fn: helpers_isWhitespace__P166651, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -39009,7 +38600,7 @@ function Sprite_height__P168925_mk(s) { -function Sprite_y__P168884(s) { +function helpers__registerFactory__P169859(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39024,40 +38615,34 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - s.tmp_0 = Sprite_top__P168931_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_1 = r0 = s.arg1; - s.tmp_4 = Sprite_height__P168925_mk(s); - s.tmp_4.arg0 = s.arg0; - s.callLocIdx = 409; 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 = 410; s.pc = 1; return s.tmp_0; + r0 = pxsim_numops_toBoolDecr(globals.factories___172876); + 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.factories___172876 = (r0); case 1: - r0 = s.retval; + case 2: + r0 = pxsim_pxtrt.mkMap(); + s.tmp_0 = r0; + r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "kind", s.arg0); + r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "factory", s.arg1); + r0 = pxsim_Array__push(globals.factories___172876, s.tmp_0); r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_y__P168884.info = {"start":3081,"length":65,"line":126,"column":4,"endLine":128,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"y","argumentNames":["this","v"]} +helpers__registerFactory__P169859.info = {"start":2019,"length":201,"line":58,"column":4,"endLine":64,"endColumn":5,"fileName":"pxt_modules/game/assetTemplates.ts","functionName":"_registerFactory","argumentNames":["kind","factory"]} -function Sprite_y__P168884_mk(s) { +function helpers__registerFactory__P169859_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_y__P168884, depth: s.depth + 1, + parent: s, fn: helpers__registerFactory__P169859, depth: s.depth + 1, pc: 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, } } @@ -39066,7 +38651,7 @@ function Sprite_y__P168884_mk(s) { -function Sprite_x__P168882(s) { +function helpers_arrayForEach__P166636(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39076,45 +38661,49 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.len___185618 = undefined; + s.i___185621 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - s.tmp_0 = Sprite_left__P168927_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_1 = r0 = s.arg1; - s.tmp_4 = Sprite_width__P168924_mk(s); - s.tmp_4.arg0 = s.arg0; - s.callLocIdx = 404; 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 = 405; s.pc = 1; return s.tmp_0; + r0 = pxsim_Array__length(s.arg0); + s.len___185618 = (r0); + s.i___185621 = (0); case 1: + r0 = (s.i___185621 < s.len___185618); + 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___185621); + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.i___185621; + setupLambda(s.tmp_1, s.tmp_1.argL); + s.callLocIdx = 6; s.pc = 3; return s.tmp_1; + case 3: r0 = s.retval; + r0 = (s.i___185621 + 1); + s.i___185621 = (r0); + { step = 1; continue; } + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_x__P168882.info = {"start":2724,"length":65,"line":115,"column":4,"endLine":117,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"x","argumentNames":["this","v"]} +helpers_arrayForEach__P166636.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 Sprite_x__P168882_mk(s) { +function helpers_arrayForEach__P166636_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_x__P168882, depth: s.depth + 1, + parent: s, fn: helpers_arrayForEach__P166636, depth: s.depth + 1, pc: 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___185618: undefined, + i___185621: undefined, arg0: undefined, arg1: undefined, } } @@ -39123,7 +38712,7 @@ function Sprite_x__P168882_mk(s) { -function Sprite_width__P168924(s) { +function imagesFlipX__P171847(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39137,23 +38726,28 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - r0 = s.arg0.fields["_width"]; + r0 = pxsim_pxtcore_mkAction(1, imagesFlipX_inline__P185728); s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = helpers_arrayForEach__P166636_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 2083; s.pc = 1; return s.tmp_1; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_width__P168924.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__P168924.isGetter = true; +imagesFlipX__P171847.info = {"start":5260,"length":204,"line":99,"column":0,"endLine":104,"endColumn":1,"fileName":"pxt_modules/pxt-raycasting/animation.ts","functionName":"imagesFlipX","argumentNames":["ani"]} -function Sprite_width__P168924_mk(s) { +function imagesFlipX__P171847_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_width__P168924, depth: s.depth + 1, + parent: s, fn: imagesFlipX__P171847, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, arg0: undefined, } } @@ -39161,7 +38755,7 @@ function Sprite_width__P168924_mk(s) { -function sprites_BaseSpriteSayRenderer_draw__P168788(s) { +function imagesFlipX_inline__P185728(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39174,34 +38768,39 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, sprites_BaseSpriteSayRenderer__C168786_VT)) failedCast(r0); + s.tmp_0 = r0 = s.caps[0]; + s.tmp_1 = r0 = s.arg1; + r0 = pxsim_ImageMethods.clone(s.arg0); + s.tmp_2 = r0; + r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_1, s.tmp_2); + r0 = pxsim_Array__getAt(s.caps[0], s.arg1); + s.tmp_0 = r0; + r0 = pxsim_ImageMethods.flipX(s.tmp_0); r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_BaseSpriteSayRenderer_draw__P168788.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"]} +imagesFlipX_inline__P185728.info = {"start":5313,"length":148,"line":100,"column":16,"endLine":103,"endColumn":5,"fileName":"pxt_modules/pxt-raycasting/animation.ts","functionName":"inline","argumentNames":["img","i"]} -function sprites_BaseSpriteSayRenderer_draw__P168788_mk(s) { +function imagesFlipX_inline__P185728_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_BaseSpriteSayRenderer_draw__P168788, depth: s.depth + 1, + parent: s, fn: imagesFlipX_inline__P185728, 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_imageBlit__P168480(s) { +function Render_RayCastingRender_constructor__P171787(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39211,202 +38810,288 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.sc___185832 = 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___172095; - 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) + r0 = s.arg0; + if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim.image.create(globals.SW___174806, globals.SH___174800); s.tmp_1 = r0; - globals._blitArgs___172095 = (s.tmp_1); - s.tmp_0 = r0 = globals._blitArgs___172095; - 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___172095; - 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___172095; - 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___172095; - 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___172095; - 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___172095; - 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___172095; - 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___172095; - 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; } + r0 = (s.tmp_0).fields["tempScreen"] = (s.tmp_1); + r0 = (s.arg0).fields["velocityAngle"] = (2); + r0 = (s.arg0).fields["velocity"] = (3); + r0 = (s.arg0).fields["_viewMode"] = (1); + r0 = (s.arg0).fields["_wallZScale"] = (1); + r0 = (s.arg0).fields["cameraSway"] = (0); + r0 = (s.arg0).fields["isWalking"] = (false); + r0 = (s.arg0).fields["cameraOffsetX"] = (0); + r0 = (s.arg0).fields["cameraOffsetZ_fpx"] = (0); + s.tmp_2 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_3 = r0; + r0 = (s.tmp_2).fields["sprites"] = (s.tmp_3); + s.tmp_4 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_5 = r0; + r0 = (s.tmp_4).fields["sprites2D"] = (s.tmp_5); + s.tmp_6 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_7 = r0; + r0 = (s.tmp_6).fields["spriteParticles"] = (s.tmp_7); + s.tmp_8 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_9 = r0; + r0 = (s.tmp_8).fields["spriteLikes"] = (s.tmp_9); + s.tmp_10 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_11 = r0; + r0 = (s.tmp_10).fields["spriteAnimations"] = (s.tmp_11); + s.tmp_12 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_13 = r0; + r0 = (s.tmp_12).fields["spriteMotionZ"] = (s.tmp_13); + s.tmp_14 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_15 = r0; + r0 = (s.tmp_14).fields["sayRederers"] = (s.tmp_15); + s.tmp_16 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_17 = r0; + r0 = (s.tmp_16).fields["sayEndTimes"] = (s.tmp_17); + r0 = (s.arg0).fields["tilemapScaleSize"] = (16); + s.tmp_18 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_19 = r0; + r0 = (s.tmp_18).fields["dist"] = (s.tmp_19); + s.tmp_20 = r0 = s.arg0; + s.tmp_22 = sprites_create__P168802_mk(s); + r0 = pxsim.image.ofBuffer(_hex185817); + s.tmp_22.arg0 = r0; + s.tmp_22.arg1 = undefined; + s.callLocIdx = 1986; s.pc = 3; return s.tmp_22; case 3: - r0 = 0; + r0 = s.retval; + s.tmp_21 = r0; + r0 = (s.tmp_20).fields["tempSprite"] = (s.tmp_21); + s.tmp_23 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_24 = r0; + r0 = (s.tmp_23).fields["transformX"] = (s.tmp_24); + s.tmp_25 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_26 = r0; + r0 = (s.tmp_25).fields["transformY"] = (s.tmp_26); + s.tmp_27 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_28 = r0; + r0 = (s.tmp_27).fields["angleSelfToSpr"] = (s.tmp_28); + r0 = (s.arg0).fields["_angle"] = (0); + s.tmp_0 = Render_RayCastingRender_fov__P171768_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = globals.defaultFov___171737; + s.callLocIdx = 1987; s.pc = 4; return s.tmp_0; case 4: - // jmp value (already in r0) + r0 = s.retval; + r0 = pxsim_pxtcore_mkClassInstance(scene_Camera__C169308_VT); s.tmp_0 = r0; - r0 = pxsim_Array_.setAt(globals._blitArgs___172095, 8, s.tmp_0); - r0 = pxsim_numops_toBoolDecr(s.arg11); - if (!r0) { step = 5; continue; } - r0 = 1; - { step = 6; continue; } + s.tmp_1 = scene_Camera_constructor__P169312_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 1988; s.pc = 5; return s.tmp_1; case 5: - r0 = 0; + r0 = s.retval; + r0 = (s.arg0).fields["camera"] = (s.tmp_0); + s.tmp_0 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1989; s.pc = 6; return s.tmp_0; case 6: - // jmp value (already in r0) - s.tmp_0 = r0; - r0 = pxsim_Array_.setAt(globals._blitArgs___172095, 9, s.tmp_0); - r0 = pxsim_ImageMethods._blit(s.arg0, s.arg5, globals._blitArgs___172095); - return leave(s, r0) - default: oops() -} } } -helpers_imageBlit__P168480.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 helpers_imageBlit__P168480_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: helpers_imageBlit__P168480, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, - arg5: undefined, - arg6: undefined, - arg7: undefined, - arg8: undefined, - arg9: undefined, - arg10: undefined, - arg11: undefined, -} } - - - - - -function Math_roundWithPrecision__P166659(s) { -let r0 = s.r0, 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.r___187639 = undefined; - s.d___187641 = 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 <= 0); + r0 = s.retval; + s.sc___185832 = (r0); + r0 = s.sc___185832.fields["tileMap"]; + 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.Math_.round(s.arg0); - { step = 9; continue; } + r0 = pxsim_pxtcore_mkClassInstance(tiles_TileMap__C169262_VT); + s.tmp_3 = r0; + s.tmp_4 = tiles_TileMap_constructor__P169264_mk(s); + s.tmp_4.arg0 = s.tmp_3; + s.tmp_4.arg1 = 4; + s.callLocIdx = 1990; s.pc = 7; return s.tmp_4; + case 7: + r0 = s.retval; + r0 = (s.sc___185832).fields["tileMap"] = (s.tmp_3); + { step = 2; continue; } case 1: + s.tmp_0 = Render_RayCastingRender_tilemapLoaded__P171786_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1991; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; case 2: - r0 = (s.arg0 == 0); + r0 = pxsim_pxtcore_mkAction(1, Render_RayCastingRender_inline__P185848); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = tiles_TileMap_addEventListener__P169287_mk(s); + s.tmp_2 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1992; s.pc = 10; return s.tmp_2; + case 10: + r0 = s.retval; + r0 = r0.fields["tileMap"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 0; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 1994; s.pc = 9; return s.tmp_1; + case 9: + r0 = s.retval; + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = sprites_create__P168802_mk(s); + r0 = s.arg0.fields["tilemapScaleSize"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 >> 1); + s.tmp_3 = r0; + r0 = s.arg0.fields["tilemapScaleSize"]; + s.tmp_6 = r0; + r0 = (s.tmp_6 >> 1); + s.tmp_5 = r0; + r0 = pxsim.image.create(s.tmp_3, s.tmp_5); + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = globals.Player___169007; + s.callLocIdx = 1995; s.pc = 11; return s.tmp_2; + case 11: + r0 = s.retval; s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 3; continue; } - r0 = 0; - { step = 9; continue; } - case 3: - case 4: - s.r___187639 = (0); - case 5: - r0 = pxsim.Math_.pow(10, s.arg1); - s.d___187641 = (r0); - r0 = (s.arg0 * s.d___187641); + r0 = (s.tmp_0).fields["sprSelf"] = (s.tmp_1); + s.tmp_0 = Render_RayCastingRender_takeoverSceneSprites__P171784_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1996; s.pc = 12; return s.tmp_0; + case 12: + r0 = s.retval; + r0 = s.arg0.fields["sprites"]; + s.tmp_0 = r0; + r0 = s.arg0.fields["sprSelf"]; s.tmp_1 = r0; - r0 = pxsim.Math_.round(s.tmp_1); + r0 = pxsim_Array_.removeElement(s.tmp_0, s.tmp_1); + s.tmp_0 = Render_RayCastingRender_updateViewZPos__P171783_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1997; s.pc = 13; return s.tmp_0; + case 13: + r0 = s.retval; + s.tmp_0 = scene_cameraFollowSprite__P169417_mk(s); + r0 = s.arg0.fields["sprSelf"]; + s.tmp_0.arg0 = r0; + s.callLocIdx = 1998; s.pc = 14; return s.tmp_0; + case 14: + r0 = s.retval; + s.tmp_0 = Render_RayCastingRender_updateSelfImage__P171788_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1999; s.pc = 15; return s.tmp_0; + case 15: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, Render_RayCastingRender_inline__P185876); s.tmp_0 = r0; - r0 = (s.tmp_0 / s.d___187641); - s.r___187639 = (r0); - r0 = (s.arg1 + 1); - s.arg1 = (r0); - r0 = (s.r___187639 == 0); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = game_onUpdate__P169550_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 2001; s.pc = 16; return s.tmp_1; + case 16: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, Render_RayCastingRender_inline__P185880); 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.arg1 < 21); - case 7: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 8; continue; } - { step = 5; continue; } - case 8: - r0 = s.r___187639; - case 9: + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = game_onUpdateInterval__P169551_mk(s); + s.tmp_1.arg0 = 400; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 2003; s.pc = 17; return s.tmp_1; + case 17: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, Render_RayCastingRender_inline__P185941); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = game_onUpdateInterval__P169551_mk(s); + s.tmp_1.arg0 = 25; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 2005; s.pc = 18; return s.tmp_1; + case 18: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, Render_RayCastingRender_inline__P185974); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = control___screen_setupUpdate__P168521_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 2007; s.pc = 19; return s.tmp_1; + case 19: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, Render_RayCastingRender_inline__P185986); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = game_addScenePushHandler__P169545_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 2010; s.pc = 20; return s.tmp_1; + case 20: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, Render_RayCastingRender_inline__P186003); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = game_addScenePopHandler__P169547_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 2014; s.pc = 21; return s.tmp_1; + case 21: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -Math_roundWithPrecision__P166659.info = {"start":17145,"length":411,"line":579,"column":4,"endLine":591,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"roundWithPrecision","argumentNames":["x","digits"]} +Render_RayCastingRender_constructor__P171787.info = {"start":12269,"length":3037,"line":337,"column":8,"endLine":408,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":["this"]} -function Math_roundWithPrecision__P166659_mk(s) { +function Render_RayCastingRender_constructor__P171787_mk(s) { checkStack(s.depth); return { - parent: s, fn: Math_roundWithPrecision__P166659, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_constructor__P171787, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - r___187639: undefined, - d___187641: 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, + sc___185832: undefined, arg0: undefined, - arg1: undefined, } } +const _hex185817 = pxsim.BufferMethods.createBufferFromHex("870401000100000000000000") -function Render_RayCastingRender_sprYFx8__P171766(s) { +function Render_RayCastingRender_inline__P185848(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39418,49 +39103,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, Render_RayCastingRender__C171738_VT)) failedCast(r0); - r0 = s.arg1.fields["_y"]; - s.tmp_1 = r0; - r0 = s.arg1.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.arg0.fields["tilemapScaleSize"]; - s.tmp_5 = r0; - r0 = (s.tmp_0 / s.tmp_5); + s.tmp_0 = Render_RayCastingRender_tilemapLoaded__P171786_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.callLocIdx = 1993; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -Render_RayCastingRender_sprYFx8__P171766.info = {"start":3952,"length":139,"line":129,"column":8,"endLine":131,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"sprYFx8","argumentNames":["this","spr"]} +Render_RayCastingRender_inline__P185848.info = {"start":12673,"length":28,"line":348,"column":84,"endLine":348,"endColumn":112,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":["data"]} -function Render_RayCastingRender_sprYFx8__P171766_mk(s) { +function Render_RayCastingRender_inline__P185848_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_sprYFx8__P171766, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_inline__P185848, depth: s.depth + 1, pc: 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 Render_RayCastingRender_sprXFx8__P171765(s) { +function Render_RayCastingRender_inline__P185876(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39470,51 +39139,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.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; + s.tmp_0 = if_updateControls_1_mk(s); + s.tmp_0.arg0 = s.caps[0]; + if (!s.tmp_0.arg0.vtable.iface) { + setupLambda(s.tmp_0, pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "updateControls"), 1); + s.callLocIdx = 2000; s.pc = 1; return s.tmp_0; + } else { + s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["updateControls"]; + if (s.tmp_0.fn == null) { setupLambda(s.tmp_0, s.tmp_0.arg0.fields["updateControls"], 1); s.callLocIdx = 2000; s.pc = 1; return s.tmp_0; } + else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 2000; s.pc = 1; return s.tmp_0;; } + else { s.callLocIdx = 2000; s.pc = 1; return s.tmp_0; } } - r0 = s.arg0; - if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); - r0 = s.arg1.fields["_x"]; - s.tmp_1 = r0; - r0 = s.arg1.fields["_width"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 << 8); - s.tmp_4 = r0; - r0 = pxsim.Math_.idiv(s.tmp_4, 512); - s.tmp_2 = r0; - r0 = (s.tmp_1 + s.tmp_2); - s.tmp_0 = r0; - r0 = s.arg0.fields["tilemapScaleSize"]; - s.tmp_5 = r0; - r0 = (s.tmp_0 / s.tmp_5); + case 1: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -Render_RayCastingRender_sprXFx8__P171765.info = {"start":3804,"length":138,"line":125,"column":8,"endLine":127,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"sprXFx8","argumentNames":["this","spr"]} +Render_RayCastingRender_inline__P185876.info = {"start":13101,"length":65,"line":358,"column":26,"endLine":360,"endColumn":13,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":[]} -function Render_RayCastingRender_sprXFx8__P171765_mk(s) { +function Render_RayCastingRender_inline__P185876_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_sprXFx8__P171765, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_inline__P185876, depth: s.depth + 1, pc: 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 Render_RayCastingRender_yFpx__P171760(s) { +function Render_RayCastingRender_inline__P185880(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39524,52 +39180,114 @@ 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, Render_RayCastingRender__C171738_VT)) failedCast(r0); - r0 = s.arg0.fields["sprSelf"]; - r0 = r0.fields["_y"]; - s.tmp_1 = r0; - r0 = s.arg0.fields["sprSelf"]; - r0 = r0.fields["_height"]; + s.i___185881 = undefined; + s.spr___185888 = undefined; + s.i___185909 = undefined; + s.spr___185916 = undefined; + s.i___185881 = (0); + case 1: + s.tmp_1 = r0 = s.i___185881; + r0 = s.caps[0].fields["sprites"]; s.tmp_3 = r0; - r0 = (s.tmp_3 << 8); + 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 = 4; continue; } + r0 = s.caps[0].fields["sprites"]; s.tmp_4 = r0; - r0 = pxsim.Math_.idiv(s.tmp_4, 512); + r0 = pxsim_Array__getAt(s.tmp_4, s.i___185881); + s.spr___185888 = (r0); + r0 = s.spr___185888.fields["flags"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 & 512); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + r0 = s.caps[0].fields["sprites"]; s.tmp_2 = r0; - r0 = (s.tmp_1 + s.tmp_2); + r0 = pxsim_Array_.removeElement(s.tmp_2, s.spr___185888); + r0 = s.caps[0].fields["sprites2D"]; s.tmp_0 = r0; - r0 = s.arg0.fields["tilemapScaleSize"]; - s.tmp_5 = r0; - r0 = (s.tmp_0 / s.tmp_5); - return leaveAccessor(s, r0) - default: oops() -} } } -Render_RayCastingRender_yFpx__P171760.info = {"start":3187,"length":155,"line":101,"column":8,"endLine":103,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"yFpx","argumentNames":["this"]} -Render_RayCastingRender_yFpx__P171760.isGetter = true; + r0 = pxsim_Array__push(s.tmp_0, s.spr___185888); + { step = 3; continue; } + case 2: + r0 = (s.i___185881 + 1); + s.i___185881 = (r0); + case 3: + { step = 1; continue; } + case 4: + s.i___185909 = (0); + case 5: + s.tmp_1 = r0 = s.i___185909; + r0 = s.caps[0].fields["sprites2D"]; + 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 = 8; continue; } + r0 = s.caps[0].fields["sprites2D"]; + s.tmp_4 = r0; + r0 = pxsim_Array__getAt(s.tmp_4, s.i___185909); + s.spr___185916 = (r0); + r0 = s.spr___185916.fields["flags"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 & 512); + 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 = 6; continue; } + r0 = s.caps[0].fields["sprites2D"]; + s.tmp_4 = r0; + r0 = pxsim_Array_.removeElement(s.tmp_4, s.spr___185916); + r0 = s.caps[0].fields["sprites"]; + s.tmp_0 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.spr___185916); + { step = 7; continue; } + case 6: + r0 = (s.i___185909 + 1); + s.i___185909 = (r0); + case 7: + { step = 5; continue; } + case 8: + s.tmp_0 = Render_RayCastingRender_takeoverSceneSprites__P171784_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.callLocIdx = 2002; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +Render_RayCastingRender_inline__P185880.info = {"start":13208,"length":760,"line":362,"column":39,"endLine":378,"endColumn":13,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":[]} -function Render_RayCastingRender_yFpx__P171760_mk(s) { +function Render_RayCastingRender_inline__P185880_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_yFpx__P171760, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_inline__P185880, depth: s.depth + 1, pc: 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, + i___185881: undefined, + spr___185888: undefined, + i___185909: undefined, + spr___185916: undefined, } } -function Render_RayCastingRender_xFpx__P171759(s) { +function Render_RayCastingRender_inline__P185941(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39579,37 +39297,65 @@ 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, Render_RayCastingRender__C171738_VT)) failedCast(r0); - r0 = s.arg0.fields["sprSelf"]; - r0 = r0.fields["_x"]; + r0 = s.caps[0].fields["cameraSway"]; + 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["isWalking"]; + case 2: + // jmp value (already in r0) s.tmp_1 = r0; - r0 = s.arg0.fields["sprSelf"]; - r0 = r0.fields["_width"]; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 3; continue; } + s.tmp_2 = r0 = s.caps[0]; + r0 = pxsim.control.millis(); + s.tmp_8 = r0; + r0 = (s.tmp_8 / 150); + s.tmp_7 = r0; + r0 = pxsim.Math_.sin(s.tmp_7); + s.tmp_6 = r0; + r0 = s.caps[0].fields["cameraSway"]; + s.tmp_9 = r0; + r0 = (s.tmp_6 * s.tmp_9); + s.tmp_5 = r0; + r0 = (s.tmp_5 * 3); + s.tmp_4 = r0; + r0 = (s.tmp_4 | 0); s.tmp_3 = r0; - r0 = (s.tmp_3 << 8); + r0 = (s.tmp_2).fields["cameraOffsetX"] = (s.tmp_3); + s.tmp_0 = r0 = s.caps[0]; + r0 = pxsim.control.millis(); + s.tmp_6 = r0; + r0 = (s.tmp_6 / 75); + s.tmp_5 = r0; + r0 = pxsim.Math_.cos(s.tmp_5); s.tmp_4 = r0; - r0 = pxsim.Math_.idiv(s.tmp_4, 512); + r0 = s.caps[0].fields["cameraSway"]; + s.tmp_7 = r0; + r0 = (s.tmp_4 * s.tmp_7); + s.tmp_3 = r0; + r0 = (s.tmp_3 * 256); + s.tmp_8 = r0; + r0 = (s.tmp_8 | 0); s.tmp_2 = r0; - r0 = (s.tmp_1 + s.tmp_2); - s.tmp_0 = r0; - r0 = s.arg0.fields["tilemapScaleSize"]; - s.tmp_5 = r0; - r0 = (s.tmp_0 / s.tmp_5); - return leaveAccessor(s, r0) + r0 = (s.tmp_2 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["cameraOffsetZ_fpx"] = (s.tmp_1); + case 3: + case 4: + r0 = undefined; + return leave(s, r0) default: oops() } } } -Render_RayCastingRender_xFpx__P171759.info = {"start":2903,"length":154,"line":93,"column":8,"endLine":95,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"xFpx","argumentNames":["this"]} -Render_RayCastingRender_xFpx__P171759.isGetter = true; +Render_RayCastingRender_inline__P185941.info = {"start":14010,"length":296,"line":381,"column":38,"endLine":386,"endColumn":13,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":[]} -function Render_RayCastingRender_xFpx__P171759_mk(s) { +function Render_RayCastingRender_inline__P185941_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_xFpx__P171759, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_inline__P185941, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -39617,14 +39363,17 @@ function Render_RayCastingRender_xFpx__P171759_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - arg0: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, } } -function tiles_TileMapData_isWall__P169255(s) { +function Render_RayCastingRender_inline__P185974(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39634,41 +39383,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.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMapData__C169244_VT)) failedCast(r0); - r0 = s.arg0.fields["layers"]; + r0 = s.caps[0].fields["_viewMode"]; s.tmp_1 = r0; - r0 = pxsim_ImageMethods.getPixel(s.tmp_1, s.arg1, s.arg2); + r0 = (s.tmp_1 == 1); s.tmp_0 = r0; - r0 = (s.tmp_0 === 2); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.caps[0].fields["tempScreen"]; + s.tmp_2 = r0; + r0 = pxsim_pxtcore.updateScreen(s.tmp_2); + { step = 2; continue; } + case 1: + r0 = pxsim_pxtcore.updateScreen(globals.screen___168559); + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -tiles_TileMapData_isWall__P169255.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"]} +Render_RayCastingRender_inline__P185974.info = {"start":14350,"length":192,"line":387,"column":41,"endLine":392,"endColumn":13,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":[]} -function tiles_TileMapData_isWall__P169255_mk(s) { +function Render_RayCastingRender_inline__P185974_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMapData_isWall__P169255, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_inline__P185974, 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, + tmp_2: undefined, } } -function helpers_imageBlitRow__P168481(s) { +function Render_RayCastingRender_inline__P185986(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39680,60 +39428,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.lambdaArgs = null; } - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = helpers_pack__P172094_mk(s); - s.tmp_2.arg0 = s.arg1; - s.tmp_2.arg1 = s.arg2; - s.callLocIdx = 146; s.pc = 1; return s.tmp_2; + s.tmp_0 = r0 = s.caps[0]; + s.tmp_2 = scene_Background_addLayer__P169201_mk(s); + r0 = s.arg0.fields["background"]; + s.tmp_2.arg0 = r0; + r0 = s.caps[0].fields["tempScreen"]; + s.tmp_2.arg1 = r0; + s.tmp_2.arg2 = 0; + s.tmp_2.arg3 = 5; + s.callLocIdx = 2008; s.pc = 1; return s.tmp_2; case 1: r0 = s.retval; s.tmp_1 = r0; - s.tmp_3 = r0 = s.arg3; - s.tmp_5 = helpers_pack__P172094_mk(s); - s.tmp_5.arg0 = s.arg4; - s.tmp_5.arg1 = s.arg5; - s.callLocIdx = 147; s.pc = 2; return s.tmp_5; + r0 = (s.tmp_0).fields["tempBackground"] = (s.tmp_1); + s.tmp_0 = control___screen_setupUpdate__P168521_mk(s); + s.tmp_0.arg0 = Render_RayCastingRender_inline__P185998; + s.callLocIdx = 2009; s.pc = 2; return s.tmp_0; case 2: r0 = s.retval; - s.tmp_4 = r0; - r0 = pxsim_ImageMethods._blitRow(s.tmp_0, s.tmp_1, s.tmp_3, s.tmp_4); r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_imageBlitRow__P168481.info = {"start":5107,"length":191,"line":169,"column":4,"endLine":171,"endColumn":5,"fileName":"pxt_modules/screen/image.ts","functionName":"imageBlitRow","argumentNames":["img","dstX","dstY","from","fromX","fromH"]} +Render_RayCastingRender_inline__P185986.info = {"start":14582,"length":221,"line":394,"column":37,"endLine":397,"endColumn":13,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":["oldScene"]} -function helpers_imageBlitRow__P168481_mk(s) { +function Render_RayCastingRender_inline__P185986_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_imageBlitRow__P168481, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_inline__P185986, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, - arg5: undefined, } } -function control_benchmark__P166874(s) { +function Render_RayCastingRender_inline__P185998(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39743,54 +39479,25 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.t0___187925 = undefined; - s.t___187929 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = pxsim.control.micros(); - s.t0___187925 = (r0); - s.tmp_0 = lambda_1_mk(s); - s.tmp_0.argL = s.arg0; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 37; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - r0 = pxsim.control.micros(); - s.tmp_0 = r0; - r0 = (s.tmp_0 - s.t0___187925); - s.t___187929 = (r0); - r0 = (s.t___187929 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = (s.t___187929 + 1073741823); - s.t___187929 = (r0); - case 1: - case 2: - r0 = s.t___187929; + r0 = pxsim_pxtcore.updateScreen(globals.screen___168559); + r0 = undefined; return leave(s, r0) default: oops() } } } -control_benchmark__P166874.info = {"start":5020,"length":182,"line":170,"column":4,"endLine":177,"endColumn":5,"fileName":"pxt_modules/base/control.ts","functionName":"benchmark","argumentNames":["f"]} +Render_RayCastingRender_inline__P185998.info = {"start":14758,"length":30,"line":396,"column":45,"endLine":396,"endColumn":75,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":[]} -function control_benchmark__P166874_mk(s) { +function Render_RayCastingRender_inline__P185998_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_benchmark__P166874, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_inline__P185998, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - t0___187925: undefined, - t___187929: undefined, - arg0: undefined, } } -function Math_abs__P166655(s) { +function Render_RayCastingRender_inline__P186003(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39804,30 +39511,46 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = (s.arg0 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = (0 - s.arg0); - { step = 2; continue; } + s.tmp_1 = if__layers_1_mk(s); + r0 = s.arg0.fields["background"]; + s.tmp_1.arg0 = r0; + if (!s.tmp_1.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "_layers"); + } else { + s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["_layers"]; + if (s.tmp_1.fn == null) { s.retval = s.tmp_1.arg0.fields["_layers"]; } + else if (!s.tmp_1.fn.isGetter) { s.retval = bind(s.tmp_1); } + else { s.callLocIdx = 2011; s.pc = 1; return s.tmp_1; } + } case 1: - r0 = s.arg0; + r0 = s.retval; + s.tmp_0 = r0; + r0 = s.caps[0].fields["tempBackground"]; + s.tmp_2 = r0; + r0 = pxsim_Array_.removeElement(s.tmp_0, s.tmp_2); + r0 = (s.caps[0]).fields["tempBackground"] = (undefined); + r0 = pxsim_pxtcore_mkAction(1, Render_RayCastingRender_inline__P186017); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.caps[0]); + s.tmp_1 = control___screen_setupUpdate__P168521_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 2013; s.pc = 2; return s.tmp_1; case 2: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = s.tmp_1; + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -Math_abs__P166655.info = {"start":16120,"length":77,"line":539,"column":4,"endLine":541,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"abs","argumentNames":["x"]} +Render_RayCastingRender_inline__P186003.info = {"start":14841,"length":454,"line":398,"column":36,"endLine":407,"endColumn":13,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":["oldScene"]} -function Math_abs__P166655_mk(s) { +function Render_RayCastingRender_inline__P186003_mk(s) { checkStack(s.depth); return { - parent: s, fn: Math_abs__P166655, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_inline__P186003, 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, } } @@ -39835,7 +39558,7 @@ function Math_abs__P166655_mk(s) { -function scene_Renderable___drawCore__P169330(s) { +function Render_RayCastingRender_inline__P186017(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39845,49 +39568,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.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, scene_Renderable__C169327_VT)) failedCast(r0); - s.tmp_0 = if_handler_3_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = globals.screen___168559; - 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); - s.callLocIdx = 1132; 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 = 1132; s.pc = 1; return s.tmp_0; } - else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 1132; s.pc = 1; return s.tmp_0;; } - else { s.callLocIdx = 1132; s.pc = 1; return s.tmp_0; } - } + r0 = s.caps[0].fields["_viewMode"]; + 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; } + r0 = s.caps[0].fields["tempScreen"]; + s.tmp_2 = r0; + r0 = pxsim_pxtcore.updateScreen(s.tmp_2); + { step = 2; continue; } case 1: - r0 = s.retval; + r0 = pxsim_pxtcore.updateScreen(globals.screen___168559); + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_Renderable___drawCore__P169330.info = {"start":390,"length":86,"line":14,"column":8,"endLine":16,"endColumn":9,"fileName":"pxt_modules/game/renderable.ts","functionName":"__drawCore","argumentNames":["this","camera"]} +Render_RayCastingRender_inline__P186017.info = {"start":15065,"length":215,"line":401,"column":45,"endLine":406,"endColumn":17,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":[]} -function scene_Renderable___drawCore__P169330_mk(s) { +function Render_RayCastingRender_inline__P186017_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Renderable___drawCore__P169330, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_inline__P186017, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - arg0: undefined, - arg1: undefined, + tmp_1: undefined, + tmp_2: undefined, } } -function tiles_TileMap_data__P169267(s) { +function Render_RayCastingRender_tilemapLoaded__P171786(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39897,24 +39611,138 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.sc___186338 = undefined; + s.frameCallback_update___186386 = undefined; + s.frameCallback_draw___186413 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C169262_VT)) failedCast(r0); - r0 = s.arg0.fields["_map"]; - return leaveAccessor(s, r0) + if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); + s.tmp_0 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1960; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + s.sc___186338 = (r0); + s.tmp_0 = r0 = s.arg0; + r0 = s.sc___186338.fields["tileMap"]; + s.tmp_2 = r0; + r0 = s.tmp_2.fields["_map"]; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["map"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = helpers_bufferToArray__P166719_mk(s); + s.tmp_3 = if_data_1_mk(s); + r0 = s.arg0.fields["map"]; + s.tmp_3.arg0 = r0; + if (!s.tmp_3.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "data"); + } else { + s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["data"]; + if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["data"]; } + else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } + else { s.callLocIdx = 1962; s.pc = 3; return s.tmp_3; } + } + case 3: + r0 = s.retval; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = 1; + s.callLocIdx = 1963; s.pc = 2; return s.tmp_2; + case 2: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["mapData"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = s.sc___186338.fields["tileMap"]; + s.tmp_4 = r0; + r0 = s.tmp_4.fields["_map"]; + s.tmp_3 = r0; + r0 = s.tmp_3.fields["_scale"]; + s.tmp_2 = r0; + r0 = (1 << s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["tilemapScaleSize"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = s.sc___186338.fields["tileMap"]; + s.tmp_3 = r0; + r0 = s.tmp_3.fields["_map"]; + s.tmp_2 = r0; + r0 = s.tmp_2.fields["tileset"]; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["textures"] = (s.tmp_1); + r0 = s.sc___186338.fields["tileMap"]; + r0 = r0.fields["renderable"]; + s.tmp_0 = r0; + r0 = (s.arg0).fields["oldRender"] = (s.tmp_0); + r0 = s.arg0.fields["spriteLikes"]; + s.tmp_0 = r0; + r0 = s.arg0.fields["oldRender"]; + s.tmp_1 = r0; + r0 = pxsim_Array_.removeElement(s.tmp_0, s.tmp_1); + r0 = s.sc___186338.fields["allSprites"]; + s.tmp_0 = r0; + r0 = s.arg0.fields["oldRender"]; + s.tmp_1 = r0; + r0 = pxsim_Array_.removeElement(s.tmp_0, s.tmp_1); + r0 = pxsim_pxtcore_mkAction(2, frameCallback_update_inline__P186393); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.sc___186338); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.arg0); + s.tmp_1 = control_EventContext_registerFrameHandler__P166930_mk(s); + r0 = s.sc___186338.fields["eventContext"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 56; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 1969; s.pc = 4; return s.tmp_1; + case 4: + r0 = s.retval; + s.frameCallback_update___186386 = (r0); + r0 = pxsim_pxtcore_mkAction(2, frameCallback_draw_inline__P186420); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.sc___186338); + s.tmp_1 = control_EventContext_registerFrameHandler__P166930_mk(s); + r0 = s.sc___186338.fields["eventContext"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 91; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 1982; s.pc = 5; return s.tmp_1; + case 5: + r0 = s.retval; + s.frameCallback_draw___186413 = (r0); + r0 = pxsim_pxtcore_mkAction(3, Render_RayCastingRender_tilemapLoaded_inline__P186511); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.sc___186338); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.frameCallback_update___186386); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.frameCallback_draw___186413); + s.tmp_1 = tiles_TileMap_addEventListener__P169287_mk(s); + r0 = s.sc___186338.fields["tileMap"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 1; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 1985; s.pc = 6; return s.tmp_1; + case 6: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) default: oops() } } } -tiles_TileMap_data__P169267.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__P169267.isGetter = true; +Render_RayCastingRender_tilemapLoaded__P171786.info = {"start":10003,"length":2256,"line":293,"column":8,"endLine":335,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"tilemapLoaded","argumentNames":["this"]} -function tiles_TileMap_data__P169267_mk(s) { +function Render_RayCastingRender_tilemapLoaded__P171786_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_data__P169267, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_tilemapLoaded__P171786, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + sc___186338: undefined, + frameCallback_update___186386: undefined, + frameCallback_draw___186413: undefined, arg0: undefined, } } @@ -39922,7 +39750,7 @@ function tiles_TileMap_data__P169267_mk(s) { -function tiles_TileMapData_getTileset__P169252(s) { +function frameCallback_update_inline__P186393(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39932,151 +39760,79 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMapData__C169244_VT)) failedCast(r0); - r0 = s.arg0.fields["tileset"]; - return leave(s, r0) - default: oops() -} } } -tiles_TileMapData_getTileset__P169252.info = {"start":7287,"length":57,"line":247,"column":8,"endLine":249,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTileset","argumentNames":["this"]} - -function tiles_TileMapData_getTileset__P169252_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_TileMapData_getTileset__P169252, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function Sprite___update__P168943(s) { -let r0 = s.r0, 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, Sprite__C168868_VT)) failedCast(r0); - r0 = s.arg0.fields["lifespan"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 !== undefined); + s.dt___186394 = undefined; + s.s___186399 = undefined; + s.unnamed848___U2 = undefined; + s.unnamed849___U3 = undefined; + r0 = s.caps[0].fields["eventContext"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_2 = r0 = s.arg0; - r0 = s.tmp_2.fields["lifespan"]; - s.tmp_4 = r0; - r0 = (s.arg2 * 1000); - s.tmp_5 = r0; - r0 = (s.tmp_4 - s.tmp_5); - s.tmp_3 = r0; - r0 = (s.tmp_2).fields["lifespan"] = (s.tmp_3); - r0 = s.arg0.fields["lifespan"]; + r0 = s.tmp_0.fields["deltaTimeMillis"]; s.tmp_1 = r0; - r0 = (s.tmp_1 <= 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = (s.arg0).fields["lifespan"] = (undefined); - s.tmp_0 = Sprite__destroyCore__P168956_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 484; s.pc = 11; return s.tmp_0; - case 11: - r0 = s.retval; + r0 = (s.tmp_1 / 1000); + s.dt___186394 = (r0); + s.s___186399 = (undefined); + r0 = s.caps[1].fields["sprites"]; + s.unnamed848___U2 = (r0); + s.unnamed849___U3 = (0); case 1: - case 2: - case 3: - case 4: - r0 = s.arg0.fields["flags"]; + s.tmp_0 = r0 = s.unnamed849___U3; + r0 = pxsim_Array__length(s.unnamed848___U2); s.tmp_1 = r0; - r0 = (s.tmp_1 & 4); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 5; continue; } - r0 = s.tmp_0; - { step = 6; continue; } - case 5: - s.tmp_2 = Sprite_isOutOfScreen__P168941_mk(s); - s.tmp_2.arg0 = s.arg0; - s.tmp_2.arg1 = s.arg1; - s.callLocIdx = 485; s.pc = 12; return s.tmp_2; - case 12: - r0 = s.retval; - case 6: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 7; continue; } - s.tmp_4 = Sprite_destroy__P168955_mk(s); - s.tmp_4.arg0 = s.arg0; - s.tmp_4.arg1 = undefined; - s.tmp_4.arg2 = undefined; - s.callLocIdx = 486; s.pc = 13; return s.tmp_4; - case 13: + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 2; continue; } + r0 = pxsim_Array__getAt(s.unnamed848___U2, s.unnamed849___U3); + s.s___186399 = (r0); + s.tmp_2 = Sprite__C168868_v3_3_mk(s); + s.tmp_2.arg0 = s.s___186399; + r0 = s.caps[0].fields["camera"]; + s.tmp_2.arg1 = r0; + s.tmp_2.arg2 = s.dt___186394; + if (!checkSubtype(s.tmp_2.arg0, Sprite__C168868_VT)) failedCast(s.tmp_2.arg0); + s.tmp_2.fn = s.tmp_2.arg0.vtable.methods.__update; + s.pc = 3; return s.tmp_2; + case 3: r0 = s.retval; - case 7: - case 8: - r0 = s.arg0.fields["sayRenderer"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 9; continue; } - s.tmp_1 = sprites_BaseSpriteSayRenderer__C168786_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__C168786_VT)) failedCast(s.tmp_1.arg0); - s.tmp_1.fn = s.tmp_1.arg0.vtable.methods.update; - s.pc = 14; return s.tmp_1; - case 14: + r0 = (s.unnamed849___U3 + 1); + s.unnamed849___U3 = (r0); + { step = 1; continue; } + case 2: + s.unnamed848___U2 = (undefined); + s.tmp_0 = Sprite__C168868_v3_3_mk(s); + r0 = s.caps[1].fields["sprSelf"]; + s.tmp_0.arg0 = r0; + r0 = s.caps[0].fields["camera"]; + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = s.dt___186394; + if (!checkSubtype(s.tmp_0.arg0, Sprite__C168868_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.__update; + s.pc = 4; return s.tmp_0; + case 4: r0 = s.retval; - case 9: - case 10: r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite___update__P168943.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"]} +frameCallback_update_inline__P186393.info = {"start":10595,"length":285,"line":303,"column":114,"endLine":309,"endColumn":13,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":[]} -function Sprite___update__P168943_mk(s) { +function frameCallback_update_inline__P186393_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite___update__P168943, depth: s.depth + 1, + parent: s, fn: frameCallback_update_inline__P186393, depth: s.depth + 1, pc: 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, + dt___186394: undefined, + s___186399: undefined, + unnamed848___U2: undefined, + unnamed849___U3: undefined, } } -function Sprite_isOutOfScreen__P168941(s) { +function frameCallback_draw_inline__P186420(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -40086,118 +39842,141 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ox___188018 = undefined; - s.oy___188026 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - r0 = s.arg0.fields["flags"]; + r0 = s.caps[0].fields["_viewMode"]; s.tmp_1 = r0; - r0 = (s.tmp_1 & 512); + r0 = (s.tmp_1 == 1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = s.caps[0].fields["tempBackground"]; + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + s.tmp_3 = r0; + r0 = pxsim_Boolean__bang(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); if (!r0) { step = 1; continue; } - r0 = 0; - { step = 2; continue; } + r0 = s.caps[0].fields["tempScreen"]; + s.tmp_5 = r0; + s.tmp_7 = scene_Background_image__P169202_mk(s); + s.tmp_8 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1970; s.pc = 6; return s.tmp_8; + case 6: + r0 = s.retval; + r0 = r0.fields["background"]; + s.tmp_7.arg0 = r0; + s.callLocIdx = 1971; s.pc = 5; return s.tmp_7; + case 5: + r0 = s.retval; + s.tmp_6 = r0; + r0 = pxsim_ImageMethods.drawImage(s.tmp_5, s.tmp_6, 0, 0); + s.tmp_0 = Render_RayCastingRender_render__P171791_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.callLocIdx = 1972; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + r0 = pxsim_ImageMethods.fill(globals.screen___168559, 0); + r0 = pxsim_pxtcore_mkAction(1, frameCallback_draw_inline__P186443); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.caps[1]); + s.tmp_1 = helpers_arrayForEach__P166636_mk(s); + r0 = s.caps[0].fields["sprites2D"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 1973; s.pc = 8; return s.tmp_1; + case 8: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, frameCallback_draw_inline__P186452); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.caps[1]); + s.tmp_1 = helpers_arrayForEach__P166636_mk(s); + r0 = s.caps[0].fields["spriteLikes"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 1975; s.pc = 9; return s.tmp_1; + case 9: + r0 = s.retval; + r0 = s.caps[0].fields["tempScreen"]; + s.tmp_0 = r0; + r0 = pxsim_ImageMethods.drawTransparentImage(s.tmp_0, globals.screen___168559, 0, 0); case 1: - r0 = s.arg1.fields["drawOffsetX"]; case 2: - // jmp value (already in r0) - s.tmp_2 = r0; - s.ox___188018 = (s.tmp_2); - r0 = s.arg0.fields["flags"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 512); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = 0; { step = 4; continue; } case 3: - r0 = s.arg1.fields["drawOffsetY"]; - case 4: - // jmp value (already in r0) - s.tmp_2 = r0; - s.oy___188026 = (s.tmp_2); - s.tmp_3 = Sprite_right__P168928_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 475; s.pc = 11; return s.tmp_3; + s.tmp_0 = r0 = globals.screen___168559; + s.tmp_2 = scene_Background_image__P169202_mk(s); + s.tmp_3 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1976; s.pc = 11; return s.tmp_3; case 11: r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_2 - s.ox___188018); + r0 = r0.fields["background"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 1977; s.pc = 10; return s.tmp_2; + case 10: + r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_1 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 5; continue; } - r0 = s.tmp_0; - { step = 6; continue; } - case 5: - s.tmp_6 = Sprite_bottom__P168932_mk(s); - s.tmp_6.arg0 = s.arg0; - s.callLocIdx = 476; s.pc = 12; return s.tmp_6; + r0 = pxsim_ImageMethods.drawImage(s.tmp_0, s.tmp_1, 0, 0); + s.tmp_0 = scene_Renderable__C169327_v2_2_mk(s); + r0 = s.caps[0].fields["oldRender"]; + s.tmp_0.arg0 = r0; + r0 = s.caps[1].fields["camera"]; + s.tmp_0.arg1 = r0; + if (!checkSubtype(s.tmp_0.arg0, scene_Renderable__C169327_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.__drawCore; + s.pc = 12; return s.tmp_0; case 12: r0 = s.retval; - s.tmp_5 = r0; - r0 = (s.tmp_5 - s.oy___188026); - s.tmp_4 = r0; - r0 = (s.tmp_4 < 0); - case 6: - // jmp value (already in r0) - s.tmp_7 = r0; - r0 = pxsim_numops_toBool(s.tmp_7); - if (!r0) { step = 7; continue; } - r0 = s.tmp_7; - { step = 8; continue; } - case 7: - s.tmp_10 = Sprite_left__P168926_mk(s); - s.tmp_10.arg0 = s.arg0; - s.callLocIdx = 477; s.pc = 13; return s.tmp_10; + r0 = pxsim_pxtcore_mkAction(1, frameCallback_draw_inline__P186478); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.caps[1]); + s.tmp_1 = helpers_arrayForEach__P166636_mk(s); + r0 = s.caps[0].fields["sprites"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 1978; s.pc = 13; return s.tmp_1; case 13: r0 = s.retval; - s.tmp_9 = r0; - r0 = (s.tmp_9 - s.ox___188018); - s.tmp_8 = r0; - r0 = pxsim_ImageMethods.width(globals.screen___168559); - s.tmp_11 = r0; - r0 = (s.tmp_8 > s.tmp_11); - case 8: - // jmp value (already in r0) - s.tmp_12 = r0; - r0 = pxsim_numops_toBool(s.tmp_12); - if (!r0) { step = 9; continue; } - r0 = s.tmp_12; - { step = 10; continue; } - case 9: - s.tmp_15 = Sprite_top__P168930_mk(s); - s.tmp_15.arg0 = s.arg0; - s.callLocIdx = 478; s.pc = 14; return s.tmp_15; + s.tmp_0 = sprites_BaseSprite__C168621_v1_2_mk(s); + r0 = s.caps[0].fields["sprSelf"]; + s.tmp_0.arg0 = r0; + r0 = s.caps[1].fields["camera"]; + s.tmp_0.arg1 = r0; + if (!checkSubtype(s.tmp_0.arg0, sprites_BaseSprite__C168621_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.__draw; + s.pc = 14; return s.tmp_0; case 14: r0 = s.retval; - s.tmp_14 = r0; - r0 = (s.tmp_14 - s.oy___188026); - s.tmp_13 = r0; - r0 = pxsim_ImageMethods.height(globals.screen___168559); - s.tmp_16 = r0; - r0 = (s.tmp_13 > s.tmp_16); - case 10: - // jmp value (already in r0) - s.tmp_17 = r0; - r0 = s.tmp_17; + r0 = pxsim_pxtcore_mkAction(1, frameCallback_draw_inline__P186492); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.caps[1]); + s.tmp_1 = helpers_arrayForEach__P166636_mk(s); + r0 = s.caps[0].fields["sprites2D"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 1979; s.pc = 15; return s.tmp_1; + case 15: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, frameCallback_draw_inline__P186501); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.caps[1]); + s.tmp_1 = helpers_arrayForEach__P166636_mk(s); + r0 = s.caps[0].fields["spriteLikes"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 1981; s.pc = 16; return s.tmp_1; + case 16: + r0 = s.retval; + case 4: + r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_isOutOfScreen__P168941.info = {"start":17830,"length":358,"line":607,"column":4,"endLine":611,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"isOutOfScreen","argumentNames":["this","camera"]} +frameCallback_draw_inline__P186420.info = {"start":10992,"length":1009,"line":311,"column":109,"endLine":329,"endColumn":13,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":[]} -function Sprite_isOutOfScreen__P168941_mk(s) { +function frameCallback_draw_inline__P186420_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_isOutOfScreen__P168941, depth: s.depth + 1, + parent: s, fn: frameCallback_draw_inline__P186420, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -40208,26 +39987,13 @@ function Sprite_isOutOfScreen__P168941_mk(s) { tmp_6: undefined, tmp_7: undefined, tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - tmp_11: undefined, - tmp_12: undefined, - tmp_13: undefined, - tmp_14: undefined, - tmp_15: undefined, - tmp_16: undefined, - tmp_17: undefined, - ox___188018: undefined, - oy___188026: undefined, - arg0: undefined, - arg1: undefined, } } -function Sprite_bottom__P168932(s) { +function frameCallback_draw_inline__P186443(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -40241,36 +40007,27 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - s.tmp_1 = Sprite_top__P168930_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 461; s.pc = 1; return s.tmp_1; + s.tmp_0 = sprites_BaseSprite__C168621_v1_2_mk(s); + s.tmp_0.arg0 = s.arg0; + r0 = s.caps[0].fields["camera"]; + s.tmp_0.arg1 = r0; + if (!checkSubtype(s.tmp_0.arg0, sprites_BaseSprite__C168621_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.__draw; + s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - s.tmp_0 = r0; - s.tmp_3 = Sprite_height__P168925_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 462; s.pc = 2; return s.tmp_3; - case 2: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_0 + s.tmp_2); - return leaveAccessor(s, r0) + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_bottom__P168932.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__P168932.isGetter = true; +frameCallback_draw_inline__P186443.info = {"start":11331,"length":28,"line":317,"column":47,"endLine":317,"endColumn":75,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":["spr"]} -function Sprite_bottom__P168932_mk(s) { +function frameCallback_draw_inline__P186443_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_bottom__P168932, depth: s.depth + 1, + parent: s, fn: frameCallback_draw_inline__P186443, depth: s.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, } } @@ -40278,7 +40035,7 @@ function Sprite_bottom__P168932_mk(s) { -function Sprite_right__P168928(s) { +function frameCallback_draw_inline__P186452(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -40292,36 +40049,33 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - s.tmp_1 = Sprite_left__P168926_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 453; s.pc = 1; return s.tmp_1; + s.tmp_0 = if___draw_2_mk(s); + s.tmp_0.arg0 = s.arg0; + r0 = s.caps[0].fields["camera"]; + s.tmp_0.arg1 = r0; + if (!s.tmp_0.arg0.vtable.iface) { + setupLambda(s.tmp_0, pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "__draw"), 2); + s.callLocIdx = 1974; s.pc = 1; return s.tmp_0; + } else { + s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["__draw"]; + if (s.tmp_0.fn == null) { setupLambda(s.tmp_0, s.tmp_0.arg0.fields["__draw"], 2); s.callLocIdx = 1974; s.pc = 1; return s.tmp_0; } + else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 1974; s.pc = 1; return s.tmp_0;; } + else { s.callLocIdx = 1974; s.pc = 1; return s.tmp_0; } + } case 1: r0 = s.retval; - s.tmp_0 = r0; - s.tmp_3 = Sprite_width__P168924_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 454; s.pc = 2; return s.tmp_3; - case 2: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_0 + s.tmp_2); - return leaveAccessor(s, r0) + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_right__P168928.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__P168928.isGetter = true; +frameCallback_draw_inline__P186452.info = {"start":11410,"length":28,"line":318,"column":49,"endLine":318,"endColumn":77,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":["spr"]} -function Sprite_right__P168928_mk(s) { +function frameCallback_draw_inline__P186452_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_right__P168928, depth: s.depth + 1, + parent: s, fn: frameCallback_draw_inline__P186452, depth: s.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, } } @@ -40329,7 +40083,7 @@ function Sprite_right__P168928_mk(s) { -function sprites_BaseSpriteSayRenderer_update__P168789(s) { +function frameCallback_draw_inline__P186478(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -40341,35 +40095,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, sprites_BaseSpriteSayRenderer__C168786_VT)) failedCast(r0); + s.tmp_0 = sprites_BaseSprite__C168621_v1_2_mk(s); + s.tmp_0.arg0 = s.arg0; + r0 = s.caps[0].fields["camera"]; + s.tmp_0.arg1 = r0; + if (!checkSubtype(s.tmp_0.arg0, sprites_BaseSprite__C168621_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.__draw; + s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_BaseSpriteSayRenderer_update__P168789.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"]} +frameCallback_draw_inline__P186478.info = {"start":11741,"length":28,"line":324,"column":41,"endLine":324,"endColumn":69,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":["spr"]} -function sprites_BaseSpriteSayRenderer_update__P168789_mk(s) { +function frameCallback_draw_inline__P186478_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_BaseSpriteSayRenderer_update__P168789, depth: s.depth + 1, + parent: s, fn: frameCallback_draw_inline__P186478, 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 sprites_BaseSprite___draw__P168627(s) { +function frameCallback_draw_inline__P186492(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -40381,54 +40137,37 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, sprites_BaseSprite__C168621_VT)) failedCast(r0); - s.tmp_1 = sprites_BaseSprite__C168621_v0_1_mk(s); - s.tmp_1.arg0 = s.arg0; - if (!checkSubtype(s.tmp_1.arg0, sprites_BaseSprite__C168621_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__C168621_v2_2_mk(s); - s.tmp_2.arg0 = s.arg0; - s.tmp_2.arg1 = s.arg1; - if (!checkSubtype(s.tmp_2.arg0, sprites_BaseSprite__C168621_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; + s.tmp_0 = sprites_BaseSprite__C168621_v1_2_mk(s); + s.tmp_0.arg0 = s.arg0; + r0 = s.caps[0].fields["camera"]; + s.tmp_0.arg1 = r0; + if (!checkSubtype(s.tmp_0.arg0, sprites_BaseSprite__C168621_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.__draw; + s.pc = 1; return s.tmp_0; case 1: - case 2: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_BaseSprite___draw__P168627.info = {"start":840,"length":131,"line":37,"column":8,"endLine":41,"endColumn":9,"fileName":"pxt_modules/game/basesprite.ts","functionName":"__draw","argumentNames":["this","camera"]} +frameCallback_draw_inline__P186492.info = {"start":11865,"length":28,"line":326,"column":43,"endLine":326,"endColumn":71,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":["spr"]} -function sprites_BaseSprite___draw__P168627_mk(s) { +function frameCallback_draw_inline__P186492_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_BaseSprite___draw__P168627, depth: s.depth + 1, + parent: s, fn: frameCallback_draw_inline__P186492, 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__P168628(s) { +function frameCallback_draw_inline__P186501(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -40440,150 +40179,43 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, sprites_BaseSprite__C168621_VT)) failedCast(r0); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -sprites_BaseSprite___drawCore__P168628.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 sprites_BaseSprite___drawCore__P168628_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: sprites_BaseSprite___drawCore__P168628, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, - arg1: undefined, -} } - - - - - -function sprites_BaseSprite___visible__P168624(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, sprites_BaseSprite__C168621_VT)) failedCast(r0); - r0 = true; - return leave(s, r0) - default: oops() -} } } -sprites_BaseSprite___visible__P168624.info = {"start":524,"length":57,"line":22,"column":8,"endLine":24,"endColumn":9,"fileName":"pxt_modules/game/basesprite.ts","functionName":"__visible","argumentNames":["this"]} - -function sprites_BaseSprite___visible__P168624_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: sprites_BaseSprite___visible__P168624, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function control_EventContext_unregisterFrameHandler__P166931(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.i___186529 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; + s.tmp_0 = if___draw_2_mk(s); + s.tmp_0.arg0 = s.arg0; + r0 = s.caps[0].fields["camera"]; + s.tmp_0.arg1 = r0; + if (!s.tmp_0.arg0.vtable.iface) { + setupLambda(s.tmp_0, pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "__draw"), 2); + s.callLocIdx = 1980; s.pc = 1; return s.tmp_0; + } else { + s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["__draw"]; + if (s.tmp_0.fn == null) { setupLambda(s.tmp_0, s.tmp_0.arg0.fields["__draw"], 2); s.callLocIdx = 1980; s.pc = 1; return s.tmp_0; } + else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 1980; s.pc = 1; return s.tmp_0;; } + else { s.callLocIdx = 1980; s.pc = 1; return s.tmp_0; } } - r0 = s.arg0; - if (!checkSubtype(r0, control_EventContext__C166922_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["frameCallbacks"]; - 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 = 7; continue; } - case 3: - case 4: - r0 = s.arg0.fields["frameCallbacks"]; - s.tmp_5 = r0; - r0 = pxsim_Array_.indexOf(s.tmp_5, s.arg1, undefined); - s.i___186529 = (r0); - r0 = (s.i___186529 > -1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - s.tmp_1 = helpers_arraySplice__P166627_mk(s); - r0 = s.arg0.fields["frameCallbacks"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.i___186529; - s.tmp_1.arg2 = 1; - s.callLocIdx = 72; s.pc = 8; return s.tmp_1; - case 8: r0 = s.retval; - case 5: - case 6: - case 7: r0 = undefined; return leave(s, r0) default: oops() } } } -control_EventContext_unregisterFrameHandler__P166931.info = {"start":5515,"length":235,"line":166,"column":8,"endLine":171,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"unregisterFrameHandler","argumentNames":["this","fn"]} +frameCallback_draw_inline__P186501.info = {"start":11940,"length":28,"line":327,"column":45,"endLine":327,"endColumn":73,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":["spr"]} -function control_EventContext_unregisterFrameHandler__P166931_mk(s) { +function frameCallback_draw_inline__P186501_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_unregisterFrameHandler__P166931, depth: s.depth + 1, + parent: s, fn: frameCallback_draw_inline__P186501, depth: s.depth + 1, pc: 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, - i___186529: undefined, arg0: undefined, - arg1: undefined, } } -function helpers_bufferToArray__P166719(s) { +function Render_RayCastingRender_tilemapLoaded_inline__P186511(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -40593,68 +40225,44 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sz___188070 = undefined; - s.len___188074 = undefined; - s.r___188079 = undefined; - s.i___188081 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = Buffer_sizeOfNumberFormat__P166742_mk(s); - s.tmp_0.arg0 = s.arg1; - s.callLocIdx = 35; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.sz___188070 = (r0); - r0 = pxsim.BufferMethods.length(s.arg0); - s.tmp_0 = r0; - r0 = (s.tmp_0 - s.sz___188070); - s.len___188074 = (r0); - r0 = pxsim_Array__mk(); - s.r___188079 = (r0); - s.i___188081 = (0); + s.tmp_0 = control_EventContext_unregisterFrameHandler__P166931_mk(s); + r0 = s.caps[0].fields["eventContext"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.caps[1]; + s.callLocIdx = 1983; s.pc = 1; return s.tmp_0; case 1: - r0 = (s.i___188081 <= s.len___188074); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.tmp_1 = r0 = s.r___188079; - r0 = pxsim.BufferMethods.getNumber(s.arg0, s.arg1, s.i___188081); - s.tmp_2 = r0; - r0 = pxsim_Array__push(s.tmp_1, s.tmp_2); - r0 = (s.i___188081 + s.sz___188070); - s.i___188081 = (r0); - { step = 1; continue; } + r0 = s.retval; + s.tmp_0 = control_EventContext_unregisterFrameHandler__P166931_mk(s); + r0 = s.caps[0].fields["eventContext"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.caps[2]; + s.callLocIdx = 1984; s.pc = 2; return s.tmp_0; case 2: - r0 = s.r___188079; + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_bufferToArray__P166719.info = {"start":5411,"length":297,"line":186,"column":4,"endLine":193,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"bufferToArray","argumentNames":["buf","format"]} +Render_RayCastingRender_tilemapLoaded_inline__P186511.info = {"start":12073,"length":175,"line":331,"column":69,"endLine":334,"endColumn":13,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":["data"]} -function helpers_bufferToArray__P166719_mk(s) { +function Render_RayCastingRender_tilemapLoaded_inline__P186511_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_bufferToArray__P166719, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_tilemapLoaded_inline__P186511, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - sz___188070: undefined, - len___188074: undefined, - r___188079: undefined, - i___188081: undefined, arg0: undefined, - arg1: undefined, } } -function Render_RayCastingRender_takeoverSceneSprites__P171784(s) { +function Render_RayCastingRender_render__P171791(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -40664,180 +40272,561 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sc_allSprites___186137 = undefined; - s.i___186141 = undefined; - s.spr___186147 = undefined; - s.sprList___186154 = undefined; - s.particle___186206 = undefined; - s.spr___186221 = undefined; + s.drawStart___186564 = undefined; + s.drawHeight___186565 = undefined; + s.lastDist___186566 = undefined; + s.lastTexX___186569 = undefined; + s.lastMapX___186572 = undefined; + s.lastMapY___186575 = undefined; + s.cameraRangeAngle___186599 = undefined; + s.ms___186605 = undefined; + s.x___186755 = undefined; + s.cameraX___186760 = undefined; + s.rayDirX___186775 = undefined; + s.rayDirY___186786 = undefined; + s.mapX___186803 = undefined; + s.mapY___186808 = undefined; + s.sideDistX___186813 = undefined; + s.sideDistY___186814 = undefined; + s.deltaDistX___186815 = undefined; + s.deltaDistY___186822 = undefined; + s.mapStepX___186829 = undefined; + s.mapStepY___186830 = undefined; + s.sideWallHit___186831 = undefined; + s.color___186902 = undefined; + s.isOutsideMap___186903 = undefined; + s.perpWallDist___186954 = undefined; + s.wallX___186955 = undefined; + s.tex___187028 = undefined; + s.texX___187035 = undefined; + s.lineHeight___187058 = undefined; + s.drawEnd___187064 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); - s.tmp_0 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1950; s.pc = 19; return s.tmp_0; - case 19: + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = Render_RayCastingRender_xFpx__P171759_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 2036; s.pc = 36; return s.tmp_2; + case 36: r0 = s.retval; - r0 = r0.fields["allSprites"]; - s.sc_allSprites___186137 = (r0); - s.i___186141 = (0); - case 1: - s.tmp_1 = r0 = s.i___186141; - r0 = pxsim_Array__length(s.sc_allSprites___186137); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["selfXFpx"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = Render_RayCastingRender_yFpx__P171760_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 2037; s.pc = 37; return s.tmp_2; + case 37: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["selfYFpx"] = (s.tmp_1); + s.drawStart___186564 = (0); + s.drawHeight___186565 = (0); + s.lastDist___186566 = (-1); + s.lastTexX___186569 = (-1); + s.lastMapX___186572 = (-1); + s.lastMapY___186575 = (-1); + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["spriteMotionZ"]; + s.tmp_5 = r0; + r0 = s.arg0.fields["sprSelf"]; + r0 = r0.fields["id"]; + s.tmp_6 = r0; + r0 = pxsim_Array__getAt(s.tmp_5, s.tmp_6); + r0 = r0.fields["p"]; + s.tmp_4 = r0; + r0 = s.arg0.fields["sprSelf"]; + r0 = r0.fields["_height"]; + s.tmp_7 = r0; + r0 = (s.tmp_4 + s.tmp_7); + s.tmp_3 = r0; + r0 = (s.tmp_3 - 512); s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); + r0 = s.arg0.fields["cameraOffsetZ_fpx"]; + s.tmp_8 = r0; + r0 = (s.tmp_2 + s.tmp_8); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["viewZPos"] = (s.tmp_1); + r0 = s.arg0.fields["_fov"]; + s.tmp_1 = r0; + r0 = pxsim.Math_.atan(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 18; continue; } - r0 = pxsim_Array__getAt(s.sc_allSprites___186137, s.i___186141); - s.spr___186147 = (r0); - r0 = s.spr___186147; - r0 = checkSubtype(r0, Sprite__C168868_VT); + r0 = (s.tmp_0 + 0.1); + s.cameraRangeAngle___186599 = (r0); + r0 = pxsim_numops_toBoolDecr(0); + if (!r0) { step = 1; continue; } + r0 = pxsim_pxtcore_mkAction(1, Render_RayCastingRender_render_inline__P186608); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = control_benchmark__P166874_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 2040; s.pc = 38; return s.tmp_1; + case 38: + r0 = s.retval; + s.ms___186605 = (r0); + s.tmp_0 = helpers_imagePrint__P168517_mk(s); + r0 = s.arg0.fields["tempScreen"]; + s.tmp_0.arg0 = r0; + r0 = pxsim_numops.toString(s.ms___186605); + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = 0; + s.tmp_0.arg3 = 10; + s.tmp_0.arg4 = undefined; + s.tmp_0.arg5 = undefined; + s.tmp_0.arg6 = undefined; + s.callLocIdx = 2041; s.pc = 39; return s.tmp_0; + case 39: + r0 = s.retval; + case 1: + case 2: + s.x___186755 = (0); + case 3: + r0 = (s.x___186755 < globals.SW___174806); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 6; continue; } - r0 = s.spr___186147.fields["flags"]; + if (!r0) { step = 35; continue; } + r0 = s.arg0.fields["cameraOffsetX"]; + s.tmp_5 = r0; + r0 = (s.x___186755 + s.tmp_5); + s.tmp_4 = r0; + r0 = (s.tmp_4 << 8); + s.tmp_3 = r0; + r0 = (s.tmp_3 << 1); s.tmp_2 = r0; - r0 = (s.tmp_2 & 512); + r0 = pxsim.Math_.idiv(s.tmp_2, globals.SW___174806); s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 2; continue; } - r0 = s.arg0.fields["sprites2D"]; - { step = 3; continue; } - case 2: - r0 = s.arg0.fields["sprites"]; - case 3: - // jmp value (already in r0) + r0 = (256 - s.tmp_1); + s.cameraX___186760 = (r0); + r0 = s.arg0.fields["dirXFpx"]; + s.tmp_0 = r0; + r0 = s.arg0.fields["planeX"]; s.tmp_3 = r0; - s.sprList___186154 = (s.tmp_3); - r0 = pxsim_Array_.indexOf(s.sprList___186154, s.spr___186147, undefined); + r0 = (s.tmp_3 * s.cameraX___186760); + s.tmp_2 = r0; + r0 = (s.tmp_2 >> 8); s.tmp_1 = r0; - r0 = (s.tmp_1 < 0); + r0 = (s.tmp_0 + s.tmp_1); + s.rayDirX___186775 = (r0); + r0 = s.arg0.fields["dirYFpx"]; + s.tmp_0 = r0; + r0 = s.arg0.fields["planeY"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 * s.cameraX___186760); + s.tmp_2 = r0; + r0 = (s.tmp_2 >> 8); + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); + s.rayDirY___186786 = (r0); + r0 = (s.rayDirX___186775 == 0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 4; continue; } - r0 = pxsim_Array__push(s.sprList___186154, s.spr___186147); - s.tmp_0 = Render_RayCastingRender_getMotionZ__P171773_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.spr___186147; - s.tmp_0.arg2 = 0; - s.callLocIdx = 1951; s.pc = 20; return s.tmp_0; - case 20: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(2, Render_RayCastingRender_takeoverSceneSprites_inline__P186178); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.spr___186147); - s.tmp_1 = Sprite_onDestroyed__P168954_mk(s); - s.tmp_1.arg0 = s.spr___186147; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 1952; s.pc = 21; return s.tmp_1; - case 21: - r0 = s.retval; + s.rayDirX___186775 = (1); case 4: case 5: - { step = 17; continue; } + r0 = (s.rayDirY___186786 == 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 6; continue; } + s.rayDirY___186786 = (1); case 6: - r0 = s.spr___186147; - r0 = checkSubtype(r0, particles_ParticleSource__C169678_VT); + case 7: + r0 = s.arg0.fields["selfXFpx"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 >> 8); + s.mapX___186803 = (r0); + r0 = s.arg0.fields["selfYFpx"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 >> 8); + s.mapY___186808 = (r0); + s.sideDistX___186813 = (0); + s.sideDistY___186814 = (0); + s.tmp_0 = Math_abs__P166655_mk(s); + r0 = pxsim.Math_.idiv(globals.one2___174831, s.rayDirX___186775); + s.tmp_0.arg0 = r0; + s.callLocIdx = 2042; s.pc = 40; return s.tmp_0; + case 40: + r0 = s.retval; + s.deltaDistX___186815 = (r0); + s.tmp_0 = Math_abs__P166655_mk(s); + r0 = pxsim.Math_.idiv(globals.one2___174831, s.rayDirY___186786); + s.tmp_0.arg0 = r0; + s.callLocIdx = 2043; s.pc = 41; return s.tmp_0; + case 41: + r0 = s.retval; + s.deltaDistY___186822 = (r0); + s.mapStepX___186829 = (0); + s.mapStepY___186830 = (0); + s.sideWallHit___186831 = (false); + r0 = (s.rayDirX___186775 < 0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 13; continue; } - s.particle___186206 = (s.spr___186147); - r0 = s.arg0.fields["spriteParticles"]; + if (!r0) { step = 8; continue; } + s.mapStepX___186829 = (-1); + r0 = s.arg0.fields["selfXFpx"]; s.tmp_2 = r0; - r0 = pxsim_Array_.indexOf(s.tmp_2, s.particle___186206, undefined); + r0 = (s.mapX___186803 << 8); + s.tmp_3 = r0; + r0 = (s.tmp_2 - s.tmp_3); s.tmp_1 = r0; - r0 = (s.tmp_1 < 0); + r0 = (s.tmp_1 * s.deltaDistX___186815); s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 7; continue; } - r0 = s.tmp_0; - { step = 8; continue; } - case 7: - r0 = s.particle___186206.fields["anchor"]; - r0 = checkSubtype(r0, Sprite__C168868_VT); + r0 = (s.tmp_0 >> 8); + s.sideDistX___186813 = (r0); + { step = 9; continue; } case 8: - // jmp value (already in r0) + s.mapStepX___186829 = (1); + r0 = (s.mapX___186803 << 8); s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 11; continue; } - r0 = s.particle___186206.fields["anchor"]; - s.spr___186221 = (r0); - r0 = s.arg0.fields["sprites"]; + r0 = (s.tmp_3 + 256); s.tmp_2 = r0; - r0 = pxsim_Array_.indexOf(s.tmp_2, s.spr___186221, undefined); + r0 = s.arg0.fields["selfXFpx"]; + s.tmp_4 = r0; + r0 = (s.tmp_2 - s.tmp_4); s.tmp_1 = r0; - r0 = (s.tmp_1 >= 0); + r0 = (s.tmp_1 * s.deltaDistX___186815); + s.tmp_0 = r0; + r0 = (s.tmp_0 >> 8); + s.sideDistX___186813 = (r0); + case 9: + r0 = (s.rayDirY___186786 < 0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 9; continue; } - r0 = s.arg0.fields["spriteParticles"]; + if (!r0) { step = 10; continue; } + s.mapStepY___186830 = (-1); + r0 = s.arg0.fields["selfYFpx"]; + s.tmp_2 = r0; + r0 = (s.mapY___186808 << 8); s.tmp_3 = r0; - r0 = s.spr___186221.fields["id"]; - s.tmp_4 = r0; - r0 = pxsim_Array_.setAt(s.tmp_3, s.tmp_4, s.particle___186206); - r0 = s.arg0.fields["tempSprite"]; + r0 = (s.tmp_2 - s.tmp_3); + s.tmp_1 = r0; + r0 = (s.tmp_1 * s.deltaDistY___186822); s.tmp_0 = r0; - r0 = (s.particle___186206).fields["anchor"] = (s.tmp_0); - case 9: + r0 = (s.tmp_0 >> 8); + s.sideDistY___186814 = (r0); + { step = 11; continue; } case 10: - case 11: - case 12: - { step = 16; continue; } - case 13: - r0 = s.arg0.fields["spriteLikes"]; + s.mapStepY___186830 = (1); + r0 = (s.mapY___186808 << 8); + s.tmp_3 = r0; + r0 = (s.tmp_3 + 256); s.tmp_2 = r0; - r0 = pxsim_Array_.indexOf(s.tmp_2, s.spr___186147, undefined); + r0 = s.arg0.fields["selfYFpx"]; + s.tmp_4 = r0; + r0 = (s.tmp_2 - s.tmp_4); s.tmp_1 = r0; - r0 = (s.tmp_1 < 0); + r0 = (s.tmp_1 * s.deltaDistY___186822); + s.tmp_0 = r0; + r0 = (s.tmp_0 >> 8); + s.sideDistY___186814 = (r0); + case 11: + s.color___186902 = (0); + s.isOutsideMap___186903 = (false); + case 12: + r0 = pxsim_numops_toBoolDecr(true); + if (!r0) { step = 19; continue; } + r0 = (s.sideDistX___186813 < s.sideDistY___186814); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 14; continue; } - r0 = s.arg0.fields["spriteLikes"]; - s.tmp_3 = r0; - r0 = pxsim_Array__push(s.tmp_3, s.spr___186147); - case 14: - case 15: + if (!r0) { step = 13; continue; } + r0 = (s.sideDistX___186813 + s.deltaDistX___186815); + s.sideDistX___186813 = (r0); + r0 = (s.mapX___186803 + s.mapStepX___186829); + s.mapX___186803 = (r0); + s.sideWallHit___186831 = (false); + { step = 14; continue; } + case 13: + r0 = (s.sideDistY___186814 + s.deltaDistY___186822); + s.sideDistY___186814 = (r0); + r0 = (s.mapY___186808 + s.mapStepY___186830); + s.mapY___186808 = (r0); + s.sideWallHit___186831 = (true); + case 14: + s.tmp_1 = tiles_TileMapData_isOutsideMap__P169256_mk(s); + r0 = s.arg0.fields["map"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.mapX___186803; + s.tmp_1.arg2 = s.mapY___186808; + s.callLocIdx = 2044; s.pc = 42; return s.tmp_1; + case 42: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 15; continue; } + s.isOutsideMap___186903 = (true); + { step = 19; continue; } + case 15: case 16: + r0 = s.arg0.fields["map"]; + s.tmp_1 = r0; + r0 = s.tmp_1.fields["layers"]; + s.tmp_3 = r0; + r0 = pxsim_ImageMethods.getPixel(s.tmp_3, s.mapX___186803, s.mapY___186808); + s.tmp_2 = r0; + r0 = (s.tmp_2 === 2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 17; continue; } + r0 = s.arg0.fields["mapData"]; + s.tmp_4 = r0; + r0 = (s.mapX___186803 | 0); + s.tmp_7 = r0; + r0 = (4 + s.tmp_7); + s.tmp_6 = r0; + r0 = (s.mapY___186808 | 0); + s.tmp_9 = r0; + r0 = s.arg0.fields["map"]; + s.tmp_11 = r0; + r0 = s.tmp_11.fields["_width"]; + s.tmp_10 = r0; + r0 = (s.tmp_9 * s.tmp_10); + s.tmp_8 = r0; + r0 = (s.tmp_6 + s.tmp_8); + s.tmp_5 = r0; + r0 = pxsim_Array__getAt(s.tmp_4, s.tmp_5); + s.color___186902 = (r0); + { step = 19; continue; } case 17: - r0 = pxsim_Array_.removeElement(s.sc_allSprites___186137, s.spr___186147); - { step = 1; continue; } case 18: - r0 = pxsim_pxtcore_mkAction(1, Render_RayCastingRender_takeoverSceneSprites_inline__P186261); + { step = 12; continue; } + case 19: + r0 = pxsim_numops_toBoolDecr(s.isOutsideMap___186903); + if (!r0) { step = 20; continue; } + { step = 34; continue; } + case 20: + case 21: + s.perpWallDist___186954 = (undefined); + s.wallX___186955 = (0); + r0 = pxsim_numops_toBoolDecr(s.sideWallHit___186831); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = helpers_arrayForEach__P166636_mk(s); - r0 = s.arg0.fields["sprites"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 1954; s.pc = 22; return s.tmp_1; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 22; continue; } + r0 = (s.mapX___186803 << 8); + s.tmp_5 = r0; + r0 = s.arg0.fields["selfXFpx"]; + s.tmp_6 = r0; + r0 = (s.tmp_5 - s.tmp_6); + s.tmp_4 = r0; + r0 = (1 - s.mapStepX___186829); + s.tmp_8 = r0; + r0 = (s.tmp_8 << 7); + s.tmp_7 = r0; + r0 = (s.tmp_4 + s.tmp_7); + s.tmp_3 = r0; + r0 = (s.tmp_3 << 8); + s.tmp_2 = r0; + r0 = pxsim.Math_.idiv(s.tmp_2, s.rayDirX___186775); + s.perpWallDist___186954 = (r0); + r0 = s.arg0.fields["selfYFpx"]; + s.tmp_0 = r0; + r0 = (s.perpWallDist___186954 * s.rayDirY___186786); + s.tmp_2 = r0; + r0 = (s.tmp_2 >> 8); + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); + s.wallX___186955 = (r0); + { step = 23; continue; } case 22: + r0 = (s.mapY___186808 << 8); + s.tmp_3 = r0; + r0 = s.arg0.fields["selfYFpx"]; + s.tmp_4 = r0; + r0 = (s.tmp_3 - s.tmp_4); + s.tmp_2 = r0; + r0 = (1 - s.mapStepY___186830); + s.tmp_6 = r0; + r0 = (s.tmp_6 << 7); + s.tmp_5 = r0; + r0 = (s.tmp_2 + s.tmp_5); + s.tmp_1 = r0; + r0 = (s.tmp_1 << 8); + s.tmp_0 = r0; + r0 = pxsim.Math_.idiv(s.tmp_0, s.rayDirY___186786); + s.perpWallDist___186954 = (r0); + r0 = s.arg0.fields["selfXFpx"]; + s.tmp_0 = r0; + r0 = (s.perpWallDist___186954 * s.rayDirX___186775); + s.tmp_2 = r0; + r0 = (s.tmp_2 >> 8); + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); + s.wallX___186955 = (r0); + case 23: + r0 = (s.wallX___186955 & globals.FPX_MAX___174837); + s.wallX___186955 = (r0); + r0 = s.arg0.fields["textures"]; + s.tmp_0 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.color___186902); + s.tex___187028 = (r0); + r0 = pxsim_numops_toBoolDecr(s.tex___187028); + 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 = 24; continue; } + { step = 34; continue; } + case 24: + case 25: + s.tmp_3 = r0 = s.wallX___186955; + r0 = pxsim_ImageMethods.width(s.tex___187028); + s.tmp_4 = r0; + r0 = (s.tmp_3 * s.tmp_4); + s.tmp_2 = r0; + r0 = (s.tmp_2 >> 8); + s.texX___187035 = (r0); + r0 = (s.perpWallDist___186954 !== s.lastDist___186566); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 26; continue; } + r0 = s.tmp_0; + { step = 31; continue; } + case 26: + r0 = (s.texX___187035 !== s.lastTexX___186569); + s.tmp_1 = r0; + r0 = pxsim_numops_toBool(s.tmp_1); + if (!r0) { step = 27; continue; } + r0 = s.tmp_1; + { step = 28; continue; } + case 27: + r0 = (s.mapX___186803 !== s.lastMapX___186572); + case 28: + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = pxsim_numops_toBool(s.tmp_2); + if (!r0) { step = 29; continue; } + r0 = s.tmp_2; + { step = 30; continue; } + case 29: + r0 = (s.mapY___186808 !== s.lastMapY___186575); + case 30: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = s.tmp_3; + case 31: + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + if (!r0) { step = 32; continue; } + r0 = s.arg0.fields["wallHeightInView"]; + s.tmp_5 = r0; + r0 = (s.tmp_5 / s.perpWallDist___186954); + s.lineHeight___187058 = (r0); + r0 = s.arg0.fields["viewZPos"]; + s.tmp_2 = r0; + r0 = (s.lineHeight___187058 * s.tmp_2); + s.tmp_1 = r0; + r0 = s.arg0.fields["tilemapScaleSize"]; + s.tmp_3 = r0; + r0 = (s.tmp_1 / s.tmp_3); + s.tmp_0 = r0; + r0 = (s.tmp_0 / 256); + s.drawEnd___187064 = (r0); + s.tmp_1 = r0 = s.drawEnd___187064; + r0 = s.arg0.fields["_wallZScale"]; + s.tmp_3 = r0; + r0 = (s.lineHeight___187058 * s.tmp_3); + s.tmp_2 = r0; + r0 = (s.tmp_1 - s.tmp_2); + s.tmp_0 = r0; + r0 = (s.tmp_0 + 1); + s.drawStart___186564 = (r0); + r0 = pxsim.Math_.ceil(s.drawEnd___187064); + s.tmp_1 = r0; + r0 = pxsim.Math_.ceil(s.drawStart___186564); + s.tmp_2 = r0; + r0 = (s.tmp_1 - s.tmp_2); + s.tmp_0 = r0; + r0 = (s.tmp_0 + 1); + s.drawHeight___186565 = (r0); + r0 = (s.drawStart___186564 + globals.SHHalf___174804); + s.drawStart___186564 = (r0); + s.lastDist___186566 = (s.perpWallDist___186954); + s.lastTexX___186569 = (s.texX___187035); + s.lastMapX___186572 = (s.mapX___186803); + s.lastMapY___186575 = (s.mapY___186808); + case 32: + case 33: + s.tmp_0 = helpers_imageBlitRow__P168481_mk(s); + r0 = s.arg0.fields["tempScreen"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.x___186755; + s.tmp_0.arg2 = s.drawStart___186564; + s.tmp_0.arg3 = s.tex___187028; + s.tmp_0.arg4 = s.texX___187035; + s.tmp_0.arg5 = s.drawHeight___186565; + s.callLocIdx = 2047; s.pc = 43; return s.tmp_0; + case 43: + r0 = s.retval; + r0 = s.arg0.fields["dist"]; + s.tmp_0 = r0; + r0 = pxsim_Array_.setAt(s.tmp_0, s.x___186755, s.perpWallDist___186954); + case 34: + r0 = (s.x___186755 + 1); + s.x___186755 = (r0); + { step = 3; continue; } + case 35: + s.tmp_0 = Render_RayCastingRender_drawSprites__P171792_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 2048; s.pc = 44; return s.tmp_0; + case 44: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -Render_RayCastingRender_takeoverSceneSprites__P171784.info = {"start":7597,"length":1974,"line":244,"column":8,"endLine":282,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"takeoverSceneSprites","argumentNames":["this"]} +Render_RayCastingRender_render__P171791.info = {"start":17614,"length":7237,"line":469,"column":8,"endLine":628,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"render","argumentNames":["this"]} -function Render_RayCastingRender_takeoverSceneSprites__P171784_mk(s) { +function Render_RayCastingRender_render__P171791_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_takeoverSceneSprites__P171784, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_render__P171791, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, - sc_allSprites___186137: undefined, - i___186141: undefined, - spr___186147: undefined, - sprList___186154: undefined, - particle___186206: undefined, - spr___186221: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, + tmp_11: undefined, + drawStart___186564: undefined, + drawHeight___186565: undefined, + lastDist___186566: undefined, + lastTexX___186569: undefined, + lastMapX___186572: undefined, + lastMapY___186575: undefined, + cameraRangeAngle___186599: undefined, + ms___186605: undefined, + x___186755: undefined, + cameraX___186760: undefined, + rayDirX___186775: undefined, + rayDirY___186786: undefined, + mapX___186803: undefined, + mapY___186808: undefined, + sideDistX___186813: undefined, + sideDistY___186814: undefined, + deltaDistX___186815: undefined, + deltaDistY___186822: undefined, + mapStepX___186829: undefined, + mapStepY___186830: undefined, + sideWallHit___186831: undefined, + color___186902: undefined, + isOutsideMap___186903: undefined, + perpWallDist___186954: undefined, + wallX___186955: undefined, + tex___187028: undefined, + texX___187035: undefined, + lineHeight___187058: undefined, + drawEnd___187064: undefined, arg0: undefined, } } @@ -40845,7 +40834,7 @@ function Render_RayCastingRender_takeoverSceneSprites__P171784_mk(s) { -function Render_RayCastingRender_takeoverSceneSprites_inline__P186178(s) { +function Render_RayCastingRender_render_inline__P186608(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -40855,54 +40844,185 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sayRenderer___186189 = undefined; - r0 = s.caps[0].fields["sprites"]; + s.posZ___186609 = undefined; + s.yFloor___186619 = undefined; + s.rowDistance___186625 = undefined; + s.floorX___186633 = undefined; + s.floorY___186647 = undefined; + s.floorStepX___186661 = undefined; + s.floorStepY___186670 = undefined; + s.xFloor___186679 = undefined; + s.tileType___186684 = undefined; + s.floorTex___186703 = undefined; + s.tx___186709 = undefined; + s.ty___186715 = undefined; + s.c___186721 = undefined; + r0 = s.caps[0].fields["viewZPos"]; + s.tmp_2 = r0; + r0 = (globals.SH___174800 * s.tmp_2); + s.tmp_1 = r0; + r0 = s.caps[0].fields["tilemapScaleSize"]; + s.tmp_3 = r0; + r0 = (s.tmp_1 / s.tmp_3); s.tmp_0 = r0; - r0 = pxsim_Array_.removeElement(s.tmp_0, s.caps[1]); - r0 = s.caps[0].fields["sprites2D"]; + r0 = (s.tmp_0 | 0); + s.posZ___186609 = (r0); + s.yFloor___186619 = (globals.SHHalf___174804); + case 1: + r0 = (s.yFloor___186619 < globals.SH___174800); s.tmp_0 = r0; - r0 = pxsim_Array_.removeElement(s.tmp_0, s.caps[1]); - r0 = s.caps[0].fields["sayRederers"]; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 6; continue; } + s.tmp_2 = r0 = s.posZ___186609; + r0 = (s.yFloor___186619 - globals.SHHalf___174804); + s.tmp_3 = r0; + r0 = (s.tmp_2 / s.tmp_3); + s.tmp_1 = r0; + r0 = (s.tmp_1 | 0); + s.rowDistance___186625 = (r0); + r0 = s.caps[0].fields["selfXFpx"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 * 256); s.tmp_0 = r0; - r0 = s.caps[1].fields["id"]; + s.tmp_3 = r0 = s.rowDistance___186625; + r0 = s.caps[0].fields["dirXFpx"]; + s.tmp_5 = r0; + r0 = s.caps[0].fields["planeX"]; + s.tmp_6 = r0; + r0 = (s.tmp_5 + s.tmp_6); + s.tmp_4 = r0; + r0 = (s.tmp_3 * s.tmp_4); + s.tmp_2 = r0; + r0 = (s.tmp_0 + s.tmp_2); + s.floorX___186633 = (r0); + r0 = s.caps[0].fields["selfYFpx"]; s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); - s.sayRenderer___186189 = (r0); - r0 = pxsim_numops_toBoolDecr(s.sayRenderer___186189); - if (!r0) { step = 1; continue; } - r0 = s.caps[0].fields["sayRederers"]; + r0 = (s.tmp_1 * 256); s.tmp_0 = r0; - r0 = pxsim_Array_.removeElement(s.tmp_0, s.sayRenderer___186189); - s.tmp_0 = sprites_BaseSpriteSayRenderer__C168786_v2_1_mk(s); - s.tmp_0.arg0 = s.sayRenderer___186189; - if (!checkSubtype(s.tmp_0.arg0, sprites_BaseSpriteSayRenderer__C168786_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.destroy; - s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - case 1: + s.tmp_3 = r0 = s.rowDistance___186625; + r0 = s.caps[0].fields["dirYFpx"]; + s.tmp_5 = r0; + r0 = s.caps[0].fields["planeY"]; + s.tmp_6 = r0; + r0 = (s.tmp_5 + s.tmp_6); + s.tmp_4 = r0; + r0 = (s.tmp_3 * s.tmp_4); + s.tmp_2 = r0; + r0 = (s.tmp_0 + s.tmp_2); + s.floorY___186647 = (r0); + r0 = s.caps[0].fields["planeX"]; + s.tmp_2 = r0; + r0 = (s.rowDistance___186625 * s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim.Math_.idiv(s.tmp_1, globals.SWHalf___174810); + s.tmp_0 = r0; + r0 = (0 - s.tmp_0); + s.floorStepX___186661 = (r0); + r0 = s.caps[0].fields["planeY"]; + s.tmp_2 = r0; + r0 = (s.rowDistance___186625 * s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim.Math_.idiv(s.tmp_1, globals.SWHalf___174810); + s.tmp_0 = r0; + r0 = (0 - s.tmp_0); + s.floorStepY___186670 = (r0); + s.xFloor___186679 = (0); case 2: + r0 = (s.xFloor___186679 < globals.SW___174806); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + r0 = s.caps[0].fields["mapData"]; + s.tmp_1 = r0; + r0 = (s.floorX___186633 >> 16); + s.tmp_4 = r0; + r0 = (4 + s.tmp_4); + s.tmp_3 = r0; + r0 = (s.floorY___186647 >> 16); + s.tmp_6 = r0; + r0 = s.caps[0].fields["map"]; + s.tmp_8 = r0; + r0 = s.tmp_8.fields["_width"]; + s.tmp_7 = r0; + r0 = (s.tmp_6 * s.tmp_7); + s.tmp_5 = r0; + r0 = (s.tmp_3 + s.tmp_5); + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_1, s.tmp_2); + s.tileType___186684 = (r0); + r0 = s.caps[0].fields["textures"]; + s.tmp_0 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.tileType___186684); + s.floorTex___186703 = (r0); + r0 = pxsim_numops_toBoolDecr(s.floorTex___186703); + if (!r0) { step = 3; continue; } + r0 = (s.floorX___186633 >> 12); + s.tmp_0 = r0; + r0 = (s.tmp_0 & 15); + s.tx___186709 = (r0); + r0 = (s.floorY___186647 >> 12); + s.tmp_0 = r0; + r0 = (s.tmp_0 & 15); + s.ty___186715 = (r0); + r0 = pxsim_ImageMethods.getPixel(s.floorTex___186703, s.tx___186709, s.ty___186715); + s.c___186721 = (r0); + r0 = s.caps[0].fields["tempScreen"]; + s.tmp_0 = r0; + r0 = pxsim_ImageMethods.setPixel(s.tmp_0, s.xFloor___186679, s.yFloor___186619, s.c___186721); + case 3: + case 4: + r0 = (s.floorX___186633 + s.floorStepX___186661); + s.floorX___186633 = (r0); + r0 = (s.floorY___186647 + s.floorStepY___186670); + s.floorY___186647 = (r0); + r0 = (s.xFloor___186679 + 1); + s.xFloor___186679 = (r0); + { step = 2; continue; } + case 5: + r0 = (s.yFloor___186619 + 1); + s.yFloor___186619 = (r0); + { step = 1; continue; } + case 6: r0 = undefined; return leave(s, r0) default: oops() } } } -Render_RayCastingRender_takeoverSceneSprites_inline__P186178.info = {"start":8129,"length":511,"line":253,"column":40,"endLine":261,"endColumn":25,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":[]} +Render_RayCastingRender_render_inline__P186608.info = {"start":18321,"length":1578,"line":486,"column":39,"endLine":509,"endColumn":17,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":[]} -function Render_RayCastingRender_takeoverSceneSprites_inline__P186178_mk(s) { +function Render_RayCastingRender_render_inline__P186608_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_takeoverSceneSprites_inline__P186178, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_render_inline__P186608, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - sayRenderer___186189: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + posZ___186609: undefined, + yFloor___186619: undefined, + rowDistance___186625: undefined, + floorX___186633: undefined, + floorY___186647: undefined, + floorStepX___186661: undefined, + floorStepY___186670: undefined, + xFloor___186679: undefined, + tileType___186684: undefined, + floorTex___186703: undefined, + tx___186709: undefined, + ty___186715: undefined, + c___186721: undefined, } } -function Render_RayCastingRender_takeoverSceneSprites_inline__P186261(s) { +function Render_RayCastingRender_drawSprites__P171792(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -40912,147 +41032,69 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.invDet___187122 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(s.arg0); - if (!r0) { step = 1; continue; } - s.tmp_0 = Render_RayCastingRender_takeoverSayRenderOfSprite__P171785_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_0.arg1 = s.arg0; - s.callLocIdx = 1953; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - case 1: - case 2: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -Render_RayCastingRender_takeoverSceneSprites_inline__P186261.info = {"start":9455,"length":105,"line":278,"column":33,"endLine":281,"endColumn":13,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":["spr"]} - -function Render_RayCastingRender_takeoverSceneSprites_inline__P186261_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Render_RayCastingRender_takeoverSceneSprites_inline__P186261, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, -} } - - - - - -function Render_RayCastingRender_takeoverSayRenderOfSprite__P171785(s) { -let r0 = s.r0, 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.sprite_as_any___186268 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } r0 = s.arg0; if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); - s.sprite_as_any___186268 = (s.arg1); - s.tmp_1 = if_sayRenderer_1_mk(s); - s.tmp_1.arg0 = s.sprite_as_any___186268; - if (!s.tmp_1.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "sayRenderer"); - } else { - s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["sayRenderer"]; - if (s.tmp_1.fn == null) { s.retval = s.tmp_1.arg0.fields["sayRenderer"]; } - else if (!s.tmp_1.fn.isGetter) { s.retval = bind(s.tmp_1); } - else { s.callLocIdx = 1955; 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; } - r0 = s.arg0.fields["sayRederers"]; - s.tmp_2 = r0; - r0 = s.arg1.fields["id"]; + s.tmp_0 = r0 = globals.one2___174831; + r0 = s.arg0.fields["planeX"]; s.tmp_3 = r0; - s.tmp_5 = if_sayRenderer_1_mk(s); - s.tmp_5.arg0 = s.sprite_as_any___186268; - if (!s.tmp_5.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "sayRenderer"); - } else { - s.tmp_5.fn = s.tmp_5.arg0.vtable.iface["sayRenderer"]; - if (s.tmp_5.fn == null) { s.retval = s.tmp_5.arg0.fields["sayRenderer"]; } - else if (!s.tmp_5.fn.isGetter) { s.retval = bind(s.tmp_5); } - else { s.callLocIdx = 1956; s.pc = 4; return s.tmp_5; } - } - case 4: - r0 = s.retval; + r0 = s.arg0.fields["dirYFpx"]; s.tmp_4 = r0; - r0 = pxsim_Array_.setAt(s.tmp_2, s.tmp_3, s.tmp_4); - r0 = s.arg0.fields["sayEndTimes"]; + r0 = (s.tmp_3 * s.tmp_4); + s.tmp_2 = r0; + r0 = s.arg0.fields["dirXFpx"]; + s.tmp_6 = r0; + r0 = s.arg0.fields["planeY"]; + s.tmp_7 = r0; + r0 = (s.tmp_6 * s.tmp_7); + s.tmp_5 = r0; + r0 = (s.tmp_2 - s.tmp_5); + s.tmp_1 = r0; + r0 = (s.tmp_0 / s.tmp_1); + s.invDet___187122 = (r0); + r0 = pxsim_pxtcore_mkAction(2, sort_inline__P187141); s.tmp_0 = r0; - r0 = s.arg1.fields["id"]; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.invDet___187122); + r0 = pxsim_pxtcore_mkAction(1, forEach_inline__P187226); s.tmp_1 = r0; - s.tmp_3 = if_sayEndTime_1_mk(s); - s.tmp_3.arg0 = s.sprite_as_any___186268; - if (!s.tmp_3.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "sayEndTime"); - } else { - s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["sayEndTime"]; - if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["sayEndTime"]; } - else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } - else { s.callLocIdx = 1957; s.pc = 5; return s.tmp_3; } - } - case 5: - r0 = s.retval; + r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.arg0); + r0 = pxsim_pxtcore_mkAction(1, Render_RayCastingRender_drawSprites_inline__P187239); s.tmp_2 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_1, s.tmp_2); - s.tmp_0 = if_sayRenderer_2_mk(s); - s.tmp_0.arg0 = s.sprite_as_any___186268; - s.tmp_0.arg1 = undefined; - if (!s.tmp_0.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapSetByString(s.tmp_0.arg0, "sayRenderer", s.tmp_0.arg1); - } else { - s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["set/sayRenderer"]; - if (s.tmp_0.fn === null) { s.tmp_0.arg0.fields["sayRenderer"] = s.tmp_0.arg1; } - else if (s.tmp_0.fn === undefined) { failedCast(s.tmp_0.arg0) } - else { s.callLocIdx = 1958; s.pc = 6; return s.tmp_0; } - } - case 6: + r0 = pxsim_pxtrt_stclo(s.tmp_2, 0, s.arg0); + s.tmp_3 = helpers_arrayForEach__P166636_mk(s); + s.tmp_4 = helpers_arraySort__P166632_mk(s); + s.tmp_5 = helpers_arrayFilter__P166637_mk(s); + r0 = s.arg0.fields["sprites"]; + s.tmp_5.arg0 = r0; + s.tmp_5.arg1 = s.tmp_0; + s.callLocIdx = 2054; s.pc = 3; return s.tmp_5; + case 3: r0 = s.retval; - s.tmp_0 = if_sayEndTime_2_mk(s); - s.tmp_0.arg0 = s.sprite_as_any___186268; - s.tmp_0.arg1 = undefined; - if (!s.tmp_0.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapSetByString(s.tmp_0.arg0, "sayEndTime", s.tmp_0.arg1); - } else { - s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["set/sayEndTime"]; - if (s.tmp_0.fn === null) { s.tmp_0.arg0.fields["sayEndTime"] = s.tmp_0.arg1; } - else if (s.tmp_0.fn === undefined) { failedCast(s.tmp_0.arg0) } - else { s.callLocIdx = 1959; s.pc = 7; return s.tmp_0; } - } - case 7: + s.tmp_4.arg0 = r0; + s.tmp_4.arg1 = s.tmp_1; + s.callLocIdx = 2055; s.pc = 2; return s.tmp_4; + case 2: r0 = s.retval; + s.tmp_3.arg0 = r0; + s.tmp_3.arg1 = s.tmp_2; + s.callLocIdx = 2057; s.pc = 1; return s.tmp_3; case 1: - case 2: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -Render_RayCastingRender_takeoverSayRenderOfSprite__P171785.info = {"start":9580,"length":413,"line":283,"column":8,"endLine":291,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"takeoverSayRenderOfSprite","argumentNames":["this","sprite"]} +Render_RayCastingRender_drawSprites__P171792.info = {"start":24869,"length":1815,"line":630,"column":8,"endLine":659,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"drawSprites","argumentNames":["this"]} -function Render_RayCastingRender_takeoverSayRenderOfSprite__P171785_mk(s) { +function Render_RayCastingRender_drawSprites__P171792_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_takeoverSayRenderOfSprite__P171785, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_drawSprites__P171792, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -41060,16 +41102,17 @@ function Render_RayCastingRender_takeoverSayRenderOfSprite__P171785_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - sprite_as_any___186268: undefined, + tmp_6: undefined, + tmp_7: undefined, + invDet___187122: undefined, arg0: undefined, - arg1: undefined, } } -function Sprite_onDestroyed__P168954(s) { +function sort_inline__P187141(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -41079,25 +41122,154 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.spriteX___187144 = undefined; + s.spriteY___187150 = undefined; + s.angleInCamera___187202 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - r0 = (s.arg0).fields["destroyHandler"] = (s.arg1); - r0 = undefined; + s.tmp_1 = Render_RayCastingRender_sprXFx8__P171765_mk(s); + s.tmp_1.arg0 = s.caps[0]; + s.tmp_1.arg1 = s.arg0; + s.callLocIdx = 2049; s.pc = 3; return s.tmp_1; + case 3: + r0 = s.retval; + s.tmp_0 = r0; + s.tmp_3 = Render_RayCastingRender_xFpx__P171759_mk(s); + s.tmp_3.arg0 = s.caps[0]; + s.callLocIdx = 2050; s.pc = 4; return s.tmp_3; + case 4: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_0 - s.tmp_2); + s.spriteX___187144 = (r0); + s.tmp_1 = Render_RayCastingRender_sprYFx8__P171766_mk(s); + s.tmp_1.arg0 = s.caps[0]; + s.tmp_1.arg1 = s.arg0; + s.callLocIdx = 2051; s.pc = 5; return s.tmp_1; + case 5: + r0 = s.retval; + s.tmp_0 = r0; + s.tmp_3 = Render_RayCastingRender_yFpx__P171760_mk(s); + s.tmp_3.arg0 = s.caps[0]; + s.callLocIdx = 2052; s.pc = 6; return s.tmp_3; + case 6: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_0 - s.tmp_2); + s.spriteY___187150 = (r0); + r0 = s.caps[0].fields["angleSelfToSpr"]; + s.tmp_0 = r0; + r0 = s.arg0.fields["id"]; + s.tmp_1 = r0; + r0 = pxsim.Math_.atan2(s.spriteX___187144, s.spriteY___187150); + s.tmp_2 = r0; + r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_1, s.tmp_2); + r0 = s.caps[0].fields["transformX"]; + s.tmp_0 = r0; + r0 = s.arg0.fields["id"]; + s.tmp_1 = r0; + s.tmp_4 = r0 = s.caps[1]; + r0 = s.caps[0].fields["dirYFpx"]; + s.tmp_7 = r0; + r0 = (s.tmp_7 * s.spriteX___187144); + s.tmp_6 = r0; + r0 = s.caps[0].fields["dirXFpx"]; + s.tmp_9 = r0; + r0 = (s.tmp_9 * s.spriteY___187150); + s.tmp_8 = r0; + r0 = (s.tmp_6 - s.tmp_8); + s.tmp_5 = r0; + r0 = (s.tmp_4 * s.tmp_5); + s.tmp_3 = r0; + r0 = (s.tmp_3 >> 8); + s.tmp_2 = r0; + r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_1, s.tmp_2); + r0 = s.caps[0].fields["transformY"]; + s.tmp_0 = r0; + r0 = s.arg0.fields["id"]; + s.tmp_1 = r0; + s.tmp_4 = r0 = s.caps[1]; + r0 = s.caps[0].fields["planeY"]; + s.tmp_8 = r0; + r0 = (0 - s.tmp_8); + s.tmp_7 = r0; + r0 = (s.tmp_7 * s.spriteX___187144); + s.tmp_6 = r0; + r0 = s.caps[0].fields["planeX"]; + s.tmp_10 = r0; + r0 = (s.tmp_10 * s.spriteY___187150); + s.tmp_9 = r0; + r0 = (s.tmp_6 + s.tmp_9); + s.tmp_5 = r0; + r0 = (s.tmp_4 * s.tmp_5); + s.tmp_3 = r0; + r0 = (s.tmp_3 >> 8); + s.tmp_2 = r0; + r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_1, s.tmp_2); + r0 = s.caps[0].fields["transformX"]; + s.tmp_2 = r0; + r0 = s.arg0.fields["id"]; + s.tmp_3 = r0; + r0 = pxsim_Array__getAt(s.tmp_2, s.tmp_3); + s.tmp_1 = r0; + r0 = s.caps[0].fields["_fov"]; + s.tmp_4 = r0; + r0 = (s.tmp_1 * s.tmp_4); + s.tmp_0 = r0; + r0 = s.caps[0].fields["transformY"]; + s.tmp_6 = r0; + r0 = s.arg0.fields["id"]; + s.tmp_7 = r0; + r0 = pxsim_Array__getAt(s.tmp_6, s.tmp_7); + s.tmp_5 = r0; + r0 = pxsim.Math_.atan2(s.tmp_0, s.tmp_5); + s.angleInCamera___187202 = (r0); + s.tmp_1 = r0 = s.angleInCamera___187202; + r0 = s.caps[0].fields["cameraRangeAngle"]; + s.tmp_3 = r0; + r0 = (0 - s.tmp_3); + 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.caps[0].fields["cameraRangeAngle"]; + s.tmp_4 = r0; + r0 = (s.angleInCamera___187202 < s.tmp_4); + case 2: + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = s.tmp_5; return leave(s, r0) default: oops() } } } -Sprite_onDestroyed__P168954.info = {"start":26089,"length":78,"line":845,"column":4,"endLine":847,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"onDestroyed","argumentNames":["this","handler"]} +sort_inline__P187141.info = {"start":25221,"length":819,"line":639,"column":24,"endLine":647,"endColumn":17,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":["spr","i"]} -function Sprite_onDestroyed__P168954_mk(s) { +function sort_inline__P187141_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_onDestroyed__P168954, depth: s.depth + 1, + parent: s, fn: sort_inline__P187141, depth: s.depth + 1, pc: 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, + spriteX___187144: undefined, + spriteY___187150: undefined, + angleInCamera___187202: undefined, arg0: undefined, arg1: undefined, } } @@ -41106,7 +41278,7 @@ function Sprite_onDestroyed__P168954_mk(s) { -function sprites_BaseSpriteSayRenderer_destroy__P168790(s) { +function forEach_inline__P187226(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -41118,29 +41290,47 @@ 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_BaseSpriteSayRenderer__C168786_VT)) failedCast(r0); - r0 = undefined; + r0 = s.caps[0].fields["transformY"]; + s.tmp_1 = r0; + r0 = s.arg1.fields["id"]; + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_1, s.tmp_2); + s.tmp_0 = r0; + r0 = s.caps[0].fields["transformY"]; + s.tmp_4 = r0; + r0 = s.arg0.fields["id"]; + s.tmp_5 = r0; + r0 = pxsim_Array__getAt(s.tmp_4, s.tmp_5); + s.tmp_3 = r0; + r0 = (s.tmp_0 - s.tmp_3); return leave(s, r0) default: oops() } } } -sprites_BaseSpriteSayRenderer_destroy__P168790.info = {"start":328,"length":22,"line":13,"column":8,"endLine":15,"endColumn":9,"fileName":"pxt_modules/game/spritesay.ts","functionName":"destroy","argumentNames":["this"]} +forEach_inline__P187226.info = {"start":26047,"length":133,"line":647,"column":24,"endLine":649,"endColumn":17,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":["spr1","spr2"]} -function sprites_BaseSpriteSayRenderer_destroy__P168790_mk(s) { +function forEach_inline__P187226_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_BaseSpriteSayRenderer_destroy__P168790, depth: s.depth + 1, + parent: s, fn: forEach_inline__P187226, depth: s.depth + 1, pc: 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 Render_RayCastingRender_updateViewZPos__P171783(s) { +function Render_RayCastingRender_drawSprites_inline__P187239(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -41152,37 +41342,44 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["spriteMotionZ"]; + s.tmp_0 = Render_RayCastingRender_drawSprite__P171794_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_0.arg1 = s.arg0; + s.tmp_0.arg2 = s.arg1; + r0 = s.caps[0].fields["transformX"]; + s.tmp_1 = r0; + r0 = s.arg0.fields["id"]; + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_1, s.tmp_2); + s.tmp_0.arg3 = r0; + r0 = s.caps[0].fields["transformY"]; + s.tmp_3 = r0; + r0 = s.arg0.fields["id"]; s.tmp_4 = r0; - r0 = s.arg0.fields["sprSelf"]; - r0 = r0.fields["id"]; + r0 = pxsim_Array__getAt(s.tmp_3, s.tmp_4); + s.tmp_0.arg4 = r0; + r0 = s.caps[0].fields["angleSelfToSpr"]; s.tmp_5 = r0; - r0 = pxsim_Array__getAt(s.tmp_4, s.tmp_5); - r0 = r0.fields["p"]; - s.tmp_3 = r0; - r0 = s.arg0.fields["sprSelf"]; - r0 = r0.fields["_height"]; + r0 = s.arg0.fields["id"]; s.tmp_6 = r0; - r0 = (s.tmp_3 + s.tmp_6); - s.tmp_2 = r0; - r0 = (s.tmp_2 - 512); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["viewZPos"] = (s.tmp_1); + r0 = pxsim_Array__getAt(s.tmp_5, s.tmp_6); + s.tmp_0.arg5 = r0; + s.callLocIdx = 2056; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -Render_RayCastingRender_updateViewZPos__P171783.info = {"start":7438,"length":149,"line":240,"column":8,"endLine":242,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"updateViewZPos","argumentNames":["this"]} +Render_RayCastingRender_drawSprites_inline__P187239.info = {"start":26190,"length":315,"line":649,"column":27,"endLine":653,"endColumn":17,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":["spr","index"]} -function Render_RayCastingRender_updateViewZPos__P171783_mk(s) { +function Render_RayCastingRender_drawSprites_inline__P187239_mk(s) { checkStack(s.depth); return { - parent: s, fn: Render_RayCastingRender_updateViewZPos__P171783, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_drawSprites_inline__P187239, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -41192,13 +41389,14 @@ function Render_RayCastingRender_updateViewZPos__P171783_mk(s) { tmp_5: undefined, tmp_6: undefined, arg0: undefined, + arg1: undefined, } } -function Render_RayCastingRender_viewMode__P171781(s) { +function Render_RayCastingRender_drawSprite__P171794(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -41208,109 +41406,609 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.spriteScreenX___187263 = undefined; + s.spriteScreenHalfWidth___187277 = undefined; + s.spriteScreenLeft___187291 = undefined; + s.spriteScreenRight___187295 = undefined; + s.blitX___187299 = undefined; + s.blitWidth___187300 = undefined; + s.sprX___187301 = undefined; + s.blitXSpr___187335 = undefined; + s.blitWidthSpr___187340 = undefined; + s.lineHeight___187351 = undefined; + s.drawStart___187357 = undefined; + s.texSpr___187400 = undefined; + s.sprTexRatio___187430 = undefined; + s.sayRender___187463 = undefined; + s.particle___187469 = undefined; + s.sayOrParticle___187475 = undefined; + s.fpx_div_transformy___187560 = undefined; + s.height___187567 = undefined; + s.blitXSaySrc___187572 = undefined; + s.blitWidthSaySrc___187582 = 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, Render_RayCastingRender__C171738_VT)) failedCast(r0); - r0 = s.arg0.fields["_viewMode"]; - return leaveAccessor(s, r0) - default: oops() -} } } -Render_RayCastingRender_viewMode__P171781.info = {"start":7280,"length":70,"line":232,"column":8,"endLine":234,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"viewMode","argumentNames":["this"]} -Render_RayCastingRender_viewMode__P171781.isGetter = true; - -function Render_RayCastingRender_viewMode__P171781_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Render_RayCastingRender_viewMode__P171781, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function game_onUpdateInterval__P169551(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.timer___177285 = 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_2 = r0 = globals.SWHalf___174810; + r0 = (s.arg3 / s.arg4); + s.tmp_4 = r0; + r0 = (1 - s.tmp_4); + s.tmp_3 = r0; + r0 = (s.tmp_2 * s.tmp_3); s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = pxsim.Math_.ceil(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 = s.arg0.fields["cameraOffsetX"]; + s.tmp_5 = r0; + r0 = (s.tmp_0 - s.tmp_5); + s.spriteScreenX___187263 = (r0); + r0 = s.arg1.fields["_width"]; + s.tmp_3 = r0; + r0 = s.arg0.fields["tilemapScaleSize"]; + s.tmp_4 = r0; + r0 = (s.tmp_3 / s.tmp_4); + s.tmp_2 = r0; + r0 = (s.tmp_2 / 2); + s.tmp_1 = r0; + r0 = s.arg0.fields["wallWidthInView"]; + s.tmp_5 = r0; + r0 = (s.tmp_1 * s.tmp_5); + s.tmp_0 = r0; + r0 = pxsim.Math_.idiv(s.tmp_0, s.arg4); + s.spriteScreenHalfWidth___187277 = (r0); + r0 = (s.spriteScreenX___187263 - s.spriteScreenHalfWidth___187277); + s.spriteScreenLeft___187291 = (r0); + r0 = (s.spriteScreenX___187263 + s.spriteScreenHalfWidth___187277); + s.spriteScreenRight___187295 = (r0); + s.blitX___187299 = (0); + s.blitWidth___187300 = (0); + s.sprX___187301 = (0); case 1: - r0 = (s.arg0 < 0); - case 2: - // jmp value (already in r0) + r0 = (s.sprX___187301 < globals.SW___174806); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 12; continue; } + r0 = s.arg0.fields["dist"]; + s.tmp_3 = r0; + r0 = pxsim_Array__getAt(s.tmp_3, s.sprX___187301); s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 3; continue; } - { step = 5; continue; } + r0 = (s.tmp_2 > s.arg4); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 4; continue; } + r0 = (s.blitWidth___187300 == 0); + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + if (!r0) { step = 2; continue; } + s.blitX___187299 = (s.sprX___187301); + case 2: case 3: + r0 = (s.blitWidth___187300 + 1); + s.blitWidth___187300 = (r0); + { step = 11; continue; } case 4: - r0 = pxsim_pxtrt.mklocRef(); - s.timer___177285 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.timer___177285, 0); - r0 = pxsim_pxtcore_mkAction(3, game_onUpdateInterval_inline__P177289); + r0 = (s.blitWidth___187300 > 0); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.timer___177285); - 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__P166930_mk(s); - s.tmp_2 = game_eventContext__P169529_mk(s); - s.callLocIdx = 1385; 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 = 1389; s.pc = 6; return s.tmp_1; - case 6: - r0 = s.retval; - case 5: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -game_onUpdateInterval__P169551.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 game_onUpdateInterval__P169551_mk(s) { + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 9; continue; } + r0 = (s.blitX___187299 <= s.spriteScreenRight___187295); + s.tmp_1 = r0; + r0 = pxsim_numops_toBool(s.tmp_1); + if (r0) { step = 5; continue; } + r0 = s.tmp_1; + { step = 6; continue; } + case 5: + r0 = (s.blitX___187299 + s.blitWidth___187300); + s.tmp_2 = r0; + r0 = (s.tmp_2 >= s.spriteScreenLeft___187291); + case 6: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 7; continue; } + { step = 12; continue; } + { step = 8; continue; } + case 7: + s.blitX___187299 = (0); + s.blitWidth___187300 = (0); + r0 = 0; + case 8: + case 9: + case 10: + case 11: + r0 = (s.sprX___187301 + 1); + s.sprX___187301 = (r0); + { step = 1; continue; } + case 12: + s.tmp_0 = Math_max__P166657_mk(s); + s.tmp_0.arg0 = s.blitX___187299; + s.tmp_0.arg1 = s.spriteScreenLeft___187291; + s.callLocIdx = 2058; s.pc = 36; return s.tmp_0; + case 36: + r0 = s.retval; + s.blitXSpr___187335 = (r0); + s.tmp_1 = Math_min__P166658_mk(s); + r0 = (s.blitX___187299 + s.blitWidth___187300); + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.spriteScreenRight___187295; + s.callLocIdx = 2059; s.pc = 37; return s.tmp_1; + case 37: + r0 = s.retval; + s.tmp_0 = r0; + r0 = (s.tmp_0 - s.blitXSpr___187335); + s.blitWidthSpr___187340 = (r0); + r0 = (s.blitWidthSpr___187340 <= 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 13; continue; } + { step = 35; continue; } + case 13: + case 14: + r0 = s.arg0.fields["wallHeightInView"]; + s.tmp_1 = r0; + r0 = pxsim.Math_.idiv(s.tmp_1, s.arg4); + s.lineHeight___187351 = (r0); + s.tmp_0 = r0 = globals.SHHalf___174804; + s.tmp_3 = r0 = s.lineHeight___187351; + r0 = s.arg0.fields["viewZPos"]; + s.tmp_7 = r0; + r0 = s.arg0.fields["spriteMotionZ"]; + s.tmp_9 = r0; + r0 = s.arg1.fields["id"]; + s.tmp_10 = r0; + r0 = pxsim_Array__getAt(s.tmp_9, s.tmp_10); + r0 = r0.fields["p"]; + s.tmp_8 = r0; + r0 = (s.tmp_7 - s.tmp_8); + s.tmp_6 = r0; + r0 = s.arg1.fields["_height"]; + s.tmp_11 = r0; + r0 = (s.tmp_6 - s.tmp_11); + s.tmp_5 = r0; + r0 = s.arg0.fields["tilemapScaleSize"]; + s.tmp_12 = r0; + r0 = (s.tmp_5 / s.tmp_12); + s.tmp_4 = r0; + r0 = (s.tmp_3 * s.tmp_4); + s.tmp_2 = r0; + r0 = (s.tmp_2 >> 8); + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); + s.drawStart___187357 = (r0); + r0 = s.arg0.fields["onSpriteDirectionUpdateHandler"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 15; continue; } + s.tmp_1 = if_onSpriteDirectionUpdateHandler_3_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_1.arg1 = s.arg1; + r0 = s.arg1.fields["_vx"]; + s.tmp_7 = r0; + r0 = s.arg1.fields["_vy"]; + s.tmp_8 = r0; + r0 = pxsim.Math_.atan2(s.tmp_7, s.tmp_8); + s.tmp_6 = r0; + r0 = (s.tmp_6 - s.arg5); + s.tmp_5 = r0; + r0 = (s.tmp_5 / 3.141592653589793); + s.tmp_4 = r0; + r0 = (s.tmp_4 / 2); + s.tmp_3 = r0; + r0 = (s.tmp_3 + 2); + s.tmp_2 = r0; + r0 = (s.tmp_2 - 0.25); + s.tmp_1.arg2 = r0; + if (!s.tmp_1.arg0.vtable.iface) { + setupLambda(s.tmp_1, pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "onSpriteDirectionUpdateHandler"), 3); + s.callLocIdx = 2060; s.pc = 38; return s.tmp_1; + } else { + s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["onSpriteDirectionUpdateHandler"]; + if (s.tmp_1.fn == null) { setupLambda(s.tmp_1, s.tmp_1.arg0.fields["onSpriteDirectionUpdateHandler"], 3); s.callLocIdx = 2060; s.pc = 38; return s.tmp_1; } + else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 2060; s.pc = 38; return s.tmp_1;; } + else { s.callLocIdx = 2060; s.pc = 38; return s.tmp_1; } + } + case 38: + r0 = s.retval; + case 15: + case 16: + r0 = s.arg0.fields["spriteAnimations"]; + s.tmp_3 = r0; + r0 = s.arg1.fields["id"]; + s.tmp_4 = r0; + r0 = pxsim_Array__getAt(s.tmp_3, s.tmp_4); + 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; } + r0 = s.arg1.fields["_image"]; + { step = 18; continue; } + case 17: + s.tmp_5 = Render_Animations_getFrameByDir__P171812_mk(s); + r0 = s.arg0.fields["spriteAnimations"]; + s.tmp_6 = r0; + r0 = s.arg1.fields["id"]; + s.tmp_7 = r0; + r0 = pxsim_Array__getAt(s.tmp_6, s.tmp_7); + s.tmp_5.arg0 = r0; + r0 = s.arg1.fields["_vx"]; + s.tmp_13 = r0; + r0 = s.arg1.fields["_vy"]; + s.tmp_14 = r0; + r0 = pxsim.Math_.atan2(s.tmp_13, s.tmp_14); + s.tmp_12 = r0; + r0 = (s.tmp_12 - s.arg5); + s.tmp_11 = r0; + r0 = (s.tmp_11 / 3.141592653589793); + s.tmp_10 = r0; + r0 = (s.tmp_10 / 2); + s.tmp_9 = r0; + r0 = (s.tmp_9 + 2); + s.tmp_8 = r0; + r0 = (s.tmp_8 - 0.25); + s.tmp_5.arg1 = r0; + s.callLocIdx = 2062; s.pc = 39; return s.tmp_5; + case 39: + r0 = s.retval; + case 18: + // jmp value (already in r0) + s.tmp_15 = r0; + s.texSpr___187400 = (s.tmp_15); + r0 = pxsim_ImageMethods.width(s.texSpr___187400); + s.tmp_1 = r0; + r0 = (s.tmp_1 / s.spriteScreenHalfWidth___187277); + s.tmp_0 = r0; + r0 = (s.tmp_0 / 2); + s.sprTexRatio___187430 = (r0); + s.tmp_0 = helpers_imageBlit__P168480_mk(s); + r0 = s.arg0.fields["tempScreen"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.blitXSpr___187335; + s.tmp_0.arg2 = s.drawStart___187357; + s.tmp_0.arg3 = s.blitWidthSpr___187340; + s.tmp_2 = r0 = s.lineHeight___187351; + s.tmp_4 = Sprite_height__P168925_mk(s); + s.tmp_4.arg0 = s.arg1; + s.callLocIdx = 2063; s.pc = 41; return s.tmp_4; + case 41: + r0 = s.retval; + s.tmp_3 = r0; + r0 = (s.tmp_2 * s.tmp_3); + s.tmp_1 = r0; + r0 = s.arg0.fields["tilemapScaleSize"]; + s.tmp_5 = r0; + r0 = (s.tmp_1 / s.tmp_5); + s.tmp_0.arg4 = r0; + s.tmp_0.arg5 = s.texSpr___187400; + s.tmp_7 = r0 = s.blitXSpr___187335; + r0 = (s.spriteScreenX___187263 - s.spriteScreenHalfWidth___187277); + s.tmp_8 = r0; + r0 = (s.tmp_7 - s.tmp_8); + s.tmp_6 = r0; + r0 = (s.tmp_6 * s.sprTexRatio___187430); + s.tmp_0.arg6 = r0; + s.tmp_0.arg7 = 0; + r0 = (s.blitWidthSpr___187340 * s.sprTexRatio___187430); + s.tmp_0.arg8 = r0; + r0 = pxsim_ImageMethods.height(s.texSpr___187400); + s.tmp_0.arg9 = r0; + s.tmp_0.arg10 = true; + s.tmp_0.arg11 = false; + s.callLocIdx = 2064; s.pc = 40; return s.tmp_0; + case 40: + r0 = s.retval; + r0 = s.arg0.fields["sayRederers"]; + s.tmp_0 = r0; + r0 = s.arg1.fields["id"]; + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); + s.sayRender___187463 = (r0); + r0 = s.arg0.fields["spriteParticles"]; + s.tmp_0 = r0; + r0 = s.arg1.fields["id"]; + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); + s.particle___187469 = (r0); + r0 = pxsim_numops_toBoolDecr(s.sayRender___187463); + 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_toBool(s.tmp_0); + if (!r0) { step = 19; continue; } + r0 = s.tmp_0; + { step = 20; continue; } + case 19: + r0 = pxsim_numops_toBoolDecr(s.particle___187469); + s.tmp_6 = r0; + r0 = pxsim_Boolean__bang(s.tmp_6); + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + s.tmp_4 = r0; + r0 = pxsim_Boolean__bang(s.tmp_4); + case 20: + // jmp value (already in r0) + s.tmp_7 = r0; + s.sayOrParticle___187475 = (s.tmp_7); + r0 = pxsim_numops_toBoolDecr(s.sayOrParticle___187475); + if (!r0) { step = 33; continue; } + r0 = pxsim_ImageMethods.fill(globals.screen___168559, 0); + r0 = pxsim_numops_toBoolDecr(s.sayRender___187463); + if (!r0) { step = 25; continue; } + r0 = s.arg0.fields["sayEndTimes"]; + s.tmp_1 = r0; + r0 = s.arg1.fields["id"]; + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_1, s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 21; continue; } + r0 = s.tmp_0; + { step = 22; continue; } + case 21: + r0 = pxsim.control.millis(); + s.tmp_3 = r0; + r0 = s.arg0.fields["sayEndTimes"]; + s.tmp_5 = r0; + r0 = s.arg1.fields["id"]; + s.tmp_6 = r0; + r0 = pxsim_Array__getAt(s.tmp_5, s.tmp_6); + s.tmp_4 = r0; + r0 = (s.tmp_3 > s.tmp_4); + case 22: + // jmp value (already in r0) + s.tmp_7 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_7); + if (!r0) { step = 23; continue; } + r0 = s.arg0.fields["sayRederers"]; + s.tmp_8 = r0; + r0 = s.arg1.fields["id"]; + s.tmp_9 = r0; + r0 = pxsim_Array_.setAt(s.tmp_8, s.tmp_9, undefined); + { step = 24; continue; } + case 23: + s.tmp_0 = Sprite_x__P168882_mk(s); + r0 = s.arg0.fields["tempSprite"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = globals.SWHalf___174810; + s.callLocIdx = 2065; s.pc = 42; return s.tmp_0; + case 42: + r0 = s.retval; + s.tmp_0 = Sprite_y__P168884_mk(s); + r0 = s.arg0.fields["tempSprite"]; + s.tmp_0.arg0 = r0; + r0 = (globals.SHHalf___174804 + 2); + s.tmp_0.arg1 = r0; + s.callLocIdx = 2066; s.pc = 43; return s.tmp_0; + case 43: + r0 = s.retval; + r0 = s.arg0.fields["camera"]; + s.tmp_0 = r0; + r0 = (s.tmp_0).fields["drawOffsetX"] = (0); + r0 = s.arg0.fields["camera"]; + s.tmp_0 = r0; + r0 = (s.tmp_0).fields["drawOffsetY"] = (0); + s.tmp_0 = sprites_BaseSpriteSayRenderer__C168786_v0_4_mk(s); + s.tmp_0.arg0 = s.sayRender___187463; + s.tmp_0.arg1 = globals.screen___168559; + r0 = s.arg0.fields["camera"]; + s.tmp_0.arg2 = r0; + r0 = s.arg0.fields["tempSprite"]; + s.tmp_0.arg3 = r0; + if (!checkSubtype(s.tmp_0.arg0, sprites_BaseSpriteSayRenderer__C168786_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.draw; + s.pc = 44; return s.tmp_0; + case 44: + r0 = s.retval; + case 24: + case 25: + case 26: + r0 = pxsim_numops_toBoolDecr(s.particle___187469); + if (!r0) { step = 29; continue; } + r0 = s.particle___187469.fields["lifespan"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 27; continue; } + s.tmp_1 = Sprite_x__P168882_mk(s); + r0 = s.arg0.fields["tempSprite"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = globals.SWHalf___174810; + s.callLocIdx = 2067; s.pc = 45; return s.tmp_1; + case 45: + r0 = s.retval; + s.tmp_0 = Sprite_y__P168884_mk(s); + r0 = s.arg0.fields["tempSprite"]; + s.tmp_0.arg0 = r0; + s.tmp_1 = r0 = globals.SHHalf___174804; + s.tmp_3 = Sprite_height__P168925_mk(s); + s.tmp_3.arg0 = s.arg1; + s.callLocIdx = 2068; s.pc = 47; return s.tmp_3; + case 47: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_1 + s.tmp_2); + s.tmp_0.arg1 = r0; + s.callLocIdx = 2069; s.pc = 46; return s.tmp_0; + case 46: + r0 = s.retval; + r0 = s.arg0.fields["camera"]; + s.tmp_0 = r0; + r0 = (s.tmp_0).fields["drawOffsetX"] = (0); + r0 = s.arg0.fields["camera"]; + s.tmp_0 = r0; + r0 = (s.tmp_0).fields["drawOffsetY"] = (0); + s.tmp_0 = particles_ParticleSource__C169678_v1_2_mk(s); + s.tmp_0.arg0 = s.particle___187469; + r0 = s.arg0.fields["camera"]; + s.tmp_0.arg1 = r0; + if (!checkSubtype(s.tmp_0.arg0, particles_ParticleSource__C169678_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.__draw; + s.pc = 48; return s.tmp_0; + case 48: + r0 = s.retval; + { step = 28; continue; } + case 27: + r0 = s.arg0.fields["spriteParticles"]; + s.tmp_0 = r0; + r0 = s.arg1.fields["id"]; + s.tmp_1 = r0; + r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_1, undefined); + case 28: + case 29: + case 30: + s.tmp_0 = Math_roundWithPrecision__P166659_mk(s); + r0 = (s.arg4 / 4); + s.tmp_1 = r0; + r0 = (s.tmp_1 / 256); + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = 2; + s.callLocIdx = 2070; s.pc = 49; return s.tmp_0; + case 49: + r0 = s.retval; + s.fpx_div_transformy___187560 = (r0); + r0 = (globals.SH___174800 / s.fpx_div_transformy___187560); + s.height___187567 = (r0); + r0 = (s.blitX___187299 - s.spriteScreenX___187263); + s.tmp_1 = r0; + r0 = (s.tmp_1 * s.fpx_div_transformy___187560); + s.tmp_0 = r0; + r0 = (s.tmp_0 + globals.SWHalf___174810); + s.blitXSaySrc___187572 = (r0); + r0 = (s.blitWidth___187300 * s.fpx_div_transformy___187560); + s.blitWidthSaySrc___187582 = (r0); + r0 = (s.blitXSaySrc___187572 <= 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 31; continue; } + s.tmp_1 = helpers_imageBlit__P168480_mk(s); + r0 = s.arg0.fields["tempScreen"]; + s.tmp_1.arg0 = r0; + s.tmp_2 = r0 = s.spriteScreenX___187263; + r0 = (globals.SWHalf___174810 / s.fpx_div_transformy___187560); + s.tmp_3 = r0; + r0 = (s.tmp_2 - s.tmp_3); + s.tmp_1.arg1 = r0; + s.tmp_4 = r0 = s.drawStart___187357; + r0 = (s.height___187567 / 2); + s.tmp_5 = r0; + r0 = (s.tmp_4 - s.tmp_5); + s.tmp_1.arg2 = r0; + r0 = (s.blitWidthSaySrc___187582 + s.blitXSaySrc___187572); + s.tmp_6 = r0; + r0 = (s.tmp_6 / s.fpx_div_transformy___187560); + s.tmp_1.arg3 = r0; + s.tmp_1.arg4 = s.height___187567; + s.tmp_1.arg5 = globals.screen___168559; + s.tmp_1.arg6 = 0; + s.tmp_1.arg7 = 0; + r0 = (s.blitWidthSaySrc___187582 + s.blitXSaySrc___187572); + s.tmp_1.arg8 = r0; + s.tmp_1.arg9 = globals.SH___174800; + s.tmp_1.arg10 = true; + s.tmp_1.arg11 = false; + s.callLocIdx = 2071; s.pc = 50; return s.tmp_1; + case 50: + r0 = s.retval; + { step = 32; continue; } + case 31: + s.tmp_0 = helpers_imageBlit__P168480_mk(s); + r0 = s.arg0.fields["tempScreen"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.blitX___187299; + s.tmp_1 = r0 = s.drawStart___187357; + r0 = (s.height___187567 / 2); + s.tmp_2 = r0; + r0 = (s.tmp_1 - s.tmp_2); + s.tmp_0.arg2 = r0; + s.tmp_0.arg3 = s.blitWidth___187300; + s.tmp_0.arg4 = s.height___187567; + s.tmp_0.arg5 = globals.screen___168559; + s.tmp_0.arg6 = s.blitXSaySrc___187572; + s.tmp_0.arg7 = 0; + s.tmp_0.arg8 = s.blitWidthSaySrc___187582; + s.tmp_0.arg9 = globals.SH___174800; + s.tmp_0.arg10 = true; + s.tmp_0.arg11 = false; + s.callLocIdx = 2072; s.pc = 51; return s.tmp_0; + case 51: + r0 = s.retval; + case 32: + case 33: + case 34: + case 35: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +Render_RayCastingRender_drawSprite__P171794.info = {"start":26856,"length":6171,"line":665,"column":8,"endLine":773,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"drawSprite","argumentNames":["this","spr","index","transformX","transformY","myAngle"]} + +function Render_RayCastingRender_drawSprite__P171794_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_onUpdateInterval__P169551, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_drawSprite__P171794, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - timer___177285: 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, + spriteScreenX___187263: undefined, + spriteScreenHalfWidth___187277: undefined, + spriteScreenLeft___187291: undefined, + spriteScreenRight___187295: undefined, + blitX___187299: undefined, + blitWidth___187300: undefined, + sprX___187301: undefined, + blitXSpr___187335: undefined, + blitWidthSpr___187340: undefined, + lineHeight___187351: undefined, + drawStart___187357: undefined, + texSpr___187400: undefined, + sprTexRatio___187430: undefined, + sayRender___187463: undefined, + particle___187469: undefined, + sayOrParticle___187475: undefined, + fpx_div_transformy___187560: undefined, + height___187567: undefined, + blitXSaySrc___187572: undefined, + blitWidthSaySrc___187582: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, + arg5: undefined, } } -function game_onUpdateInterval_inline__P177289(s) { +function Render_Animations_getFrameByDir__P171812(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -41320,55 +42018,108 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.time___177290 = undefined; - s.tmp_1 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1386; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; - s.tmp_0 = r0; - r0 = s.tmp_0.fields["_millis"]; - s.time___177290 = (r0); - r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); - s.tmp_1 = r0; - r0 = (s.tmp_1 <= s.time___177290); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Render_Animations__C171807_VT)) failedCast(r0); + r0 = pxsim.control.millis(); + s.tmp_2 = r0; + r0 = s.arg0.fields["msLast"]; + s.tmp_3 = r0; + r0 = (s.tmp_2 - s.tmp_3); + s.tmp_1 = r0; + r0 = s.arg0.fields["frameInterval"]; + s.tmp_4 = r0; + r0 = (s.tmp_1 > s.tmp_4); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_2 = r0 = s.caps[0]; - r0 = (s.time___177290 + s.caps[1]); + if (!r0) { step = 3; continue; } + s.tmp_5 = r0 = s.arg0; + r0 = pxsim.control.millis(); + s.tmp_6 = r0; + r0 = (s.tmp_5).fields["msLast"] = (s.tmp_6); + s.tmp_0 = r0 = s.arg0; + r0 = s.tmp_0.fields["index"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + 1); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["index"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + s.tmp_4 = r0 = s.arg1; + r0 = s.arg0.fields["animations"]; + s.tmp_6 = r0; + r0 = pxsim_Array__length(s.tmp_6); + s.tmp_5 = r0; + r0 = (s.tmp_4 * s.tmp_5); 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 = 1388; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; + r0 = pxsim.Math_.round(s.tmp_3); + s.tmp_2 = r0; + r0 = s.arg0.fields["animations"]; + s.tmp_8 = r0; + r0 = pxsim_Array__length(s.tmp_8); + s.tmp_7 = r0; + r0 = (s.tmp_2 % s.tmp_7); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["iAnimation"] = (s.tmp_1); + r0 = s.arg0.fields["index"]; + s.tmp_1 = r0; + r0 = s.arg0.fields["animations"]; + s.tmp_4 = r0; + r0 = s.arg0.fields["iAnimation"]; + s.tmp_5 = r0; + r0 = pxsim_Array__getAt(s.tmp_4, s.tmp_5); + 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 = 1; continue; } + r0 = (s.arg0).fields["index"] = (0); case 1: case 2: - r0 = undefined; + case 3: + case 4: + r0 = s.arg0.fields["animations"]; + s.tmp_1 = r0; + r0 = s.arg0.fields["iAnimation"]; + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_1, s.tmp_2); + s.tmp_0 = r0; + r0 = s.arg0.fields["index"]; + s.tmp_3 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_3); return leave(s, r0) default: oops() } } } -game_onUpdateInterval_inline__P177289.info = {"start":1027,"length":179,"line":29,"column":81,"endLine":35,"endColumn":9,"fileName":"pxt_modules/game/gameutil.ts","functionName":"inline","argumentNames":[]} +Render_Animations_getFrameByDir__P171812.info = {"start":613,"length":482,"line":27,"column":8,"endLine":36,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_blocks.ts","functionName":"getFrameByDir","argumentNames":["this","dir"]} -function game_onUpdateInterval_inline__P177289_mk(s) { +function Render_Animations_getFrameByDir__P171812_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_onUpdateInterval_inline__P177289, depth: s.depth + 1, + parent: s, fn: Render_Animations_getFrameByDir__P171812, depth: s.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___177290: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + arg0: undefined, + arg1: undefined, } } -function scene_cameraFollowSprite__P169417(s) { +function particles_ParticleSource___draw__P169684(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -41378,46 +42129,105 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___186107 = undefined; + s.current___187663 = undefined; + s.left___187666 = undefined; + s.top___187676 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1175; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.scene___186107 = (r0); - r0 = s.scene___186107.fields["camera"]; + r0 = s.arg0; + if (!checkSubtype(r0, particles_ParticleSource__C169678_VT)) failedCast(r0); + r0 = s.arg0.fields["head"]; + s.current___187663 = (r0); + r0 = s.arg0.fields["pFlags"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 & 4); s.tmp_0 = r0; - r0 = (s.tmp_0).fields["sprite"] = (s.arg0); - s.tmp_0 = scene_Camera_update__P169325_mk(s); - r0 = s.scene___186107.fields["camera"]; - s.tmp_0.arg0 = r0; - s.callLocIdx = 1176; s.pc = 2; return s.tmp_0; + 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___187666 = (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___187676 = (s.tmp_4); + case 5: + r0 = pxsim_numops_toBoolDecr(s.current___187663); + if (!r0) { step = 8; continue; } + r0 = s.current___187663.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__P172799_mk(s); + s.tmp_2.arg0 = s.arg0; + s.tmp_2.arg1 = s.current___187663; + s.tmp_2.arg2 = s.left___187666; + s.tmp_2.arg3 = s.top___187676; + s.callLocIdx = 1575; s.pc = 9; return s.tmp_2; + case 9: r0 = s.retval; + case 6: + case 7: + r0 = s.current___187663.fields["next"]; + s.current___187663 = (r0); + { step = 5; continue; } + case 8: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_cameraFollowSprite__P169417.info = {"start":4010,"length":170,"line":143,"column":4,"endLine":147,"endColumn":5,"fileName":"pxt_modules/game/scenes.ts","functionName":"cameraFollowSprite","argumentNames":["sprite"]} +particles_ParticleSource___draw__P169684.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 scene_cameraFollowSprite__P169417_mk(s) { +function particles_ParticleSource___draw__P169684_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_cameraFollowSprite__P169417, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource___draw__P169684, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - scene___186107: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + current___187663: undefined, + left___187666: undefined, + top___187676: undefined, arg0: undefined, + arg1: undefined, } } -function tiles_TileMap_addEventListener__P169287(s) { +function particles_ParticleSource_drawParticle__P172799(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -41427,114 +42237,57 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.eventHandler___186316 = undefined; - s.unnamed830___U1 = undefined; - s.unnamed831___U2 = 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, tiles_TileMap__C169262_VT)) failedCast(r0); - r0 = s.arg0.fields["handlerState"]; - 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_Array__mk(); - s.tmp_4 = r0; - r0 = (s.tmp_3).fields["handlerState"] = (s.tmp_4); - case 1: - case 2: - s.eventHandler___186316 = (undefined); - r0 = s.arg0.fields["handlerState"]; - s.unnamed830___U1 = (r0); - s.unnamed831___U2 = (0); - case 3: - s.tmp_0 = r0 = s.unnamed831___U2; - r0 = pxsim_Array__length(s.unnamed830___U1); + if (!checkSubtype(r0, particles_ParticleSource__C169678_VT)) failedCast(r0); + s.tmp_0 = particles_ParticleFactory__C169714_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_0 < s.tmp_1); - if (!r0) { step = 8; continue; } - r0 = pxsim_Array__getAt(s.unnamed830___U1, s.unnamed831___U2); - s.eventHandler___186316 = (r0); - r0 = s.eventHandler___186316.fields["event"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 === s.arg1); + r0 = (s.tmp_1 - s.arg2); + s.tmp_0.arg2 = r0; + r0 = s.arg1.fields["_y"]; 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.eventHandler___186316.fields["callback"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 === s.arg2); - case 5: - // jmp value (already in r0) - s.tmp_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); - if (!r0) { step = 6; continue; } - { step = 9; continue; } - case 6: - case 7: - r0 = (s.unnamed831___U2 + 1); - s.unnamed831___U2 = (r0); - { step = 3; continue; } - case 8: - s.unnamed830___U1 = (undefined); - r0 = pxsim_pxtcore_mkClassInstance(tiles_TileMapEventHandler__C169260_VT); - s.tmp_6 = r0; - s.tmp_7 = tiles_TileMapEventHandler_constructor__P169261_mk(s); - s.tmp_7.arg0 = s.tmp_6; - s.tmp_7.arg1 = s.arg1; - s.tmp_7.arg2 = s.arg2; - s.callLocIdx = 1099; s.pc = 10; return s.tmp_7; - case 10: + r0 = (s.tmp_2 - s.arg3); + s.tmp_0.arg3 = r0; + if (!checkSubtype(s.tmp_0.arg0, particles_ParticleFactory__C169714_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.drawParticle; + s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - r0 = s.arg0.fields["handlerState"]; - s.tmp_8 = r0; - r0 = pxsim_Array__push(s.tmp_8, s.tmp_6); - case 9: r0 = undefined; return leave(s, r0) default: oops() } } } -tiles_TileMap_addEventListener__P169287.info = {"start":17616,"length":401,"line":557,"column":8,"endLine":564,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"addEventListener","argumentNames":["this","event","handler"]} +particles_ParticleSource_drawParticle__P172799.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 tiles_TileMap_addEventListener__P169287_mk(s) { +function particles_ParticleSource_drawParticle__P172799_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_addEventListener__P169287, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_drawParticle__P172799, depth: s.depth + 1, pc: 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, - eventHandler___186316: undefined, - unnamed830___U1: undefined, - unnamed831___U2: undefined, arg0: undefined, arg1: undefined, arg2: undefined, + arg3: undefined, } } -function tiles_TileMapEventHandler_constructor__P169261(s) { +function particles_ParticleFactory_drawParticle__P169717(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -41548,33 +42301,48 @@ 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, tiles_TileMapEventHandler__C169260_VT)) failedCast(r0); - r0 = (s.arg0).fields["event"] = (s.arg1); - r0 = (s.arg0).fields["callback"] = (s.arg2); + if (!checkSubtype(r0, particles_ParticleFactory__C169714_VT)) failedCast(r0); + s.tmp_0 = r0 = globals.screen___168559; + r0 = (s.arg2 + 128); + s.tmp_2 = r0; + r0 = (s.tmp_2 >> 8); + s.tmp_1 = r0; + r0 = (s.arg3 + 128); + s.tmp_4 = r0; + r0 = (s.tmp_4 >> 8); + s.tmp_3 = r0; + r0 = pxsim_ImageMethods.setPixel(s.tmp_0, s.tmp_1, s.tmp_3, 1); r0 = undefined; return leave(s, r0) default: oops() } } } -tiles_TileMapEventHandler_constructor__P169261.info = {"start":8593,"length":88,"line":289,"column":8,"endLine":289,"endColumn":96,"fileName":"pxt_modules/game/tilemap.ts","functionName":"inline","argumentNames":["this","event","callback"]} +particles_ParticleFactory_drawParticle__P169717.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 tiles_TileMapEventHandler_constructor__P169261_mk(s) { +function particles_ParticleFactory_drawParticle__P169717_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMapEventHandler_constructor__P169261, depth: s.depth + 1, + parent: s, fn: particles_ParticleFactory_drawParticle__P169717, depth: s.depth + 1, pc: 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 scene_Background_addLayer__P169201(s) { +function Sprite_height__P168925(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -41584,62 +42352,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.layer___186032 = 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_Background__C169196_VT)) failedCast(r0); - r0 = pxsim_pxtcore_mkClassInstance(scene_BackgroundLayer__C169206_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_BackgroundLayer_constructor__P169213_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = s.arg2; - s.tmp_1.arg2 = s.arg3; - s.tmp_1.arg3 = s.arg1; - s.callLocIdx = 1007; s.pc = 1; return s.tmp_1; - case 1: - r0 = s.retval; - s.layer___186032 = (s.tmp_0); - r0 = s.arg0.fields["_layers"]; + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + r0 = s.arg0.fields["_height"]; s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.layer___186032); - s.tmp_0 = helpers_arraySort__P166632_mk(s); - r0 = s.arg0.fields["_layers"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = scene_Background_addLayer_inline__P186046; - s.callLocIdx = 1008; s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; - r0 = s.layer___186032; - return leave(s, r0) + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -scene_Background_addLayer__P169201.info = {"start":509,"length":292,"line":26,"column":8,"endLine":31,"endColumn":9,"fileName":"pxt_modules/game/background.ts","functionName":"addLayer","argumentNames":["this","pic","distance","alignment"]} +Sprite_height__P168925.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__P168925.isGetter = true; -function scene_Background_addLayer__P169201_mk(s) { +function Sprite_height__P168925_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Background_addLayer__P169201, depth: s.depth + 1, + parent: s, fn: Sprite_height__P168925, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - layer___186032: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function scene_Background_addLayer_inline__P186046(s) { +function Sprite_y__P168884(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -41654,23 +42395,40 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg1.fields["distance"]; - s.tmp_0 = r0; - r0 = s.arg0.fields["distance"]; - s.tmp_1 = r0; - r0 = (s.tmp_0 - s.tmp_1); + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + s.tmp_0 = Sprite_top__P168931_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = r0 = s.arg1; + s.tmp_4 = Sprite_height__P168925_mk(s); + s.tmp_4.arg0 = s.arg0; + s.callLocIdx = 409; 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 = 410; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -scene_Background_addLayer_inline__P186046.info = {"start":730,"length":33,"line":29,"column":30,"endLine":29,"endColumn":63,"fileName":"pxt_modules/game/background.ts","functionName":"inline","argumentNames":["a","b"]} +Sprite_y__P168884.info = {"start":3081,"length":65,"line":126,"column":4,"endLine":128,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"y","argumentNames":["this","v"]} -function scene_Background_addLayer_inline__P186046_mk(s) { +function Sprite_y__P168884_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Background_addLayer_inline__P186046, depth: s.depth + 1, + parent: s, fn: Sprite_y__P168884, depth: s.depth + 1, pc: 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, } } @@ -41679,7 +42437,7 @@ function scene_Background_addLayer_inline__P186046_mk(s) { -function scene_BackgroundLayer_constructor__P169213(s) { +function Sprite_x__P168882(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -41692,80 +42450,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.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_BackgroundLayer__C169206_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = Math_max__P166657_mk(s); - s.tmp_2.arg0 = 1; - s.tmp_2.arg1 = s.arg1; - s.callLocIdx = 1011; s.pc = 7; return s.tmp_2; - case 7: + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + s.tmp_0 = Sprite_left__P168927_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = r0 = s.arg1; + s.tmp_4 = Sprite_width__P168924_mk(s); + s.tmp_4.arg0 = s.arg0; + s.callLocIdx = 404; s.pc = 2; return s.tmp_4; + case 2: 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; } + 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 = 405; s.pc = 1; return s.tmp_0; 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 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -scene_BackgroundLayer_constructor__P169213.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"]} +Sprite_x__P168882.info = {"start":2724,"length":65,"line":115,"column":4,"endLine":117,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"x","argumentNames":["this","v"]} -function scene_BackgroundLayer_constructor__P169213_mk(s) { +function Sprite_x__P168882_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_BackgroundLayer_constructor__P169213, depth: s.depth + 1, + parent: s, fn: Sprite_x__P168882, depth: s.depth + 1, pc: 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 controller___internal_initVibration__P174784(s) { +function Sprite_width__P168924(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -41779,38 +42508,23 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(globals.vibrationPin___174781); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + r0 = s.arg0.fields["_width"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = pxsim.pins.pinByCfg(76); - globals.vibrationPin___174781 = (r0); - case 1: - case 2: - globals.vibrationEnd___174782 = (-1); - s.tmp_0 = control_EventContext_registerFrameHandler__P166930_mk(s); - r0 = s.arg0.fields["eventContext"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = 20; - s.tmp_0.arg2 = controller___internal_updateVibration__P174783; - s.callLocIdx = 1932; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -controller___internal_initVibration__P174784.info = {"start":5979,"length":250,"line":177,"column":4,"endLine":182,"endColumn":5,"fileName":"pxt_modules/controller/controllerimpl.ts","functionName":"initVibration","argumentNames":["s"]} +Sprite_width__P168924.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__P168924.isGetter = true; -function controller___internal_initVibration__P174784_mk(s) { +function Sprite_width__P168924_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller___internal_initVibration__P174784, depth: s.depth + 1, + parent: s, fn: Sprite_width__P168924, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, arg0: undefined, } } @@ -41818,7 +42532,7 @@ function controller___internal_initVibration__P174784_mk(s) { -function controller___internal_updateVibration__P174783(s) { +function sprites_BaseSpriteSayRenderer_draw__P168788(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -41828,52 +42542,37 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = (globals.vibrationEnd___174782 > 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: - s.tmp_1 = r0 = globals.vibrationEnd___174782; - r0 = pxsim.control.millis(); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); - case 2: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 5; continue; } - r0 = pxsim_numops_toBoolDecr(globals.vibrationPin___174781); - if (!r0) { step = 3; continue; } - r0 = pxsim.DigitalInOutPinMethods.digitalWrite(globals.vibrationPin___174781, false); - case 3: - case 4: - globals.vibrationEnd___174782 = (-1); - case 5: - case 6: + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, sprites_BaseSpriteSayRenderer__C168786_VT)) failedCast(r0); r0 = undefined; return leave(s, r0) default: oops() } } } -controller___internal_updateVibration__P174783.info = {"start":5711,"length":262,"line":168,"column":4,"endLine":175,"endColumn":5,"fileName":"pxt_modules/controller/controllerimpl.ts","functionName":"updateVibration","argumentNames":[]} +sprites_BaseSpriteSayRenderer_draw__P168788.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 controller___internal_updateVibration__P174783_mk(s) { +function sprites_BaseSpriteSayRenderer_draw__P168788_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller___internal_updateVibration__P174783, depth: s.depth + 1, + parent: s, fn: sprites_BaseSpriteSayRenderer_draw__P168788, depth: s.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, } } -function controller_initController__P174772(s) { +function helpers_imageBlit__P168480(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -41885,36 +42584,114 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); + s.arg5 = (s.lambdaArgs[5]); + s.arg6 = (s.lambdaArgs[6]); + s.arg7 = (s.lambdaArgs[7]); + s.arg8 = (s.lambdaArgs[8]); + s.arg9 = (s.lambdaArgs[9]); + s.arg10 = (s.lambdaArgs[10]); + s.arg11 = (s.lambdaArgs[11]); s.lambdaArgs = null; } - s.tmp_0 = control_EventContext_registerFrameHandler__P166930_mk(s); - r0 = s.arg0.fields["eventContext"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = 13; - s.tmp_0.arg2 = controller_updateController__P174771; - s.callLocIdx = 1931; s.pc = 1; return s.tmp_0; + s.tmp_0 = r0 = globals._blitArgs___172095; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: - r0 = s.retval; - r0 = undefined; + r0 = pxsim_Array__mk(); + case 2: + // jmp value (already in r0) + s.tmp_1 = r0; + globals._blitArgs___172095 = (s.tmp_1); + s.tmp_0 = r0 = globals._blitArgs___172095; + 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___172095; + 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___172095; + 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___172095; + 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___172095; + 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___172095; + 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___172095; + 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___172095; + 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___172095, 8, s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.arg11); + if (!r0) { step = 5; continue; } + r0 = 1; + { step = 6; continue; } + case 5: + r0 = 0; + case 6: + // jmp value (already in r0) + s.tmp_0 = r0; + r0 = pxsim_Array_.setAt(globals._blitArgs___172095, 9, s.tmp_0); + r0 = pxsim_ImageMethods._blit(s.arg0, s.arg5, globals._blitArgs___172095); return leave(s, r0) default: oops() } } } -controller_initController__P174772.info = {"start":1764,"length":144,"line":54,"column":4,"endLine":56,"endColumn":5,"fileName":"pxt_modules/controller/state.ts","functionName":"initController","argumentNames":["s"]} +helpers_imageBlit__P168480.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 controller_initController__P174772_mk(s) { +function helpers_imageBlit__P168480_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_initController__P174772, depth: s.depth + 1, + parent: s, fn: helpers_imageBlit__P168480, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, + arg5: undefined, + arg6: undefined, + arg7: undefined, + arg8: undefined, + arg9: undefined, + arg10: undefined, + arg11: undefined, } } -function controller_updateController__P174771(s) { +function Math_roundWithPrecision__P166659(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -41924,361 +42701,83 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.state___188137 = undefined; - s.handler___188144 = undefined; - s.customHandler___188161 = undefined; - s.handler___188187 = undefined; - s.tmp_0 = controller_sceneState__P171637_mk(s); - s.callLocIdx = 1910; s.pc = 19; return s.tmp_0; - case 19: - r0 = s.retval; - s.state___188137 = (r0); - s.tmp_2 = if_lastGesture_1_mk(s); - s.tmp_2.arg0 = s.state___188137; - if (!s.tmp_2.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "lastGesture"); - } else { - s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["lastGesture"]; - if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["lastGesture"]; } - else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } - else { s.callLocIdx = 1911; s.pc = 20; return s.tmp_2; } + s.r___187639 = undefined; + s.d___187641 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; } - case 20: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_1 !== undefined); + r0 = (s.arg1 | 0); + s.arg1 = (r0); + r0 = (s.arg1 <= 0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - s.tmp_4 = if_gestureHandlers_1_mk(s); - s.tmp_4.arg0 = s.state___188137; - if (!s.tmp_4.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_4.arg0, "gestureHandlers"); - } else { - s.tmp_4.fn = s.tmp_4.arg0.vtable.iface["gestureHandlers"]; - if (s.tmp_4.fn == null) { s.retval = s.tmp_4.arg0.fields["gestureHandlers"]; } - else if (!s.tmp_4.fn.isGetter) { s.retval = bind(s.tmp_4); } - else { s.callLocIdx = 1912; s.pc = 21; return s.tmp_4; } - } - case 21: - r0 = s.retval; - s.tmp_3 = r0; - r0 = pxsim_numops_toBool(s.tmp_3); - if (r0) { step = 1; continue; } - r0 = s.tmp_3; - { step = 2; continue; } + if (!r0) { step = 1; continue; } + r0 = pxsim.Math_.round(s.arg0); + { step = 9; continue; } case 1: - s.tmp_6 = if_gestureHandlers_1_mk(s); - s.tmp_6.arg0 = s.state___188137; - if (!s.tmp_6.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_6.arg0, "gestureHandlers"); - } else { - s.tmp_6.fn = s.tmp_6.arg0.vtable.iface["gestureHandlers"]; - if (s.tmp_6.fn == null) { s.retval = s.tmp_6.arg0.fields["gestureHandlers"]; } - else if (!s.tmp_6.fn.isGetter) { s.retval = bind(s.tmp_6); } - else { s.callLocIdx = 1913; s.pc = 22; return s.tmp_6; } - } - case 22: - r0 = s.retval; - s.tmp_5 = r0; - s.tmp_8 = if_lastGesture_1_mk(s); - s.tmp_8.arg0 = s.state___188137; - if (!s.tmp_8.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_8.arg0, "lastGesture"); - } else { - s.tmp_8.fn = s.tmp_8.arg0.vtable.iface["lastGesture"]; - if (s.tmp_8.fn == null) { s.retval = s.tmp_8.arg0.fields["lastGesture"]; } - else if (!s.tmp_8.fn.isGetter) { s.retval = bind(s.tmp_8); } - else { s.callLocIdx = 1914; s.pc = 23; return s.tmp_8; } - } - case 23: - r0 = s.retval; - s.tmp_7 = r0; - r0 = pxsim_pxtrt.mapGetGeneric(s.tmp_5, s.tmp_7); case 2: - // jmp value (already in r0) - s.tmp_9 = r0; - s.handler___188144 = (s.tmp_9); - r0 = pxsim_numops_toBoolDecr(s.handler___188144); + r0 = (s.arg0 == 0); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); if (!r0) { step = 3; continue; } - s.tmp_0 = if_lastGesture_2_mk(s); - s.tmp_0.arg0 = s.state___188137; - s.tmp_0.arg1 = undefined; - if (!s.tmp_0.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapSetByString(s.tmp_0.arg0, "lastGesture", s.tmp_0.arg1); - } else { - s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["set/lastGesture"]; - if (s.tmp_0.fn === null) { s.tmp_0.arg0.fields["lastGesture"] = s.tmp_0.arg1; } - else if (s.tmp_0.fn === undefined) { failedCast(s.tmp_0.arg0) } - else { s.callLocIdx = 1915; s.pc = 24; return s.tmp_0; } - } - case 24: - r0 = s.retval; - s.tmp_0 = lambda_1_mk(s); - s.tmp_0.argL = s.handler___188144; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 1916; s.pc = 25; return s.tmp_0; - case 25: - r0 = s.retval; + r0 = 0; + { step = 9; continue; } case 3: case 4: + s.r___187639 = (0); case 5: - case 6: - s.tmp_2 = if_lastCustomGesture_1_mk(s); - s.tmp_2.arg0 = s.state___188137; - if (!s.tmp_2.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "lastCustomGesture"); - } else { - s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["lastCustomGesture"]; - if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["lastCustomGesture"]; } - else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } - else { s.callLocIdx = 1917; s.pc = 26; return s.tmp_2; } - } - case 26: - r0 = s.retval; + r0 = pxsim.Math_.pow(10, s.arg1); + s.d___187641 = (r0); + r0 = (s.arg0 * s.d___187641); s.tmp_1 = r0; - r0 = (s.tmp_1 !== undefined); + r0 = pxsim.Math_.round(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 11; continue; } - s.tmp_4 = if_customGestureHandlers_1_mk(s); - s.tmp_4.arg0 = s.state___188137; - if (!s.tmp_4.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_4.arg0, "customGestureHandlers"); - } else { - s.tmp_4.fn = s.tmp_4.arg0.vtable.iface["customGestureHandlers"]; - if (s.tmp_4.fn == null) { s.retval = s.tmp_4.arg0.fields["customGestureHandlers"]; } - else if (!s.tmp_4.fn.isGetter) { s.retval = bind(s.tmp_4); } - else { s.callLocIdx = 1918; s.pc = 27; return s.tmp_4; } - } - case 27: - r0 = s.retval; - 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: - s.tmp_6 = if_customGestureHandlers_1_mk(s); - s.tmp_6.arg0 = s.state___188137; - if (!s.tmp_6.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_6.arg0, "customGestureHandlers"); - } else { - s.tmp_6.fn = s.tmp_6.arg0.vtable.iface["customGestureHandlers"]; - if (s.tmp_6.fn == null) { s.retval = s.tmp_6.arg0.fields["customGestureHandlers"]; } - else if (!s.tmp_6.fn.isGetter) { s.retval = bind(s.tmp_6); } - else { s.callLocIdx = 1919; s.pc = 28; return s.tmp_6; } - } - case 28: - r0 = s.retval; - s.tmp_5 = r0; - s.tmp_8 = if_lastCustomGesture_1_mk(s); - s.tmp_8.arg0 = s.state___188137; - if (!s.tmp_8.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_8.arg0, "lastCustomGesture"); - } else { - s.tmp_8.fn = s.tmp_8.arg0.vtable.iface["lastCustomGesture"]; - if (s.tmp_8.fn == null) { s.retval = s.tmp_8.arg0.fields["lastCustomGesture"]; } - else if (!s.tmp_8.fn.isGetter) { s.retval = bind(s.tmp_8); } - else { s.callLocIdx = 1920; s.pc = 29; return s.tmp_8; } - } - case 29: - r0 = s.retval; - s.tmp_7 = r0; - r0 = pxsim_pxtrt.mapGetGeneric(s.tmp_5, s.tmp_7); - case 8: - // jmp value (already in r0) - s.tmp_9 = r0; - s.customHandler___188161 = (s.tmp_9); - r0 = pxsim_numops_toBoolDecr(s.customHandler___188161); - if (!r0) { step = 9; continue; } - s.tmp_0 = if_lastCustomGesture_2_mk(s); - s.tmp_0.arg0 = s.state___188137; - s.tmp_0.arg1 = undefined; - if (!s.tmp_0.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapSetByString(s.tmp_0.arg0, "lastCustomGesture", s.tmp_0.arg1); - } else { - s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["set/lastCustomGesture"]; - if (s.tmp_0.fn === null) { s.tmp_0.arg0.fields["lastCustomGesture"] = s.tmp_0.arg1; } - else if (s.tmp_0.fn === undefined) { failedCast(s.tmp_0.arg0) } - else { s.callLocIdx = 1921; s.pc = 30; return s.tmp_0; } - } - case 30: - r0 = s.retval; - s.tmp_0 = if_handler_1_mk(s); - s.tmp_0.arg0 = s.customHandler___188161; - if (!s.tmp_0.arg0.vtable.iface) { - setupLambda(s.tmp_0, pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "handler"), 1); - s.callLocIdx = 1922; s.pc = 31; 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"], 1); s.callLocIdx = 1922; s.pc = 31; return s.tmp_0; } - else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 1922; s.pc = 31; return s.tmp_0;; } - else { s.callLocIdx = 1922; s.pc = 31; return s.tmp_0; } - } - case 31: - r0 = s.retval; - case 9: - case 10: - case 11: - case 12: - s.tmp_1 = if_lightHandlers_1_mk(s); - s.tmp_1.arg0 = s.state___188137; - if (!s.tmp_1.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "lightHandlers"); - } else { - s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["lightHandlers"]; - if (s.tmp_1.fn == null) { s.retval = s.tmp_1.arg0.fields["lightHandlers"]; } - else if (!s.tmp_1.fn.isGetter) { s.retval = bind(s.tmp_1); } - else { s.callLocIdx = 1923; s.pc = 32; return s.tmp_1; } - } - case 32: - r0 = s.retval; + r0 = (s.tmp_0 / s.d___187641); + s.r___187639 = (r0); + r0 = (s.arg1 + 1); + s.arg1 = (r0); + r0 = (s.r___187639 == 0); s.tmp_0 = r0; r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 13; continue; } + if (r0) { step = 6; continue; } r0 = s.tmp_0; - { step = 14; continue; } - case 13: - s.tmp_3 = if_lastLightCondition_1_mk(s); - s.tmp_3.arg0 = s.state___188137; - if (!s.tmp_3.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "lastLightCondition"); - } else { - s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["lastLightCondition"]; - if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["lastLightCondition"]; } - else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } - else { s.callLocIdx = 1924; s.pc = 33; return s.tmp_3; } - } - case 33: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_2 !== undefined); - case 14: - // jmp value (already in r0) - s.tmp_4 = r0; - r0 = pxsim_numops_toBool(s.tmp_4); - if (r0) { step = 15; continue; } - r0 = s.tmp_4; - { step = 16; continue; } - case 15: - s.tmp_6 = if_lightHandlers_1_mk(s); - s.tmp_6.arg0 = s.state___188137; - if (!s.tmp_6.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_6.arg0, "lightHandlers"); - } else { - s.tmp_6.fn = s.tmp_6.arg0.vtable.iface["lightHandlers"]; - if (s.tmp_6.fn == null) { s.retval = s.tmp_6.arg0.fields["lightHandlers"]; } - else if (!s.tmp_6.fn.isGetter) { s.retval = bind(s.tmp_6); } - else { s.callLocIdx = 1925; s.pc = 34; return s.tmp_6; } - } - case 34: - r0 = s.retval; - s.tmp_5 = r0; - s.tmp_8 = if_lastLightCondition_1_mk(s); - s.tmp_8.arg0 = s.state___188137; - if (!s.tmp_8.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_8.arg0, "lastLightCondition"); - } else { - s.tmp_8.fn = s.tmp_8.arg0.vtable.iface["lastLightCondition"]; - if (s.tmp_8.fn == null) { s.retval = s.tmp_8.arg0.fields["lastLightCondition"]; } - else if (!s.tmp_8.fn.isGetter) { s.retval = bind(s.tmp_8); } - else { s.callLocIdx = 1926; s.pc = 35; return s.tmp_8; } - } - case 35: - r0 = s.retval; - s.tmp_7 = r0; - r0 = pxsim_pxtrt.mapGetGeneric(s.tmp_5, s.tmp_7); - case 16: + { step = 7; continue; } + case 6: + r0 = (s.arg1 < 21); + case 7: // jmp value (already in r0) - s.tmp_9 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_9); - if (!r0) { step = 17; continue; } - s.tmp_11 = if_lightHandlers_1_mk(s); - s.tmp_11.arg0 = s.state___188137; - if (!s.tmp_11.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_11.arg0, "lightHandlers"); - } else { - s.tmp_11.fn = s.tmp_11.arg0.vtable.iface["lightHandlers"]; - if (s.tmp_11.fn == null) { s.retval = s.tmp_11.arg0.fields["lightHandlers"]; } - else if (!s.tmp_11.fn.isGetter) { s.retval = bind(s.tmp_11); } - else { s.callLocIdx = 1927; s.pc = 36; return s.tmp_11; } - } - case 36: - r0 = s.retval; - s.tmp_10 = r0; - s.tmp_13 = if_lastLightCondition_1_mk(s); - s.tmp_13.arg0 = s.state___188137; - if (!s.tmp_13.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_13.arg0, "lastLightCondition"); - } else { - s.tmp_13.fn = s.tmp_13.arg0.vtable.iface["lastLightCondition"]; - if (s.tmp_13.fn == null) { s.retval = s.tmp_13.arg0.fields["lastLightCondition"]; } - else if (!s.tmp_13.fn.isGetter) { s.retval = bind(s.tmp_13); } - else { s.callLocIdx = 1928; s.pc = 37; return s.tmp_13; } - } - case 37: - r0 = s.retval; - s.tmp_12 = r0; - r0 = pxsim_pxtrt.mapGetGeneric(s.tmp_10, s.tmp_12); - s.handler___188187 = (r0); - s.tmp_0 = if_lastLightCondition_2_mk(s); - s.tmp_0.arg0 = s.state___188137; - s.tmp_0.arg1 = undefined; - if (!s.tmp_0.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapSetByString(s.tmp_0.arg0, "lastLightCondition", s.tmp_0.arg1); - } else { - s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["set/lastLightCondition"]; - if (s.tmp_0.fn === null) { s.tmp_0.arg0.fields["lastLightCondition"] = s.tmp_0.arg1; } - else if (s.tmp_0.fn === undefined) { failedCast(s.tmp_0.arg0) } - else { s.callLocIdx = 1929; s.pc = 38; return s.tmp_0; } - } - case 38: - r0 = s.retval; - s.tmp_0 = lambda_1_mk(s); - s.tmp_0.argL = s.handler___188187; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 1930; s.pc = 39; return s.tmp_0; - case 39: - r0 = s.retval; - case 17: - case 18: - r0 = undefined; + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 8; continue; } + { step = 5; continue; } + case 8: + r0 = s.r___187639; + case 9: return leave(s, r0) default: oops() } } } -controller_updateController__P174771.info = {"start":715,"length":1043,"line":26,"column":4,"endLine":52,"endColumn":5,"fileName":"pxt_modules/controller/state.ts","functionName":"updateController","argumentNames":[]} +Math_roundWithPrecision__P166659.info = {"start":17145,"length":411,"line":579,"column":4,"endLine":591,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"roundWithPrecision","argumentNames":["x","digits"]} -function controller_updateController__P174771_mk(s) { +function Math_roundWithPrecision__P166659_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_updateController__P174771, depth: s.depth + 1, + parent: s, fn: Math_roundWithPrecision__P166659, depth: s.depth + 1, pc: 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, - state___188137: undefined, - handler___188144: undefined, - customHandler___188161: undefined, - handler___188187: undefined, -} } - - + r___187639: undefined, + d___187641: undefined, + arg0: undefined, + arg1: undefined, +} } -function controller_sceneState__P171637(s) { + + +function Render_RayCastingRender_sprYFx8__P171766(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -42288,55 +42787,51 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sc___188197 = undefined; - s.state___188200 = undefined; - s.tmp_0 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1907; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.sc___188197 = (r0); - r0 = s.sc___188197.fields["_data"]; - s.tmp_0 = r0; - r0 = pxsim_pxtrt.mapGetGeneric(s.tmp_0, "controller.state"); - s.state___188200 = (r0); - r0 = pxsim_numops_toBoolDecr(s.state___188200); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); + r0 = s.arg1.fields["_y"]; 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.sc___188197.fields["_data"]; - s.tmp_2 = r0; - r0 = pxsim_pxtrt.mkMap(); + r0 = s.arg1.fields["_height"]; s.tmp_3 = r0; - r0 = pxsim_pxtrt.mapSetGeneric(s.tmp_2, "controller.state", s.tmp_3); - s.state___188200 = (s.tmp_3); - case 1: - case 2: - r0 = s.state___188200; + 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.arg0.fields["tilemapScaleSize"]; + s.tmp_5 = r0; + r0 = (s.tmp_0 / s.tmp_5); return leave(s, r0) default: oops() } } } -controller_sceneState__P171637.info = {"start":418,"length":290,"line":15,"column":4,"endLine":23,"endColumn":5,"fileName":"pxt_modules/controller/state.ts","functionName":"sceneState","argumentNames":[]} +Render_RayCastingRender_sprYFx8__P171766.info = {"start":3952,"length":139,"line":129,"column":8,"endLine":131,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"sprYFx8","argumentNames":["this","spr"]} -function controller_sceneState__P171637_mk(s) { +function Render_RayCastingRender_sprYFx8__P171766_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_sceneState__P171637, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_sprYFx8__P171766, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - sc___188197: undefined, - state___188200: undefined, + tmp_4: undefined, + tmp_5: undefined, + arg0: undefined, + arg1: undefined, } } -function scene_Scene_data__P169395(s) { +function Render_RayCastingRender_sprXFx8__P171765(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -42348,30 +42843,49 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_Scene__C169370_VT)) failedCast(r0); - r0 = s.arg0.fields["_data"]; - return leaveAccessor(s, r0) + if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); + r0 = s.arg1.fields["_x"]; + s.tmp_1 = r0; + r0 = s.arg1.fields["_width"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 << 8); + s.tmp_4 = r0; + r0 = pxsim.Math_.idiv(s.tmp_4, 512); + s.tmp_2 = r0; + r0 = (s.tmp_1 + s.tmp_2); + s.tmp_0 = r0; + r0 = s.arg0.fields["tilemapScaleSize"]; + s.tmp_5 = r0; + r0 = (s.tmp_0 / s.tmp_5); + return leave(s, r0) default: oops() } } } -scene_Scene_data__P169395.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__P169395.isGetter = true; +Render_RayCastingRender_sprXFx8__P171765.info = {"start":3804,"length":138,"line":125,"column":8,"endLine":127,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"sprXFx8","argumentNames":["this","spr"]} -function scene_Scene_data__P169395_mk(s) { +function Render_RayCastingRender_sprXFx8__P171765_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_data__P169395, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_sprXFx8__P171765, depth: s.depth + 1, pc: 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 StatusBarKind_create__P171203(s) { +function Render_RayCastingRender_yFpx__P171760(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -42381,35 +42895,52 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = (globals.nextKind___174654 === undefined); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); + r0 = s.arg0.fields["sprSelf"]; + r0 = r0.fields["_y"]; + s.tmp_1 = r0; + r0 = s.arg0.fields["sprSelf"]; + r0 = r0.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 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - globals.nextKind___174654 = (1); - case 1: - case 2: - s.tmp_0 = r0 = globals.nextKind___174654; - r0 = (s.tmp_0 + 1); - globals.nextKind___174654 = (r0); - r0 = s.tmp_0; - return leave(s, r0) + r0 = s.arg0.fields["tilemapScaleSize"]; + s.tmp_5 = r0; + r0 = (s.tmp_0 / s.tmp_5); + return leaveAccessor(s, r0) default: oops() } } } -StatusBarKind_create__P171203.info = {"start":1891,"length":109,"line":51,"column":4,"endLine":54,"endColumn":5,"fileName":"pxt_modules/pxt-status-bar/status-bar.ts","functionName":"create","argumentNames":[]} +Render_RayCastingRender_yFpx__P171760.info = {"start":3187,"length":155,"line":101,"column":8,"endLine":103,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"yFpx","argumentNames":["this"]} +Render_RayCastingRender_yFpx__P171760.isGetter = true; -function StatusBarKind_create__P171203_mk(s) { +function Render_RayCastingRender_yFpx__P171760_mk(s) { checkStack(s.depth); return { - parent: s, fn: StatusBarKind_create__P171203, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_yFpx__P171760, depth: s.depth + 1, pc: 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 music_Melody_constructor__P168156(s) { +function Render_RayCastingRender_xFpx__P171759(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -42421,32 +42952,50 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, music_Melody__C168153_VT)) failedCast(r0); - r0 = (s.arg0).fields["_text"] = (s.arg1); - r0 = undefined; - return leave(s, r0) + if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); + r0 = s.arg0.fields["sprSelf"]; + r0 = r0.fields["_x"]; + s.tmp_1 = r0; + r0 = s.arg0.fields["sprSelf"]; + r0 = r0.fields["_width"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 << 8); + s.tmp_4 = r0; + r0 = pxsim.Math_.idiv(s.tmp_4, 512); + s.tmp_2 = r0; + r0 = (s.tmp_1 + s.tmp_2); + s.tmp_0 = r0; + r0 = s.arg0.fields["tilemapScaleSize"]; + s.tmp_5 = r0; + r0 = (s.tmp_0 / s.tmp_5); + return leaveAccessor(s, r0) default: oops() } } } -music_Melody_constructor__P168156.info = {"start":6430,"length":67,"line":203,"column":8,"endLine":205,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"inline","argumentNames":["this","text"]} +Render_RayCastingRender_xFpx__P171759.info = {"start":2903,"length":154,"line":93,"column":8,"endLine":95,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"xFpx","argumentNames":["this"]} +Render_RayCastingRender_xFpx__P171759.isGetter = true; -function music_Melody_constructor__P168156_mk(s) { +function Render_RayCastingRender_xFpx__P171759_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_Melody_constructor__P168156, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_xFpx__P171759, depth: s.depth + 1, pc: 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 grid_move__P170877(s) { +function tiles_TileMapData_isWall__P169255(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -42456,93 +43005,31 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.loc___188233 = undefined; - s.c___188243 = undefined; - s.r___188247 = undefined; - s.newLoc___188251 = 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 = grid_getLocation__P170875_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1814; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.loc___188233 = (r0); - r0 = pxsim_numops_toBoolDecr(s.loc___188233); + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMapData__C169244_VT)) failedCast(r0); + r0 = s.arg0.fields["layers"]; s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = pxsim_ImageMethods.getPixel(s.tmp_1, s.arg1, s.arg2); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_2 = grid_snap__P170888_mk(s); - s.tmp_2.arg0 = s.arg0; - s.tmp_2.arg1 = false; - s.callLocIdx = 1815; s.pc = 4; return s.tmp_2; - case 4: - r0 = s.retval; - s.tmp_0 = grid_getLocation__P170875_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1816; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - s.loc___188233 = (r0); - case 1: - case 2: - s.tmp_0 = locCol__P170859_mk(s); - s.tmp_0.arg0 = s.loc___188233; - s.callLocIdx = 1817; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.c___188243 = (r0); - s.tmp_0 = locRow__P170858_mk(s); - s.tmp_0.arg0 = s.loc___188233; - s.callLocIdx = 1818; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - s.r___188247 = (r0); - s.tmp_0 = tiles_TileMap_getTile__P169276_mk(s); - s.tmp_1 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1819; s.pc = 9; return s.tmp_1; - case 9: - r0 = s.retval; - r0 = r0.fields["tileMap"]; - s.tmp_0.arg0 = r0; - r0 = (s.c___188243 + s.arg1); - s.tmp_0.arg1 = r0; - r0 = (s.r___188247 + s.arg2); - s.tmp_0.arg2 = r0; - s.callLocIdx = 1820; s.pc = 8; return s.tmp_0; - case 8: - r0 = s.retval; - s.newLoc___188251 = (r0); - s.tmp_0 = grid_place__P170873_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.newLoc___188251; - s.callLocIdx = 1821; s.pc = 10; return s.tmp_0; - case 10: - r0 = s.retval; - r0 = undefined; + r0 = (s.tmp_0 === 2); return leave(s, r0) default: oops() } } } -grid_move__P170877.info = {"start":4564,"length":388,"line":146,"column":4,"endLine":156,"endColumn":5,"fileName":"pxt_modules/Sprite Grid/grid.ts","functionName":"move","argumentNames":["sprite","columns","rows"]} +tiles_TileMapData_isWall__P169255.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 grid_move__P170877_mk(s) { +function tiles_TileMapData_isWall__P169255_mk(s) { checkStack(s.depth); return { - parent: s, fn: grid_move__P170877, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_isWall__P169255, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - loc___188233: undefined, - c___188243: undefined, - r___188247: undefined, - newLoc___188251: undefined, arg0: undefined, arg1: undefined, arg2: undefined, @@ -42552,7 +43039,7 @@ function grid_move__P170877_mk(s) { -function grid_snap__P170888(s) { +function helpers_imageBlitRow__P168481(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -42562,99 +43049,62 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.loc___188451 = 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 = tiles_getTileLocation__P169294_mk(s); - s.tmp_1 = grid_screenCoordinateToTile__P174533_mk(s); - s.tmp_2 = Sprite_x__P168881_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 1832; s.pc = 5; return s.tmp_2; - case 5: - r0 = s.retval; - s.tmp_1.arg0 = r0; - s.callLocIdx = 1833; s.pc = 4; return s.tmp_1; - case 4: - r0 = s.retval; - s.tmp_0.arg0 = r0; - s.tmp_3 = grid_screenCoordinateToTile__P174533_mk(s); - s.tmp_4 = Sprite_y__P168883_mk(s); - s.tmp_4.arg0 = s.arg0; - s.callLocIdx = 1834; s.pc = 7; return s.tmp_4; - case 7: - r0 = s.retval; - s.tmp_3.arg0 = r0; - s.callLocIdx = 1835; s.pc = 6; return s.tmp_3; - case 6: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1836; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.loc___188451 = (r0); - s.tmp_0 = grid_place__P170873_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.loc___188451; - s.callLocIdx = 1837; s.pc = 8; return s.tmp_0; - case 8: - r0 = s.retval; - r0 = pxsim_numops_toBoolDecr(s.arg1); - if (!r0) { step = 1; continue; } - s.tmp_0 = Sprite_ay__P168892_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 1838; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; - s.tmp_1 = Sprite_ax__P168890_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_1.arg1 = 0; - s.callLocIdx = 1839; s.pc = 10; return s.tmp_1; - case 10: - r0 = s.retval; - s.tmp_2 = Sprite_vy__P168888_mk(s); - s.tmp_2.arg0 = s.arg0; - s.tmp_2.arg1 = 0; - s.callLocIdx = 1840; s.pc = 11; return s.tmp_2; - case 11: - r0 = s.retval; - s.tmp_3 = Sprite_vx__P168886_mk(s); - s.tmp_3.arg0 = s.arg0; - s.tmp_3.arg1 = 0; - s.callLocIdx = 1841; s.pc = 12; return s.tmp_3; - case 12: - r0 = s.retval; + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = helpers_pack__P172094_mk(s); + s.tmp_2.arg0 = s.arg1; + s.tmp_2.arg1 = s.arg2; + s.callLocIdx = 146; s.pc = 1; return s.tmp_2; case 1: + r0 = s.retval; + s.tmp_1 = r0; + s.tmp_3 = r0 = s.arg3; + s.tmp_5 = helpers_pack__P172094_mk(s); + s.tmp_5.arg0 = s.arg4; + s.tmp_5.arg1 = s.arg5; + s.callLocIdx = 147; s.pc = 2; return s.tmp_5; case 2: + r0 = s.retval; + s.tmp_4 = r0; + r0 = pxsim_ImageMethods._blitRow(s.tmp_0, s.tmp_1, s.tmp_3, s.tmp_4); r0 = undefined; return leave(s, r0) default: oops() } } } -grid_snap__P170888.info = {"start":10046,"length":248,"line":311,"column":4,"endLine":317,"endColumn":5,"fileName":"pxt_modules/Sprite Grid/grid.ts","functionName":"snap","argumentNames":["s","stop"]} +helpers_imageBlitRow__P168481.info = {"start":5107,"length":191,"line":169,"column":4,"endLine":171,"endColumn":5,"fileName":"pxt_modules/screen/image.ts","functionName":"imageBlitRow","argumentNames":["img","dstX","dstY","from","fromX","fromH"]} -function grid_snap__P170888_mk(s) { +function helpers_imageBlitRow__P168481_mk(s) { checkStack(s.depth); return { - parent: s, fn: grid_snap__P170888, depth: s.depth + 1, + parent: s, fn: helpers_imageBlitRow__P168481, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, - loc___188451: undefined, + tmp_5: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, + arg5: undefined, } } -function grid_screenCoordinateToTile__P174533(s) { +function control_benchmark__P166874(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -42664,47 +43114,46 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tm___188473 = undefined; + s.t0___187925 = undefined; + s.t___187929 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1830; s.pc = 4; return s.tmp_0; - case 4: + r0 = pxsim.control.micros(); + s.t0___187925 = (r0); + s.tmp_0 = lambda_1_mk(s); + s.tmp_0.argL = s.arg0; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 37; s.pc = 3; return s.tmp_0; + case 3: r0 = s.retval; - r0 = r0.fields["tileMap"]; - s.tm___188473 = (r0); - r0 = pxsim_numops_toBoolDecr(s.tm___188473); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = pxsim.control.micros(); + s.tmp_0 = r0; + r0 = (s.tmp_0 - s.t0___187925); + s.t___187929 = (r0); + r0 = (s.t___187929 < 0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = (s.arg0 >> 4); - { step = 3; continue; } + r0 = (s.t___187929 + 1073741823); + s.t___187929 = (r0); case 1: case 2: - s.tmp_2 = r0 = s.arg0; - r0 = s.tm___188473.fields["_scale"]; - s.tmp_3 = r0; - r0 = (s.tmp_2 >> s.tmp_3); - case 3: + r0 = s.t___187929; return leave(s, r0) default: oops() } } } -grid_screenCoordinateToTile__P174533.info = {"start":9717,"length":172,"line":302,"column":4,"endLine":306,"endColumn":5,"fileName":"pxt_modules/Sprite Grid/grid.ts","functionName":"screenCoordinateToTile","argumentNames":["value"]} +control_benchmark__P166874.info = {"start":5020,"length":182,"line":170,"column":4,"endLine":177,"endColumn":5,"fileName":"pxt_modules/base/control.ts","functionName":"benchmark","argumentNames":["f"]} -function grid_screenCoordinateToTile__P174533_mk(s) { +function control_benchmark__P166874_mk(s) { checkStack(s.depth); return { - parent: s, fn: grid_screenCoordinateToTile__P174533, depth: s.depth + 1, + parent: s, fn: control_benchmark__P166874, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tm___188473: undefined, + t0___187925: undefined, + t___187929: undefined, arg0: undefined, } } @@ -42712,7 +43161,7 @@ function grid_screenCoordinateToTile__P174533_mk(s) { -function grid_getLocation__P170875(s) { +function Math_abs__P166655(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -42722,70 +43171,34 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.d___188486 = undefined; - s.r___188490 = undefined; - s.c___188494 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = Sprite_data__P168903_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1811; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.d___188486 = (r0); - r0 = pxsim_pxtrt.mapGetGeneric(s.d___188486, globals.DATA_ROW___170860); - s.r___188490 = (r0); - r0 = pxsim_pxtrt.mapGetGeneric(s.d___188486, globals.DATA_COL___170861); - s.c___188494 = (r0); - r0 = (s.r___188490 === undefined); + 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; + r0 = (0 - s.arg0); { step = 2; continue; } case 1: - r0 = (s.c___188494 === undefined); + r0 = s.arg0; case 2: // jmp value (already in r0) s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 3; continue; } - r0 = null; - { step = 5; continue; } - case 3: - case 4: - s.tmp_2 = tiles_TileMap_getTile__P169276_mk(s); - s.tmp_3 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1812; s.pc = 8; return s.tmp_3; - case 8: - r0 = s.retval; - r0 = r0.fields["tileMap"]; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = s.c___188494; - s.tmp_2.arg2 = s.r___188490; - s.callLocIdx = 1813; s.pc = 7; return s.tmp_2; - case 7: - r0 = s.retval; - case 5: + r0 = s.tmp_1; return leave(s, r0) default: oops() } } } -grid_getLocation__P170875.info = {"start":3725,"length":386,"line":126,"column":4,"endLine":134,"endColumn":5,"fileName":"pxt_modules/Sprite Grid/grid.ts","functionName":"getLocation","argumentNames":["sprite"]} +Math_abs__P166655.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 grid_getLocation__P170875_mk(s) { +function Math_abs__P166655_mk(s) { checkStack(s.depth); return { - parent: s, fn: grid_getLocation__P170875, depth: s.depth + 1, + parent: s, fn: Math_abs__P166655, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - d___188486: undefined, - r___188490: undefined, - c___188494: undefined, arg0: undefined, } } @@ -42793,7 +43206,7 @@ function grid_getLocation__P170875_mk(s) { -function Sprite_data__P168903(s) { +function scene_Renderable___drawCore__P169330(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -42805,49 +43218,47 @@ 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__C168868_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); + if (!checkSubtype(r0, scene_Renderable__C169327_VT)) failedCast(r0); + s.tmp_0 = if_handler_3_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = globals.screen___168559; + 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); + s.callLocIdx = 1132; 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 = 1132; s.pc = 1; return s.tmp_0; } + else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 1132; s.pc = 1; return s.tmp_0;; } + else { s.callLocIdx = 1132; s.pc = 1; return s.tmp_0; } + } case 1: - case 2: - r0 = s.arg0.fields["_data"]; - return leaveAccessor(s, r0) + r0 = s.retval; + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_data__P168903.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__P168903.isGetter = true; +scene_Renderable___drawCore__P169330.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 Sprite_data__P168903_mk(s) { +function scene_Renderable___drawCore__P169330_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_data__P168903, depth: s.depth + 1, + parent: s, fn: scene_Renderable___drawCore__P169330, depth: s.depth + 1, pc: 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 grid_place__P170873(s) { +function tiles_TileMap_data__P169267(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -42859,42 +43270,30 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = grid_Grid_place__P170868_mk(s); - s.tmp_1 = grid_currentGrid__P174496_mk(s); - s.callLocIdx = 1809; 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.callLocIdx = 1810; 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_TileMap__C169262_VT)) failedCast(r0); + r0 = s.arg0.fields["_map"]; + return leaveAccessor(s, r0) default: oops() } } } -grid_place__P170873.info = {"start":3264,"length":108,"line":111,"column":4,"endLine":113,"endColumn":5,"fileName":"pxt_modules/Sprite Grid/grid.ts","functionName":"place","argumentNames":["sprite","loc"]} +tiles_TileMap_data__P169267.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__P169267.isGetter = true; -function grid_place__P170873_mk(s) { +function tiles_TileMap_data__P169267_mk(s) { checkStack(s.depth); return { - parent: s, fn: grid_place__P170873, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_data__P169267, 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 grid_currentGrid__P174496(s) { +function tiles_TileMapData_getTileset__P169252(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -42904,62 +43303,31 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tm___188274 = undefined; - r0 = pxsim_numops_toBoolDecr(globals._currentGrid___174495); - 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_2 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1807; s.pc = 5; return s.tmp_2; - case 5: - r0 = s.retval; - r0 = r0.fields["tileMap"]; - s.tm___188274 = (r0); - r0 = pxsim_numops_toBoolDecr(s.tm___188274); - 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.throwValue("Cannot use sprite grid; no tilemap has been set"); - case 1: - case 2: - r0 = pxsim_pxtcore_mkClassInstance(grid_Grid__C170863_VT); - s.tmp_2 = r0; - s.tmp_3 = grid_Grid_constructor__P170867_mk(s); - s.tmp_3.arg0 = s.tmp_2; - s.tmp_3.arg1 = s.tm___188274; - s.callLocIdx = 1808; s.pc = 6; return s.tmp_3; - case 6: - r0 = s.retval; - globals._currentGrid___174495 = (s.tmp_2); - case 3: - case 4: - r0 = globals._currentGrid___174495; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMapData__C169244_VT)) failedCast(r0); + r0 = s.arg0.fields["tileset"]; return leave(s, r0) default: oops() } } } -grid_currentGrid__P174496.info = {"start":2546,"length":289,"line":87,"column":4,"endLine":95,"endColumn":5,"fileName":"pxt_modules/Sprite Grid/grid.ts","functionName":"currentGrid","argumentNames":[]} +tiles_TileMapData_getTileset__P169252.info = {"start":7287,"length":57,"line":247,"column":8,"endLine":249,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTileset","argumentNames":["this"]} -function grid_currentGrid__P174496_mk(s) { +function tiles_TileMapData_getTileset__P169252_mk(s) { checkStack(s.depth); return { - parent: s, fn: grid_currentGrid__P174496, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_getTileset__P169252, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tm___188274: undefined, + arg0: undefined, } } -function grid_Grid_constructor__P170867(s) { +function Sprite___update__P168943(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -42969,87 +43337,117 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.x___188306 = 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, grid_Grid__C170863_VT)) failedCast(r0); - r0 = (s.arg0).fields["tm"] = (s.arg1); - s.tmp_0 = r0 = s.arg0; - s.tmp_3 = tiles_TileMap_areaWidth__P169270_mk(s); - s.tmp_3.arg0 = s.arg1; - s.callLocIdx = 1797; s.pc = 3; return s.tmp_3; - case 3: - r0 = s.retval; - s.tmp_2 = r0; - r0 = s.arg1.fields["_scale"]; - s.tmp_4 = r0; - r0 = (s.tmp_2 >> s.tmp_4); + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + r0 = s.arg0.fields["lifespan"]; s.tmp_1 = r0; - r0 = (s.tmp_0).fields["columns"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - s.tmp_3 = tiles_TileMap_areaHeight__P169271_mk(s); - s.tmp_3.arg0 = s.arg1; - s.callLocIdx = 1799; s.pc = 4; return s.tmp_3; - case 4: - r0 = s.retval; - s.tmp_2 = r0; - r0 = s.arg1.fields["_scale"]; + r0 = (s.tmp_1 !== undefined); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + s.tmp_2 = r0 = s.arg0; + r0 = s.tmp_2.fields["lifespan"]; s.tmp_4 = r0; - r0 = (s.tmp_2 >> s.tmp_4); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["rows"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); + r0 = (s.arg2 * 1000); + s.tmp_5 = r0; + r0 = (s.tmp_4 - s.tmp_5); + s.tmp_3 = r0; + r0 = (s.tmp_2).fields["lifespan"] = (s.tmp_3); + r0 = s.arg0.fields["lifespan"]; s.tmp_1 = r0; - r0 = (s.tmp_0).fields["sprites"] = (s.tmp_1); - s.x___188306 = (0); + r0 = (s.tmp_1 <= 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = (s.arg0).fields["lifespan"] = (undefined); + s.tmp_0 = Sprite__destroyCore__P168956_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 484; s.pc = 11; return s.tmp_0; + case 11: + r0 = s.retval; case 1: - r0 = s.arg0.fields["columns"]; + case 2: + case 3: + case 4: + r0 = s.arg0.fields["flags"]; s.tmp_1 = r0; - r0 = (s.x___188306 < s.tmp_1); + r0 = (s.tmp_1 & 4); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 5; continue; } + r0 = s.tmp_0; + { step = 6; continue; } + case 5: + s.tmp_2 = Sprite_isOutOfScreen__P168941_mk(s); + s.tmp_2.arg0 = s.arg0; + s.tmp_2.arg1 = s.arg1; + s.callLocIdx = 485; s.pc = 12; return s.tmp_2; + case 12: + r0 = s.retval; + case 6: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 7; continue; } + s.tmp_4 = Sprite_destroy__P168955_mk(s); + s.tmp_4.arg0 = s.arg0; + s.tmp_4.arg1 = undefined; + s.tmp_4.arg2 = undefined; + s.callLocIdx = 486; s.pc = 13; return s.tmp_4; + case 13: + r0 = s.retval; + case 7: + case 8: + r0 = s.arg0.fields["sayRenderer"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - r0 = s.arg0.fields["sprites"]; - s.tmp_2 = r0; - s.tmp_3 = r0 = s.x___188306; - r0 = pxsim_Array__mk(); - s.tmp_4 = r0; - r0 = pxsim_Array_.setAt(s.tmp_2, s.tmp_3, s.tmp_4); - r0 = (s.x___188306 + 1); - s.x___188306 = (r0); - { step = 1; continue; } - case 2: + if (!r0) { step = 9; continue; } + s.tmp_1 = sprites_BaseSpriteSayRenderer__C168786_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__C168786_VT)) failedCast(s.tmp_1.arg0); + s.tmp_1.fn = s.tmp_1.arg0.vtable.methods.update; + s.pc = 14; return s.tmp_1; + case 14: + r0 = s.retval; + case 9: + case 10: r0 = undefined; return leave(s, r0) default: oops() } } } -grid_Grid_constructor__P170867.info = {"start":484,"length":295,"line":20,"column":8,"endLine":28,"endColumn":9,"fileName":"pxt_modules/Sprite Grid/grid.ts","functionName":"inline","argumentNames":["this","tm"]} +Sprite___update__P168943.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 grid_Grid_constructor__P170867_mk(s) { +function Sprite___update__P168943_mk(s) { checkStack(s.depth); return { - parent: s, fn: grid_Grid_constructor__P170867, depth: s.depth + 1, + parent: s, fn: Sprite___update__P168943, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, - x___188306: undefined, + tmp_5: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function grid_Grid_place__P170868(s) { +function Sprite_isOutOfScreen__P168941(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -43059,134 +43457,118 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.x___188326 = undefined; - s.y___188337 = undefined; - s.d___188372 = undefined; + s.ox___188018 = undefined; + s.oy___188026 = 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, grid_Grid__C170863_VT)) failedCast(r0); - r0 = s.arg1.fields["flags"]; + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + r0 = s.arg0.fields["flags"]; s.tmp_1 = r0; - r0 = (s.tmp_1 & 2); + r0 = (s.tmp_1 & 512); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - { step = 13; continue; } + r0 = 0; + { step = 2; continue; } case 1: + r0 = s.arg1.fields["drawOffsetX"]; case 2: - s.tmp_2 = locCol__P170859_mk(s); - s.tmp_2.arg0 = s.arg2; - s.callLocIdx = 1801; s.pc = 14; return s.tmp_2; - case 14: - r0 = s.retval; - s.x___188326 = (r0); - r0 = (s.x___188326 < 0); + // jmp value (already in r0) + s.tmp_2 = r0; + s.ox___188018 = (s.tmp_2); + r0 = s.arg0.fields["flags"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 & 512); s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 3; continue; } - r0 = s.tmp_0; + r0 = 0; { step = 4; continue; } case 3: - r0 = s.arg0.fields["columns"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 <= s.x___188326); + r0 = s.arg1.fields["drawOffsetY"]; case 4: // jmp value (already in r0) s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 5; continue; } - { step = 13; continue; } - case 5: - case 6: - s.tmp_3 = locRow__P170858_mk(s); - s.tmp_3.arg0 = s.arg2; - s.callLocIdx = 1802; s.pc = 15; return s.tmp_3; - case 15: + s.oy___188026 = (s.tmp_2); + s.tmp_3 = Sprite_right__P168928_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 475; s.pc = 11; return s.tmp_3; + case 11: r0 = s.retval; - s.y___188337 = (r0); - r0 = (s.y___188337 < 0); + s.tmp_2 = r0; + r0 = (s.tmp_2 - s.ox___188018); + s.tmp_1 = r0; + r0 = (s.tmp_1 < 0); s.tmp_0 = r0; r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 7; continue; } + if (!r0) { step = 5; continue; } r0 = s.tmp_0; + { step = 6; continue; } + case 5: + s.tmp_6 = Sprite_bottom__P168932_mk(s); + s.tmp_6.arg0 = s.arg0; + s.callLocIdx = 476; s.pc = 12; return s.tmp_6; + case 12: + r0 = s.retval; + s.tmp_5 = r0; + r0 = (s.tmp_5 - s.oy___188026); + s.tmp_4 = r0; + r0 = (s.tmp_4 < 0); + case 6: + // jmp value (already in r0) + s.tmp_7 = r0; + r0 = pxsim_numops_toBool(s.tmp_7); + if (!r0) { step = 7; continue; } + r0 = s.tmp_7; { step = 8; continue; } case 7: - r0 = s.arg0.fields["rows"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 <= s.y___188337); + s.tmp_10 = Sprite_left__P168926_mk(s); + s.tmp_10.arg0 = s.arg0; + s.callLocIdx = 477; s.pc = 13; return s.tmp_10; + case 13: + r0 = s.retval; + s.tmp_9 = r0; + r0 = (s.tmp_9 - s.ox___188018); + s.tmp_8 = r0; + r0 = pxsim_ImageMethods.width(globals.screen___168559); + s.tmp_11 = r0; + r0 = (s.tmp_8 > s.tmp_11); case 8: // jmp value (already in r0) - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_12 = r0; + r0 = pxsim_numops_toBool(s.tmp_12); if (!r0) { step = 9; continue; } - { step = 13; continue; } + r0 = s.tmp_12; + { step = 10; continue; } case 9: - case 10: - s.tmp_3 = grid_Grid_remove__P170869_mk(s); - s.tmp_3.arg0 = s.arg0; - s.tmp_3.arg1 = s.arg1; - s.callLocIdx = 1803; s.pc = 16; return s.tmp_3; - case 16: - r0 = s.retval; - r0 = s.arg0.fields["sprites"]; - s.tmp_4 = r0; - r0 = pxsim_Array__getAt(s.tmp_4, s.x___188326); - s.tmp_3 = r0; - r0 = pxsim_Array__getAt(s.tmp_3, s.y___188337); - 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 = s.arg0.fields["sprites"]; - s.tmp_6 = r0; - r0 = pxsim_Array__getAt(s.tmp_6, s.x___188326); - s.tmp_5 = r0; - s.tmp_7 = r0 = s.y___188337; - r0 = pxsim_Array__mk(); - s.tmp_8 = r0; - r0 = pxsim_Array_.setAt(s.tmp_5, s.tmp_7, s.tmp_8); - case 11: - case 12: - r0 = s.arg0.fields["sprites"]; - s.tmp_2 = r0; - r0 = pxsim_Array__getAt(s.tmp_2, s.x___188326); - s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_1, s.y___188337); - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.arg1); - s.tmp_0 = Sprite_data__P168903_mk(s); - s.tmp_0.arg0 = s.arg1; - s.callLocIdx = 1804; s.pc = 17; return s.tmp_0; - case 17: - r0 = s.retval; - s.d___188372 = (r0); - r0 = pxsim_pxtrt.mapSetGeneric(s.d___188372, globals.DATA_COL___170861, s.x___188326); - r0 = pxsim_pxtrt.mapSetGeneric(s.d___188372, globals.DATA_ROW___170860, s.y___188337); - s.tmp_0 = tiles_Location_place__P169236_mk(s); - s.tmp_0.arg0 = s.arg2; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 1805; s.pc = 18; return s.tmp_0; - case 18: + s.tmp_15 = Sprite_top__P168930_mk(s); + s.tmp_15.arg0 = s.arg0; + s.callLocIdx = 478; s.pc = 14; return s.tmp_15; + case 14: r0 = s.retval; - case 13: - r0 = undefined; + s.tmp_14 = r0; + r0 = (s.tmp_14 - s.oy___188026); + s.tmp_13 = r0; + r0 = pxsim_ImageMethods.height(globals.screen___168559); + s.tmp_16 = r0; + r0 = (s.tmp_13 > s.tmp_16); + case 10: + // jmp value (already in r0) + s.tmp_17 = r0; + r0 = s.tmp_17; return leave(s, r0) default: oops() } } } -grid_Grid_place__P170868.info = {"start":789,"length":614,"line":30,"column":8,"endLine":47,"endColumn":9,"fileName":"pxt_modules/Sprite Grid/grid.ts","functionName":"place","argumentNames":["this","sprite","loc"]} +Sprite_isOutOfScreen__P168941.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 grid_Grid_place__P170868_mk(s) { +function Sprite_isOutOfScreen__P168941_mk(s) { checkStack(s.depth); return { - parent: s, fn: grid_Grid_place__P170868, depth: s.depth + 1, + parent: s, fn: Sprite_isOutOfScreen__P168941, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -43197,19 +43579,26 @@ function grid_Grid_place__P170868_mk(s) { tmp_6: undefined, tmp_7: undefined, tmp_8: undefined, - x___188326: undefined, - y___188337: undefined, - d___188372: undefined, + tmp_9: undefined, + tmp_10: undefined, + tmp_11: undefined, + tmp_12: undefined, + tmp_13: undefined, + tmp_14: undefined, + tmp_15: undefined, + tmp_16: undefined, + tmp_17: undefined, + ox___188018: undefined, + oy___188026: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function grid_Grid_remove__P170869(s) { +function Sprite_bottom__P168932(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -43219,93 +43608,48 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.d___188402 = undefined; - s.c___188406 = undefined; - s.r___188410 = undefined; - s.spriteList___188429 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, grid_Grid__C170863_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(s.arg1); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 9; continue; } + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + s.tmp_1 = Sprite_top__P168930_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 461; s.pc = 1; return s.tmp_1; case 1: - case 2: - s.tmp_2 = Sprite_data__P168903_mk(s); - s.tmp_2.arg0 = s.arg1; - s.callLocIdx = 1806; s.pc = 10; return s.tmp_2; - case 10: r0 = s.retval; - s.d___188402 = (r0); - r0 = pxsim_pxtrt.mapGetGeneric(s.d___188402, globals.DATA_COL___170861); - s.c___188406 = (r0); - r0 = pxsim_pxtrt.mapGetGeneric(s.d___188402, globals.DATA_ROW___170860); - s.r___188410 = (r0); - r0 = (s.c___188406 === undefined); - 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.r___188410 === undefined); - case 4: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 5; continue; } - { step = 9; continue; } - case 5: - case 6: - r0 = pxsim_pxtrt.mapSetGeneric(s.d___188402, globals.DATA_COL___170861, undefined); - r0 = pxsim_pxtrt.mapSetGeneric(s.d___188402, globals.DATA_ROW___170860, undefined); - r0 = s.arg0.fields["sprites"]; - s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_1, s.c___188406); s.tmp_0 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.r___188410); - s.spriteList___188429 = (r0); - r0 = pxsim_numops_toBoolDecr(s.spriteList___188429); - if (!r0) { step = 7; continue; } - r0 = pxsim_Array_.removeElement(s.spriteList___188429, s.arg1); - case 7: - case 8: - case 9: - r0 = undefined; - return leave(s, r0) + s.tmp_3 = Sprite_height__P168925_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 462; s.pc = 2; return s.tmp_3; + case 2: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_0 + s.tmp_2); + return leaveAccessor(s, r0) default: oops() } } } -grid_Grid_remove__P170869.info = {"start":1413,"length":599,"line":49,"column":8,"endLine":67,"endColumn":9,"fileName":"pxt_modules/Sprite Grid/grid.ts","functionName":"remove","argumentNames":["this","sprite"]} +Sprite_bottom__P168932.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__P168932.isGetter = true; -function grid_Grid_remove__P170869_mk(s) { +function Sprite_bottom__P168932_mk(s) { checkStack(s.depth); return { - parent: s, fn: grid_Grid_remove__P170869, depth: s.depth + 1, + parent: s, fn: Sprite_bottom__P168932, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - d___188402: undefined, - c___188406: undefined, - r___188410: undefined, - spriteList___188429: undefined, + tmp_3: undefined, arg0: undefined, - arg1: undefined, } } -function locCol__P170859(s) { +function Sprite_right__P168928(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -43319,29 +43663,36 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = if__col_1_mk(s); - s.tmp_0.arg0 = s.arg0; - if (!s.tmp_0.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "_col"); - } else { - s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["_col"]; - if (s.tmp_0.fn == null) { s.retval = s.tmp_0.arg0.fields["_col"]; } - else if (!s.tmp_0.fn.isGetter) { s.retval = bind(s.tmp_0); } - else { s.callLocIdx = 1796; s.pc = 1; return s.tmp_0; } - } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + s.tmp_1 = Sprite_left__P168926_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 453; s.pc = 1; return s.tmp_1; case 1: r0 = s.retval; - return leave(s, r0) + s.tmp_0 = r0; + s.tmp_3 = Sprite_width__P168924_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 454; s.pc = 2; return s.tmp_3; + case 2: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_0 + s.tmp_2); + return leaveAccessor(s, r0) default: oops() } } } -locCol__P170859.info = {"start":74,"length":73,"line":3,"column":0,"endLine":5,"endColumn":1,"fileName":"pxt_modules/Sprite Grid/grid.ts","functionName":"locCol","argumentNames":["l"]} +Sprite_right__P168928.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__P168928.isGetter = true; -function locCol__P170859_mk(s) { +function Sprite_right__P168928_mk(s) { checkStack(s.depth); return { - parent: s, fn: locCol__P170859, depth: s.depth + 1, + parent: s, fn: Sprite_right__P168928, depth: s.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, } } @@ -43349,7 +43700,7 @@ function locCol__P170859_mk(s) { -function locRow__P170858(s) { +function sprites_BaseSpriteSayRenderer_update__P168789(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -43361,39 +43712,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; } - s.tmp_0 = if__row_1_mk(s); - s.tmp_0.arg0 = s.arg0; - if (!s.tmp_0.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "_row"); - } else { - s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["_row"]; - if (s.tmp_0.fn == null) { s.retval = s.tmp_0.arg0.fields["_row"]; } - else if (!s.tmp_0.fn.isGetter) { s.retval = bind(s.tmp_0); } - else { s.callLocIdx = 1795; s.pc = 1; return s.tmp_0; } - } - case 1: - r0 = s.retval; + r0 = s.arg0; + if (!checkSubtype(r0, sprites_BaseSpriteSayRenderer__C168786_VT)) failedCast(r0); + r0 = undefined; return leave(s, r0) default: oops() } } } -locRow__P170858.info = {"start":0,"length":73,"line":0,"column":0,"endLine":2,"endColumn":1,"fileName":"pxt_modules/Sprite Grid/grid.ts","functionName":"locRow","argumentNames":["l"]} +sprites_BaseSpriteSayRenderer_update__P168789.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 locRow__P170858_mk(s) { +function sprites_BaseSpriteSayRenderer_update__P168789_mk(s) { checkStack(s.depth); return { - parent: s, fn: locRow__P170858, depth: s.depth + 1, + parent: s, fn: sprites_BaseSpriteSayRenderer_update__P168789, 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 controller_Button_onEvent__P168723(s) { +function sprites_BaseSprite___draw__P168627(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -43403,46 +43750,56 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.eventHandler___188518 = 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__C168716_VT)) failedCast(r0); - s.tmp_0 = controller_Button_getOrCreateHandlerForEvent__P172246_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 300; s.pc = 1; return s.tmp_0; - case 1: + if (!checkSubtype(r0, sprites_BaseSprite__C168621_VT)) failedCast(r0); + s.tmp_1 = sprites_BaseSprite__C168621_v0_1_mk(s); + s.tmp_1.arg0 = s.arg0; + if (!checkSubtype(s.tmp_1.arg0, sprites_BaseSprite__C168621_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.eventHandler___188518 = (r0); - r0 = (s.eventHandler___188518).fields["callback"] = (s.arg2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_2 = sprites_BaseSprite__C168621_v2_2_mk(s); + s.tmp_2.arg0 = s.arg0; + s.tmp_2.arg1 = s.arg1; + if (!checkSubtype(s.tmp_2.arg0, sprites_BaseSprite__C168621_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() } } } -controller_Button_onEvent__P168723.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"]} +sprites_BaseSprite___draw__P168627.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 controller_Button_onEvent__P168723_mk(s) { +function sprites_BaseSprite___draw__P168627_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_onEvent__P168723, depth: s.depth + 1, + parent: s, fn: sprites_BaseSprite___draw__P168627, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - eventHandler___188518: undefined, + tmp_1: undefined, + tmp_2: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function controller_Button_getOrCreateHandlerForEvent__P172246(s) { +function sprites_BaseSprite___drawCore__P168628(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -43452,146 +43809,24 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.handlerState___188539 = undefined; - s.eventHandler___188548 = undefined; - s.unnamed806___U2 = undefined; - s.unnamed807___U3 = undefined; - s.newHandler___188564 = 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__C168716_VT)) failedCast(r0); - s.tmp_3 = controller_Button_handlerState__P172241_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 310; 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__C168712_VT); - s.tmp_4 = r0; - s.tmp_5 = controller_ButtonEventHandlerState_constructor__P168713_mk(s); - s.tmp_5.arg0 = s.tmp_4; - r0 = s.arg0.fields["id"]; - s.tmp_5.arg1 = r0; - s.callLocIdx = 312; s.pc = 11; return s.tmp_5; - case 11: - r0 = s.retval; - s.tmp_7 = game_currentScene__P169526_mk(s); - s.callLocIdx = 311; 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__P172241_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 313; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; - s.handlerState___188539 = (r0); - r0 = s.handlerState___188539.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___188539; - r0 = pxsim_Array__mk(); - s.tmp_4 = r0; - r0 = (s.tmp_3).fields["user"] = (s.tmp_4); - case 3: - case 4: - s.eventHandler___188548 = (undefined); - r0 = s.handlerState___188539.fields["user"]; - s.unnamed806___U2 = (r0); - s.unnamed807___U3 = (0); - case 5: - s.tmp_0 = r0 = s.unnamed807___U3; - r0 = pxsim_Array__length(s.unnamed806___U2); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 8; continue; } - r0 = pxsim_Array__getAt(s.unnamed806___U2, s.unnamed807___U3); - s.eventHandler___188548 = (r0); - r0 = s.eventHandler___188548.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___188548; - { step = 9; continue; } - case 6: - case 7: - r0 = (s.unnamed807___U3 + 1); - s.unnamed807___U3 = (r0); - { step = 5; continue; } - case 8: - s.unnamed806___U2 = (undefined); - r0 = pxsim_pxtcore_mkAction(2, controller_Button_getOrCreateHandlerForEvent_inline__P188561); - 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__P166918_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 = 315; s.pc = 14; return s.tmp_5; - case 14: - r0 = s.retval; - r0 = pxsim_pxtcore_mkClassInstance(controller_ButtonHandler__C168710_VT); - s.tmp_0 = r0; - s.tmp_1 = controller_ButtonHandler_constructor__P168711_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = s.arg1; - s.tmp_1.arg2 = undefined; - s.callLocIdx = 316; s.pc = 15; return s.tmp_1; - case 15: - r0 = s.retval; - s.newHandler___188564 = (s.tmp_0); - r0 = s.handlerState___188539.fields["user"]; - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.newHandler___188564); - r0 = s.newHandler___188564; - case 9: + if (!checkSubtype(r0, sprites_BaseSprite__C168621_VT)) failedCast(r0); + r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Button_getOrCreateHandlerForEvent__P172246.info = {"start":8550,"length":829,"line":250,"column":8,"endLine":270,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"getOrCreateHandlerForEvent","argumentNames":["this","event"]} +sprites_BaseSprite___drawCore__P168628.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 controller_Button_getOrCreateHandlerForEvent__P172246_mk(s) { +function sprites_BaseSprite___drawCore__P168628_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_getOrCreateHandlerForEvent__P172246, depth: s.depth + 1, + parent: s, fn: sprites_BaseSprite___drawCore__P168628, depth: s.depth + 1, pc: 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___188539: undefined, - eventHandler___188548: undefined, - unnamed806___U2: undefined, - unnamed807___U3: undefined, - newHandler___188564: undefined, arg0: undefined, arg1: undefined, } } @@ -43600,7 +43835,7 @@ function controller_Button_getOrCreateHandlerForEvent__P172246_mk(s) { -function controller_Button_getOrCreateHandlerForEvent_inline__P188561(s) { +function sprites_BaseSprite___visible__P168624(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -43610,31 +43845,31 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = controller_Button_runButtonEvents__P172245_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_0.arg1 = s.caps[1]; - s.callLocIdx = 314; 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; + if (!checkSubtype(r0, sprites_BaseSprite__C168621_VT)) failedCast(r0); + r0 = true; return leave(s, r0) default: oops() } } } -controller_Button_getOrCreateHandlerForEvent_inline__P188561.info = {"start":9186,"length":33,"line":265,"column":44,"endLine":265,"endColumn":77,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"inline","argumentNames":[]} +sprites_BaseSprite___visible__P168624.info = {"start":524,"length":57,"line":22,"column":8,"endLine":24,"endColumn":9,"fileName":"pxt_modules/game/basesprite.ts","functionName":"__visible","argumentNames":["this"]} -function controller_Button_getOrCreateHandlerForEvent_inline__P188561_mk(s) { +function sprites_BaseSprite___visible__P168624_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_getOrCreateHandlerForEvent_inline__P188561, depth: s.depth + 1, + parent: s, fn: sprites_BaseSprite___visible__P168624, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, + arg0: undefined, } } -function controller_Button_runButtonEvents__P172245(s) { +function control_EventContext_unregisterFrameHandler__P166931(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -43644,123 +43879,65 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.handlerState___188578 = undefined; - s.userHandler___188582 = undefined; - s.eventHandler___188593 = undefined; - s.unnamed804___U3 = undefined; - s.unnamed805___U4 = undefined; + s.i___186529 = 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__C168716_VT)) failedCast(r0); - s.tmp_0 = controller_Button_handlerState__P172241_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 306; s.pc = 14; return s.tmp_0; - case 14: - r0 = s.retval; - s.handlerState___188578 = (r0); - r0 = pxsim_numops_toBoolDecr(s.handlerState___188578); + if (!checkSubtype(r0, control_EventContext__C166922_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_toBool(s.tmp_0); if (!r0) { step = 1; continue; } - { step = 13; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: + r0 = s.arg0.fields["frameCallbacks"]; + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); case 2: - s.tmp_2 = controller_Button_getOrCreateHandlerForEvent__P172246_mk(s); - s.tmp_2.arg0 = s.arg0; - s.tmp_2.arg1 = s.arg1; - s.callLocIdx = 307; s.pc = 15; return s.tmp_2; - case 15: - r0 = s.retval; - s.userHandler___188582 = (r0); - r0 = s.userHandler___188582.fields["callback"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); if (!r0) { step = 3; continue; } - s.tmp_1 = if_callback_1_mk(s); - s.tmp_1.arg0 = s.userHandler___188582; - if (!s.tmp_1.arg0.vtable.iface) { - setupLambda(s.tmp_1, pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "callback"), 1); - s.callLocIdx = 308; 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 = 308; s.pc = 16; return s.tmp_1; } - else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 308; s.pc = 16; return s.tmp_1;; } - else { s.callLocIdx = 308; s.pc = 16; return s.tmp_1; } - } - case 16: - r0 = s.retval; + { step = 7; continue; } case 3: case 4: - r0 = s.handlerState___188578.fields["system"]; + r0 = s.arg0.fields["frameCallbacks"]; + s.tmp_5 = r0; + r0 = pxsim_Array_.indexOf(s.tmp_5, s.arg1, undefined); + s.i___186529 = (r0); + r0 = (s.i___186529 > -1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 11; continue; } - s.eventHandler___188593 = (undefined); - r0 = s.handlerState___188578.fields["system"]; - s.unnamed804___U3 = (r0); - s.unnamed805___U4 = (0); + if (!r0) { step = 5; continue; } + s.tmp_1 = helpers_arraySplice__P166627_mk(s); + r0 = s.arg0.fields["frameCallbacks"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.i___186529; + s.tmp_1.arg2 = 1; + s.callLocIdx = 72; s.pc = 8; return s.tmp_1; + case 8: + r0 = s.retval; case 5: - s.tmp_0 = r0 = s.unnamed805___U4; - r0 = pxsim_Array__length(s.unnamed804___U3); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 10; continue; } - r0 = pxsim_Array__getAt(s.unnamed804___U3, s.unnamed805___U4); - s.eventHandler___188593 = (r0); - r0 = s.eventHandler___188593.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___188593.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___188593; - if (!s.tmp_5.arg0.vtable.iface) { - setupLambda(s.tmp_5, pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "callback"), 1); - s.callLocIdx = 309; 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 = 309; s.pc = 17; return s.tmp_5; } - else if (s.tmp_5.fn.isGetter) { s.tmp_5.stage2Call = true; s.callLocIdx = 309; s.pc = 17; return s.tmp_5;; } - else { s.callLocIdx = 309; s.pc = 17; return s.tmp_5; } - } - case 17: - r0 = s.retval; - case 8: - case 9: - r0 = (s.unnamed805___U4 + 1); - s.unnamed805___U4 = (r0); - { step = 5; continue; } - case 10: - s.unnamed804___U3 = (undefined); - case 11: - case 12: - case 13: r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Button_runButtonEvents__P172245.info = {"start":8005,"length":535,"line":236,"column":8,"endLine":248,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"runButtonEvents","argumentNames":["this","event"]} +control_EventContext_unregisterFrameHandler__P166931.info = {"start":5515,"length":235,"line":166,"column":8,"endLine":171,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"unregisterFrameHandler","argumentNames":["this","fn"]} -function controller_Button_runButtonEvents__P172245_mk(s) { +function control_EventContext_unregisterFrameHandler__P166931_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_runButtonEvents__P172245, depth: s.depth + 1, + parent: s, fn: control_EventContext_unregisterFrameHandler__P166931, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -43768,11 +43945,7 @@ function controller_Button_runButtonEvents__P172245_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - handlerState___188578: undefined, - userHandler___188582: undefined, - eventHandler___188593: undefined, - unnamed804___U3: undefined, - unnamed805___U4: undefined, + i___186529: undefined, arg0: undefined, arg1: undefined, } } @@ -43781,7 +43954,7 @@ function controller_Button_runButtonEvents__P172245_mk(s) { -function controller_Button_handlerState__P172241(s) { +function helpers_bufferToArray__P166719(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -43791,105 +43964,59 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.state___188609 = undefined; - s.unnamed802___U1 = undefined; - s.unnamed803___U2 = undefined; + s.sz___188070 = undefined; + s.len___188074 = undefined; + s.r___188079 = undefined; + s.i___188081 = 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__C168716_VT)) failedCast(r0); - s.state___188609 = (undefined); - s.tmp_0 = game_currentScene__P169526_mk(s); - s.callLocIdx = 296; s.pc = 6; return s.tmp_0; - case 6: + s.tmp_0 = Buffer_sizeOfNumberFormat__P166742_mk(s); + s.tmp_0.arg0 = s.arg1; + s.callLocIdx = 35; s.pc = 3; return s.tmp_0; + case 3: r0 = s.retval; - r0 = r0.fields["buttonEventHandlers"]; - s.unnamed802___U1 = (r0); - s.unnamed803___U2 = (0); + s.sz___188070 = (r0); + r0 = pxsim.BufferMethods.length(s.arg0); + s.tmp_0 = r0; + r0 = (s.tmp_0 - s.sz___188070); + s.len___188074 = (r0); + r0 = pxsim_Array__mk(); + s.r___188079 = (r0); + s.i___188081 = (0); case 1: - s.tmp_0 = r0 = s.unnamed803___U2; - r0 = pxsim_Array__length(s.unnamed802___U1); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 4; continue; } - r0 = pxsim_Array__getAt(s.unnamed802___U1, s.unnamed803___U2); - s.state___188609 = (r0); - r0 = s.state___188609.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); + r0 = (s.i___188081 <= s.len___188074); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 2; continue; } - r0 = s.state___188609; - { step = 5; continue; } - case 2: - case 3: - r0 = (s.unnamed803___U2 + 1); - s.unnamed803___U2 = (r0); + s.tmp_1 = r0 = s.r___188079; + r0 = pxsim.BufferMethods.getNumber(s.arg0, s.arg1, s.i___188081); + s.tmp_2 = r0; + r0 = pxsim_Array__push(s.tmp_1, s.tmp_2); + r0 = (s.i___188081 + s.sz___188070); + s.i___188081 = (r0); { step = 1; continue; } - case 4: - s.unnamed802___U1 = (undefined); - r0 = undefined; - case 5: - return leaveAccessor(s, r0) + case 2: + r0 = s.r___188079; + return leave(s, r0) default: oops() } } } -controller_Button_handlerState__P172241.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__P172241.isGetter = true; +helpers_bufferToArray__P166719.info = {"start":5411,"length":297,"line":186,"column":4,"endLine":193,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"bufferToArray","argumentNames":["buf","format"]} -function controller_Button_handlerState__P172241_mk(s) { +function helpers_bufferToArray__P166719_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_handlerState__P172241, depth: s.depth + 1, + parent: s, fn: helpers_bufferToArray__P166719, depth: s.depth + 1, pc: 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___188609: undefined, - unnamed802___U1: undefined, - unnamed803___U2: undefined, - arg0: undefined, -} } - - - - - -function controller_ButtonEventHandlerState_constructor__P168713(s) { -let r0 = s.r0, 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_ButtonEventHandlerState__C168712_VT)) failedCast(r0); - r0 = (s.arg0).fields["id"] = (s.arg1); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -controller_ButtonEventHandlerState_constructor__P168713.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 controller_ButtonEventHandlerState_constructor__P168713_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: controller_ButtonEventHandlerState_constructor__P168713, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + sz___188070: undefined, + len___188074: undefined, + r___188079: undefined, + i___188081: undefined, arg0: undefined, arg1: undefined, } } @@ -43898,7 +44025,7 @@ function controller_ButtonEventHandlerState_constructor__P168713_mk(s) { -function controller_ButtonHandler_constructor__P168711(s) { +function Render_RayCastingRender_takeoverSceneSprites__P171784(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -43908,70 +44035,188 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.sc_allSprites___186137 = undefined; + s.i___186141 = undefined; + s.spr___186147 = undefined; + s.sprList___186154 = undefined; + s.particle___186206 = undefined; + s.spr___186221 = 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_ButtonHandler__C168710_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__P168711.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__P168711_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: controller_ButtonHandler_constructor__P168711, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, - arg1: undefined, - arg2: undefined, -} } - - - - - -function game_eventContext__P169529(s) { -let r0 = s.r0, 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__P172465_mk(s); - s.tmp_0.arg0 = undefined; - s.callLocIdx = 1332; s.pc = 1; return s.tmp_0; + if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); + s.tmp_0 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1950; s.pc = 19; return s.tmp_0; + case 19: + r0 = s.retval; + r0 = r0.fields["allSprites"]; + s.sc_allSprites___186137 = (r0); + s.i___186141 = (0); case 1: + s.tmp_1 = r0 = s.i___186141; + r0 = pxsim_Array__length(s.sc_allSprites___186137); + 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 = 18; continue; } + r0 = pxsim_Array__getAt(s.sc_allSprites___186137, s.i___186141); + s.spr___186147 = (r0); + r0 = s.spr___186147; + r0 = checkSubtype(r0, Sprite__C168868_VT); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 6; continue; } + r0 = s.spr___186147.fields["flags"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 & 512); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 2; continue; } + r0 = s.arg0.fields["sprites2D"]; + { step = 3; continue; } + case 2: + r0 = s.arg0.fields["sprites"]; + case 3: + // jmp value (already in r0) + s.tmp_3 = r0; + s.sprList___186154 = (s.tmp_3); + r0 = pxsim_Array_.indexOf(s.sprList___186154, s.spr___186147, undefined); + 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; } + r0 = pxsim_Array__push(s.sprList___186154, s.spr___186147); + s.tmp_0 = Render_RayCastingRender_getMotionZ__P171773_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.spr___186147; + s.tmp_0.arg2 = 0; + s.callLocIdx = 1951; s.pc = 20; return s.tmp_0; + case 20: r0 = s.retval; - r0 = globals._scene___172457.fields["eventContext"]; + r0 = pxsim_pxtcore_mkAction(2, Render_RayCastingRender_takeoverSceneSprites_inline__P186178); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.spr___186147); + s.tmp_1 = Sprite_onDestroyed__P168954_mk(s); + s.tmp_1.arg0 = s.spr___186147; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 1952; s.pc = 21; return s.tmp_1; + case 21: + r0 = s.retval; + case 4: + case 5: + { step = 17; continue; } + case 6: + r0 = s.spr___186147; + r0 = checkSubtype(r0, particles_ParticleSource__C169678_VT); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 13; continue; } + s.particle___186206 = (s.spr___186147); + r0 = s.arg0.fields["spriteParticles"]; + s.tmp_2 = r0; + r0 = pxsim_Array_.indexOf(s.tmp_2, s.particle___186206, undefined); + s.tmp_1 = r0; + r0 = (s.tmp_1 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 7; continue; } + r0 = s.tmp_0; + { step = 8; continue; } + case 7: + r0 = s.particle___186206.fields["anchor"]; + r0 = checkSubtype(r0, Sprite__C168868_VT); + case 8: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 11; continue; } + r0 = s.particle___186206.fields["anchor"]; + s.spr___186221 = (r0); + r0 = s.arg0.fields["sprites"]; + s.tmp_2 = r0; + r0 = pxsim_Array_.indexOf(s.tmp_2, s.spr___186221, undefined); + 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["spriteParticles"]; + s.tmp_3 = r0; + r0 = s.spr___186221.fields["id"]; + s.tmp_4 = r0; + r0 = pxsim_Array_.setAt(s.tmp_3, s.tmp_4, s.particle___186206); + r0 = s.arg0.fields["tempSprite"]; + s.tmp_0 = r0; + r0 = (s.particle___186206).fields["anchor"] = (s.tmp_0); + case 9: + case 10: + case 11: + case 12: + { step = 16; continue; } + case 13: + r0 = s.arg0.fields["spriteLikes"]; + s.tmp_2 = r0; + r0 = pxsim_Array_.indexOf(s.tmp_2, s.spr___186147, undefined); + s.tmp_1 = r0; + r0 = (s.tmp_1 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 14; continue; } + r0 = s.arg0.fields["spriteLikes"]; + s.tmp_3 = r0; + r0 = pxsim_Array__push(s.tmp_3, s.spr___186147); + case 14: + case 15: + case 16: + case 17: + r0 = pxsim_Array_.removeElement(s.sc_allSprites___186137, s.spr___186147); + { step = 1; continue; } + case 18: + r0 = pxsim_pxtcore_mkAction(1, Render_RayCastingRender_takeoverSceneSprites_inline__P186261); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = helpers_arrayForEach__P166636_mk(s); + r0 = s.arg0.fields["sprites"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 1954; s.pc = 22; return s.tmp_1; + case 22: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -game_eventContext__P169529.info = {"start":4442,"length":112,"line":136,"column":4,"endLine":139,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"eventContext","argumentNames":[]} +Render_RayCastingRender_takeoverSceneSprites__P171784.info = {"start":7597,"length":1974,"line":244,"column":8,"endLine":282,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"takeoverSceneSprites","argumentNames":["this"]} -function game_eventContext__P169529_mk(s) { +function Render_RayCastingRender_takeoverSceneSprites__P171784_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_eventContext__P169529, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_takeoverSceneSprites__P171784, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + sc_allSprites___186137: undefined, + i___186141: undefined, + spr___186147: undefined, + sprList___186154: undefined, + particle___186206: undefined, + spr___186221: undefined, + arg0: undefined, } } -function controller_pauseUntilAnyButtonIsPressed__P168732(s) { +function Render_RayCastingRender_takeoverSceneSprites_inline__P186178(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -43981,30 +44226,54 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - setupResume(s, 1); - pxsim.control.waitForEvent(2049, 0); - checkResumeConsumed(); - return; - case 1: + s.sayRenderer___186189 = undefined; + r0 = s.caps[0].fields["sprites"]; + s.tmp_0 = r0; + r0 = pxsim_Array_.removeElement(s.tmp_0, s.caps[1]); + r0 = s.caps[0].fields["sprites2D"]; + s.tmp_0 = r0; + r0 = pxsim_Array_.removeElement(s.tmp_0, s.caps[1]); + r0 = s.caps[0].fields["sayRederers"]; + s.tmp_0 = r0; + r0 = s.caps[1].fields["id"]; + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); + s.sayRenderer___186189 = (r0); + r0 = pxsim_numops_toBoolDecr(s.sayRenderer___186189); + if (!r0) { step = 1; continue; } + r0 = s.caps[0].fields["sayRederers"]; + s.tmp_0 = r0; + r0 = pxsim_Array_.removeElement(s.tmp_0, s.sayRenderer___186189); + s.tmp_0 = sprites_BaseSpriteSayRenderer__C168786_v2_1_mk(s); + s.tmp_0.arg0 = s.sayRenderer___186189; + if (!checkSubtype(s.tmp_0.arg0, sprites_BaseSpriteSayRenderer__C168786_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.destroy; + s.pc = 3; return s.tmp_0; + case 3: r0 = s.retval; + case 1: + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -controller_pauseUntilAnyButtonIsPressed__P168732.info = {"start":9968,"length":96,"line":287,"column":4,"endLine":289,"endColumn":5,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"pauseUntilAnyButtonIsPressed","argumentNames":[]} +Render_RayCastingRender_takeoverSceneSprites_inline__P186178.info = {"start":8129,"length":511,"line":253,"column":40,"endLine":261,"endColumn":25,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":[]} -function controller_pauseUntilAnyButtonIsPressed__P168732_mk(s) { +function Render_RayCastingRender_takeoverSceneSprites_inline__P186178_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_pauseUntilAnyButtonIsPressed__P168732, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_takeoverSceneSprites_inline__P186178, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + sayRenderer___186189: undefined, } } -function game_setWaitAnyButton__P169527(s) { +function Render_RayCastingRender_takeoverSceneSprites_inline__P186261(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -44018,18 +44287,28 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - globals.__waitAnyButton___172461 = (s.arg0); + r0 = pxsim_numops_toBoolDecr(s.arg0); + if (!r0) { step = 1; continue; } + s.tmp_0 = Render_RayCastingRender_takeoverSayRenderOfSprite__P171785_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 1953; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + case 1: + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -game_setWaitAnyButton__P169527.info = {"start":4236,"length":83,"line":127,"column":4,"endLine":129,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"setWaitAnyButton","argumentNames":["f"]} +Render_RayCastingRender_takeoverSceneSprites_inline__P186261.info = {"start":9455,"length":105,"line":278,"column":33,"endLine":281,"endColumn":13,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"inline","argumentNames":["spr"]} -function game_setWaitAnyButton__P169527_mk(s) { +function Render_RayCastingRender_takeoverSceneSprites_inline__P186261_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_setWaitAnyButton__P169527, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_takeoverSceneSprites_inline__P186261, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, } } @@ -44037,7 +44316,7 @@ function game_setWaitAnyButton__P169527_mk(s) { -function Math_FastRandom_constructor__P169588(s) { +function Render_RayCastingRender_takeoverSayRenderOfSprite__P171785(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -44047,35 +44326,112 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.sprite_as_any___186268 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Math_FastRandom__C169586_VT)) failedCast(r0); - r0 = (s.arg1 === undefined); + if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); + s.sprite_as_any___186268 = (s.arg1); + s.tmp_1 = if_sayRenderer_1_mk(s); + s.tmp_1.arg0 = s.sprite_as_any___186268; + if (!s.tmp_1.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "sayRenderer"); + } else { + s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["sayRenderer"]; + if (s.tmp_1.fn == null) { s.retval = s.tmp_1.arg0.fields["sayRenderer"]; } + else if (!s.tmp_1.fn.isGetter) { s.retval = bind(s.tmp_1); } + else { s.callLocIdx = 1955; 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; } - r0 = pxsim.Math_.randomRange(1, 65535); - s.arg1 = (r0); + r0 = s.arg0.fields["sayRederers"]; + s.tmp_2 = r0; + r0 = s.arg1.fields["id"]; + s.tmp_3 = r0; + s.tmp_5 = if_sayRenderer_1_mk(s); + s.tmp_5.arg0 = s.sprite_as_any___186268; + if (!s.tmp_5.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "sayRenderer"); + } else { + s.tmp_5.fn = s.tmp_5.arg0.vtable.iface["sayRenderer"]; + if (s.tmp_5.fn == null) { s.retval = s.tmp_5.arg0.fields["sayRenderer"]; } + else if (!s.tmp_5.fn.isGetter) { s.retval = bind(s.tmp_5); } + else { s.callLocIdx = 1956; s.pc = 4; return s.tmp_5; } + } + case 4: + r0 = s.retval; + s.tmp_4 = r0; + r0 = pxsim_Array_.setAt(s.tmp_2, s.tmp_3, s.tmp_4); + r0 = s.arg0.fields["sayEndTimes"]; + s.tmp_0 = r0; + r0 = s.arg1.fields["id"]; + s.tmp_1 = r0; + s.tmp_3 = if_sayEndTime_1_mk(s); + s.tmp_3.arg0 = s.sprite_as_any___186268; + if (!s.tmp_3.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "sayEndTime"); + } else { + s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["sayEndTime"]; + if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["sayEndTime"]; } + else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } + else { s.callLocIdx = 1957; s.pc = 5; return s.tmp_3; } + } + case 5: + r0 = s.retval; + s.tmp_2 = r0; + r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_1, s.tmp_2); + s.tmp_0 = if_sayRenderer_2_mk(s); + s.tmp_0.arg0 = s.sprite_as_any___186268; + s.tmp_0.arg1 = undefined; + if (!s.tmp_0.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapSetByString(s.tmp_0.arg0, "sayRenderer", s.tmp_0.arg1); + } else { + s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["set/sayRenderer"]; + if (s.tmp_0.fn === null) { s.tmp_0.arg0.fields["sayRenderer"] = s.tmp_0.arg1; } + else if (s.tmp_0.fn === undefined) { failedCast(s.tmp_0.arg0) } + else { s.callLocIdx = 1958; s.pc = 6; return s.tmp_0; } + } + case 6: + r0 = s.retval; + s.tmp_0 = if_sayEndTime_2_mk(s); + s.tmp_0.arg0 = s.sprite_as_any___186268; + s.tmp_0.arg1 = undefined; + if (!s.tmp_0.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapSetByString(s.tmp_0.arg0, "sayEndTime", s.tmp_0.arg1); + } else { + s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["set/sayEndTime"]; + if (s.tmp_0.fn === null) { s.tmp_0.arg0.fields["sayEndTime"] = s.tmp_0.arg1; } + else if (s.tmp_0.fn === undefined) { failedCast(s.tmp_0.arg0) } + else { s.callLocIdx = 1959; s.pc = 7; return s.tmp_0; } + } + case 7: + r0 = s.retval; case 1: case 2: - r0 = (s.arg0).fields["seed"] = (s.arg1); - r0 = (s.arg0).fields["lfsr"] = (s.arg1); r0 = undefined; return leave(s, r0) default: oops() } } } -Math_FastRandom_constructor__P169588.info = {"start":1425,"length":175,"line":44,"column":8,"endLine":48,"endColumn":9,"fileName":"pxt_modules/game/mathUtil.ts","functionName":"inline","argumentNames":["this","seed"]} +Render_RayCastingRender_takeoverSayRenderOfSprite__P171785.info = {"start":9580,"length":413,"line":283,"column":8,"endLine":291,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"takeoverSayRenderOfSprite","argumentNames":["this","sprite"]} -function Math_FastRandom_constructor__P169588_mk(s) { +function Render_RayCastingRender_takeoverSayRenderOfSprite__P171785_mk(s) { checkStack(s.depth); return { - parent: s, fn: Math_FastRandom_constructor__P169588, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_takeoverSayRenderOfSprite__P171785, depth: s.depth + 1, pc: 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, + sprite_as_any___186268: undefined, arg0: undefined, arg1: undefined, } } @@ -44084,7 +44440,7 @@ function Math_FastRandom_constructor__P169588_mk(s) { -function game_consoleOverlay_listener__P172791(s) { +function Sprite_onDestroyed__P168954(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -44099,82 +44455,20 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___172756); - 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(s.arg1); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); - case 2: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 3; continue; } - { step = 7; continue; } - case 3: - case 4: - s.tmp_4 = helpers_arrayForEach__P166636_mk(s); - s.tmp_5 = helpers_arrayFilter__P166637_mk(s); - s.tmp_6 = helpers_stringSplit__P166649_mk(s); - s.tmp_6.arg0 = s.arg1; - s.tmp_6.arg1 = "\n"; - s.tmp_6.arg2 = undefined; - s.callLocIdx = 1548; s.pc = 10; return s.tmp_6; - case 10: - r0 = s.retval; - s.tmp_5.arg0 = r0; - s.tmp_5.arg1 = forEach_inline__P188656; - s.callLocIdx = 1549; s.pc = 9; return s.tmp_5; - case 9: - r0 = s.retval; - s.tmp_4.arg0 = r0; - s.tmp_4.arg1 = game_consoleOverlay_listener_inline__P188661; - s.callLocIdx = 1551; s.pc = 8; return s.tmp_4; - case 8: - r0 = s.retval; - r0 = pxsim_Array__length(globals.consoleStrings___172756); - s.tmp_1 = r0; - r0 = (s.tmp_1 > globals.consoleLines___172769); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - s.tmp_2 = helpers_arraySplice__P166627_mk(s); - s.tmp_2.arg0 = globals.consoleStrings___172756; - s.tmp_2.arg1 = 0; - r0 = pxsim_Array__length(globals.consoleStrings___172756); - s.tmp_3 = r0; - r0 = (s.tmp_3 - globals.consoleLines___172769); - s.tmp_2.arg2 = r0; - s.callLocIdx = 1552; s.pc = 11; return s.tmp_2; - case 11: - r0 = s.retval; - case 5: - case 6: - case 7: + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + r0 = (s.arg0).fields["destroyHandler"] = (s.arg1); r0 = undefined; return leave(s, r0) default: oops() } } } -game_consoleOverlay_listener__P172791.info = {"start":787,"length":571,"line":26,"column":4,"endLine":42,"endColumn":5,"fileName":"pxt_modules/game/console.ts","functionName":"listener","argumentNames":["priority","text"]} +Sprite_onDestroyed__P168954.info = {"start":26089,"length":78,"line":845,"column":4,"endLine":847,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"onDestroyed","argumentNames":["this","handler"]} -function game_consoleOverlay_listener__P172791_mk(s) { +function Sprite_onDestroyed__P168954_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_consoleOverlay_listener__P172791, depth: s.depth + 1, + parent: s, fn: Sprite_onDestroyed__P168954, depth: s.depth + 1, pc: 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, } } @@ -44183,7 +44477,7 @@ function game_consoleOverlay_listener__P172791_mk(s) { -function forEach_inline__P188656(s) { +function sprites_BaseSpriteSayRenderer_destroy__P168790(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -44197,26 +44491,19 @@ switch (step) { 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); + r0 = s.arg0; + if (!checkSubtype(r0, sprites_BaseSpriteSayRenderer__C168786_VT)) failedCast(r0); + r0 = undefined; return leave(s, r0) default: oops() } } } -forEach_inline__P188656.info = {"start":985,"length":14,"line":32,"column":20,"endLine":32,"endColumn":34,"fileName":"pxt_modules/game/console.ts","functionName":"inline","argumentNames":["line"]} +sprites_BaseSpriteSayRenderer_destroy__P168790.info = {"start":328,"length":22,"line":13,"column":8,"endLine":15,"endColumn":9,"fileName":"pxt_modules/game/spritesay.ts","functionName":"destroy","argumentNames":["this"]} -function forEach_inline__P188656_mk(s) { +function sprites_BaseSpriteSayRenderer_destroy__P168790_mk(s) { checkStack(s.depth); return { - parent: s, fn: forEach_inline__P188656, depth: s.depth + 1, + parent: s, fn: sprites_BaseSpriteSayRenderer_destroy__P168790, 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, } } @@ -44224,7 +44511,7 @@ function forEach_inline__P188656_mk(s) { -function game_consoleOverlay_listener_inline__P188661(s) { +function Render_RayCastingRender_updateViewZPos__P171783(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -44234,45 +44521,39 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.j___188663 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.j___188663 = (0); - case 1: - s.tmp_1 = r0 = s.j___188663; - 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___172756; - s.tmp_5 = helpers_stringSlice__P166646_mk(s); - s.tmp_5.arg0 = s.arg0; - s.tmp_5.arg1 = s.j___188663; - r0 = (s.j___188663 + globals.consoleColumns___172779); - s.tmp_5.arg2 = r0; - s.callLocIdx = 1550; s.pc = 3; return s.tmp_5; - case 3: - r0 = s.retval; + r0 = s.arg0; + if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["spriteMotionZ"]; s.tmp_4 = r0; - r0 = pxsim_Array__push(s.tmp_3, s.tmp_4); - r0 = (s.j___188663 + globals.consoleColumns___172779); - s.j___188663 = (r0); - { step = 1; continue; } - case 2: + r0 = s.arg0.fields["sprSelf"]; + r0 = r0.fields["id"]; + s.tmp_5 = r0; + r0 = pxsim_Array__getAt(s.tmp_4, s.tmp_5); + r0 = r0.fields["p"]; + s.tmp_3 = r0; + r0 = s.arg0.fields["sprSelf"]; + r0 = r0.fields["_height"]; + s.tmp_6 = r0; + r0 = (s.tmp_3 + s.tmp_6); + s.tmp_2 = r0; + r0 = (s.tmp_2 - 512); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["viewZPos"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -game_consoleOverlay_listener_inline__P188661.info = {"start":1022,"length":189,"line":33,"column":21,"endLine":37,"endColumn":13,"fileName":"pxt_modules/game/console.ts","functionName":"inline","argumentNames":["line"]} +Render_RayCastingRender_updateViewZPos__P171783.info = {"start":7438,"length":149,"line":240,"column":8,"endLine":242,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"updateViewZPos","argumentNames":["this"]} -function game_consoleOverlay_listener_inline__P188661_mk(s) { +function Render_RayCastingRender_updateViewZPos__P171783_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_consoleOverlay_listener_inline__P188661, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_updateViewZPos__P171783, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -44280,7 +44561,7 @@ function game_consoleOverlay_listener_inline__P188661_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - j___188663: undefined, + tmp_6: undefined, arg0: undefined, } } @@ -44288,7 +44569,7 @@ function game_consoleOverlay_listener_inline__P188661_mk(s) { -function console_addListener__P166910(s) { +function Render_RayCastingRender_viewMode__P171781(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -44302,43 +44583,20 @@ switch (step) { 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_Array_.indexOf(globals.listeners___171935, s.arg0, undefined); - s.tmp_2 = r0; - r0 = (s.tmp_2 > -1); - case 2: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 3; continue; } - { step = 5; continue; } - case 3: - case 4: - r0 = pxsim_Array__push(globals.listeners___171935, s.arg0); - case 5: - r0 = undefined; - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, Render_RayCastingRender__C171738_VT)) failedCast(r0); + r0 = s.arg0.fields["_viewMode"]; + return leaveAccessor(s, r0) default: oops() } } } -console_addListener__P166910.info = {"start":3558,"length":197,"line":121,"column":4,"endLine":124,"endColumn":5,"fileName":"pxt_modules/base/console.ts","functionName":"addListener","argumentNames":["listener"]} +Render_RayCastingRender_viewMode__P171781.info = {"start":7280,"length":70,"line":232,"column":8,"endLine":234,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_raycasting.ts","functionName":"viewMode","argumentNames":["this"]} +Render_RayCastingRender_viewMode__P171781.isGetter = true; -function console_addListener__P166910_mk(s) { +function Render_RayCastingRender_viewMode__P171781_mk(s) { checkStack(s.depth); return { - parent: s, fn: console_addListener__P166910, depth: s.depth + 1, + parent: s, fn: Render_RayCastingRender_viewMode__P171781, depth: s.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, } } @@ -44346,7 +44604,7 @@ function console_addListener__P166910_mk(s) { -function listeners_inline__P171934(s) { +function scene_cameraFollowSprite__P169417(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -44356,32 +44614,46 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.scene___186107 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim.control.__log(s.arg0, s.arg1); + s.tmp_0 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1175; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + s.scene___186107 = (r0); + r0 = s.scene___186107.fields["camera"]; + s.tmp_0 = r0; + r0 = (s.tmp_0).fields["sprite"] = (s.arg0); + s.tmp_0 = scene_Camera_update__P169325_mk(s); + r0 = s.scene___186107.fields["camera"]; + s.tmp_0.arg0 = r0; + s.callLocIdx = 1176; s.pc = 2; return s.tmp_0; + case 2: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -listeners_inline__P171934.info = {"start":534,"length":85,"line":25,"column":8,"endLine":25,"endColumn":93,"fileName":"pxt_modules/base/console.ts","functionName":"inline","argumentNames":["priority","text"]} +scene_cameraFollowSprite__P169417.info = {"start":4010,"length":170,"line":143,"column":4,"endLine":147,"endColumn":5,"fileName":"pxt_modules/game/scenes.ts","functionName":"cameraFollowSprite","argumentNames":["sprite"]} -function listeners_inline__P171934_mk(s) { +function scene_cameraFollowSprite__P169417_mk(s) { checkStack(s.depth); return { - parent: s, fn: listeners_inline__P171934, depth: s.depth + 1, + parent: s, fn: scene_cameraFollowSprite__P169417, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + scene___186107: undefined, arg0: undefined, - arg1: undefined, } } -function scene_systemMenu_register__P169633(s) { +function tiles_TileMap_addEventListener__P169287(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -44391,38 +44663,114 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.instance___172710); + s.eventHandler___186316 = undefined; + s.unnamed830___U1 = undefined; + s.unnamed831___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, tiles_TileMap__C169262_VT)) failedCast(r0); + r0 = s.arg0.fields["handlerState"]; + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - { step = 3; continue; } + s.tmp_3 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_4 = r0; + r0 = (s.tmp_3).fields["handlerState"] = (s.tmp_4); case 1: case 2: - s.tmp_0 = controller_Button_onEvent__P168723_mk(s); - s.tmp_0.arg0 = globals.menu___168646; - s.tmp_0.arg1 = 2049; - s.tmp_0.arg2 = scene_systemMenu_showSystemMenu__P169634; - s.callLocIdx = 1535; s.pc = 4; return s.tmp_0; + s.eventHandler___186316 = (undefined); + r0 = s.arg0.fields["handlerState"]; + s.unnamed830___U1 = (r0); + s.unnamed831___U2 = (0); + case 3: + s.tmp_0 = r0 = s.unnamed831___U2; + r0 = pxsim_Array__length(s.unnamed830___U1); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 8; continue; } + r0 = pxsim_Array__getAt(s.unnamed830___U1, s.unnamed831___U2); + s.eventHandler___186316 = (r0); + r0 = s.eventHandler___186316.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 = 4; continue; } + r0 = s.tmp_2; + { step = 5; continue; } case 4: + r0 = s.eventHandler___186316.fields["callback"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 === s.arg2); + case 5: + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + if (!r0) { step = 6; continue; } + { step = 9; continue; } + case 6: + case 7: + r0 = (s.unnamed831___U2 + 1); + s.unnamed831___U2 = (r0); + { step = 3; continue; } + case 8: + s.unnamed830___U1 = (undefined); + r0 = pxsim_pxtcore_mkClassInstance(tiles_TileMapEventHandler__C169260_VT); + s.tmp_6 = r0; + s.tmp_7 = tiles_TileMapEventHandler_constructor__P169261_mk(s); + s.tmp_7.arg0 = s.tmp_6; + s.tmp_7.arg1 = s.arg1; + s.tmp_7.arg2 = s.arg2; + s.callLocIdx = 1099; s.pc = 10; return s.tmp_7; + case 10: r0 = s.retval; - case 3: + r0 = s.arg0.fields["handlerState"]; + s.tmp_8 = r0; + r0 = pxsim_Array__push(s.tmp_8, s.tmp_6); + case 9: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_register__P169633.info = {"start":12793,"length":193,"line":382,"column":4,"endLine":386,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"register","argumentNames":[]} +tiles_TileMap_addEventListener__P169287.info = {"start":17616,"length":401,"line":557,"column":8,"endLine":564,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"addEventListener","argumentNames":["this","event","handler"]} -function scene_systemMenu_register__P169633_mk(s) { +function tiles_TileMap_addEventListener__P169287_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_register__P169633, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_addEventListener__P169287, depth: s.depth + 1, pc: 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, + eventHandler___186316: undefined, + unnamed830___U1: undefined, + unnamed831___U2: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function scene_systemMenu_showSystemMenu__P169634(s) { +function tiles_TileMapEventHandler_constructor__P169261(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -44432,51 +44780,37 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.instance___172710); - if (!r0) { step = 1; continue; } - { step = 3; continue; } - case 1: - case 2: - s.tmp_0 = game_pushScene__P169530_mk(s); - s.callLocIdx = 1536; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_PauseMenu__C169622_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_systemMenu_PauseMenu_constructor__P169623_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = scene_systemMenu_buildOptionList__P169630; - s.tmp_1.arg2 = undefined; - s.callLocIdx = 1537; s.pc = 5; return s.tmp_1; - case 5: - r0 = s.retval; - globals.instance___172710 = (s.tmp_0); - s.tmp_0 = scene_systemMenu_PauseMenu_show__P169624_mk(s); - s.tmp_0.arg0 = globals.instance___172710; - s.callLocIdx = 1538; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - case 3: + 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_TileMapEventHandler__C169260_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() } } } -scene_systemMenu_showSystemMenu__P169634.info = {"start":12992,"length":172,"line":388,"column":4,"endLine":393,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"showSystemMenu","argumentNames":[]} +tiles_TileMapEventHandler_constructor__P169261.info = {"start":8593,"length":88,"line":289,"column":8,"endLine":289,"endColumn":96,"fileName":"pxt_modules/game/tilemap.ts","functionName":"inline","argumentNames":["this","event","callback"]} -function scene_systemMenu_showSystemMenu__P169634_mk(s) { +function tiles_TileMapEventHandler_constructor__P169261_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_showSystemMenu__P169634, depth: s.depth + 1, + parent: s, fn: tiles_TileMapEventHandler_constructor__P169261, 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_buildOptionList__P169630(s) { +function scene_Background_addLayer__P169201(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -44486,136 +44820,62 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.options___189321 = undefined; - r0 = pxsim_Array__mk(); - s.options___189321 = (r0); - r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C169614_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_systemMenu_MenuOption_constructor__P169615_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = globals.VOLUME_DOWN_ICON___169644; - s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P189329; - s.tmp_1.arg3 = scene_systemMenu_volumeDown__P172716; - s.callLocIdx = 1518; s.pc = 5; return s.tmp_1; - case 5: - r0 = s.retval; - r0 = pxsim_Array__push(s.options___189321, s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C169614_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_systemMenu_MenuOption_constructor__P169615_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = globals.VOLUME_UP_ICON___169641; - s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P189343; - s.tmp_1.arg3 = scene_systemMenu_volumeUp__P172715; - s.callLocIdx = 1520; s.pc = 6; return s.tmp_1; - case 6: - r0 = s.retval; - r0 = pxsim_Array__push(s.options___189321, 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__C169614_VT); - s.tmp_1 = r0; - s.tmp_2 = scene_systemMenu_MenuOption_constructor__P169615_mk(s); - s.tmp_2.arg0 = s.tmp_1; - s.tmp_2.arg1 = globals.BRIGHTNESS_DOWN_ICON___169642; - s.tmp_2.arg2 = scene_systemMenu_buildOptionList_inline__P189358; - s.tmp_2.arg3 = scene_systemMenu_brightnessDown__P172718; - s.callLocIdx = 1523; s.pc = 7; return s.tmp_2; - case 7: - r0 = s.retval; - r0 = pxsim_Array__push(s.options___189321, s.tmp_1); - r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C169614_VT); + s.layer___186032 = 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_Background__C169196_VT)) failedCast(r0); + r0 = pxsim_pxtcore_mkClassInstance(scene_BackgroundLayer__C169206_VT); s.tmp_0 = r0; - s.tmp_1 = scene_systemMenu_MenuOption_constructor__P169615_mk(s); + s.tmp_1 = scene_BackgroundLayer_constructor__P169213_mk(s); s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = globals.BRIGHTNESS_UP_ICON___169647; - s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P189373; - s.tmp_1.arg3 = scene_systemMenu_brightnessUp__P172717; - s.callLocIdx = 1525; s.pc = 8; return s.tmp_1; - case 8: - r0 = s.retval; - r0 = pxsim_Array__push(s.options___189321, s.tmp_0); + s.tmp_1.arg1 = s.arg2; + s.tmp_1.arg2 = s.arg3; + s.tmp_1.arg3 = s.arg1; + s.callLocIdx = 1007; s.pc = 1; return s.tmp_1; case 1: - case 2: - r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C169614_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_systemMenu_MenuOption_constructor__P169615_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = globals.STATS_ICON___169648; - s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P189388; - s.tmp_1.arg3 = scene_systemMenu_toggleStats__P172720; - s.callLocIdx = 1526; s.pc = 9; return s.tmp_1; - case 9: - r0 = s.retval; - r0 = pxsim_Array__push(s.options___189321, s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C169614_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_systemMenu_MenuOption_constructor__P169615_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = globals.CONSOLE_ICON___169646; - s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P189397; - s.tmp_1.arg3 = scene_systemMenu_toggleConsole__P172721; - s.callLocIdx = 1528; s.pc = 10; return s.tmp_1; - case 10: - r0 = s.retval; - r0 = pxsim_Array__push(s.options___189321, s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C169614_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_systemMenu_MenuOption_constructor__P169615_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = globals.SLEEP_ICON___169645; - s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P189406; - s.tmp_1.arg3 = scene_systemMenu_sleep__P172722; - s.callLocIdx = 1529; s.pc = 11; return s.tmp_1; - case 11: - r0 = s.retval; - r0 = pxsim_Array__push(s.options___189321, s.tmp_0); - r0 = pxsim_numops_toBoolDecr(globals.customMenuOptions___172711); - if (!r0) { step = 3; continue; } - s.tmp_0 = helpers_arrayConcat__P166640_mk(s); - s.tmp_0.arg0 = s.options___189321; - s.tmp_0.arg1 = globals.customMenuOptions___172711; - s.callLocIdx = 1530; s.pc = 12; return s.tmp_0; - case 12: r0 = s.retval; - s.options___189321 = (r0); - case 3: - case 4: - r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C169614_VT); + s.layer___186032 = (s.tmp_0); + r0 = s.arg0.fields["_layers"]; s.tmp_0 = r0; - s.tmp_1 = scene_systemMenu_MenuOption_constructor__P169615_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = globals.CLOSE_MENU_ICON___169643; - s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P189419; - s.tmp_1.arg3 = scene_systemMenu_closeMenu__P169629; - s.callLocIdx = 1531; s.pc = 13; return s.tmp_1; - case 13: + r0 = pxsim_Array__push(s.tmp_0, s.layer___186032); + s.tmp_0 = helpers_arraySort__P166632_mk(s); + r0 = s.arg0.fields["_layers"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = scene_Background_addLayer_inline__P186046; + s.callLocIdx = 1008; s.pc = 2; return s.tmp_0; + case 2: r0 = s.retval; - r0 = pxsim_Array__push(s.options___189321, s.tmp_0); - r0 = s.options___189321; + r0 = s.layer___186032; return leave(s, r0) default: oops() } } } -scene_systemMenu_buildOptionList__P169630.info = {"start":10499,"length":1149,"line":334,"column":4,"endLine":354,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"buildOptionList","argumentNames":[]} +scene_Background_addLayer__P169201.info = {"start":509,"length":292,"line":26,"column":8,"endLine":31,"endColumn":9,"fileName":"pxt_modules/game/background.ts","functionName":"addLayer","argumentNames":["this","pic","distance","alignment"]} -function scene_systemMenu_buildOptionList__P169630_mk(s) { +function scene_Background_addLayer__P169201_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_buildOptionList__P169630, depth: s.depth + 1, + parent: s, fn: scene_Background_addLayer__P169201, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - options___189321: undefined, + layer___186032: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function scene_systemMenu_buildOptionList_inline__P189329(s) { +function scene_Background_addLayer_inline__P186046(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -44625,44 +44885,37 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_3 = music_volume__P168148_mk(s); - s.callLocIdx = 1517; s.pc = 1; return s.tmp_3; - case 1: - r0 = s.retval; - s.tmp_2 = r0; - if ((s.tmp_2) && (s.tmp_2).vtable) { - setupResume(s, 2); - pxsim_String__stringConv(s.tmp_2); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_2) + ""; } - case 2: - r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_String__concat("VOLUME DOWN (", s.tmp_1); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg1.fields["distance"]; s.tmp_0 = r0; - r0 = pxsim_String__concat(s.tmp_0, ")"); + r0 = s.arg0.fields["distance"]; + s.tmp_1 = r0; + r0 = (s.tmp_0 - s.tmp_1); return leave(s, r0) default: oops() } } } -scene_systemMenu_buildOptionList_inline__P189329.info = {"start":10644,"length":39,"line":337,"column":54,"endLine":337,"endColumn":93,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +scene_Background_addLayer_inline__P186046.info = {"start":730,"length":33,"line":29,"column":30,"endLine":29,"endColumn":63,"fileName":"pxt_modules/game/background.ts","functionName":"inline","argumentNames":["a","b"]} -function scene_systemMenu_buildOptionList_inline__P189329_mk(s) { +function scene_Background_addLayer_inline__P186046_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_buildOptionList_inline__P189329, depth: s.depth + 1, + parent: s, fn: scene_Background_addLayer_inline__P186046, depth: s.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_buildOptionList_inline__P189343(s) { +function scene_BackgroundLayer_constructor__P169213(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -44672,44 +44925,83 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_3 = music_volume__P168148_mk(s); - s.callLocIdx = 1519; s.pc = 1; return s.tmp_3; - case 1: - r0 = s.retval; - s.tmp_2 = r0; - if ((s.tmp_2) && (s.tmp_2).vtable) { - setupResume(s, 2); - pxsim_String__stringConv(s.tmp_2); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_2) + ""; } - case 2: + 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_BackgroundLayer__C169206_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = Math_max__P166657_mk(s); + s.tmp_2.arg0 = 1; + s.tmp_2.arg1 = s.arg1; + s.callLocIdx = 1011; s.pc = 7; return s.tmp_2; + case 7: r0 = s.retval; s.tmp_1 = r0; - r0 = pxsim_String__concat("VOLUME UP (", s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_String__concat(s.tmp_0, ")"); + r0 = (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() } } } -scene_systemMenu_buildOptionList_inline__P189343.info = {"start":10751,"length":37,"line":338,"column":52,"endLine":338,"endColumn":89,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +scene_BackgroundLayer_constructor__P169213.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 scene_systemMenu_buildOptionList_inline__P189343_mk(s) { +function scene_BackgroundLayer_constructor__P169213_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_buildOptionList_inline__P189343, depth: s.depth + 1, + parent: s, fn: scene_BackgroundLayer_constructor__P169213, depth: s.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, } } -function scene_systemMenu_buildOptionList_inline__P189358(s) { +function controller___internal_initVibration__P174784(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -44719,40 +45011,50 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = globals.brightness___168478; - 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; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = pxsim_numops_toBoolDecr(globals.vibrationPin___174781); s.tmp_1 = r0; - r0 = pxsim_String__concat("BRIGHTNESS DOWN (", s.tmp_1); + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_String__concat(s.tmp_0, ")"); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = pxsim.pins.pinByCfg(76); + globals.vibrationPin___174781 = (r0); + case 1: + case 2: + globals.vibrationEnd___174782 = (-1); + s.tmp_0 = control_EventContext_registerFrameHandler__P166930_mk(s); + r0 = s.arg0.fields["eventContext"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = 20; + s.tmp_0.arg2 = controller___internal_updateVibration__P174783; + s.callLocIdx = 1932; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_buildOptionList_inline__P189358.info = {"start":10910,"length":48,"line":340,"column":62,"endLine":340,"endColumn":110,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +controller___internal_initVibration__P174784.info = {"start":5979,"length":250,"line":177,"column":4,"endLine":182,"endColumn":5,"fileName":"pxt_modules/controller/controllerimpl.ts","functionName":"initVibration","argumentNames":["s"]} -function scene_systemMenu_buildOptionList_inline__P189358_mk(s) { +function controller___internal_initVibration__P174784_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_buildOptionList_inline__P189358, depth: s.depth + 1, + parent: s, fn: controller___internal_initVibration__P174784, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, + arg0: undefined, } } -function scene_systemMenu_buildOptionList_inline__P189373(s) { +function controller___internal_updateVibration__P174783(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -44762,40 +45064,52 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = globals.brightness___168478; - 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 UP (", s.tmp_1); + r0 = (globals.vibrationEnd___174782 > 0); s.tmp_0 = r0; - r0 = pxsim_String__concat(s.tmp_0, ")"); - return leave(s, r0) - default: oops() -} } } -scene_systemMenu_buildOptionList_inline__P189373.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_buildOptionList_inline__P189373_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: scene_systemMenu_buildOptionList_inline__P189373, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, -} } + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + s.tmp_1 = r0 = globals.vibrationEnd___174782; + r0 = pxsim.control.millis(); + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); + case 2: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 5; continue; } + r0 = pxsim_numops_toBoolDecr(globals.vibrationPin___174781); + if (!r0) { step = 3; continue; } + r0 = pxsim.DigitalInOutPinMethods.digitalWrite(globals.vibrationPin___174781, false); + case 3: + case 4: + globals.vibrationEnd___174782 = (-1); + case 5: + case 6: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +controller___internal_updateVibration__P174783.info = {"start":5711,"length":262,"line":168,"column":4,"endLine":175,"endColumn":5,"fileName":"pxt_modules/controller/controllerimpl.ts","functionName":"updateVibration","argumentNames":[]} + +function controller___internal_updateVibration__P174783_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller___internal_updateVibration__P174783, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, +} } -function scene_systemMenu_buildOptionList_inline__P189388(s) { +function controller_initController__P174772(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -44805,34 +45119,38 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.stats___169495); - if (!r0) { step = 1; continue; } - r0 = "HIDE STATS"; - { step = 2; continue; } + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + s.tmp_0 = control_EventContext_registerFrameHandler__P166930_mk(s); + r0 = s.arg0.fields["eventContext"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = 13; + s.tmp_0.arg2 = controller_updateController__P174771; + s.callLocIdx = 1931; s.pc = 1; return s.tmp_0; case 1: - r0 = "SHOW STATS"; - case 2: - // jmp value (already in r0) - s.tmp_0 = r0; - r0 = s.tmp_0; + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_buildOptionList_inline__P189388.info = {"start":11160,"length":46,"line":343,"column":48,"endLine":343,"endColumn":94,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +controller_initController__P174772.info = {"start":1764,"length":144,"line":54,"column":4,"endLine":56,"endColumn":5,"fileName":"pxt_modules/controller/state.ts","functionName":"initController","argumentNames":["s"]} -function scene_systemMenu_buildOptionList_inline__P189388_mk(s) { +function controller_initController__P174772_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_buildOptionList_inline__P189388, depth: s.depth + 1, + parent: s, fn: controller_initController__P174772, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + arg0: undefined, } } -function scene_systemMenu_buildOptionList_inline__P189397(s) { +function controller_updateController__P174771(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -44842,46 +45160,361 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___172756); - s.tmp_3 = r0; - r0 = pxsim_Boolean__bang(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.state___188137 = undefined; + s.handler___188144 = undefined; + s.customHandler___188161 = undefined; + s.handler___188187 = undefined; + s.tmp_0 = controller_sceneState__P171637_mk(s); + s.callLocIdx = 1910; s.pc = 19; return s.tmp_0; + case 19: + r0 = s.retval; + s.state___188137 = (r0); + s.tmp_2 = if_lastGesture_1_mk(s); + s.tmp_2.arg0 = s.state___188137; + if (!s.tmp_2.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "lastGesture"); + } else { + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["lastGesture"]; + if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["lastGesture"]; } + else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } + else { s.callLocIdx = 1911; s.pc = 20; return s.tmp_2; } + } + case 20: + r0 = s.retval; s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = (s.tmp_1 !== undefined); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = "HIDE CONSOLE"; + if (!r0) { step = 5; continue; } + s.tmp_4 = if_gestureHandlers_1_mk(s); + s.tmp_4.arg0 = s.state___188137; + if (!s.tmp_4.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_4.arg0, "gestureHandlers"); + } else { + s.tmp_4.fn = s.tmp_4.arg0.vtable.iface["gestureHandlers"]; + if (s.tmp_4.fn == null) { s.retval = s.tmp_4.arg0.fields["gestureHandlers"]; } + else if (!s.tmp_4.fn.isGetter) { s.retval = bind(s.tmp_4); } + else { s.callLocIdx = 1912; s.pc = 21; return s.tmp_4; } + } + case 21: + r0 = s.retval; + s.tmp_3 = r0; + r0 = pxsim_numops_toBool(s.tmp_3); + if (r0) { step = 1; continue; } + r0 = s.tmp_3; { step = 2; continue; } case 1: - r0 = "SHOW CONSOLE"; + s.tmp_6 = if_gestureHandlers_1_mk(s); + s.tmp_6.arg0 = s.state___188137; + if (!s.tmp_6.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_6.arg0, "gestureHandlers"); + } else { + s.tmp_6.fn = s.tmp_6.arg0.vtable.iface["gestureHandlers"]; + if (s.tmp_6.fn == null) { s.retval = s.tmp_6.arg0.fields["gestureHandlers"]; } + else if (!s.tmp_6.fn.isGetter) { s.retval = bind(s.tmp_6); } + else { s.callLocIdx = 1913; s.pc = 22; return s.tmp_6; } + } + case 22: + r0 = s.retval; + s.tmp_5 = r0; + s.tmp_8 = if_lastGesture_1_mk(s); + s.tmp_8.arg0 = s.state___188137; + if (!s.tmp_8.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_8.arg0, "lastGesture"); + } else { + s.tmp_8.fn = s.tmp_8.arg0.vtable.iface["lastGesture"]; + if (s.tmp_8.fn == null) { s.retval = s.tmp_8.arg0.fields["lastGesture"]; } + else if (!s.tmp_8.fn.isGetter) { s.retval = bind(s.tmp_8); } + else { s.callLocIdx = 1914; s.pc = 23; return s.tmp_8; } + } + case 23: + r0 = s.retval; + s.tmp_7 = r0; + r0 = pxsim_pxtrt.mapGetGeneric(s.tmp_5, s.tmp_7); case 2: + // jmp value (already in r0) + s.tmp_9 = r0; + s.handler___188144 = (s.tmp_9); + r0 = pxsim_numops_toBoolDecr(s.handler___188144); + if (!r0) { step = 3; continue; } + s.tmp_0 = if_lastGesture_2_mk(s); + s.tmp_0.arg0 = s.state___188137; + s.tmp_0.arg1 = undefined; + if (!s.tmp_0.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapSetByString(s.tmp_0.arg0, "lastGesture", s.tmp_0.arg1); + } else { + s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["set/lastGesture"]; + if (s.tmp_0.fn === null) { s.tmp_0.arg0.fields["lastGesture"] = s.tmp_0.arg1; } + else if (s.tmp_0.fn === undefined) { failedCast(s.tmp_0.arg0) } + else { s.callLocIdx = 1915; s.pc = 24; return s.tmp_0; } + } + case 24: + r0 = s.retval; + s.tmp_0 = lambda_1_mk(s); + s.tmp_0.argL = s.handler___188144; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 1916; s.pc = 25; return s.tmp_0; + case 25: + r0 = s.retval; + case 3: + case 4: + case 5: + case 6: + s.tmp_2 = if_lastCustomGesture_1_mk(s); + s.tmp_2.arg0 = s.state___188137; + if (!s.tmp_2.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "lastCustomGesture"); + } else { + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["lastCustomGesture"]; + if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["lastCustomGesture"]; } + else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } + else { s.callLocIdx = 1917; s.pc = 26; return s.tmp_2; } + } + case 26: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_1 !== undefined); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 11; continue; } + s.tmp_4 = if_customGestureHandlers_1_mk(s); + s.tmp_4.arg0 = s.state___188137; + if (!s.tmp_4.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_4.arg0, "customGestureHandlers"); + } else { + s.tmp_4.fn = s.tmp_4.arg0.vtable.iface["customGestureHandlers"]; + if (s.tmp_4.fn == null) { s.retval = s.tmp_4.arg0.fields["customGestureHandlers"]; } + else if (!s.tmp_4.fn.isGetter) { s.retval = bind(s.tmp_4); } + else { s.callLocIdx = 1918; s.pc = 27; return s.tmp_4; } + } + case 27: + r0 = s.retval; + 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: + s.tmp_6 = if_customGestureHandlers_1_mk(s); + s.tmp_6.arg0 = s.state___188137; + if (!s.tmp_6.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_6.arg0, "customGestureHandlers"); + } else { + s.tmp_6.fn = s.tmp_6.arg0.vtable.iface["customGestureHandlers"]; + if (s.tmp_6.fn == null) { s.retval = s.tmp_6.arg0.fields["customGestureHandlers"]; } + else if (!s.tmp_6.fn.isGetter) { s.retval = bind(s.tmp_6); } + else { s.callLocIdx = 1919; s.pc = 28; return s.tmp_6; } + } + case 28: + r0 = s.retval; + s.tmp_5 = r0; + s.tmp_8 = if_lastCustomGesture_1_mk(s); + s.tmp_8.arg0 = s.state___188137; + if (!s.tmp_8.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_8.arg0, "lastCustomGesture"); + } else { + s.tmp_8.fn = s.tmp_8.arg0.vtable.iface["lastCustomGesture"]; + if (s.tmp_8.fn == null) { s.retval = s.tmp_8.arg0.fields["lastCustomGesture"]; } + else if (!s.tmp_8.fn.isGetter) { s.retval = bind(s.tmp_8); } + else { s.callLocIdx = 1920; s.pc = 29; return s.tmp_8; } + } + case 29: + r0 = s.retval; + s.tmp_7 = r0; + r0 = pxsim_pxtrt.mapGetGeneric(s.tmp_5, s.tmp_7); + case 8: + // jmp value (already in r0) + s.tmp_9 = r0; + s.customHandler___188161 = (s.tmp_9); + r0 = pxsim_numops_toBoolDecr(s.customHandler___188161); + if (!r0) { step = 9; continue; } + s.tmp_0 = if_lastCustomGesture_2_mk(s); + s.tmp_0.arg0 = s.state___188137; + s.tmp_0.arg1 = undefined; + if (!s.tmp_0.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapSetByString(s.tmp_0.arg0, "lastCustomGesture", s.tmp_0.arg1); + } else { + s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["set/lastCustomGesture"]; + if (s.tmp_0.fn === null) { s.tmp_0.arg0.fields["lastCustomGesture"] = s.tmp_0.arg1; } + else if (s.tmp_0.fn === undefined) { failedCast(s.tmp_0.arg0) } + else { s.callLocIdx = 1921; s.pc = 30; return s.tmp_0; } + } + case 30: + r0 = s.retval; + s.tmp_0 = if_handler_1_mk(s); + s.tmp_0.arg0 = s.customHandler___188161; + if (!s.tmp_0.arg0.vtable.iface) { + setupLambda(s.tmp_0, pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "handler"), 1); + s.callLocIdx = 1922; s.pc = 31; 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"], 1); s.callLocIdx = 1922; s.pc = 31; return s.tmp_0; } + else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 1922; s.pc = 31; return s.tmp_0;; } + else { s.callLocIdx = 1922; s.pc = 31; return s.tmp_0; } + } + case 31: + r0 = s.retval; + case 9: + case 10: + case 11: + case 12: + s.tmp_1 = if_lightHandlers_1_mk(s); + s.tmp_1.arg0 = s.state___188137; + if (!s.tmp_1.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "lightHandlers"); + } else { + s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["lightHandlers"]; + if (s.tmp_1.fn == null) { s.retval = s.tmp_1.arg0.fields["lightHandlers"]; } + else if (!s.tmp_1.fn.isGetter) { s.retval = bind(s.tmp_1); } + else { s.callLocIdx = 1923; s.pc = 32; return s.tmp_1; } + } + case 32: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 13; continue; } + r0 = s.tmp_0; + { step = 14; continue; } + case 13: + s.tmp_3 = if_lastLightCondition_1_mk(s); + s.tmp_3.arg0 = s.state___188137; + if (!s.tmp_3.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "lastLightCondition"); + } else { + s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["lastLightCondition"]; + if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["lastLightCondition"]; } + else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } + else { s.callLocIdx = 1924; s.pc = 33; return s.tmp_3; } + } + case 33: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_2 !== undefined); + case 14: // jmp value (already in r0) s.tmp_4 = r0; + r0 = pxsim_numops_toBool(s.tmp_4); + if (r0) { step = 15; continue; } r0 = s.tmp_4; + { step = 16; continue; } + case 15: + s.tmp_6 = if_lightHandlers_1_mk(s); + s.tmp_6.arg0 = s.state___188137; + if (!s.tmp_6.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_6.arg0, "lightHandlers"); + } else { + s.tmp_6.fn = s.tmp_6.arg0.vtable.iface["lightHandlers"]; + if (s.tmp_6.fn == null) { s.retval = s.tmp_6.arg0.fields["lightHandlers"]; } + else if (!s.tmp_6.fn.isGetter) { s.retval = bind(s.tmp_6); } + else { s.callLocIdx = 1925; s.pc = 34; return s.tmp_6; } + } + case 34: + r0 = s.retval; + s.tmp_5 = r0; + s.tmp_8 = if_lastLightCondition_1_mk(s); + s.tmp_8.arg0 = s.state___188137; + if (!s.tmp_8.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_8.arg0, "lastLightCondition"); + } else { + s.tmp_8.fn = s.tmp_8.arg0.vtable.iface["lastLightCondition"]; + if (s.tmp_8.fn == null) { s.retval = s.tmp_8.arg0.fields["lastLightCondition"]; } + else if (!s.tmp_8.fn.isGetter) { s.retval = bind(s.tmp_8); } + else { s.callLocIdx = 1926; s.pc = 35; return s.tmp_8; } + } + case 35: + r0 = s.retval; + s.tmp_7 = r0; + r0 = pxsim_pxtrt.mapGetGeneric(s.tmp_5, s.tmp_7); + case 16: + // jmp value (already in r0) + s.tmp_9 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_9); + if (!r0) { step = 17; continue; } + s.tmp_11 = if_lightHandlers_1_mk(s); + s.tmp_11.arg0 = s.state___188137; + if (!s.tmp_11.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_11.arg0, "lightHandlers"); + } else { + s.tmp_11.fn = s.tmp_11.arg0.vtable.iface["lightHandlers"]; + if (s.tmp_11.fn == null) { s.retval = s.tmp_11.arg0.fields["lightHandlers"]; } + else if (!s.tmp_11.fn.isGetter) { s.retval = bind(s.tmp_11); } + else { s.callLocIdx = 1927; s.pc = 36; return s.tmp_11; } + } + case 36: + r0 = s.retval; + s.tmp_10 = r0; + s.tmp_13 = if_lastLightCondition_1_mk(s); + s.tmp_13.arg0 = s.state___188137; + if (!s.tmp_13.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_13.arg0, "lastLightCondition"); + } else { + s.tmp_13.fn = s.tmp_13.arg0.vtable.iface["lastLightCondition"]; + if (s.tmp_13.fn == null) { s.retval = s.tmp_13.arg0.fields["lastLightCondition"]; } + else if (!s.tmp_13.fn.isGetter) { s.retval = bind(s.tmp_13); } + else { s.callLocIdx = 1928; s.pc = 37; return s.tmp_13; } + } + case 37: + r0 = s.retval; + s.tmp_12 = r0; + r0 = pxsim_pxtrt.mapGetGeneric(s.tmp_10, s.tmp_12); + s.handler___188187 = (r0); + s.tmp_0 = if_lastLightCondition_2_mk(s); + s.tmp_0.arg0 = s.state___188137; + s.tmp_0.arg1 = undefined; + if (!s.tmp_0.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapSetByString(s.tmp_0.arg0, "lastLightCondition", s.tmp_0.arg1); + } else { + s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["set/lastLightCondition"]; + if (s.tmp_0.fn === null) { s.tmp_0.arg0.fields["lastLightCondition"] = s.tmp_0.arg1; } + else if (s.tmp_0.fn === undefined) { failedCast(s.tmp_0.arg0) } + else { s.callLocIdx = 1929; s.pc = 38; return s.tmp_0; } + } + case 38: + r0 = s.retval; + s.tmp_0 = lambda_1_mk(s); + s.tmp_0.argL = s.handler___188187; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 1930; s.pc = 39; return s.tmp_0; + case 39: + r0 = s.retval; + case 17: + case 18: + r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_buildOptionList_inline__P189397.info = {"start":11273,"length":71,"line":344,"column":50,"endLine":344,"endColumn":121,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +controller_updateController__P174771.info = {"start":715,"length":1043,"line":26,"column":4,"endLine":52,"endColumn":5,"fileName":"pxt_modules/controller/state.ts","functionName":"updateController","argumentNames":[]} -function scene_systemMenu_buildOptionList_inline__P189397_mk(s) { +function controller_updateController__P174771_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_buildOptionList_inline__P189397, depth: s.depth + 1, + parent: s, fn: controller_updateController__P174771, depth: s.depth + 1, pc: 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, + state___188137: undefined, + handler___188144: undefined, + customHandler___188161: undefined, + handler___188187: undefined, } } -function scene_systemMenu_buildOptionList_inline__P189406(s) { +function controller_sceneState__P171637(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -44891,24 +45524,55 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = "SLEEP"; + s.sc___188197 = undefined; + s.state___188200 = undefined; + s.tmp_0 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1907; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.sc___188197 = (r0); + r0 = s.sc___188197.fields["_data"]; + s.tmp_0 = r0; + r0 = pxsim_pxtrt.mapGetGeneric(s.tmp_0, "controller.state"); + s.state___188200 = (r0); + r0 = pxsim_numops_toBoolDecr(s.state___188200); + 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.sc___188197.fields["_data"]; + s.tmp_2 = r0; + r0 = pxsim_pxtrt.mkMap(); + s.tmp_3 = r0; + r0 = pxsim_pxtrt.mapSetGeneric(s.tmp_2, "controller.state", s.tmp_3); + s.state___188200 = (s.tmp_3); + case 1: + case 2: + r0 = s.state___188200; return leave(s, r0) default: oops() } } } -scene_systemMenu_buildOptionList_inline__P189406.info = {"start":11411,"length":13,"line":345,"column":48,"endLine":345,"endColumn":61,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +controller_sceneState__P171637.info = {"start":418,"length":290,"line":15,"column":4,"endLine":23,"endColumn":5,"fileName":"pxt_modules/controller/state.ts","functionName":"sceneState","argumentNames":[]} -function scene_systemMenu_buildOptionList_inline__P189406_mk(s) { +function controller_sceneState__P171637_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_buildOptionList_inline__P189406, depth: s.depth + 1, + parent: s, fn: controller_sceneState__P171637, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + sc___188197: undefined, + state___188200: undefined, } } -function scene_systemMenu_buildOptionList_inline__P189419(s) { +function StatusBarKind_create__P171203(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -44918,24 +45582,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = "CLOSE"; + r0 = (globals.nextKind___174654 === undefined); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + globals.nextKind___174654 = (1); + case 1: + case 2: + s.tmp_0 = r0 = globals.nextKind___174654; + r0 = (s.tmp_0 + 1); + globals.nextKind___174654 = (r0); + r0 = s.tmp_0; return leave(s, r0) default: oops() } } } -scene_systemMenu_buildOptionList_inline__P189419.info = {"start":11590,"length":13,"line":351,"column":53,"endLine":351,"endColumn":66,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +StatusBarKind_create__P171203.info = {"start":1891,"length":109,"line":51,"column":4,"endLine":54,"endColumn":5,"fileName":"pxt_modules/pxt-status-bar/status-bar.ts","functionName":"create","argumentNames":[]} -function scene_systemMenu_buildOptionList_inline__P189419_mk(s) { +function StatusBarKind_create__P171203_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_buildOptionList_inline__P189419, depth: s.depth + 1, + parent: s, fn: StatusBarKind_create__P171203, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, } } -function scene_systemMenu_setScreenBrightnessSupported__P172723(s) { +function music_Melody_constructor__P168156(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -44945,24 +45620,34 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = 0; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, music_Melody__C168153_VT)) failedCast(r0); + r0 = (s.arg0).fields["_text"] = (s.arg1); + r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_setScreenBrightnessSupported__P172723.info = {"start":10398,"length":95,"line":330,"column":4,"endLine":332,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"setScreenBrightnessSupported","argumentNames":[]} +music_Melody_constructor__P168156.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 scene_systemMenu_setScreenBrightnessSupported__P172723_mk(s) { +function music_Melody_constructor__P168156_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_setScreenBrightnessSupported__P172723, depth: s.depth + 1, + parent: s, fn: music_Melody_constructor__P168156, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, + arg1: undefined, } } -function scene_systemMenu_sleep__P172722(s) { +function grid_move__P170877(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -44972,87 +45657,103 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_pxtcore.deepSleep(); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -scene_systemMenu_sleep__P172722.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__P172722_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: scene_systemMenu_sleep__P172722, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, -} } - - - - - -function scene_systemMenu_toggleConsole__P172721(s) { -let r0 = s.r0, 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___172756); - s.tmp_3 = r0; - r0 = pxsim_Boolean__bang(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.loc___188233 = undefined; + s.c___188243 = undefined; + s.r___188247 = undefined; + s.newLoc___188251 = 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 = grid_getLocation__P170875_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1814; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.loc___188233 = (r0); + r0 = pxsim_numops_toBoolDecr(s.loc___188233); 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__P169653_mk(s); - s.tmp_4.arg0 = false; - s.tmp_4.arg1 = undefined; - s.callLocIdx = 1511; s.pc = 3; return s.tmp_4; - case 3: - r0 = s.retval; - { step = 2; continue; } - case 1: - s.tmp_0 = game_consoleOverlay_setVisible__P169653_mk(s); - s.tmp_0.arg0 = true; - s.tmp_0.arg1 = undefined; - s.callLocIdx = 1512; s.pc = 4; return s.tmp_0; + s.tmp_2 = grid_snap__P170888_mk(s); + s.tmp_2.arg0 = s.arg0; + s.tmp_2.arg1 = false; + s.callLocIdx = 1815; s.pc = 4; return s.tmp_2; case 4: r0 = s.retval; - s.tmp_0 = console_log__P166907_mk(s); - s.tmp_0.arg0 = "console"; - s.callLocIdx = 1513; s.pc = 5; return s.tmp_0; + s.tmp_0 = grid_getLocation__P170875_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1816; s.pc = 5; return s.tmp_0; case 5: r0 = s.retval; + s.loc___188233 = (r0); + case 1: case 2: + s.tmp_0 = locCol__P170859_mk(s); + s.tmp_0.arg0 = s.loc___188233; + s.callLocIdx = 1817; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + s.c___188243 = (r0); + s.tmp_0 = locRow__P170858_mk(s); + s.tmp_0.arg0 = s.loc___188233; + s.callLocIdx = 1818; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + s.r___188247 = (r0); + s.tmp_0 = tiles_TileMap_getTile__P169276_mk(s); + s.tmp_1 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1819; s.pc = 9; return s.tmp_1; + case 9: + r0 = s.retval; + r0 = r0.fields["tileMap"]; + s.tmp_0.arg0 = r0; + r0 = (s.c___188243 + s.arg1); + s.tmp_0.arg1 = r0; + r0 = (s.r___188247 + s.arg2); + s.tmp_0.arg2 = r0; + s.callLocIdx = 1820; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + s.newLoc___188251 = (r0); + s.tmp_0 = grid_place__P170873_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.newLoc___188251; + s.callLocIdx = 1821; s.pc = 10; return s.tmp_0; + case 10: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_toggleConsole__P172721.info = {"start":9827,"length":239,"line":307,"column":4,"endLine":314,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"toggleConsole","argumentNames":[]} +grid_move__P170877.info = {"start":4564,"length":388,"line":146,"column":4,"endLine":156,"endColumn":5,"fileName":"pxt_modules/Sprite Grid/grid.ts","functionName":"move","argumentNames":["sprite","columns","rows"]} -function scene_systemMenu_toggleConsole__P172721_mk(s) { +function grid_move__P170877_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_toggleConsole__P172721, depth: s.depth + 1, + parent: s, fn: grid_move__P170877, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, + loc___188233: undefined, + c___188243: undefined, + r___188247: undefined, + newLoc___188251: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function game_consoleOverlay_setVisible__P169653(s) { +function grid_snap__P170888(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -45062,61 +45763,90 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.loc___188451 = undefined; 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___172756); - s.tmp_5 = r0; - r0 = pxsim_Boolean__bang(s.tmp_5); - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - s.tmp_3 = r0; - r0 = pxsim_Boolean__bang(s.tmp_3); - s.tmp_2 = r0; - r0 = (s.tmp_1 != s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = pxsim_numops_toBoolDecr(s.arg0); + s.tmp_0 = tiles_getTileLocation__P169294_mk(s); + s.tmp_1 = grid_screenCoordinateToTile__P174533_mk(s); + s.tmp_2 = Sprite_x__P168881_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 1832; s.pc = 5; return s.tmp_2; + case 5: + r0 = s.retval; + s.tmp_1.arg0 = r0; + s.callLocIdx = 1833; s.pc = 4; return s.tmp_1; + case 4: + r0 = s.retval; + s.tmp_0.arg0 = r0; + s.tmp_3 = grid_screenCoordinateToTile__P174533_mk(s); + s.tmp_4 = Sprite_y__P168883_mk(s); + s.tmp_4.arg0 = s.arg0; + s.callLocIdx = 1834; s.pc = 7; return s.tmp_4; + case 7: + r0 = s.retval; + s.tmp_3.arg0 = r0; + s.callLocIdx = 1835; s.pc = 6; return s.tmp_3; + case 6: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1836; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.loc___188451 = (r0); + s.tmp_0 = grid_place__P170873_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.loc___188451; + s.callLocIdx = 1837; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + r0 = pxsim_numops_toBoolDecr(s.arg1); if (!r0) { step = 1; continue; } - r0 = pxsim_Array__mk(); - { step = 2; continue; } + s.tmp_0 = Sprite_ay__P168892_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 1838; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; + s.tmp_1 = Sprite_ax__P168890_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_1.arg1 = 0; + s.callLocIdx = 1839; s.pc = 10; return s.tmp_1; + case 10: + r0 = s.retval; + s.tmp_2 = Sprite_vy__P168888_mk(s); + s.tmp_2.arg0 = s.arg0; + s.tmp_2.arg1 = 0; + s.callLocIdx = 1840; s.pc = 11; return s.tmp_2; + case 11: + r0 = s.retval; + s.tmp_3 = Sprite_vx__P168886_mk(s); + s.tmp_3.arg0 = s.arg0; + s.tmp_3.arg1 = 0; + s.callLocIdx = 1841; s.pc = 12; return s.tmp_3; + case 12: + r0 = s.retval; case 1: - r0 = undefined; case 2: - // jmp value (already in r0) - s.tmp_6 = r0; - globals.consoleStrings___172756 = (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___172755 = (s.arg1); - case 5: - case 6: r0 = undefined; return leave(s, r0) default: oops() } } } -game_consoleOverlay_setVisible__P169653.info = {"start":562,"length":219,"line":19,"column":4,"endLine":24,"endColumn":5,"fileName":"pxt_modules/game/console.ts","functionName":"setVisible","argumentNames":["value","col"]} +grid_snap__P170888.info = {"start":10046,"length":248,"line":311,"column":4,"endLine":317,"endColumn":5,"fileName":"pxt_modules/Sprite Grid/grid.ts","functionName":"snap","argumentNames":["s","stop"]} -function game_consoleOverlay_setVisible__P169653_mk(s) { +function grid_snap__P170888_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_consoleOverlay_setVisible__P169653, depth: s.depth + 1, + parent: s, fn: grid_snap__P170888, depth: s.depth + 1, pc: 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, + loc___188451: undefined, arg0: undefined, arg1: undefined, } } @@ -45125,7 +45855,7 @@ function game_consoleOverlay_setVisible__P169653_mk(s) { -function console_log__P166907(s) { +function grid_screenCoordinateToTile__P174533(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -45135,28 +45865,47 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.tm___188473 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = console_add__P166903_mk(s); - s.tmp_0.arg0 = 1; - s.tmp_0.arg1 = s.arg0; - s.callLocIdx = 47; s.pc = 1; return s.tmp_0; - case 1: + s.tmp_0 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1830; s.pc = 4; return s.tmp_0; + case 4: r0 = s.retval; - r0 = undefined; + r0 = r0.fields["tileMap"]; + s.tm___188473 = (r0); + r0 = pxsim_numops_toBoolDecr(s.tm___188473); + 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 >> 4); + { step = 3; continue; } + case 1: + case 2: + s.tmp_2 = r0 = s.arg0; + r0 = s.tm___188473.fields["_scale"]; + s.tmp_3 = r0; + r0 = (s.tmp_2 >> s.tmp_3); + case 3: return leave(s, r0) default: oops() } } } -console_log__P166907.info = {"start":1450,"length":86,"line":58,"column":4,"endLine":60,"endColumn":5,"fileName":"pxt_modules/base/console.ts","functionName":"log","argumentNames":["value"]} +grid_screenCoordinateToTile__P174533.info = {"start":9717,"length":172,"line":302,"column":4,"endLine":306,"endColumn":5,"fileName":"pxt_modules/Sprite Grid/grid.ts","functionName":"screenCoordinateToTile","argumentNames":["value"]} -function console_log__P166907_mk(s) { +function grid_screenCoordinateToTile__P174533_mk(s) { checkStack(s.depth); return { - parent: s, fn: console_log__P166907, depth: s.depth + 1, + parent: s, fn: grid_screenCoordinateToTile__P174533, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tm___188473: undefined, arg0: undefined, } } @@ -45164,7 +45913,7 @@ function console_log__P166907_mk(s) { -function console_add__P166903(s) { +function grid_getLocation__P170875(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -45174,87 +45923,78 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.text___189458 = undefined; - s.i___189467 = undefined; + s.d___188486 = undefined; + s.r___188490 = undefined; + s.c___188494 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg0 < globals.minPriority___166902); + s.tmp_0 = Sprite_data__P168903_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1811; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + s.d___188486 = (r0); + r0 = pxsim_pxtrt.mapGetGeneric(s.d___188486, globals.DATA_ROW___170860); + s.r___188490 = (r0); + r0 = pxsim_pxtrt.mapGetGeneric(s.d___188486, globals.DATA_COL___170861); + s.c___188494 = (r0); + r0 = (s.r___188490 === undefined); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + r0 = pxsim_numops_toBool(s.tmp_0); if (!r0) { step = 1; continue; } - { step = 5; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: + r0 = (s.c___188494 === undefined); case 2: - s.tmp_1 = console_inspect__P166909_mk(s); - s.tmp_1.arg0 = s.arg1; - s.tmp_1.arg1 = 20; - s.callLocIdx = 45; s.pc = 6; return s.tmp_1; - case 6: - r0 = s.retval; - s.text___189458 = (r0); - if ((s.text___189458) && (s.text___189458).vtable) { - setupResume(s, 7); - pxsim_String__stringConv(s.text___189458); - checkResumeConsumed(); - return; - } else { s.retval = (s.text___189458) + ""; } - case 7: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_String__concat(s.tmp_0, "\n"); - s.text___189458 = (r0); - s.i___189467 = (0); + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 3; continue; } + r0 = null; + { step = 5; continue; } case 3: - s.tmp_1 = r0 = s.i___189467; - r0 = pxsim_Array__length(globals.listeners___171935); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - s.tmp_3 = lambda_3_mk(s); - r0 = pxsim_Array__getAt(globals.listeners___171935, s.i___189467); - s.tmp_3.argL = r0; - s.tmp_3.arg0 = s.arg0; - s.tmp_3.arg1 = s.text___189458; - setupLambda(s.tmp_3, s.tmp_3.argL); - s.callLocIdx = 46; s.pc = 8; return s.tmp_3; + case 4: + s.tmp_2 = tiles_TileMap_getTile__P169276_mk(s); + s.tmp_3 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1812; s.pc = 8; return s.tmp_3; case 8: r0 = s.retval; - r0 = (s.i___189467 + 1); - s.i___189467 = (r0); - { step = 3; continue; } - case 4: + r0 = r0.fields["tileMap"]; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = s.c___188494; + s.tmp_2.arg2 = s.r___188490; + s.callLocIdx = 1813; s.pc = 7; return s.tmp_2; + case 7: + r0 = s.retval; case 5: - r0 = undefined; return leave(s, r0) default: oops() } } } -console_add__P166903.info = {"start":632,"length":317,"line":28,"column":4,"endLine":36,"endColumn":5,"fileName":"pxt_modules/base/console.ts","functionName":"add","argumentNames":["priority","message"]} +grid_getLocation__P170875.info = {"start":3725,"length":386,"line":126,"column":4,"endLine":134,"endColumn":5,"fileName":"pxt_modules/Sprite Grid/grid.ts","functionName":"getLocation","argumentNames":["sprite"]} -function console_add__P166903_mk(s) { +function grid_getLocation__P170875_mk(s) { checkStack(s.depth); return { - parent: s, fn: console_add__P166903, depth: s.depth + 1, + parent: s, fn: grid_getLocation__P170875, depth: s.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___189458: undefined, - i___189467: undefined, + d___188486: undefined, + r___188490: undefined, + c___188494: undefined, arg0: undefined, - arg1: undefined, } } -function scene_systemMenu_toggleStats__P172720(s) { +function Sprite_data__P168903(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -45264,57 +46004,51 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.stats___169495); - s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); - globals.stats___169495 = (r0); - r0 = pxsim_numops_toBoolDecr(globals.stats___169495); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C168868_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_toBool(s.tmp_0); - if (r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + 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: - r0 = globals.control_EventContext_onStats___166925; 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___166925; - r0 = pxsim_String_.mkEmpty(); - s.tmp_3.arg0 = r0; - setupLambda(s.tmp_3, s.tmp_3.argL); - s.callLocIdx = 1509; s.pc = 5; return s.tmp_3; - case 5: - r0 = s.retval; - case 3: - case 4: - r0 = undefined; - return leave(s, r0) + r0 = s.arg0.fields["_data"]; + return leaveAccessor(s, r0) default: oops() } } } -scene_systemMenu_toggleStats__P172720.info = {"start":9642,"length":179,"line":300,"column":4,"endLine":305,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"toggleStats","argumentNames":[]} +Sprite_data__P168903.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__P168903.isGetter = true; -function scene_systemMenu_toggleStats__P172720_mk(s) { +function Sprite_data__P168903_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_toggleStats__P172720, depth: s.depth + 1, + parent: s, fn: Sprite_data__P168903, depth: s.depth + 1, pc: 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_brightnessDown__P172718(s) { +function grid_place__P170873(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -45324,34 +46058,44 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = scene_systemMenu_setScreenBrightness__P172719_mk(s); - r0 = globals.brightness___168478; - s.tmp_1 = r0; - r0 = (s.tmp_1 - 5); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + s.tmp_0 = grid_Grid_place__P170868_mk(s); + s.tmp_1 = grid_currentGrid__P174496_mk(s); + s.callLocIdx = 1809; s.pc = 2; return s.tmp_1; + case 2: + r0 = s.retval; s.tmp_0.arg0 = r0; - s.callLocIdx = 1505; s.pc = 1; return s.tmp_0; + s.tmp_0.arg1 = s.arg0; + s.tmp_0.arg2 = s.arg1; + s.callLocIdx = 1810; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_brightnessDown__P172718.info = {"start":9198,"length":87,"line":289,"column":4,"endLine":291,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"brightnessDown","argumentNames":[]} +grid_place__P170873.info = {"start":3264,"length":108,"line":111,"column":4,"endLine":113,"endColumn":5,"fileName":"pxt_modules/Sprite Grid/grid.ts","functionName":"place","argumentNames":["sprite","loc"]} -function scene_systemMenu_brightnessDown__P172718_mk(s) { +function grid_place__P170873_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_brightnessDown__P172718, depth: s.depth + 1, + parent: s, fn: grid_place__P170873, 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_setScreenBrightness__P172719(s) { +function grid_currentGrid__P174496(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -45361,43 +46105,62 @@ 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 = helpers_setScreenBrightness__P168492_mk(s); - s.tmp_0.arg0 = globals.screen___168559; - s.tmp_0.arg1 = s.arg0; - s.callLocIdx = 1506; s.pc = 1; return s.tmp_0; - case 1: + s.tm___188274 = undefined; + r0 = pxsim_numops_toBoolDecr(globals._currentGrid___174495); + 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_2 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1807; s.pc = 5; return s.tmp_2; + case 5: r0 = s.retval; - s.tmp_0 = settings_writeNumber__P168590_mk(s); - s.tmp_0.arg0 = "#brightness"; - r0 = globals.brightness___168478; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1508; s.pc = 2; return s.tmp_0; + r0 = r0.fields["tileMap"]; + s.tm___188274 = (r0); + r0 = pxsim_numops_toBoolDecr(s.tm___188274); + 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.throwValue("Cannot use sprite grid; no tilemap has been set"); + case 1: case 2: + r0 = pxsim_pxtcore_mkClassInstance(grid_Grid__C170863_VT); + s.tmp_2 = r0; + s.tmp_3 = grid_Grid_constructor__P170867_mk(s); + s.tmp_3.arg0 = s.tmp_2; + s.tmp_3.arg1 = s.tm___188274; + s.callLocIdx = 1808; s.pc = 6; return s.tmp_3; + case 6: r0 = s.retval; - r0 = undefined; + globals._currentGrid___174495 = (s.tmp_2); + case 3: + case 4: + r0 = globals._currentGrid___174495; return leave(s, r0) default: oops() } } } -scene_systemMenu_setScreenBrightness__P172719.info = {"start":9291,"length":345,"line":293,"column":4,"endLine":298,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"setScreenBrightness","argumentNames":["b"]} +grid_currentGrid__P174496.info = {"start":2546,"length":289,"line":87,"column":4,"endLine":95,"endColumn":5,"fileName":"pxt_modules/Sprite Grid/grid.ts","functionName":"currentGrid","argumentNames":[]} -function scene_systemMenu_setScreenBrightness__P172719_mk(s) { +function grid_currentGrid__P174496_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_setScreenBrightness__P172719, depth: s.depth + 1, + parent: s, fn: grid_currentGrid__P174496, 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, + tm___188274: undefined, } } -function helpers_setScreenBrightness__P168492(s) { +function grid_Grid_constructor__P170867(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -45407,43 +46170,87 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.x___188306 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = Math_clamp__P166654_mk(s); - s.tmp_0.arg0 = 10; - s.tmp_0.arg1 = 100; - r0 = (s.arg1 | 0); - s.tmp_0.arg2 = r0; - s.callLocIdx = 157; s.pc = 1; return s.tmp_0; - case 1: + r0 = s.arg0; + if (!checkSubtype(r0, grid_Grid__C170863_VT)) failedCast(r0); + r0 = (s.arg0).fields["tm"] = (s.arg1); + s.tmp_0 = r0 = s.arg0; + s.tmp_3 = tiles_TileMap_areaWidth__P169270_mk(s); + s.tmp_3.arg0 = s.arg1; + s.callLocIdx = 1797; s.pc = 3; return s.tmp_3; + case 3: r0 = s.retval; - s.arg1 = (r0); - globals.brightness___168478 = (s.arg1); - r0 = pxsim_pxtcore.setScreenBrightness(globals.brightness___168478); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -helpers_setScreenBrightness__P168492.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__P168492_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: helpers_setScreenBrightness__P168492, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, - arg1: undefined, -} } - + s.tmp_2 = r0; + r0 = s.arg1.fields["_scale"]; + s.tmp_4 = r0; + r0 = (s.tmp_2 >> s.tmp_4); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["columns"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + s.tmp_3 = tiles_TileMap_areaHeight__P169271_mk(s); + s.tmp_3.arg0 = s.arg1; + s.callLocIdx = 1799; s.pc = 4; return s.tmp_3; + case 4: + r0 = s.retval; + s.tmp_2 = r0; + r0 = s.arg1.fields["_scale"]; + s.tmp_4 = r0; + r0 = (s.tmp_2 >> s.tmp_4); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["rows"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["sprites"] = (s.tmp_1); + s.x___188306 = (0); + case 1: + r0 = s.arg0.fields["columns"]; + s.tmp_1 = r0; + r0 = (s.x___188306 < s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + r0 = s.arg0.fields["sprites"]; + s.tmp_2 = r0; + s.tmp_3 = r0 = s.x___188306; + r0 = pxsim_Array__mk(); + s.tmp_4 = r0; + r0 = pxsim_Array_.setAt(s.tmp_2, s.tmp_3, s.tmp_4); + r0 = (s.x___188306 + 1); + s.x___188306 = (r0); + { step = 1; continue; } + case 2: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +grid_Grid_constructor__P170867.info = {"start":484,"length":295,"line":20,"column":8,"endLine":28,"endColumn":9,"fileName":"pxt_modules/Sprite Grid/grid.ts","functionName":"inline","argumentNames":["this","tm"]} + +function grid_Grid_constructor__P170867_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: grid_Grid_constructor__P170867, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + x___188306: undefined, + arg0: undefined, + arg1: undefined, +} } -function scene_systemMenu_brightnessUp__P172717(s) { + +function grid_Grid_place__P170868(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -45453,34 +46260,157 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = scene_systemMenu_setScreenBrightness__P172719_mk(s); - r0 = globals.brightness___168478; + s.x___188326 = undefined; + s.y___188337 = undefined; + s.d___188372 = 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, grid_Grid__C170863_VT)) failedCast(r0); + r0 = s.arg1.fields["flags"]; s.tmp_1 = r0; - r0 = (s.tmp_1 + 5); - s.tmp_0.arg0 = r0; - s.callLocIdx = 1503; s.pc = 1; return s.tmp_0; + r0 = (s.tmp_1 & 2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + { step = 13; continue; } case 1: + case 2: + s.tmp_2 = locCol__P170859_mk(s); + s.tmp_2.arg0 = s.arg2; + s.callLocIdx = 1801; s.pc = 14; return s.tmp_2; + case 14: + r0 = s.retval; + s.x___188326 = (r0); + r0 = (s.x___188326 < 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 = s.arg0.fields["columns"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 <= s.x___188326); + case 4: + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 5; continue; } + { step = 13; continue; } + case 5: + case 6: + s.tmp_3 = locRow__P170858_mk(s); + s.tmp_3.arg0 = s.arg2; + s.callLocIdx = 1802; s.pc = 15; return s.tmp_3; + case 15: + r0 = s.retval; + s.y___188337 = (r0); + r0 = (s.y___188337 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 7; continue; } + r0 = s.tmp_0; + { step = 8; continue; } + case 7: + r0 = s.arg0.fields["rows"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 <= s.y___188337); + case 8: + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 9; continue; } + { step = 13; continue; } + case 9: + case 10: + s.tmp_3 = grid_Grid_remove__P170869_mk(s); + s.tmp_3.arg0 = s.arg0; + s.tmp_3.arg1 = s.arg1; + s.callLocIdx = 1803; s.pc = 16; return s.tmp_3; + case 16: + r0 = s.retval; + r0 = s.arg0.fields["sprites"]; + s.tmp_4 = r0; + r0 = pxsim_Array__getAt(s.tmp_4, s.x___188326); + s.tmp_3 = r0; + r0 = pxsim_Array__getAt(s.tmp_3, s.y___188337); + 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 = s.arg0.fields["sprites"]; + s.tmp_6 = r0; + r0 = pxsim_Array__getAt(s.tmp_6, s.x___188326); + s.tmp_5 = r0; + s.tmp_7 = r0 = s.y___188337; + r0 = pxsim_Array__mk(); + s.tmp_8 = r0; + r0 = pxsim_Array_.setAt(s.tmp_5, s.tmp_7, s.tmp_8); + case 11: + case 12: + r0 = s.arg0.fields["sprites"]; + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_2, s.x___188326); + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_1, s.y___188337); + s.tmp_0 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.arg1); + s.tmp_0 = Sprite_data__P168903_mk(s); + s.tmp_0.arg0 = s.arg1; + s.callLocIdx = 1804; s.pc = 17; return s.tmp_0; + case 17: + r0 = s.retval; + s.d___188372 = (r0); + r0 = pxsim_pxtrt.mapSetGeneric(s.d___188372, globals.DATA_COL___170861, s.x___188326); + r0 = pxsim_pxtrt.mapSetGeneric(s.d___188372, globals.DATA_ROW___170860, s.y___188337); + s.tmp_0 = tiles_Location_place__P169236_mk(s); + s.tmp_0.arg0 = s.arg2; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 1805; s.pc = 18; return s.tmp_0; + case 18: r0 = s.retval; + case 13: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_brightnessUp__P172717.info = {"start":9107,"length":85,"line":285,"column":4,"endLine":287,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"brightnessUp","argumentNames":[]} +grid_Grid_place__P170868.info = {"start":789,"length":614,"line":30,"column":8,"endLine":47,"endColumn":9,"fileName":"pxt_modules/Sprite Grid/grid.ts","functionName":"place","argumentNames":["this","sprite","loc"]} -function scene_systemMenu_brightnessUp__P172717_mk(s) { +function grid_Grid_place__P170868_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_brightnessUp__P172717, depth: s.depth + 1, + parent: s, fn: grid_Grid_place__P170868, depth: s.depth + 1, pc: 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, + x___188326: undefined, + y___188337: undefined, + d___188372: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function scene_systemMenu_volumeDown__P172716(s) { +function grid_Grid_remove__P170869(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -45490,54 +46420,93 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.v___189730 = undefined; - s.remainder___189733 = undefined; - s.newVolume___189736 = undefined; - s.tmp_0 = music_volume__P168148_mk(s); - s.callLocIdx = 1500; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.v___189730 = (r0); - r0 = (s.v___189730 % 32); - s.remainder___189733 = (r0); - r0 = pxsim_numops_toBoolDecr(s.remainder___189733); + s.d___188402 = undefined; + s.c___188406 = undefined; + s.r___188410 = undefined; + s.spriteList___188429 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, grid_Grid__C170863_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(s.arg1); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = s.remainder___189733; - { step = 2; continue; } + { step = 9; continue; } case 1: - r0 = 32; case 2: - // jmp value (already in r0) + s.tmp_2 = Sprite_data__P168903_mk(s); + s.tmp_2.arg0 = s.arg1; + s.callLocIdx = 1806; s.pc = 10; return s.tmp_2; + case 10: + r0 = s.retval; + s.d___188402 = (r0); + r0 = pxsim_pxtrt.mapGetGeneric(s.d___188402, globals.DATA_COL___170861); + s.c___188406 = (r0); + r0 = pxsim_pxtrt.mapGetGeneric(s.d___188402, globals.DATA_ROW___170860); + s.r___188410 = (r0); + r0 = (s.c___188406 === undefined); s.tmp_0 = r0; - r0 = (s.v___189730 - s.tmp_0); - s.newVolume___189736 = (r0); - s.tmp_0 = scene_systemMenu_setVolume__P172714_mk(s); - s.tmp_0.arg0 = s.newVolume___189736; - s.callLocIdx = 1501; s.pc = 4; return s.tmp_0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = s.tmp_0; + { step = 4; continue; } + case 3: + r0 = (s.r___188410 === undefined); case 4: - r0 = s.retval; + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 5; continue; } + { step = 9; continue; } + case 5: + case 6: + r0 = pxsim_pxtrt.mapSetGeneric(s.d___188402, globals.DATA_COL___170861, undefined); + r0 = pxsim_pxtrt.mapSetGeneric(s.d___188402, globals.DATA_ROW___170860, undefined); + r0 = s.arg0.fields["sprites"]; + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_1, s.c___188406); + s.tmp_0 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.r___188410); + s.spriteList___188429 = (r0); + r0 = pxsim_numops_toBoolDecr(s.spriteList___188429); + if (!r0) { step = 7; continue; } + r0 = pxsim_Array_.removeElement(s.spriteList___188429, s.arg1); + case 7: + case 8: + case 9: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_volumeDown__P172716.info = {"start":8914,"length":187,"line":278,"column":4,"endLine":283,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"volumeDown","argumentNames":[]} +grid_Grid_remove__P170869.info = {"start":1413,"length":599,"line":49,"column":8,"endLine":67,"endColumn":9,"fileName":"pxt_modules/Sprite Grid/grid.ts","functionName":"remove","argumentNames":["this","sprite"]} -function scene_systemMenu_volumeDown__P172716_mk(s) { +function grid_Grid_remove__P170869_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_volumeDown__P172716, depth: s.depth + 1, + parent: s, fn: grid_Grid_remove__P170869, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - v___189730: undefined, - remainder___189733: undefined, - newVolume___189736: undefined, + tmp_1: undefined, + tmp_2: undefined, + d___188402: undefined, + c___188406: undefined, + r___188410: undefined, + spriteList___188429: undefined, + arg0: undefined, + arg1: undefined, } } -function scene_systemMenu_setVolume__P172714(s) { +function locCol__P170859(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -45551,33 +46520,27 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = music_setVolume__P168147_mk(s); + s.tmp_0 = if__col_1_mk(s); s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1495; s.pc = 1; return s.tmp_0; + if (!s.tmp_0.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "_col"); + } else { + s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["_col"]; + if (s.tmp_0.fn == null) { s.retval = s.tmp_0.arg0.fields["_col"]; } + else if (!s.tmp_0.fn.isGetter) { s.retval = bind(s.tmp_0); } + else { s.callLocIdx = 1796; s.pc = 1; return s.tmp_0; } + } case 1: r0 = s.retval; - s.tmp_0 = music_playTone__P168149_mk(s); - s.tmp_0.arg0 = 440; - s.tmp_0.arg1 = 500; - s.callLocIdx = 1496; s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; - s.tmp_0 = settings_writeNumber__P168590_mk(s); - s.tmp_0.arg0 = "#volume"; - s.tmp_0.arg1 = s.arg0; - s.callLocIdx = 1497; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_setVolume__P172714.info = {"start":8565,"length":166,"line":265,"column":4,"endLine":269,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"setVolume","argumentNames":["newVolume"]} +locCol__P170859.info = {"start":74,"length":73,"line":3,"column":0,"endLine":5,"endColumn":1,"fileName":"pxt_modules/Sprite Grid/grid.ts","functionName":"locCol","argumentNames":["l"]} -function scene_systemMenu_setVolume__P172714_mk(s) { +function locCol__P170859_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_setVolume__P172714, depth: s.depth + 1, + parent: s, fn: locCol__P170859, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -45587,7 +46550,7 @@ function scene_systemMenu_setVolume__P172714_mk(s) { -function music_playTone__P168149(s) { +function locRow__P170858(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -45597,82 +46560,41 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.id___189571 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_pxtrt.mklocRef(); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.arg1); - s.arg1 = (s.tmp_0); - r0 = pxsim_pxtrt_ldlocRef(s.arg1); - s.tmp_2 = r0; - r0 = (s.tmp_2 == 0); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 1; continue; } - r0 = pxsim_pxtrt_stlocRef(s.arg1, 86400000); + s.tmp_0 = if__row_1_mk(s); + s.tmp_0.arg0 = s.arg0; + if (!s.tmp_0.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "_row"); + } else { + s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["_row"]; + if (s.tmp_0.fn == null) { s.retval = s.tmp_0.arg0.fields["_row"]; } + else if (!s.tmp_0.fn.isGetter) { s.retval = bind(s.tmp_0); } + else { s.callLocIdx = 1795; s.pc = 1; return s.tmp_0; } + } 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__P171993_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 = 86; s.pc = 5; return s.tmp_2; - case 5: r0 = s.retval; - s.tmp_0 = pause__P166940_mk(s); - r0 = pxsim_pxtrt_ldlocRef(s.arg1); - s.tmp_0.arg0 = r0; - s.callLocIdx = 87; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - { step = 4; continue; } - case 3: - r0 = (globals.playToneID___171995 + 1); - s.tmp_0 = r0; - globals.playToneID___171995 = (r0); - s.id___189571 = (s.tmp_0); - r0 = pxsim_pxtcore_mkAction(3, music_playTone_inline__P189577); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.id___189571); - 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__P168149.info = {"start":2612,"length":831,"line":84,"column":4,"endLine":109,"endColumn":5,"fileName":"pxt_modules/mixer/melody.ts","functionName":"playTone","argumentNames":["frequency","ms"]} +locRow__P170858.info = {"start":0,"length":73,"line":0,"column":0,"endLine":2,"endColumn":1,"fileName":"pxt_modules/Sprite Grid/grid.ts","functionName":"locRow","argumentNames":["l"]} -function music_playTone__P168149_mk(s) { +function locRow__P170858_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_playTone__P168149, depth: s.depth + 1, + parent: s, fn: locRow__P170858, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - id___189571: undefined, arg0: undefined, - arg1: undefined, } } -function music_playTone_inline__P189577(s) { +function controller_Button_onEvent__P168723(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -45682,106 +46604,46 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.pos___189578 = undefined; - s.now___189588 = undefined; - s.d___189591 = undefined; - s.t___189595 = undefined; - r0 = pxsim.control.millis(); - s.pos___189578 = (r0); + s.eventHandler___188518 = 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__C168716_VT)) failedCast(r0); + s.tmp_0 = controller_Button_getOrCreateHandlerForEvent__P172246_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 300; s.pc = 1; return s.tmp_0; case 1: - r0 = (s.caps[0] == globals.playToneID___171995); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 2; continue; } - r0 = s.tmp_0; - { step = 3; continue; } - case 2: - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); - s.tmp_1 = r0; - r0 = (s.tmp_1 > 0); - case 3: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 6; continue; } - r0 = pxsim.control.millis(); - s.now___189588 = (r0); - r0 = (s.pos___189578 - s.now___189588); - s.d___189591 = (r0); - s.tmp_0 = Math_min__P166658_mk(s); - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = 500; - s.callLocIdx = 88; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - s.t___189595 = (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___189595); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); - r0 = (s.pos___189578 + s.t___189595); - s.pos___189578 = (r0); - s.tmp_0 = music_playNoteCore__P171993_mk(s); - r0 = (s.d___189591 - 1); - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.caps[2]; - s.tmp_0.arg2 = s.t___189595; - s.callLocIdx = 89; s.pc = 8; return s.tmp_0; - case 8: - r0 = s.retval; - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); - s.tmp_1 = r0; - r0 = (s.tmp_1 == 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - s.tmp_2 = pause__P166940_mk(s); - r0 = (s.d___189591 + s.t___189595); - s.tmp_2.arg0 = r0; - s.callLocIdx = 90; s.pc = 9; return s.tmp_2; - case 9: - r0 = s.retval; - { step = 5; continue; } - case 4: - s.tmp_0 = pause__P166940_mk(s); - r0 = (s.d___189591 + s.t___189595); - s.tmp_1 = r0; - r0 = (s.tmp_1 - 100); - s.tmp_0.arg0 = r0; - s.callLocIdx = 91; s.pc = 10; return s.tmp_0; - case 10: r0 = s.retval; - case 5: - { step = 1; continue; } - case 6: + s.eventHandler___188518 = (r0); + r0 = (s.eventHandler___188518).fields["callback"] = (s.arg2); r0 = undefined; return leave(s, r0) default: oops() } } } -music_playTone_inline__P189577.info = {"start":2911,"length":515,"line":93,"column":34,"endLine":107,"endColumn":13,"fileName":"pxt_modules/mixer/melody.ts","functionName":"inline","argumentNames":[]} +controller_Button_onEvent__P168723.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 music_playTone_inline__P189577_mk(s) { +function controller_Button_onEvent__P168723_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_playTone_inline__P189577, depth: s.depth + 1, + parent: s, fn: controller_Button_onEvent__P168723, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - pos___189578: undefined, - now___189588: undefined, - d___189591: undefined, - t___189595: undefined, + eventHandler___188518: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function music_playNoteCore__P171993(s) { +function controller_Button_getOrCreateHandlerForEvent__P172246(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -45791,57 +46653,189 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.buf___189625 = undefined; + s.handlerState___188539 = undefined; + s.eventHandler___188548 = undefined; + s.unnamed806___U2 = undefined; + s.unnamed807___U3 = undefined; + s.newHandler___188564 = 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___189625 = (r0); - s.tmp_0 = music_addNote__P168163_mk(s); - s.tmp_0.arg0 = s.buf___189625; - 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__P168148_mk(s); - s.callLocIdx = 84; s.pc = 2; return s.tmp_1; - case 2: + r0 = s.arg0; + if (!checkSubtype(r0, controller_Button__C168716_VT)) failedCast(r0); + s.tmp_3 = controller_Button_handlerState__P172241_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 310; s.pc = 10; return s.tmp_3; + case 10: r0 = s.retval; - s.tmp_0.arg7 = r0; - s.tmp_0.arg8 = s.arg1; - s.callLocIdx = 85; s.pc = 1; return s.tmp_0; + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = pxsim_pxtcore_mkClassInstance(controller_ButtonEventHandlerState__C168712_VT); + s.tmp_4 = r0; + s.tmp_5 = controller_ButtonEventHandlerState_constructor__P168713_mk(s); + s.tmp_5.arg0 = s.tmp_4; + r0 = s.arg0.fields["id"]; + s.tmp_5.arg1 = r0; + s.callLocIdx = 312; s.pc = 11; return s.tmp_5; + case 11: + r0 = s.retval; + s.tmp_7 = game_currentScene__P169526_mk(s); + s.callLocIdx = 311; 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__P172241_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 313; s.pc = 13; return s.tmp_0; + case 13: r0 = s.retval; - r0 = pxsim.music.queuePlayInstructions(s.arg0, s.buf___189625); - r0 = undefined; + s.handlerState___188539 = (r0); + r0 = s.handlerState___188539.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___188539; + r0 = pxsim_Array__mk(); + s.tmp_4 = r0; + r0 = (s.tmp_3).fields["user"] = (s.tmp_4); + case 3: + case 4: + s.eventHandler___188548 = (undefined); + r0 = s.handlerState___188539.fields["user"]; + s.unnamed806___U2 = (r0); + s.unnamed807___U3 = (0); + case 5: + s.tmp_0 = r0 = s.unnamed807___U3; + r0 = pxsim_Array__length(s.unnamed806___U2); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 8; continue; } + r0 = pxsim_Array__getAt(s.unnamed806___U2, s.unnamed807___U3); + s.eventHandler___188548 = (r0); + r0 = s.eventHandler___188548.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___188548; + { step = 9; continue; } + case 6: + case 7: + r0 = (s.unnamed807___U3 + 1); + s.unnamed807___U3 = (r0); + { step = 5; continue; } + case 8: + s.unnamed806___U2 = (undefined); + r0 = pxsim_pxtcore_mkAction(2, controller_Button_getOrCreateHandlerForEvent_inline__P188561); + 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__P166918_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 = 315; s.pc = 14; return s.tmp_5; + case 14: + r0 = s.retval; + r0 = pxsim_pxtcore_mkClassInstance(controller_ButtonHandler__C168710_VT); + s.tmp_0 = r0; + s.tmp_1 = controller_ButtonHandler_constructor__P168711_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = s.arg1; + s.tmp_1.arg2 = undefined; + s.callLocIdx = 316; s.pc = 15; return s.tmp_1; + case 15: + r0 = s.retval; + s.newHandler___188564 = (s.tmp_0); + r0 = s.handlerState___188539.fields["user"]; + s.tmp_0 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.newHandler___188564); + r0 = s.newHandler___188564; + case 9: return leave(s, r0) default: oops() } } } -music_playNoteCore__P171993.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_Button_getOrCreateHandlerForEvent__P172246.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 music_playNoteCore__P171993_mk(s) { +function controller_Button_getOrCreateHandlerForEvent__P172246_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_playNoteCore__P171993, depth: s.depth + 1, + parent: s, fn: controller_Button_getOrCreateHandlerForEvent__P172246, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - buf___189625: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + handlerState___188539: undefined, + eventHandler___188548: undefined, + unnamed806___U2: undefined, + unnamed807___U3: undefined, + newHandler___188564: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function music_addNote__P168163(s) { +function controller_Button_getOrCreateHandlerForEvent_inline__P188561(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + s.tmp_0 = controller_Button_runButtonEvents__P172245_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_0.arg1 = s.caps[1]; + s.callLocIdx = 314; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +controller_Button_getOrCreateHandlerForEvent_inline__P188561.info = {"start":9186,"length":33,"line":265,"column":44,"endLine":265,"endColumn":77,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"inline","argumentNames":[]} + +function controller_Button_getOrCreateHandlerForEvent_inline__P188561_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_Button_getOrCreateHandlerForEvent_inline__P188561, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, +} } + + + + + +function controller_Button_runButtonEvents__P172245(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -45851,91 +46845,144 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.handlerState___188578 = undefined; + s.userHandler___188582 = undefined; + s.eventHandler___188593 = undefined; + s.unnamed804___U3 = undefined; + s.unnamed805___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.lambdaArgs = null; } - r0 = (s.arg2 > 0); + r0 = s.arg0; + if (!checkSubtype(r0, controller_Button__C168716_VT)) failedCast(r0); + s.tmp_0 = controller_Button_handlerState__P172241_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 306; s.pc = 14; return s.tmp_0; + case 14: + r0 = s.retval; + s.handlerState___188578 = (r0); + r0 = pxsim_numops_toBoolDecr(s.handlerState___188578); + 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.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); + { step = 13; continue; } + case 1: + case 2: + s.tmp_2 = controller_Button_getOrCreateHandlerForEvent__P172246_mk(s); + s.tmp_2.arg0 = s.arg0; + s.tmp_2.arg1 = s.arg1; + s.callLocIdx = 307; s.pc = 15; return s.tmp_2; + case 15: + r0 = s.retval; + s.userHandler___188582 = (r0); + r0 = s.userHandler___188582.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___188582; + if (!s.tmp_1.arg0.vtable.iface) { + setupLambda(s.tmp_1, pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "callback"), 1); + s.callLocIdx = 308; 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 = 308; s.pc = 16; return s.tmp_1; } + else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 308; s.pc = 16; return s.tmp_1;; } + else { s.callLocIdx = 308; s.pc = 16; return s.tmp_1; } + } + case 16: + r0 = s.retval; + case 3: + case 4: + r0 = s.handlerState___188578.fields["system"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 11; continue; } + s.eventHandler___188593 = (undefined); + r0 = s.handlerState___188578.fields["system"]; + s.unnamed804___U3 = (r0); + s.unnamed805___U4 = (0); + case 5: + s.tmp_0 = r0 = s.unnamed805___U4; + r0 = pxsim_Array__length(s.unnamed804___U3); s.tmp_1 = r0; - r0 = (s.arg4 * s.arg7); + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 10; continue; } + r0 = pxsim_Array__getAt(s.unnamed804___U3, s.unnamed805___U4); + s.eventHandler___188593 = (r0); + r0 = s.eventHandler___188593.fields["event"]; s.tmp_3 = r0; - r0 = (s.tmp_3 >> 6); + r0 = (s.tmp_3 === s.arg1); 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; + r0 = pxsim_numops_toBool(s.tmp_2); + if (r0) { step = 6; continue; } + r0 = s.tmp_2; + { step = 7; continue; } + case 6: + r0 = s.eventHandler___188593.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___188593; + if (!s.tmp_5.arg0.vtable.iface) { + setupLambda(s.tmp_5, pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "callback"), 1); + s.callLocIdx = 309; 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 = 309; s.pc = 17; return s.tmp_5; } + else if (s.tmp_5.fn.isGetter) { s.tmp_5.stage2Call = true; s.callLocIdx = 309; s.pc = 17; return s.tmp_5;; } + else { s.callLocIdx = 309; s.pc = 17; return s.tmp_5; } + } + case 17: + r0 = s.retval; + case 8: + case 9: + r0 = (s.unnamed805___U4 + 1); + s.unnamed805___U4 = (r0); + { step = 5; continue; } + case 10: + s.unnamed804___U3 = (undefined); + case 11: + case 12: + case 13: + r0 = undefined; return leave(s, r0) default: oops() } } } -music_addNote__P168163.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_Button_runButtonEvents__P172245.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 music_addNote__P168163_mk(s) { +function controller_Button_runButtonEvents__P172245_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_addNote__P168163, depth: s.depth + 1, + parent: s, fn: controller_Button_runButtonEvents__P172245, depth: s.depth + 1, pc: 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___188578: undefined, + userHandler___188582: undefined, + eventHandler___188593: undefined, + unnamed804___U3: undefined, + unnamed805___U4: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, - arg5: undefined, - arg6: undefined, - arg7: undefined, - arg8: undefined, } } -function music_setVolume__P168147(s) { +function controller_Button_handlerState__P172241(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -45945,44 +46992,69 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.state___188609 = undefined; + s.unnamed802___U1 = undefined; + s.unnamed803___U2 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = Math_clamp__P166654_mk(s); - s.tmp_0.arg0 = 0; - s.tmp_0.arg1 = 255; - r0 = (s.arg0 | 0); - s.tmp_0.arg2 = r0; - s.callLocIdx = 81; s.pc = 3; return s.tmp_0; - case 3: + r0 = s.arg0; + if (!checkSubtype(r0, controller_Button__C168716_VT)) failedCast(r0); + s.state___188609 = (undefined); + s.tmp_0 = game_currentScene__P169526_mk(s); + s.callLocIdx = 296; s.pc = 6; return s.tmp_0; + case 6: r0 = s.retval; - globals.globalVolume___171988 = (r0); - r0 = (globals.globalVolume___171988 > 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = 1; - { step = 2; continue; } + r0 = r0.fields["buttonEventHandlers"]; + s.unnamed802___U1 = (r0); + s.unnamed803___U2 = (0); case 1: - r0 = 0; - case 2: - // jmp value (already in r0) + s.tmp_0 = r0 = s.unnamed803___U2; + r0 = pxsim_Array__length(s.unnamed802___U1); s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 4; continue; } + r0 = pxsim_Array__getAt(s.unnamed802___U1, s.unnamed803___U2); + s.state___188609 = (r0); + r0 = s.state___188609.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___188609; + { step = 5; continue; } + case 2: + case 3: + r0 = (s.unnamed803___U2 + 1); + s.unnamed803___U2 = (r0); + { step = 1; continue; } + case 4: + s.unnamed802___U1 = (undefined); r0 = undefined; - r0 = undefined; - return leave(s, r0) + case 5: + return leaveAccessor(s, r0) default: oops() } } } -music_setVolume__P168147.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_handlerState__P172241.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__P172241.isGetter = true; -function music_setVolume__P168147_mk(s) { +function controller_Button_handlerState__P172241_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_setVolume__P168147, depth: s.depth + 1, + parent: s, fn: controller_Button_handlerState__P172241, depth: s.depth + 1, pc: 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___188609: undefined, + unnamed802___U1: undefined, + unnamed803___U2: undefined, arg0: undefined, } } @@ -45990,7 +47062,7 @@ function music_setVolume__P168147_mk(s) { -function music_enableAmp__P171991(s) { +function controller_ButtonEventHandlerState_constructor__P168713(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -46002,27 +47074,32 @@ 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_ButtonEventHandlerState__C168712_VT)) failedCast(r0); + r0 = (s.arg0).fields["id"] = (s.arg1); r0 = undefined; return leave(s, r0) default: oops() } } } -music_enableAmp__P171991.info = {"start":944,"length":64,"line":29,"column":4,"endLine":31,"endColumn":5,"fileName":"pxt_modules/mixer/melody.ts","functionName":"enableAmp","argumentNames":["en"]} +controller_ButtonEventHandlerState_constructor__P168713.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 music_enableAmp__P171991_mk(s) { +function controller_ButtonEventHandlerState_constructor__P168713_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_enableAmp__P171991, depth: s.depth + 1, + parent: s, fn: controller_ButtonEventHandlerState_constructor__P168713, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, + arg1: undefined, } } -function scene_systemMenu_volumeUp__P172715(s) { +function controller_ButtonHandler_constructor__P168711(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -46032,47 +47109,37 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.v___189539 = undefined; - s.remainder___189542 = undefined; - s.newVolume___189545 = undefined; - s.tmp_0 = music_volume__P168148_mk(s); - s.callLocIdx = 1498; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.v___189539 = (r0); - r0 = (s.v___189539 % 32); - s.remainder___189542 = (r0); - r0 = (s.v___189539 + 32); - s.tmp_0 = r0; - r0 = (s.tmp_0 - s.remainder___189542); - s.newVolume___189545 = (r0); - s.tmp_0 = scene_systemMenu_setVolume__P172714_mk(s); - s.tmp_0.arg0 = s.newVolume___189545; - s.callLocIdx = 1499; s.pc = 2; return s.tmp_0; - case 2: - 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, controller_ButtonHandler__C168710_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() } } } -scene_systemMenu_volumeUp__P172715.info = {"start":8737,"length":171,"line":271,"column":4,"endLine":276,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"volumeUp","argumentNames":[]} +controller_ButtonHandler_constructor__P168711.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 scene_systemMenu_volumeUp__P172715_mk(s) { +function controller_ButtonHandler_constructor__P168711_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_volumeUp__P172715, depth: s.depth + 1, + parent: s, fn: controller_ButtonHandler_constructor__P168711, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - v___189539: undefined, - remainder___189542: undefined, - newVolume___189545: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function game_consoleOverlay_isVisible__P169651(s) { +function game_eventContext__P169529(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -46082,33 +47149,30 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___172756); - 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); + s.tmp_0 = game_init__P172465_mk(s); + s.tmp_0.arg0 = undefined; + s.callLocIdx = 1332; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = globals._scene___172457.fields["eventContext"]; return leave(s, r0) default: oops() } } } -game_consoleOverlay_isVisible__P169651.info = {"start":422,"length":68,"line":11,"column":4,"endLine":13,"endColumn":5,"fileName":"pxt_modules/game/console.ts","functionName":"isVisible","argumentNames":[]} +game_eventContext__P169529.info = {"start":4442,"length":112,"line":136,"column":4,"endLine":139,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"eventContext","argumentNames":[]} -function game_consoleOverlay_isVisible__P169651_mk(s) { +function game_eventContext__P169529_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_consoleOverlay_isVisible__P169651, depth: s.depth + 1, + parent: s, fn: game_eventContext__P169529, 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_closeMenu__P169629(s) { +function controller_pauseUntilAnyButtonIsPressed__P168732(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -46118,44 +47182,63 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.instance___172710); - if (!r0) { step = 1; continue; } - s.tmp_0 = scene_systemMenu_PauseMenu_dispose__P169628_mk(s); - s.tmp_0.arg0 = globals.instance___172710; - s.callLocIdx = 1514; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - globals.instance___172710 = (undefined); - s.tmp_0 = controller__setUserEventsEnabled__P168733_mk(s); - s.tmp_0.arg0 = true; - s.callLocIdx = 1515; s.pc = 4; return s.tmp_0; - case 4: + setupResume(s, 1); + pxsim.control.waitForEvent(2049, 0); + checkResumeConsumed(); + return; + case 1: r0 = s.retval; - s.tmp_0 = game_popScene__P169531_mk(s); - s.callLocIdx = 1516; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - case 1: - case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_closeMenu__P169629.info = {"start":10129,"length":216,"line":320,"column":4,"endLine":327,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"closeMenu","argumentNames":[]} +controller_pauseUntilAnyButtonIsPressed__P168732.info = {"start":9968,"length":96,"line":287,"column":4,"endLine":289,"endColumn":5,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"pauseUntilAnyButtonIsPressed","argumentNames":[]} -function scene_systemMenu_closeMenu__P169629_mk(s) { +function controller_pauseUntilAnyButtonIsPressed__P168732_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_closeMenu__P169629, depth: s.depth + 1, + parent: s, fn: controller_pauseUntilAnyButtonIsPressed__P168732, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, } } -function scene_systemMenu_PauseMenu_dispose__P169628(s) { +function game_setWaitAnyButton__P169527(s) { +let r0 = s.r0, 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___172461 = (s.arg0); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +game_setWaitAnyButton__P169527.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__P169527_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: game_setWaitAnyButton__P169527, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function Math_FastRandom_constructor__P169588(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -46167,45 +47250,42 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C169622_VT)) failedCast(r0); - r0 = s.arg0.fields["options"]; + if (!checkSubtype(r0, Math_FastRandom__C169586_VT)) failedCast(r0); + r0 = (s.arg1 === undefined); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - s.tmp_1 = helpers_arrayForEach__P166636_mk(s); - r0 = s.arg0.fields["options"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = scene_systemMenu_PauseMenu_dispose_inline__P189184; - s.callLocIdx = 1491; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; - r0 = (s.arg0).fields["options"] = (undefined); + r0 = pxsim.Math_.randomRange(1, 65535); + s.arg1 = (r0); case 1: case 2: + r0 = (s.arg0).fields["seed"] = (s.arg1); + r0 = (s.arg0).fields["lfsr"] = (s.arg1); r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_dispose__P169628.info = {"start":7732,"length":165,"line":243,"column":8,"endLine":248,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"dispose","argumentNames":["this"]} +Math_FastRandom_constructor__P169588.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 scene_systemMenu_PauseMenu_dispose__P169628_mk(s) { +function Math_FastRandom_constructor__P169588_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_dispose__P169628, depth: s.depth + 1, + parent: s, fn: Math_FastRandom_constructor__P169588, 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_PauseMenu_dispose_inline__P189184(s) { +function game_consoleOverlay_listener__P172791(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -46217,33 +47297,94 @@ 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__P169621_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1490; s.pc = 1; return s.tmp_0; + r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___172756); + 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(s.arg1); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); + case 2: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 3; continue; } + { step = 7; continue; } + case 3: + case 4: + s.tmp_4 = helpers_arrayForEach__P166636_mk(s); + s.tmp_5 = helpers_arrayFilter__P166637_mk(s); + s.tmp_6 = helpers_stringSplit__P166649_mk(s); + s.tmp_6.arg0 = s.arg1; + s.tmp_6.arg1 = "\n"; + s.tmp_6.arg2 = undefined; + s.callLocIdx = 1548; s.pc = 10; return s.tmp_6; + case 10: + r0 = s.retval; + s.tmp_5.arg0 = r0; + s.tmp_5.arg1 = forEach_inline__P188656; + s.callLocIdx = 1549; s.pc = 9; return s.tmp_5; + case 9: + r0 = s.retval; + s.tmp_4.arg0 = r0; + s.tmp_4.arg1 = game_consoleOverlay_listener_inline__P188661; + s.callLocIdx = 1551; s.pc = 8; return s.tmp_4; + case 8: + r0 = s.retval; + r0 = pxsim_Array__length(globals.consoleStrings___172756); + s.tmp_1 = r0; + r0 = (s.tmp_1 > globals.consoleLines___172769); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + s.tmp_2 = helpers_arraySplice__P166627_mk(s); + s.tmp_2.arg0 = globals.consoleStrings___172756; + s.tmp_2.arg1 = 0; + r0 = pxsim_Array__length(globals.consoleStrings___172756); + s.tmp_3 = r0; + r0 = (s.tmp_3 - globals.consoleLines___172769); + s.tmp_2.arg2 = r0; + s.callLocIdx = 1552; s.pc = 11; return s.tmp_2; + case 11: r0 = s.retval; + case 5: + case 6: + case 7: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_dispose_inline__P189184.info = {"start":7813,"length":16,"line":245,"column":37,"endLine":245,"endColumn":53,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":["o"]} +game_consoleOverlay_listener__P172791.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_dispose_inline__P189184_mk(s) { +function game_consoleOverlay_listener__P172791_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_dispose_inline__P189184, depth: s.depth + 1, + parent: s, fn: game_consoleOverlay_listener__P172791, depth: s.depth + 1, pc: 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 scene_systemMenu_MenuOption_dispose__P169621(s) { +function forEach_inline__P188656(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -46257,45 +47398,26 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, scene_systemMenu_MenuOption__C169614_VT)) failedCast(r0); - r0 = s.arg0.fields["card"]; + 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_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_1 = Sprite_destroy__P168955_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = undefined; - s.tmp_1.arg2 = undefined; - s.callLocIdx = 1410; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; - s.tmp_0 = Sprite_destroy__P168955_mk(s); - r0 = s.arg0.fields["icon"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = undefined; - s.tmp_0.arg2 = undefined; - s.callLocIdx = 1411; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - r0 = (s.arg0).fields["card"] = (undefined); - r0 = (s.arg0).fields["icon"] = (undefined); - case 1: - case 2: - r0 = undefined; + r0 = pxsim_Boolean__bang(s.tmp_0); return leave(s, r0) default: oops() } } } -scene_systemMenu_MenuOption_dispose__P169621.info = {"start":1812,"length":216,"line":77,"column":8,"endLine":84,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"dispose","argumentNames":["this"]} +forEach_inline__P188656.info = {"start":985,"length":14,"line":32,"column":20,"endLine":32,"endColumn":34,"fileName":"pxt_modules/game/console.ts","functionName":"inline","argumentNames":["line"]} -function scene_systemMenu_MenuOption_dispose__P169621_mk(s) { +function forEach_inline__P188656_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_MenuOption_dispose__P169621, depth: s.depth + 1, + parent: s, fn: forEach_inline__P188656, 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, } } @@ -46303,7 +47425,7 @@ function scene_systemMenu_MenuOption_dispose__P169621_mk(s) { -function scene_systemMenu_MenuOption_constructor__P169615(s) { +function game_consoleOverlay_listener_inline__P188661(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -46313,40 +47435,61 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.j___188663 = 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__C169614_VT)) failedCast(r0); - r0 = (s.arg0).fields["iconImage"] = (s.arg1); - r0 = (s.arg0).fields["getText"] = (s.arg2); - r0 = (s.arg0).fields["action"] = (s.arg3); + s.j___188663 = (0); + case 1: + s.tmp_1 = r0 = s.j___188663; + 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___172756; + s.tmp_5 = helpers_stringSlice__P166646_mk(s); + s.tmp_5.arg0 = s.arg0; + s.tmp_5.arg1 = s.j___188663; + r0 = (s.j___188663 + globals.consoleColumns___172779); + s.tmp_5.arg2 = r0; + s.callLocIdx = 1550; s.pc = 3; return s.tmp_5; + case 3: + r0 = s.retval; + s.tmp_4 = r0; + r0 = pxsim_Array__push(s.tmp_3, s.tmp_4); + r0 = (s.j___188663 + globals.consoleColumns___172779); + s.j___188663 = (r0); + { step = 1; continue; } + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_MenuOption_constructor__P169615.info = {"start":786,"length":108,"line":38,"column":8,"endLine":39,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":["this","iconImage","getText","action"]} +game_consoleOverlay_listener_inline__P188661.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_MenuOption_constructor__P169615_mk(s) { +function game_consoleOverlay_listener_inline__P188661_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_MenuOption_constructor__P169615, depth: s.depth + 1, + parent: s, fn: game_consoleOverlay_listener_inline__P188661, depth: s.depth + 1, pc: 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___188663: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function helpers_screenBrightness__P168493(s) { +function console_addListener__P166910(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -46360,17 +47503,43 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = globals.brightness___168478; + 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_Array_.indexOf(globals.listeners___171935, s.arg0, undefined); + s.tmp_2 = r0; + r0 = (s.tmp_2 > -1); + case 2: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 3; continue; } + { step = 5; continue; } + case 3: + case 4: + r0 = pxsim_Array__push(globals.listeners___171935, s.arg0); + case 5: + r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_screenBrightness__P168493.info = {"start":9161,"length":98,"line":288,"column":4,"endLine":290,"endColumn":5,"fileName":"pxt_modules/screen/image.ts","functionName":"screenBrightness","argumentNames":["img"]} +console_addListener__P166910.info = {"start":3558,"length":197,"line":121,"column":4,"endLine":124,"endColumn":5,"fileName":"pxt_modules/base/console.ts","functionName":"addListener","argumentNames":["listener"]} -function helpers_screenBrightness__P168493_mk(s) { +function console_addListener__P166910_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_screenBrightness__P168493, depth: s.depth + 1, + parent: s, fn: console_addListener__P166910, depth: s.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, } } @@ -46378,7 +47547,7 @@ function helpers_screenBrightness__P168493_mk(s) { -function music_volume__P168148(s) { +function listeners_inline__P171934(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -46388,29 +47557,32 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = music_initVolume__P171992_mk(s); - s.callLocIdx = 83; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = globals.globalVolume___171988; + 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() } } } -music_volume__P168148.info = {"start":1781,"length":90,"line":61,"column":4,"endLine":64,"endColumn":5,"fileName":"pxt_modules/mixer/melody.ts","functionName":"volume","argumentNames":[]} +listeners_inline__P171934.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 music_volume__P168148_mk(s) { +function listeners_inline__P171934_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_volume__P168148, depth: s.depth + 1, + parent: s, fn: listeners_inline__P171934, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, + arg0: undefined, + arg1: undefined, } } -function music_initVolume__P171992(s) { +function scene_systemMenu_register__P169633(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -46420,29 +47592,29 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = (globals.globalVolume___171988 === null); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(globals.instance___172710); if (!r0) { step = 1; continue; } - globals.globalVolume___171988 = (0); - s.tmp_0 = music_setVolume__P168147_mk(s); - r0 = pxsim_pxtcore.getConfig(59, 128); - s.tmp_0.arg0 = r0; - s.callLocIdx = 80; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; + { step = 3; continue; } case 1: case 2: + s.tmp_0 = controller_Button_onEvent__P168723_mk(s); + s.tmp_0.arg0 = globals.menu___168646; + s.tmp_0.arg1 = 2049; + s.tmp_0.arg2 = scene_systemMenu_showSystemMenu__P169634; + s.callLocIdx = 1535; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + case 3: r0 = undefined; return leave(s, r0) default: oops() } } } -music_initVolume__P171992.info = {"start":1014,"length":180,"line":33,"column":4,"endLine":38,"endColumn":5,"fileName":"pxt_modules/mixer/melody.ts","functionName":"initVolume","argumentNames":[]} +scene_systemMenu_register__P169633.info = {"start":12793,"length":193,"line":382,"column":4,"endLine":386,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"register","argumentNames":[]} -function music_initVolume__P171992_mk(s) { +function scene_systemMenu_register__P169633_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_initVolume__P171992, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_register__P169633, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, } } @@ -46451,7 +47623,7 @@ function music_initVolume__P171992_mk(s) { -function helpers_arrayConcat__P166640(s) { +function scene_systemMenu_showSystemMenu__P169634(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -46461,83 +47633,51 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.out___189424 = undefined; - s.value___189427 = undefined; - s.unnamed784___U2 = undefined; - s.unnamed785___U3 = undefined; - s.value___189434 = undefined; - s.unnamed786___U5 = undefined; - s.unnamed787___U6 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = pxsim_Array__mk(); - s.out___189424 = (r0); - s.value___189427 = (undefined); - s.unnamed784___U2 = (s.arg0); - s.unnamed785___U3 = (0); + r0 = pxsim_numops_toBoolDecr(globals.instance___172710); + if (!r0) { step = 1; continue; } + { step = 3; continue; } case 1: - s.tmp_0 = r0 = s.unnamed785___U3; - r0 = pxsim_Array__length(s.unnamed784___U2); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 2; continue; } - r0 = pxsim_Array__getAt(s.unnamed784___U2, s.unnamed785___U3); - s.value___189427 = (r0); - r0 = pxsim_Array__push(s.out___189424, s.value___189427); - r0 = (s.unnamed785___U3 + 1); - s.unnamed785___U3 = (r0); - { step = 1; continue; } case 2: - s.unnamed784___U2 = (undefined); - s.value___189434 = (undefined); - s.unnamed786___U5 = (s.arg1); - s.unnamed787___U6 = (0); - case 3: - s.tmp_0 = r0 = s.unnamed787___U6; - r0 = pxsim_Array__length(s.unnamed786___U5); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 4; continue; } - r0 = pxsim_Array__getAt(s.unnamed786___U5, s.unnamed787___U6); - s.value___189434 = (r0); - r0 = pxsim_Array__push(s.out___189424, s.value___189434); - r0 = (s.unnamed787___U6 + 1); - s.unnamed787___U6 = (r0); - { step = 3; continue; } + s.tmp_0 = game_pushScene__P169530_mk(s); + s.callLocIdx = 1536; s.pc = 4; return s.tmp_0; case 4: - s.unnamed786___U5 = (undefined); - r0 = s.out___189424; + r0 = s.retval; + r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_PauseMenu__C169622_VT); + s.tmp_0 = r0; + s.tmp_1 = scene_systemMenu_PauseMenu_constructor__P169623_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = scene_systemMenu_buildOptionList__P169630; + s.tmp_1.arg2 = undefined; + s.callLocIdx = 1537; s.pc = 5; return s.tmp_1; + case 5: + r0 = s.retval; + globals.instance___172710 = (s.tmp_0); + s.tmp_0 = scene_systemMenu_PauseMenu_show__P169624_mk(s); + s.tmp_0.arg0 = globals.instance___172710; + s.callLocIdx = 1538; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + case 3: + r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_arrayConcat__P166640.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"]} +scene_systemMenu_showSystemMenu__P169634.info = {"start":12992,"length":172,"line":388,"column":4,"endLine":393,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"showSystemMenu","argumentNames":[]} -function helpers_arrayConcat__P166640_mk(s) { +function scene_systemMenu_showSystemMenu__P169634_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arrayConcat__P166640, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_showSystemMenu__P169634, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - out___189424: undefined, - value___189427: undefined, - unnamed784___U2: undefined, - unnamed785___U3: undefined, - value___189434: undefined, - unnamed786___U5: undefined, - unnamed787___U6: undefined, - arg0: undefined, - arg1: undefined, } } -function scene_systemMenu_PauseMenu_show__P169624(s) { +function scene_systemMenu_buildOptionList__P169630(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -46547,336 +47687,136 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.current___188740 = undefined; - s.i___188741 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C169622_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 = 1423; 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 = 1423; s.pc = 3; return s.tmp_2; } - else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 1423; s.pc = 3; return s.tmp_2;; } - else { s.callLocIdx = 1423; s.pc = 3; return s.tmp_2; } - } - case 3: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["options"] = (s.tmp_1); - r0 = (s.arg0).fields["selection"] = (0); - s.i___188741 = (0); - case 1: - s.tmp_1 = r0 = s.i___188741; - 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.options___189321 = undefined; + r0 = pxsim_Array__mk(); + s.options___189321 = (r0); + r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C169614_VT); 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___188741); - s.current___188740 = (r0); - s.tmp_0 = scene_systemMenu_MenuOption_show__P169616_mk(s); - s.tmp_0.arg0 = s.current___188740; - s.callLocIdx = 1424; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - s.tmp_0 = scene_systemMenu_MenuOption_setTheme__P169619_mk(s); - s.tmp_0.arg0 = s.current___188740; - r0 = s.arg0.fields["theme"]; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1425; s.pc = 5; return s.tmp_0; + s.tmp_1 = scene_systemMenu_MenuOption_constructor__P169615_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = globals.VOLUME_DOWN_ICON___169644; + s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P189329; + s.tmp_1.arg3 = scene_systemMenu_volumeDown__P172716; + s.callLocIdx = 1518; s.pc = 5; return s.tmp_1; case 5: r0 = s.retval; - s.tmp_0 = scene_systemMenu_MenuOption_position__P169617_mk(s); - s.tmp_0.arg0 = s.current___188740; - 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 = 1426; s.pc = 7; return s.tmp_2; } - } - case 7: + r0 = pxsim_Array__push(s.options___189321, s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C169614_VT); + s.tmp_0 = r0; + s.tmp_1 = scene_systemMenu_MenuOption_constructor__P169615_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = globals.VOLUME_UP_ICON___169641; + s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P189343; + s.tmp_1.arg3 = scene_systemMenu_volumeUp__P172715; + s.callLocIdx = 1520; s.pc = 6; return s.tmp_1; + case 6: r0 = s.retval; + r0 = pxsim_Array__push(s.options___189321, 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__C169614_VT); s.tmp_1 = r0; - s.tmp_5 = r0 = s.i___188741; - 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 = 1427; 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 = 1428; s.pc = 9; return s.tmp_10; } - } - case 9: - r0 = s.retval; - s.tmp_9 = r0; - s.tmp_12 = if_cardSpacing_1_mk(s); - r0 = s.arg0.fields["theme"]; - s.tmp_12.arg0 = r0; - if (!s.tmp_12.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_12.arg0, "cardSpacing"); - } else { - s.tmp_12.fn = s.tmp_12.arg0.vtable.iface["cardSpacing"]; - if (s.tmp_12.fn == null) { s.retval = s.tmp_12.arg0.fields["cardSpacing"]; } - else if (!s.tmp_12.fn.isGetter) { s.retval = bind(s.tmp_12); } - else { s.callLocIdx = 1429; s.pc = 10; return s.tmp_12; } - } - case 10: - r0 = s.retval; - s.tmp_11 = r0; - r0 = (s.tmp_9 + s.tmp_11); - s.tmp_8 = r0; - r0 = (s.tmp_4 * s.tmp_8); - s.tmp_3 = r0; - r0 = (s.tmp_1 + s.tmp_3); - s.tmp_0.arg1 = r0; - s.tmp_14 = if_cardsTop_1_mk(s); - r0 = s.arg0.fields["theme"]; - s.tmp_14.arg0 = r0; - if (!s.tmp_14.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_14.arg0, "cardsTop"); - } else { - s.tmp_14.fn = s.tmp_14.arg0.vtable.iface["cardsTop"]; - if (s.tmp_14.fn == null) { s.retval = s.tmp_14.arg0.fields["cardsTop"]; } - else if (!s.tmp_14.fn.isGetter) { s.retval = bind(s.tmp_14); } - else { s.callLocIdx = 1430; s.pc = 11; return s.tmp_14; } - } - case 11: - r0 = s.retval; - s.tmp_13 = r0; - s.tmp_17 = r0 = s.i___188741; - 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 = 1431; 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 = 1432; 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 = 1433; 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 = 1434; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - r0 = (s.i___188741 + 1); - s.i___188741 = (r0); - { step = 1; continue; } - case 2: - s.tmp_0 = controller__setUserEventsEnabled__P168733_mk(s); - s.tmp_0.arg0 = false; - s.callLocIdx = 1435; s.pc = 15; return s.tmp_0; - case 15: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P188804); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = controller_Button_onEvent__P168723_mk(s); - s.tmp_1.arg0 = globals.A___168640; - s.tmp_1.arg1 = 2053; - s.tmp_1.arg2 = s.tmp_0; - s.callLocIdx = 1437; s.pc = 16; return s.tmp_1; - case 16: + s.tmp_2 = scene_systemMenu_MenuOption_constructor__P169615_mk(s); + s.tmp_2.arg0 = s.tmp_1; + s.tmp_2.arg1 = globals.BRIGHTNESS_DOWN_ICON___169642; + s.tmp_2.arg2 = scene_systemMenu_buildOptionList_inline__P189358; + s.tmp_2.arg3 = scene_systemMenu_brightnessDown__P172718; + s.callLocIdx = 1523; s.pc = 7; return s.tmp_2; + case 7: r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P188824); + r0 = pxsim_Array__push(s.options___189321, s.tmp_1); + r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C169614_VT); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = controller_Button_onEvent__P168723_mk(s); - s.tmp_1.arg0 = globals.A___168640; - s.tmp_1.arg1 = 2052; - s.tmp_1.arg2 = s.tmp_0; - s.callLocIdx = 1439; s.pc = 17; return s.tmp_1; - case 17: - r0 = s.retval; - s.tmp_0 = controller_Button_onEvent__P168723_mk(s); - s.tmp_0.arg0 = globals.B___168641; - s.tmp_0.arg1 = 2053; - s.tmp_0.arg2 = scene_systemMenu_PauseMenu_show_inline__P188853; - s.callLocIdx = 1441; s.pc = 18; return s.tmp_0; - case 18: - r0 = s.retval; - s.tmp_0 = controller_Button_onEvent__P168723_mk(s); - s.tmp_0.arg0 = globals.menu___168646; - s.tmp_0.arg1 = 2053; - s.tmp_0.arg2 = scene_systemMenu_PauseMenu_show_inline__P188858; - s.callLocIdx = 1443; s.pc = 19; return s.tmp_0; - case 19: + s.tmp_1 = scene_systemMenu_MenuOption_constructor__P169615_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = globals.BRIGHTNESS_UP_ICON___169647; + s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P189373; + s.tmp_1.arg3 = scene_systemMenu_brightnessUp__P172717; + s.callLocIdx = 1525; s.pc = 8; return s.tmp_1; + case 8: r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P188863); + r0 = pxsim_Array__push(s.options___189321, s.tmp_0); + case 1: + case 2: + r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C169614_VT); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = controller_Button_onEvent__P168723_mk(s); - s.tmp_1.arg0 = globals.up___168643; - s.tmp_1.arg1 = 2053; - s.tmp_1.arg2 = s.tmp_0; - s.callLocIdx = 1447; s.pc = 20; return s.tmp_1; - case 20: + s.tmp_1 = scene_systemMenu_MenuOption_constructor__P169615_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = globals.STATS_ICON___169648; + s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P189388; + s.tmp_1.arg3 = scene_systemMenu_toggleStats__P172720; + s.callLocIdx = 1526; s.pc = 9; return s.tmp_1; + case 9: r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P188875); + r0 = pxsim_Array__push(s.options___189321, s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C169614_VT); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = controller_Button_onEvent__P168723_mk(s); - s.tmp_1.arg0 = globals.left___168642; - s.tmp_1.arg1 = 2053; - s.tmp_1.arg2 = s.tmp_0; - s.callLocIdx = 1450; s.pc = 21; return s.tmp_1; - case 21: + s.tmp_1 = scene_systemMenu_MenuOption_constructor__P169615_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = globals.CONSOLE_ICON___169646; + s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P189397; + s.tmp_1.arg3 = scene_systemMenu_toggleConsole__P172721; + s.callLocIdx = 1528; s.pc = 10; return s.tmp_1; + case 10: r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P188884); + r0 = pxsim_Array__push(s.options___189321, s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C169614_VT); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = controller_Button_onEvent__P168723_mk(s); - s.tmp_1.arg0 = globals.down___168645; - s.tmp_1.arg1 = 2053; - s.tmp_1.arg2 = s.tmp_0; - s.callLocIdx = 1454; s.pc = 22; return s.tmp_1; - case 22: + s.tmp_1 = scene_systemMenu_MenuOption_constructor__P169615_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = globals.SLEEP_ICON___169645; + s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P189406; + s.tmp_1.arg3 = scene_systemMenu_sleep__P172722; + s.callLocIdx = 1529; s.pc = 11; return s.tmp_1; + case 11: r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P188900); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = controller_Button_onEvent__P168723_mk(s); - s.tmp_1.arg0 = globals.right___168644; - s.tmp_1.arg1 = 2053; - s.tmp_1.arg2 = s.tmp_0; - s.callLocIdx = 1457; s.pc = 23; return s.tmp_1; - case 23: + r0 = pxsim_Array__push(s.options___189321, s.tmp_0); + r0 = pxsim_numops_toBoolDecr(globals.customMenuOptions___172711); + if (!r0) { step = 3; continue; } + s.tmp_0 = helpers_arrayConcat__P166640_mk(s); + s.tmp_0.arg0 = s.options___189321; + s.tmp_0.arg1 = globals.customMenuOptions___172711; + s.callLocIdx = 1530; s.pc = 12; return s.tmp_0; + case 12: r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P188912); + s.options___189321 = (r0); + case 3: + case 4: + r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C169614_VT); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = game_onShade__P169544_mk(s); + s.tmp_1 = scene_systemMenu_MenuOption_constructor__P169615_mk(s); s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 1460; s.pc = 24; return s.tmp_1; - case 24: - r0 = s.retval; - s.tmp_0 = scene_systemMenu_PauseMenu_setSelection__P169626_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 1461; s.pc = 25; return s.tmp_0; - case 25: + s.tmp_1.arg1 = globals.CLOSE_MENU_ICON___169643; + s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P189419; + s.tmp_1.arg3 = scene_systemMenu_closeMenu__P169629; + s.callLocIdx = 1531; s.pc = 13; return s.tmp_1; + case 13: r0 = s.retval; - r0 = undefined; + r0 = pxsim_Array__push(s.options___189321, s.tmp_0); + r0 = s.options___189321; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_show__P169624.info = {"start":3296,"length":2241,"line":123,"column":8,"endLine":181,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"show","argumentNames":["this"]} +scene_systemMenu_buildOptionList__P169630.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__P169624_mk(s) { +function scene_systemMenu_buildOptionList__P169630_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_show__P169624, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_buildOptionList__P169630, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - tmp_11: undefined, - tmp_12: undefined, - tmp_13: undefined, - tmp_14: undefined, - tmp_15: undefined, - tmp_16: undefined, - tmp_17: undefined, - tmp_18: undefined, - tmp_19: undefined, - tmp_20: undefined, - tmp_21: undefined, - tmp_22: undefined, - tmp_23: undefined, - tmp_24: undefined, - current___188740: undefined, - i___188741: undefined, - arg0: undefined, + options___189321: undefined, } } -function scene_systemMenu_PauseMenu_show_inline__P188804(s) { +function scene_systemMenu_buildOptionList_inline__P189329(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -46886,75 +47826,44 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = s.caps[0].fields["options"]; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + s.tmp_3 = music_volume__P168148_mk(s); + s.callLocIdx = 1517; s.pc = 1; return s.tmp_3; 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 = s.retval; + s.tmp_2 = r0; + if ((s.tmp_2) && (s.tmp_2).vtable) { + setupResume(s, 2); + pxsim_String__stringConv(s.tmp_2); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_2) + ""; } case 2: - // 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__P169620_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 = 1436; s.pc = 6; return s.tmp_8; - case 6: r0 = s.retval; - case 5: - 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__P188804.info = {"start":4025,"length":170,"line":140,"column":50,"endLine":143,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +scene_systemMenu_buildOptionList_inline__P189329.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__P188804_mk(s) { +function scene_systemMenu_buildOptionList_inline__P189329_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P188804, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_buildOptionList_inline__P189329, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, } } -function scene_systemMenu_PauseMenu_show_inline__P188824(s) { +function scene_systemMenu_buildOptionList_inline__P189343(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -46964,83 +47873,44 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = s.caps[0].fields["options"]; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + s.tmp_3 = music_volume__P168148_mk(s); + s.callLocIdx = 1519; s.pc = 1; return s.tmp_3; 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 = s.retval; + s.tmp_2 = r0; + if ((s.tmp_2) && (s.tmp_2).vtable) { + setupResume(s, 2); + pxsim_String__stringConv(s.tmp_2); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_2) + ""; } case 2: - // 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__P169620_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 = 1438; 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"]; + r0 = pxsim_String__concat("VOLUME UP (", s.tmp_1); s.tmp_0 = r0; - r0 = pxsim.control.runInParallel(s.tmp_0); - case 5: - r0 = undefined; + r0 = pxsim_String__concat(s.tmp_0, ")"); return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_show_inline__P188824.info = {"start":4247,"length":247,"line":145,"column":48,"endLine":149,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +scene_systemMenu_buildOptionList_inline__P189343.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__P188824_mk(s) { +function scene_systemMenu_buildOptionList_inline__P189343_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P188824, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_buildOptionList_inline__P189343, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, } } -function scene_systemMenu_PauseMenu_show_inline__P188853(s) { +function scene_systemMenu_buildOptionList_inline__P189358(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -47050,29 +47920,40 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = scene_systemMenu_closeMenu__P169629_mk(s); - s.callLocIdx = 1440; s.pc = 1; return s.tmp_0; + r0 = globals.brightness___168478; + 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; - 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__P188853.info = {"start":4548,"length":50,"line":151,"column":50,"endLine":153,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +scene_systemMenu_buildOptionList_inline__P189358.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__P188853_mk(s) { +function scene_systemMenu_buildOptionList_inline__P189358_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P188853, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_buildOptionList_inline__P189358, 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_show_inline__P188858(s) { +function scene_systemMenu_buildOptionList_inline__P189373(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -47082,29 +47963,40 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = scene_systemMenu_closeMenu__P169629_mk(s); - s.callLocIdx = 1442; s.pc = 1; return s.tmp_0; + r0 = globals.brightness___168478; + 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; - r0 = undefined; + s.tmp_1 = r0; + 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_show_inline__P188858.info = {"start":4655,"length":50,"line":155,"column":53,"endLine":157,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +scene_systemMenu_buildOptionList_inline__P189373.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_show_inline__P188858_mk(s) { +function scene_systemMenu_buildOptionList_inline__P189373_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P188858, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_buildOptionList_inline__P189373, 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_show_inline__P188863(s) { +function scene_systemMenu_buildOptionList_inline__P189388(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -47114,58 +48006,34 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = scene_systemMenu_PauseMenu_setSelection__P169626_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_1 = Math_max__P166657_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 = 1444; 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 = 1445; s.pc = 2; return s.tmp_1; - case 2: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1446; s.pc = 1; return s.tmp_0; + r0 = pxsim_numops_toBoolDecr(globals.stats___169495); + if (!r0) { step = 1; continue; } + r0 = "HIDE STATS"; + { step = 2; continue; } case 1: - r0 = s.retval; - r0 = undefined; + r0 = "SHOW STATS"; + case 2: + // jmp value (already in r0) + s.tmp_0 = r0; + r0 = s.tmp_0; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_show_inline__P188863.info = {"start":4760,"length":110,"line":159,"column":51,"endLine":161,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +scene_systemMenu_buildOptionList_inline__P189388.info = {"start":11160,"length":46,"line":343,"column":48,"endLine":343,"endColumn":94,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function scene_systemMenu_PauseMenu_show_inline__P188863_mk(s) { +function scene_systemMenu_buildOptionList_inline__P189388_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P188863, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_buildOptionList_inline__P189388, depth: s.depth + 1, pc: 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__P188875(s) { +function scene_systemMenu_buildOptionList_inline__P189397(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -47175,42 +48043,46 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = scene_systemMenu_PauseMenu_setSelection__P169626_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_1 = Math_max__P166657_mk(s); - s.tmp_1.arg0 = 0; - r0 = s.caps[0].fields["selection"]; + r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___172756); + s.tmp_3 = r0; + r0 = pxsim_Boolean__bang(s.tmp_3); s.tmp_2 = r0; - r0 = (s.tmp_2 - 1); - s.tmp_1.arg1 = r0; - s.callLocIdx = 1448; s.pc = 2; return s.tmp_1; - case 2: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1449; 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 = 1; continue; } + r0 = "HIDE CONSOLE"; + { step = 2; continue; } case 1: - r0 = s.retval; - r0 = undefined; + r0 = "SHOW CONSOLE"; + case 2: + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = s.tmp_4; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_show_inline__P188875.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_inline__P189397.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_show_inline__P188875_mk(s) { +function scene_systemMenu_buildOptionList_inline__P189397_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P188875, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_buildOptionList_inline__P189397, depth: s.depth + 1, pc: 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__P188884(s) { +function scene_systemMenu_buildOptionList_inline__P189406(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -47220,65 +48092,24 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = scene_systemMenu_PauseMenu_setSelection__P169626_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_1 = Math_min__P166658_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 = 1451; s.pc = 3; return s.tmp_6; } - } - case 3: - r0 = s.retval; - s.tmp_5 = r0; - r0 = (s.tmp_4 + s.tmp_5); - s.tmp_1.arg1 = r0; - s.callLocIdx = 1452; s.pc = 2; return s.tmp_1; - case 2: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1453; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; + r0 = "SLEEP"; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_show_inline__P188884.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__P189406.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_PauseMenu_show_inline__P188884_mk(s) { +function scene_systemMenu_buildOptionList_inline__P189406_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P188884, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_buildOptionList_inline__P189406, depth: s.depth + 1, pc: 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__P188900(s) { +function scene_systemMenu_buildOptionList_inline__P189419(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -47288,49 +48119,24 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = scene_systemMenu_PauseMenu_setSelection__P169626_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_1 = Math_min__P166658_mk(s); - r0 = s.caps[0].fields["options"]; - s.tmp_3 = r0; - r0 = pxsim_Array__length(s.tmp_3); - s.tmp_2 = r0; - r0 = (s.tmp_2 - 1); - s.tmp_1.arg0 = r0; - r0 = s.caps[0].fields["selection"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 + 1); - s.tmp_1.arg1 = r0; - s.callLocIdx = 1455; s.pc = 2; return s.tmp_1; - case 2: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1456; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; + r0 = "CLOSE"; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_show_inline__P188900.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__P189419.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_PauseMenu_show_inline__P188900_mk(s) { +function scene_systemMenu_buildOptionList_inline__P189419_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P188900, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_buildOptionList_inline__P189419, depth: s.depth + 1, pc: 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__P188912(s) { +function scene_systemMenu_setScreenBrightnessSupported__P172723(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -47340,35 +48146,52 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = scene_systemMenu_PauseMenu_onUpdate__P169625_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.callLocIdx = 1458; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.tmp_0 = scene_systemMenu_PauseMenu_drawText__P169627_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.callLocIdx = 1459; s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; + r0 = 0; + return leave(s, r0) + default: oops() +} } } +scene_systemMenu_setScreenBrightnessSupported__P172723.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__P172723_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: scene_systemMenu_setScreenBrightnessSupported__P172723, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, +} } + + + + + +function scene_systemMenu_sleep__P172722(s) { +let r0 = s.r0, 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_PauseMenu_show_inline__P188912.info = {"start":5403,"length":87,"line":175,"column":25,"endLine":178,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +scene_systemMenu_sleep__P172722.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_PauseMenu_show_inline__P188912_mk(s) { +function scene_systemMenu_sleep__P172722_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P188912, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_sleep__P172722, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, } } -function scene_systemMenu_PauseMenu_drawText__P169627(s) { +function scene_systemMenu_toggleConsole__P172721(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -47378,13 +48201,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.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C169622_VT)) failedCast(r0); - r0 = s.arg0.fields["options"]; + r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___172756); + 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; @@ -47392,282 +48211,49 @@ switch (step) { 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_3 = helpers_imageFillRect__P168483_mk(s); - s.tmp_3.arg0 = globals.screen___168559; - s.tmp_3.arg1 = 0; - s.tmp_3.arg2 = 0; - r0 = pxsim_ImageMethods.width(globals.screen___168559); - 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 = 1472; s.pc = 5; return s.tmp_5; } - } - case 5: + s.tmp_4 = game_consoleOverlay_setVisible__P169653_mk(s); + s.tmp_4.arg0 = false; + s.tmp_4.arg1 = undefined; + s.callLocIdx = 1511; s.pc = 3; return s.tmp_4; + case 3: r0 = s.retval; - s.tmp_4 = r0; - r0 = (s.tmp_4 - 2); - s.tmp_3.arg4 = r0; - s.tmp_3.arg5 = 15; - s.callLocIdx = 1473; s.pc = 4; return s.tmp_3; + { step = 2; continue; } + case 1: + s.tmp_0 = game_consoleOverlay_setVisible__P169653_mk(s); + s.tmp_0.arg0 = true; + s.tmp_0.arg1 = undefined; + s.callLocIdx = 1512; s.pc = 4; return s.tmp_0; case 4: r0 = s.retval; - s.tmp_0 = helpers_imagePrintCenter__P168516_mk(s); - s.tmp_0.arg0 = globals.screen___168559; - 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 = 1474; 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 = 1475; s.pc = 8; return s.tmp_2; } - } - case 8: - r0 = s.retval; - s.tmp_0.arg4 = r0; - s.callLocIdx = 1476; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.tmp_0 = helpers_imageFillRect__P168483_mk(s); - s.tmp_0.arg0 = globals.screen___168559; - 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 = 1477; 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___168559); - s.tmp_0.arg3 = r0; - r0 = pxsim_ImageMethods.height(globals.screen___168559); - 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 = 1478; 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 = 1479; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; - s.tmp_0 = helpers_imageFillRect__P168483_mk(s); - s.tmp_0.arg0 = globals.screen___168559; - 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 = 1480; 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 = 1481; s.pc = 14; return s.tmp_2; } - } - case 14: - r0 = s.retval; - s.tmp_0.arg2 = r0; - r0 = pxsim_ImageMethods.width(globals.screen___168559); - 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 = 1482; 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 = 1483; 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 = 1484; 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 = 1485; s.pc = 12; return s.tmp_0; - case 12: - r0 = s.retval; - s.tmp_0 = helpers_imagePrintCenter__P168516_mk(s); - s.tmp_0.arg0 = globals.screen___168559; - 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 = 1486; 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 = 1486; s.pc = 19; return s.tmp_1; } - else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 1486; s.pc = 19; return s.tmp_1;; } - else { s.callLocIdx = 1486; 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 = 1487; 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 = 1488; s.pc = 21; return s.tmp_6; } - } - case 21: - r0 = s.retval; - s.tmp_0.arg4 = r0; - s.callLocIdx = 1489; s.pc = 18; return s.tmp_0; - case 18: + s.tmp_0 = console_log__P166907_mk(s); + s.tmp_0.arg0 = "console"; + s.callLocIdx = 1513; s.pc = 5; return s.tmp_0; + case 5: r0 = s.retval; - case 3: + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_drawText__P169627.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_toggleConsole__P172721.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_drawText__P169627_mk(s) { +function scene_systemMenu_toggleConsole__P172721_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_drawText__P169627, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_toggleConsole__P172721, depth: s.depth + 1, pc: 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 scene_systemMenu_PauseMenu_setSelection__P169626(s) { +function game_consoleOverlay_setVisible__P169653(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -47682,95 +48268,48 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C169622_VT)) failedCast(r0); - r0 = s.arg0.fields["options"]; + s.tmp_1 = r0 = s.arg0; + r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___172756); + 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); + r0 = (s.tmp_1 != s.tmp_2); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = pxsim_numops_toBoolDecr(s.arg0); if (!r0) { step = 1; continue; } - { step = 9; continue; } + r0 = pxsim_Array__mk(); + { step = 2; continue; } case 1: + r0 = undefined; 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__P169620_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 = 1469; s.pc = 10; return s.tmp_6; - case 10: - r0 = s.retval; + // jmp value (already in r0) + s.tmp_6 = r0; + globals.consoleStrings___172756 = (s.tmp_6); 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); + r0 = (s.arg1 !== undefined); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - s.tmp_4 = controller_Button__C168716_v0_1_mk(s); - s.tmp_4.arg0 = globals.A___168640; - if (!checkSubtype(s.tmp_4.arg0, controller_Button__C168716_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; } + globals.consoleColor___172755 = (s.arg1); case 5: - r0 = 0; case 6: - // jmp value (already in r0) - s.tmp_5 = r0; - s.tmp_6 = scene_systemMenu_MenuOption_setState__P169620_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 = 1470; s.pc = 12; return s.tmp_6; - case 12: - r0 = s.retval; - case 7: - case 8: - s.tmp_0 = scene_systemMenu_PauseMenu_updateScrollTarget__P172713_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1471; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; - case 9: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_setSelection__P169626.info = {"start":6436,"length":481,"line":208,"column":8,"endLine":222,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"setSelection","argumentNames":["this","selection"]} +game_consoleOverlay_setVisible__P169653.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_setSelection__P169626_mk(s) { +function game_consoleOverlay_setVisible__P169653_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_setSelection__P169626, depth: s.depth + 1, + parent: s, fn: game_consoleOverlay_setVisible__P169653, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -47779,8 +48318,6 @@ function scene_systemMenu_PauseMenu_setSelection__P169626_mk(s) { tmp_4: undefined, tmp_5: undefined, tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, arg0: undefined, arg1: undefined, } } @@ -47789,7 +48326,7 @@ function scene_systemMenu_PauseMenu_setSelection__P169626_mk(s) { -function scene_systemMenu_PauseMenu_updateScrollTarget__P172713(s) { +function console_log__P166907(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -47799,133 +48336,28 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.row___189130 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C169622_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 = 1492; 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___189130 = (r0); - r0 = s.arg0.fields["scrollRow"]; - s.tmp_1 = r0; - r0 = (s.row___189130 === s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + s.tmp_0 = console_add__P166903_mk(s); + s.tmp_0.arg0 = 1; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 47; s.pc = 1; return s.tmp_0; case 1: - r0 = (s.row___189130 - 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: - case 4: - r0 = s.arg0.fields["scrollRow"]; - s.tmp_6 = r0; - r0 = (s.row___189130 > 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 = 1493; 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 = 1494; 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() } } } -scene_systemMenu_PauseMenu_updateScrollTarget__P172713.info = {"start":7907,"length":458,"line":250,"column":8,"endLine":260,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"updateScrollTarget","argumentNames":["this"]} +console_log__P166907.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_PauseMenu_updateScrollTarget__P172713_mk(s) { +function console_log__P166907_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_updateScrollTarget__P172713, depth: s.depth + 1, + parent: s, fn: console_log__P166907, depth: s.depth + 1, pc: 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___189130: undefined, arg0: undefined, } } @@ -47933,7 +48365,7 @@ function scene_systemMenu_PauseMenu_updateScrollTarget__P172713_mk(s) { -function scene_systemMenu_PauseMenu_onUpdate__P169625(s) { +function console_add__P166903(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -47943,186 +48375,87 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.t___188990 = undefined; - s.i___188994 = undefined; - s.dt___189023 = undefined; + s.text___189458 = undefined; + s.i___189467 = 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__C169622_VT)) failedCast(r0); - r0 = pxsim.control.millis(); - s.tmp_0 = r0; - r0 = (s.tmp_0 / 250); - s.t___188990 = (r0); - s.i___188994 = (0); - case 1: - s.tmp_1 = r0 = s.i___188994; - r0 = s.arg0.fields["options"]; - s.tmp_3 = r0; - r0 = pxsim_Array__length(s.tmp_3); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); + r0 = (s.arg0 < globals.minPriority___166902); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.tmp_4 = scene_systemMenu_MenuOption_setOffset__P169618_mk(s); - r0 = s.arg0.fields["options"]; - s.tmp_5 = r0; - r0 = pxsim_Array__getAt(s.tmp_5, s.i___188994); - s.tmp_4.arg0 = r0; - s.tmp_8 = r0 = s.t___188990; - s.tmp_11 = r0 = s.i___188994; - 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 = 1462; 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 = 1463; s.pc = 10; return s.tmp_4; - case 10: - r0 = s.retval; - r0 = (s.i___188994 + 1); - s.i___188994 = (r0); - { step = 1; continue; } + if (!r0) { step = 1; continue; } + { step = 5; continue; } + case 1: case 2: - s.tmp_1 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1464; s.pc = 12; return s.tmp_1; - case 12: + s.tmp_1 = console_inspect__P166909_mk(s); + s.tmp_1.arg0 = s.arg1; + s.tmp_1.arg1 = 20; + s.callLocIdx = 45; s.pc = 6; return s.tmp_1; + case 6: + r0 = s.retval; + s.text___189458 = (r0); + if ((s.text___189458) && (s.text___189458).vtable) { + setupResume(s, 7); + pxsim_String__stringConv(s.text___189458); + checkResumeConsumed(); + return; + } else { s.retval = (s.text___189458) + ""; } + case 7: 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___189023 = (r0); - r0 = s.arg0.fields["scrollOffset"]; - s.tmp_1 = r0; - r0 = s.arg0.fields["scrollTarget"]; - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_3 = r0 = s.arg0; - r0 = s.tmp_3.fields["scrollOffset"]; - s.tmp_5 = r0; - r0 = (s.dt___189023 * 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; } + r0 = pxsim_String__concat(s.tmp_0, "\n"); + s.text___189458 = (r0); + s.i___189467 = (0); case 3: - r0 = s.arg0.fields["scrollOffset"]; - s.tmp_1 = r0; - r0 = s.arg0.fields["scrollTarget"]; + s.tmp_1 = r0 = s.i___189467; + r0 = pxsim_Array__length(globals.listeners___171935); 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 = r0 = s.arg0; - r0 = s.tmp_3.fields["scrollOffset"]; - s.tmp_5 = r0; - r0 = (s.dt___189023 * 100); - s.tmp_6 = r0; - r0 = (s.tmp_5 - s.tmp_6); - s.tmp_4 = r0; - r0 = (s.tmp_3).fields["scrollOffset"] = (s.tmp_4); - { step = 5; continue; } - case 4: - { step = 9; continue; } - case 5: - case 6: - s.tmp_2 = Math_abs__P166655_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 = 1466; 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: + s.tmp_3 = lambda_3_mk(s); + r0 = pxsim_Array__getAt(globals.listeners___171935, s.i___189467); + s.tmp_3.argL = r0; + s.tmp_3.arg0 = s.arg0; + s.tmp_3.arg1 = s.text___189458; + setupLambda(s.tmp_3, s.tmp_3.argL); + s.callLocIdx = 46; s.pc = 8; return s.tmp_3; case 8: - s.tmp_0 = scene_Camera_offsetY__P169316_mk(s); - s.tmp_1 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1467; 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 = 1468; s.pc = 14; return s.tmp_0; - case 14: r0 = s.retval; - case 9: + r0 = (s.i___189467 + 1); + s.i___189467 = (r0); + { step = 3; continue; } + case 4: + case 5: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_onUpdate__P169625.info = {"start":5547,"length":879,"line":183,"column":8,"endLine":206,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"onUpdate","argumentNames":["this"]} +console_add__P166903.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 scene_systemMenu_PauseMenu_onUpdate__P169625_mk(s) { +function console_add__P166903_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_onUpdate__P169625, depth: s.depth + 1, + parent: s, fn: console_add__P166903, depth: s.depth + 1, pc: 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, - t___188990: undefined, - i___188994: undefined, - dt___189023: undefined, + text___189458: undefined, + i___189467: undefined, arg0: undefined, + arg1: undefined, } } -function scene_systemMenu_MenuOption_setOffset__P169618(s) { +function scene_systemMenu_toggleStats__P172720(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -48132,58 +48465,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.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, scene_systemMenu_MenuOption__C169614_VT)) failedCast(r0); - s.tmp_0 = Sprite_top__P168931_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_0.arg0 = r0; - r0 = s.arg0.fields["top"]; + r0 = pxsim_numops_toBoolDecr(globals.stats___169495); + s.tmp_0 = r0; + r0 = pxsim_Boolean__bang(s.tmp_0); + globals.stats___169495 = (r0); + r0 = pxsim_numops_toBoolDecr(globals.stats___169495); s.tmp_1 = r0; - r0 = (s.tmp_1 + s.arg1); - s.tmp_0.arg1 = r0; - s.callLocIdx = 1405; s.pc = 1; return s.tmp_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: + r0 = globals.control_EventContext_onStats___166925; + 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___166925; + r0 = pxsim_String_.mkEmpty(); + s.tmp_3.arg0 = r0; + setupLambda(s.tmp_3, s.tmp_3.argL); + s.callLocIdx = 1509; s.pc = 5; return s.tmp_3; + case 5: r0 = s.retval; - s.tmp_0 = Sprite_y__P168884_mk(s); - r0 = s.arg0.fields["icon"]; - s.tmp_0.arg0 = r0; - s.tmp_1 = Sprite_y__P168883_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_1.arg0 = r0; - s.callLocIdx = 1406; s.pc = 3; return s.tmp_1; case 3: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1407; s.pc = 2; return s.tmp_0; - case 2: + case 4: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +scene_systemMenu_toggleStats__P172720.info = {"start":9642,"length":179,"line":300,"column":4,"endLine":305,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"toggleStats","argumentNames":[]} + +function scene_systemMenu_toggleStats__P172720_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: scene_systemMenu_toggleStats__P172720, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, +} } + + + + + +function scene_systemMenu_brightnessDown__P172718(s) { +let r0 = s.r0, 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__P172719_mk(s); + r0 = globals.brightness___168478; + s.tmp_1 = r0; + r0 = (s.tmp_1 - 5); + s.tmp_0.arg0 = r0; + s.callLocIdx = 1505; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_MenuOption_setOffset__P169618.info = {"start":1411,"length":123,"line":61,"column":8,"endLine":64,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"setOffset","argumentNames":["this","offset"]} +scene_systemMenu_brightnessDown__P172718.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_MenuOption_setOffset__P169618_mk(s) { +function scene_systemMenu_brightnessDown__P172718_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_MenuOption_setOffset__P169618, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_brightnessDown__P172718, 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__P169620(s) { +function scene_systemMenu_setScreenBrightness__P172719(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -48195,49 +48564,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, scene_systemMenu_MenuOption__C169614_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.tmp_0 = helpers_setScreenBrightness__P168492_mk(s); + s.tmp_0.arg0 = globals.screen___168559; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 1506; s.pc = 1; return s.tmp_0; case 1: + r0 = s.retval; + s.tmp_0 = settings_writeNumber__P168590_mk(s); + s.tmp_0.arg0 = "#brightness"; + r0 = globals.brightness___168478; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1508; s.pc = 2; return s.tmp_0; case 2: - r0 = (s.arg0).fields["state"] = (s.arg1); - s.tmp_0 = scene_systemMenu_MenuOption_updateCard__P172712_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1409; s.pc = 4; return s.tmp_0; - case 4: r0 = s.retval; - case 3: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_MenuOption_setState__P169620.info = {"start":1655,"length":147,"line":71,"column":8,"endLine":75,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"setState","argumentNames":["this","state"]} +scene_systemMenu_setScreenBrightness__P172719.info = {"start":9291,"length":345,"line":293,"column":4,"endLine":298,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"setScreenBrightness","argumentNames":["b"]} -function scene_systemMenu_MenuOption_setState__P169620_mk(s) { +function scene_systemMenu_setScreenBrightness__P172719_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_MenuOption_setState__P169620, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_setScreenBrightness__P172719, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, arg0: undefined, - arg1: undefined, } } -function scene_systemMenu_MenuOption_updateCard__P172712(s) { +function helpers_setScreenBrightness__P168492(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -48249,149 +48610,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, scene_systemMenu_MenuOption__C169614_VT)) failedCast(r0); - r0 = s.arg0.fields["theme"]; - 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 = 7; continue; } + s.tmp_0 = Math_clamp__P166654_mk(s); + s.tmp_0.arg0 = 10; + s.tmp_0.arg1 = 100; + r0 = (s.arg1 | 0); + s.tmp_0.arg2 = r0; + s.callLocIdx = 157; s.pc = 1; return s.tmp_0; case 1: - case 2: - r0 = s.arg0.fields["state"]; - s.tmp_3 = r0; - r0 = pxsim_pxtcore.switch_eq(2, s.tmp_3); - if (r0) { step = 3; continue; } - r0 = pxsim_pxtcore.switch_eq(0, s.tmp_3); - if (r0) { step = 4; continue; } - r0 = pxsim_pxtcore.switch_eq(1, s.tmp_3); - if (r0) { step = 5; continue; } - r0 = s.tmp_3; - { step = 6; continue; } - case 3: - s.tmp_4 = Sprite_setImage__P168918_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 = 1412; s.pc = 9; return s.tmp_5; } - } - case 9: - r0 = s.retval; - s.tmp_4.arg1 = r0; - s.callLocIdx = 1413; s.pc = 8; return s.tmp_4; - case 8: - r0 = s.retval; - { step = 6; continue; } - case 4: - s.tmp_0 = Sprite_setImage__P168918_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 = 1414; s.pc = 11; return s.tmp_1; } - } - case 11: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1415; s.pc = 10; return s.tmp_0; - case 10: - r0 = s.retval; - { step = 6; continue; } - case 5: - s.tmp_0 = Sprite_setImage__P168918_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 = 1416; s.pc = 13; return s.tmp_1; } - } - case 13: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1417; s.pc = 12; return s.tmp_0; - case 12: - r0 = s.retval; - case 6: - s.tmp_0 = Sprite_x__P168882_mk(s); - r0 = s.arg0.fields["icon"]; - s.tmp_0.arg0 = r0; - s.tmp_1 = Sprite_x__P168881_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_1.arg0 = r0; - s.callLocIdx = 1418; s.pc = 15; return s.tmp_1; - case 15: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1419; s.pc = 14; return s.tmp_0; - case 14: - r0 = s.retval; - s.tmp_0 = Sprite_y__P168884_mk(s); - r0 = s.arg0.fields["icon"]; - s.tmp_0.arg0 = r0; - s.tmp_1 = Sprite_y__P168883_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_1.arg0 = r0; - s.callLocIdx = 1420; s.pc = 17; return s.tmp_1; - case 17: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1421; s.pc = 16; return s.tmp_0; - case 16: r0 = s.retval; - case 7: + s.arg1 = (r0); + globals.brightness___168478 = (s.arg1); + r0 = pxsim_pxtcore.setScreenBrightness(globals.brightness___168478); r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_MenuOption_updateCard__P172712.info = {"start":2038,"length":497,"line":86,"column":8,"endLine":97,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"updateCard","argumentNames":["this"]} +helpers_setScreenBrightness__P168492.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 scene_systemMenu_MenuOption_updateCard__P172712_mk(s) { +function helpers_setScreenBrightness__P168492_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_MenuOption_updateCard__P172712, depth: s.depth + 1, + parent: s, fn: helpers_setScreenBrightness__P168492, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, arg0: undefined, + arg1: undefined, } } -function scene_systemMenu_MenuOption_setTheme__P169619(s) { +function scene_systemMenu_brightnessUp__P172717(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -48401,40 +48654,34 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, scene_systemMenu_MenuOption__C169614_VT)) failedCast(r0); - r0 = (s.arg0).fields["theme"] = (s.arg1); - s.tmp_0 = scene_systemMenu_MenuOption_updateCard__P172712_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1408; s.pc = 1; return s.tmp_0; + s.tmp_0 = scene_systemMenu_setScreenBrightness__P172719_mk(s); + r0 = globals.brightness___168478; + s.tmp_1 = r0; + r0 = (s.tmp_1 + 5); + s.tmp_0.arg0 = r0; + s.callLocIdx = 1503; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_MenuOption_setTheme__P169619.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__P172717.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__P169619_mk(s) { +function scene_systemMenu_brightnessUp__P172717_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_MenuOption_setTheme__P169619, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_brightnessUp__P172717, 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_MenuOption_position__P169617(s) { +function scene_systemMenu_volumeDown__P172716(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -48444,78 +48691,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, scene_systemMenu_MenuOption__C169614_VT)) failedCast(r0); - r0 = (s.arg0).fields["top"] = (s.arg2); - s.tmp_0 = Sprite_left__P168927_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 1399; s.pc = 1; return s.tmp_0; - case 1: + s.v___189730 = undefined; + s.remainder___189733 = undefined; + s.newVolume___189736 = undefined; + s.tmp_0 = music_volume__P168148_mk(s); + s.callLocIdx = 1500; s.pc = 3; return s.tmp_0; + case 3: r0 = s.retval; - s.tmp_0 = Sprite_top__P168931_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.arg2; - s.callLocIdx = 1400; s.pc = 2; return s.tmp_0; + s.v___189730 = (r0); + r0 = (s.v___189730 % 32); + s.remainder___189733 = (r0); + r0 = pxsim_numops_toBoolDecr(s.remainder___189733); + if (!r0) { step = 1; continue; } + r0 = s.remainder___189733; + { step = 2; continue; } + case 1: + r0 = 32; case 2: - r0 = s.retval; - s.tmp_0 = Sprite_x__P168882_mk(s); - r0 = s.arg0.fields["icon"]; - s.tmp_0.arg0 = r0; - s.tmp_1 = Sprite_x__P168881_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_1.arg0 = r0; - s.callLocIdx = 1401; s.pc = 4; return s.tmp_1; + // jmp value (already in r0) + s.tmp_0 = r0; + r0 = (s.v___189730 - s.tmp_0); + s.newVolume___189736 = (r0); + s.tmp_0 = scene_systemMenu_setVolume__P172714_mk(s); + s.tmp_0.arg0 = s.newVolume___189736; + s.callLocIdx = 1501; s.pc = 4; return s.tmp_0; case 4: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1402; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.tmp_0 = Sprite_y__P168884_mk(s); - r0 = s.arg0.fields["icon"]; - s.tmp_0.arg0 = r0; - s.tmp_1 = Sprite_y__P168883_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_1.arg0 = r0; - s.callLocIdx = 1403; s.pc = 6; return s.tmp_1; - case 6: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1404; s.pc = 5; return s.tmp_0; - case 5: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_MenuOption_position__P169617.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_volumeDown__P172716.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_MenuOption_position__P169617_mk(s) { +function scene_systemMenu_volumeDown__P172716_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_MenuOption_position__P169617, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_volumeDown__P172716, 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, + v___189730: undefined, + remainder___189733: undefined, + newVolume___189736: undefined, } } -function scene_systemMenu_MenuOption_show__P169616(s) { +function scene_systemMenu_setVolume__P172714(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -48529,96 +48752,35 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, scene_systemMenu_MenuOption__C169614_VT)) failedCast(r0); - r0 = s.arg0.fields["theme"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_1 = if_basicCard_1_mk(s); - r0 = s.arg0.fields["theme"]; - s.tmp_1.arg0 = r0; - if (!s.tmp_1.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "basicCard"); - } else { - s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["basicCard"]; - if (s.tmp_1.fn == null) { s.retval = s.tmp_1.arg0.fields["basicCard"]; } - else if (!s.tmp_1.fn.isGetter) { s.retval = bind(s.tmp_1); } - else { s.callLocIdx = 1394; s.pc = 3; return s.tmp_1; } - } - case 3: - r0 = s.retval; - { step = 2; continue; } + s.tmp_0 = music_setVolume__P168147_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1495; s.pc = 1; return s.tmp_0; case 1: - r0 = globals.CARD_NORMAL___169638; - case 2: - // jmp value (already in r0) - s.tmp_2 = r0; - s.tmp_3 = r0 = s.arg0; - s.tmp_5 = sprites_create__P168802_mk(s); - s.tmp_5.arg0 = s.tmp_2; - s.tmp_5.arg1 = undefined; - s.callLocIdx = 1395; s.pc = 4; return s.tmp_5; - case 4: - r0 = s.retval; - s.tmp_4 = r0; - r0 = (s.tmp_3).fields["card"] = (s.tmp_4); - s.tmp_0 = if_z_2_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = 1; - if (!s.tmp_0.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapSetByString(s.tmp_0.arg0, "z", s.tmp_0.arg1); - } else { - s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["set/z"]; - if (s.tmp_0.fn === null) { s.tmp_0.arg0.fields["z"] = s.tmp_0.arg1; } - else if (s.tmp_0.fn === undefined) { failedCast(s.tmp_0.arg0) } - else { s.callLocIdx = 1396; s.pc = 5; return s.tmp_0; } - } - case 5: r0 = s.retval; - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = sprites_create__P168802_mk(s); - r0 = s.arg0.fields["iconImage"]; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = undefined; - s.callLocIdx = 1397; s.pc = 6; return s.tmp_2; - case 6: + s.tmp_0 = music_playTone__P168149_mk(s); + s.tmp_0.arg0 = 440; + s.tmp_0.arg1 = 500; + s.callLocIdx = 1496; s.pc = 2; return s.tmp_0; + case 2: r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["icon"] = (s.tmp_1); - s.tmp_0 = if_z_2_mk(s); - r0 = s.arg0.fields["icon"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = 2; - if (!s.tmp_0.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapSetByString(s.tmp_0.arg0, "z", s.tmp_0.arg1); - } else { - s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["set/z"]; - if (s.tmp_0.fn === null) { s.tmp_0.arg0.fields["z"] = s.tmp_0.arg1; } - else if (s.tmp_0.fn === undefined) { failedCast(s.tmp_0.arg0) } - else { s.callLocIdx = 1398; s.pc = 7; return s.tmp_0; } - } - case 7: + s.tmp_0 = settings_writeNumber__P168590_mk(s); + s.tmp_0.arg0 = "#volume"; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 1497; s.pc = 3; return s.tmp_0; + case 3: r0 = s.retval; - r0 = (s.arg0).fields["state"] = (2); r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_MenuOption_show__P169616.info = {"start":904,"length":264,"line":41,"column":8,"endLine":49,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"show","argumentNames":["this"]} +scene_systemMenu_setVolume__P172714.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_show__P169616_mk(s) { +function scene_systemMenu_setVolume__P172714_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_MenuOption_show__P169616, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_setVolume__P172714, depth: s.depth + 1, pc: 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, } } @@ -48626,7 +48788,7 @@ function scene_systemMenu_MenuOption_show__P169616_mk(s) { -function game_onShade__P169544(s) { +function music_playTone__P168149(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -48636,54 +48798,82 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.id___189571 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = game_init__P172465_mk(s); - s.tmp_0.arg0 = undefined; - s.callLocIdx = 1381; 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); + 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; } - { step = 3; continue; } + r0 = pxsim_pxtrt_stlocRef(s.arg1, 86400000); case 1: case 2: - s.tmp_2 = scene_createRenderable__P169332_mk(s); - s.tmp_2.arg0 = 80; + 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__P171993_mk(s); + s.tmp_2.arg0 = 0; s.tmp_2.arg1 = s.arg0; - s.tmp_2.arg2 = undefined; - s.callLocIdx = 1382; s.pc = 5; return s.tmp_2; + r0 = pxsim_pxtrt_ldlocRef(s.arg1); + s.tmp_2.arg2 = r0; + s.callLocIdx = 86; s.pc = 5; return s.tmp_2; case 5: r0 = s.retval; + s.tmp_0 = pause__P166940_mk(s); + r0 = pxsim_pxtrt_ldlocRef(s.arg1); + s.tmp_0.arg0 = r0; + s.callLocIdx = 87; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + { step = 4; continue; } case 3: + r0 = (globals.playToneID___171995 + 1); + s.tmp_0 = r0; + globals.playToneID___171995 = (r0); + s.id___189571 = (s.tmp_0); + r0 = pxsim_pxtcore_mkAction(3, music_playTone_inline__P189577); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.id___189571); + 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() } } } -game_onShade__P169544.info = {"start":15517,"length":145,"line":464,"column":4,"endLine":468,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"onShade","argumentNames":["a"]} +music_playTone__P168149.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 game_onShade__P169544_mk(s) { +function music_playTone__P168149_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_onShade__P169544, depth: s.depth + 1, + parent: s, fn: music_playTone__P168149, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, + id___189571: undefined, arg0: undefined, + arg1: undefined, } } -function scene_systemMenu_PauseMenu_constructor__P169623(s) { +function music_playTone_inline__P189577(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -48693,61 +48883,106 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C169622_VT)) failedCast(r0); - r0 = (s.arg0).fields["generator"] = (s.arg1); - s.tmp_0 = r0 = s.arg2; + s.pos___189578 = undefined; + s.now___189588 = undefined; + s.d___189591 = undefined; + s.t___189595 = undefined; + r0 = pxsim.control.millis(); + s.pos___189578 = (r0); + case 1: + r0 = (s.caps[0] == globals.playToneID___171995); + s.tmp_0 = r0; r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } + if (r0) { step = 2; continue; } r0 = s.tmp_0; - { step = 2; continue; } - case 1: - s.tmp_1 = scene_systemMenu_buildMenuTheme__P169631_mk(s); - r0 = pxsim_ImageMethods.width(globals.CARD_NORMAL___169638); - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 3; - s.tmp_1.arg2 = undefined; - s.tmp_1.arg3 = undefined; - s.callLocIdx = 1422; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; + { step = 3; continue; } case 2: + r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + s.tmp_1 = r0; + r0 = (s.tmp_1 > 0); + case 3: // jmp value (already in r0) s.tmp_2 = r0; - r0 = (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 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 6; continue; } + r0 = pxsim.control.millis(); + s.now___189588 = (r0); + r0 = (s.pos___189578 - s.now___189588); + s.d___189591 = (r0); + s.tmp_0 = Math_min__P166658_mk(s); + r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = 500; + s.callLocIdx = 88; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + s.t___189595 = (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___189595); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + r0 = (s.pos___189578 + s.t___189595); + s.pos___189578 = (r0); + s.tmp_0 = music_playNoteCore__P171993_mk(s); + r0 = (s.d___189591 - 1); + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.caps[2]; + s.tmp_0.arg2 = s.t___189595; + s.callLocIdx = 89; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + s.tmp_1 = r0; + r0 = (s.tmp_1 == 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + s.tmp_2 = pause__P166940_mk(s); + r0 = (s.d___189591 + s.t___189595); + s.tmp_2.arg0 = r0; + s.callLocIdx = 90; s.pc = 9; return s.tmp_2; + case 9: + r0 = s.retval; + { step = 5; continue; } + case 4: + s.tmp_0 = pause__P166940_mk(s); + r0 = (s.d___189591 + s.t___189595); + s.tmp_1 = r0; + r0 = (s.tmp_1 - 100); + s.tmp_0.arg0 = r0; + s.callLocIdx = 91; s.pc = 10; return s.tmp_0; + case 10: + r0 = s.retval; + case 5: + { step = 1; continue; } + case 6: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_constructor__P169623.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"]} +music_playTone_inline__P189577.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_PauseMenu_constructor__P169623_mk(s) { +function music_playTone_inline__P189577_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_constructor__P169623, depth: s.depth + 1, + parent: s, fn: music_playTone_inline__P189577, 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, + pos___189578: undefined, + now___189588: undefined, + d___189591: undefined, + t___189595: undefined, } } -function scene_systemMenu_buildMenuTheme__P169631(s) { +function music_playNoteCore__P171993(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -48757,150 +48992,57 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.cardsPerRow___189775 = undefined; + s.buf___189625 = 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___168559); - 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___189775 = (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 = globals.font8___168502; + r0 = pxsim.control.createBuffer(12); + s.buf___189625 = (r0); + s.tmp_0 = music_addNote__P168163_mk(s); + s.tmp_0.arg0 = s.buf___189625; + 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__P168148_mk(s); + s.callLocIdx = 84; s.pc = 2; return s.tmp_1; 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__P168505_mk(s); - s.tmp_1.arg0 = s.arg2; - s.callLocIdx = 1532; 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___189775); - r0 = pxsim_ImageMethods.width(globals.screen___168559); - s.tmp_3 = r0; - r0 = (s.cardsPerRow___189775 * s.arg0); - s.tmp_5 = r0; - r0 = (s.cardsPerRow___189775 - 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 = 1533; 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___168559); - 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 = 1534; s.pc = 7; return s.tmp_16; } - } - case 7: + s.tmp_0.arg7 = r0; + s.tmp_0.arg8 = s.arg1; + s.callLocIdx = 85; s.pc = 1; return s.tmp_0; + case 1: 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___169639); - r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "activeCard", globals.CARD_ACTIVE___169640); - r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "basicCard", globals.CARD_NORMAL___169638); - r0 = s.tmp_0; + r0 = pxsim.music.queuePlayInstructions(s.arg0, s.buf___189625); + r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_buildMenuTheme__P169631.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_playNoteCore__P171993.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 scene_systemMenu_buildMenuTheme__P169631_mk(s) { +function music_playNoteCore__P171993_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_buildMenuTheme__P169631, depth: s.depth + 1, + parent: s, fn: music_playNoteCore__P171993, depth: s.depth + 1, pc: 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___189775: undefined, + buf___189625: undefined, arg0: undefined, arg1: undefined, arg2: undefined, - arg3: undefined, } } -function image_doubledFont__P168505(s) { +function music_addNote__P168163(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -48912,33 +49054,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; } - s.tmp_0 = image_scaledFont__P168506_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 2; - s.callLocIdx = 158; s.pc = 1; return s.tmp_0; + 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); + 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: - r0 = s.retval; + case 2: + r0 = pxsim.BufferMethods.setNumber(s.arg0, 2, s.arg1, 0); + r0 = s.arg1; return leave(s, r0) default: oops() } } } -image_doubledFont__P168505.info = {"start":12008,"length":82,"line":146,"column":4,"endLine":148,"endColumn":5,"fileName":"pxt_modules/screen/text.ts","functionName":"doubledFont","argumentNames":["f"]} +music_addNote__P168163.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 image_doubledFont__P168505_mk(s) { +function music_addNote__P168163_mk(s) { checkStack(s.depth); return { - parent: s, fn: image_doubledFont__P168505, depth: s.depth + 1, + parent: s, fn: music_addNote__P168163, depth: s.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 image_scaledFont__P168506(s) { +function music_setVolume__P168147(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -48950,141 +49148,50 @@ switch (step) { 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 = Math_clamp__P166654_mk(s); + s.tmp_0.arg0 = 0; + s.tmp_0.arg1 = 255; + r0 = (s.arg0 | 0); + s.tmp_0.arg2 = r0; + s.callLocIdx = 81; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + globals.globalVolume___171988 = (r0); + r0 = (globals.globalVolume___171988 > 0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = s.arg0; - { step = 5; continue; } + r0 = 1; + { step = 2; continue; } case 1: + r0 = 0; 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 = 159; s.pc = 6; return s.tmp_4; } - } - case 6: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_3 * s.arg1); - s.tmp_2 = r0; - r0 = pxsim_pxtrt.mapSetByString(s.tmp_1, "charWidth", s.tmp_2); - s.tmp_7 = if_charHeight_1_mk(s); - s.tmp_7.arg0 = s.arg0; - if (!s.tmp_7.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_7.arg0, "charHeight"); - } else { - s.tmp_7.fn = s.tmp_7.arg0.vtable.iface["charHeight"]; - if (s.tmp_7.fn == null) { s.retval = s.tmp_7.arg0.fields["charHeight"]; } - else if (!s.tmp_7.fn.isGetter) { s.retval = bind(s.tmp_7); } - else { s.callLocIdx = 160; 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 = 161; 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 = 162; 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 = 163; 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: + s.tmp_1 = r0; + r0 = undefined; + r0 = undefined; return leave(s, r0) default: oops() } } } -image_scaledFont__P168506.info = {"start":12096,"length":331,"line":150,"column":4,"endLine":160,"endColumn":5,"fileName":"pxt_modules/screen/text.ts","functionName":"scaledFont","argumentNames":["f","size"]} +music_setVolume__P168147.info = {"start":1533,"length":153,"line":51,"column":4,"endLine":54,"endColumn":5,"fileName":"pxt_modules/mixer/melody.ts","functionName":"setVolume","argumentNames":["volume"]} -function image_scaledFont__P168506_mk(s) { +function music_setVolume__P168147_mk(s) { checkStack(s.depth); return { - parent: s, fn: image_scaledFont__P168506, depth: s.depth + 1, + parent: s, fn: music_setVolume__P168147, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - tmp_11: undefined, - tmp_12: undefined, - tmp_13: undefined, - tmp_14: undefined, - tmp_15: undefined, arg0: undefined, - arg1: undefined, } } -function scene_systemMenu_initScreen__P172725(s) { +function music_enableAmp__P171991(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -49094,46 +49201,29 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.brightness___189855 = undefined; - s.tmp_0 = settings_readNumber__P168595_mk(s); - s.tmp_0.arg0 = "#brightness"; - s.callLocIdx = 1541; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.brightness___189855 = (r0); - r0 = (s.brightness___189855 !== undefined); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_1 = helpers_setScreenBrightness__P168492_mk(s); - s.tmp_1.arg0 = globals.screen___168559; - s.tmp_1.arg1 = s.brightness___189855; - s.callLocIdx = 1542; s.pc = 4; return s.tmp_1; - case 4: - r0 = s.retval; - case 1: - case 2: + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_initScreen__P172725.info = {"start":13388,"length":175,"line":405,"column":4,"endLine":409,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"initScreen","argumentNames":[]} +music_enableAmp__P171991.info = {"start":944,"length":64,"line":29,"column":4,"endLine":31,"endColumn":5,"fileName":"pxt_modules/mixer/melody.ts","functionName":"enableAmp","argumentNames":["en"]} -function scene_systemMenu_initScreen__P172725_mk(s) { +function music_enableAmp__P171991_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_initScreen__P172725, depth: s.depth + 1, + parent: s, fn: music_enableAmp__P171991, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - brightness___189855: undefined, + arg0: undefined, } } -function scene_systemMenu_initVolume__P172724(s) { +function scene_systemMenu_volumeUp__P172715(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -49143,45 +49233,47 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.vol___189865 = undefined; - s.tmp_0 = settings_readNumber__P168595_mk(s); - s.tmp_0.arg0 = "#volume"; - s.callLocIdx = 1539; s.pc = 3; return s.tmp_0; - case 3: + s.v___189539 = undefined; + s.remainder___189542 = undefined; + s.newVolume___189545 = undefined; + s.tmp_0 = music_volume__P168148_mk(s); + s.callLocIdx = 1498; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - s.vol___189865 = (r0); - r0 = (s.vol___189865 !== undefined); + s.v___189539 = (r0); + r0 = (s.v___189539 % 32); + s.remainder___189542 = (r0); + r0 = (s.v___189539 + 32); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_1 = music_setVolume__P168147_mk(s); - s.tmp_1.arg0 = s.vol___189865; - s.callLocIdx = 1540; s.pc = 4; return s.tmp_1; - case 4: - r0 = s.retval; - case 1: + r0 = (s.tmp_0 - s.remainder___189542); + s.newVolume___189545 = (r0); + s.tmp_0 = scene_systemMenu_setVolume__P172714_mk(s); + s.tmp_0.arg0 = s.newVolume___189545; + s.callLocIdx = 1499; s.pc = 2; return s.tmp_0; case 2: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_initVolume__P172724.info = {"start":13238,"length":144,"line":399,"column":4,"endLine":403,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"initVolume","argumentNames":[]} +scene_systemMenu_volumeUp__P172715.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_initVolume__P172724_mk(s) { +function scene_systemMenu_volumeUp__P172715_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_initVolume__P172724, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_volumeUp__P172715, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - vol___189865: undefined, + v___189539: undefined, + remainder___189542: undefined, + newVolume___189545: undefined, } } -function game_GameOverConfig_constructor__P169515(s) { +function game_consoleOverlay_isVisible__P169651(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -49191,37 +49283,33 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, game_GameOverConfig__C169500_VT)) failedCast(r0); - s.tmp_0 = game_GameOverConfig_init__P169516_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1325; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; + r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___172756); + 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() } } } -game_GameOverConfig_constructor__P169515.info = {"start":893,"length":50,"line":35,"column":8,"endLine":37,"endColumn":9,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":["this"]} +game_consoleOverlay_isVisible__P169651.info = {"start":422,"length":68,"line":11,"column":4,"endLine":13,"endColumn":5,"fileName":"pxt_modules/game/console.ts","functionName":"isVisible","argumentNames":[]} -function game_GameOverConfig_constructor__P169515_mk(s) { +function game_consoleOverlay_isVisible__P169651_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_GameOverConfig_constructor__P169515, depth: s.depth + 1, + parent: s, fn: game_consoleOverlay_isVisible__P169651, 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, } } -function game_GameOverConfig_init__P169516(s) { +function scene_systemMenu_closeMenu__P169629(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -49231,62 +49319,44 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, game_GameOverConfig__C169500_VT)) failedCast(r0); - r0 = (s.arg0).fields["scoringType"] = (0); - r0 = (s.arg0).fields["winEffect"] = (globals.confetti___169801); - r0 = (s.arg0).fields["loseEffect"] = (globals.melt___169823); - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = music_melodyPlayable__P168450_mk(s); - s.tmp_2.arg0 = globals.powerUp___168177; - s.callLocIdx = 1326; s.pc = 1; return s.tmp_2; - case 1: + r0 = pxsim_numops_toBoolDecr(globals.instance___172710); + if (!r0) { step = 1; continue; } + s.tmp_0 = scene_systemMenu_PauseMenu_dispose__P169628_mk(s); + s.tmp_0.arg0 = globals.instance___172710; + s.callLocIdx = 1514; s.pc = 3; return s.tmp_0; + case 3: 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__P168450_mk(s); - s.tmp_2.arg0 = globals.wawawawaa___168174; - s.callLocIdx = 1327; s.pc = 2; return s.tmp_2; - case 2: + globals.instance___172710 = (undefined); + s.tmp_0 = controller__setUserEventsEnabled__P168733_mk(s); + s.tmp_0.arg0 = true; + s.callLocIdx = 1515; s.pc = 4; return s.tmp_0; + case 4: 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); + s.tmp_0 = game_popScene__P169531_mk(s); + s.callLocIdx = 1516; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + case 1: + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -game_GameOverConfig_init__P169516.info = {"start":953,"length":701,"line":39,"column":8,"endLine":54,"endColumn":9,"fileName":"pxt_modules/game/game.ts","functionName":"init","argumentNames":["this"]} +scene_systemMenu_closeMenu__P169629.info = {"start":10129,"length":216,"line":320,"column":4,"endLine":327,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"closeMenu","argumentNames":[]} -function game_GameOverConfig_init__P169516_mk(s) { +function scene_systemMenu_closeMenu__P169629_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_GameOverConfig_init__P169516, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_closeMenu__P169629, 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 melt_inline__P189923(s) { +function scene_systemMenu_PauseMenu_dispose__P169628(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -49296,96 +49366,47 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.rounds___189926 = undefined; - s.j___189934 = undefined; - s.x___189939 = undefined; - s.y___189945 = undefined; - s.c___189951 = 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___189926 = (r0); - s.j___189934 = (0); - case 1: - r0 = (s.j___189934 < s.rounds___189926); + r0 = s.arg0; + if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C169622_VT)) failedCast(r0); + r0 = s.arg0.fields["options"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.tmp_1 = Math_FastRandom_randomRange__P169590_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 = 59; s.pc = 3; return s.tmp_1; + if (!r0) { step = 1; continue; } + s.tmp_1 = helpers_arrayForEach__P166636_mk(s); + r0 = s.arg0.fields["options"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = scene_systemMenu_PauseMenu_dispose_inline__P189184; + s.callLocIdx = 1491; s.pc = 3; return s.tmp_1; case 3: r0 = s.retval; - s.x___189939 = (r0); - s.tmp_0 = Math_FastRandom_randomRange__P169590_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 = 60; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - s.y___189945 = (r0); - r0 = pxsim_ImageMethods.getPixel(s.arg0, s.x___189939, s.y___189945); - s.c___189951 = (r0); - s.tmp_0 = r0 = s.arg0; - s.tmp_1 = r0 = s.x___189939; - r0 = (s.y___189945 + 1); - s.tmp_2 = r0; - r0 = pxsim_ImageMethods.setPixel(s.tmp_0, s.tmp_1, s.tmp_2, s.c___189951); - s.tmp_0 = r0 = s.arg0; - s.tmp_1 = r0 = s.x___189939; - r0 = (s.y___189945 + 2); - s.tmp_2 = r0; - r0 = pxsim_ImageMethods.setPixel(s.tmp_0, s.tmp_1, s.tmp_2, s.c___189951); - r0 = (s.j___189934 + 1); - s.j___189934 = (r0); - { step = 1; continue; } + r0 = (s.arg0).fields["options"] = (undefined); + case 1: case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -melt_inline__P189923.info = {"start":2652,"length":386,"line":72,"column":45,"endLine":81,"endColumn":5,"fileName":"pxt_modules/game/effects.ts","functionName":"inline","argumentNames":["input","r"]} +scene_systemMenu_PauseMenu_dispose__P169628.info = {"start":7732,"length":165,"line":243,"column":8,"endLine":248,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"dispose","argumentNames":["this"]} -function melt_inline__P189923_mk(s) { +function scene_systemMenu_PauseMenu_dispose__P169628_mk(s) { checkStack(s.depth); return { - parent: s, fn: melt_inline__P189923, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_dispose__P169628, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - rounds___189926: undefined, - j___189934: undefined, - x___189939: undefined, - y___189945: undefined, - c___189951: undefined, arg0: undefined, - arg1: undefined, } } -function confetti_inline__P189977(s) { +function scene_systemMenu_PauseMenu_dispose_inline__P189184(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -49395,98 +49416,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.factory___189980 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_pxtcore_mkClassInstance(particles_ConfettiFactory__C169745_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 = 47; 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 = 48; s.pc = 4; return s.tmp_3; } - } - case 4: - r0 = s.retval; - { step = 2; continue; } + s.tmp_0 = scene_systemMenu_MenuOption_dispose__P169621_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1490; s.pc = 1; return s.tmp_0; case 1: - r0 = 16; - case 2: - // jmp value (already in r0) - s.tmp_4 = r0; - s.tmp_5 = particles_ConfettiFactory_constructor__P169746_mk(s); - s.tmp_5.arg0 = s.tmp_0; - s.tmp_5.arg1 = s.tmp_4; - s.tmp_5.arg2 = 16; - s.callLocIdx = 49; s.pc = 5; return s.tmp_5; - case 5: - r0 = s.retval; - s.factory___189980 = (s.tmp_0); - s.tmp_0 = particles_SprayFactory_setSpeed__P169722_mk(s); - s.tmp_0.arg0 = s.factory___189980; - s.tmp_0.arg1 = 30; - s.callLocIdx = 50; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - r0 = pxsim_pxtcore_mkClassInstance(particles_ParticleSource__C169678_VT); - s.tmp_0 = r0; - s.tmp_1 = particles_ParticleSource_constructor__P169683_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___189980; - s.callLocIdx = 51; s.pc = 7; return s.tmp_1; - case 7: r0 = s.retval; - r0 = s.tmp_0; + r0 = undefined; return leave(s, r0) default: oops() } } } -confetti_inline__P189977.info = {"start":7534,"length":284,"line":191,"column":59,"endLine":195,"endColumn":5,"fileName":"pxt_modules/game/particleeffects.ts","functionName":"inline","argumentNames":["anchor","particlesPerSecond"]} +scene_systemMenu_PauseMenu_dispose_inline__P189184.info = {"start":7813,"length":16,"line":245,"column":37,"endLine":245,"endColumn":53,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":["o"]} -function confetti_inline__P189977_mk(s) { +function scene_systemMenu_PauseMenu_dispose_inline__P189184_mk(s) { checkStack(s.depth); return { - parent: s, fn: confetti_inline__P189977, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_dispose_inline__P189184, depth: s.depth + 1, pc: 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___189980: undefined, arg0: undefined, - arg1: undefined, } } -function particles_ParticleSource_constructor__P169683(s) { +function scene_systemMenu_MenuOption_dispose__P169621(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -49496,130 +49454,57 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sources___190001 = undefined; - s.removedSource___190010 = 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__C169678_VT)) failedCast(r0); - s.tmp_0 = sprites_BaseSprite_constructor__P168623_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 1561; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - s.tmp_0 = particles_init__P172801_mk(s); - s.callLocIdx = 1562; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.tmp_0 = particles_particleSources__P172807_mk(s); - s.callLocIdx = 1563; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - s.sources___190001 = (r0); - r0 = pxsim_Array__length(s.sources___190001); - s.tmp_1 = r0; - r0 = (s.tmp_1 >= globals.MAX_SOURCES___172793); + if (!checkSubtype(r0, scene_systemMenu_MenuOption__C169614_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_2 = particles_sortSources__P172804_mk(s); - s.tmp_2.arg0 = s.sources___190001; - s.callLocIdx = 1564; s.pc = 8; return s.tmp_2; - case 8: - r0 = s.retval; - r0 = pxsim_Array_.removeAt(s.sources___190001, 0); - s.removedSource___190010 = (r0); - s.tmp_0 = particles_ParticleSource_clear__P169693_mk(s); - s.tmp_0.arg0 = s.removedSource___190010; - s.callLocIdx = 1566; s.pc = 9; return s.tmp_0; - case 9: + s.tmp_1 = Sprite_destroy__P168955_mk(s); + r0 = s.arg0.fields["card"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = undefined; + s.tmp_1.arg2 = undefined; + s.callLocIdx = 1410; s.pc = 3; return s.tmp_1; + case 3: r0 = s.retval; - s.tmp_0 = particles_ParticleSource_destroy__P169692_mk(s); - s.tmp_0.arg0 = s.removedSource___190010; - s.callLocIdx = 1567; s.pc = 10; return s.tmp_0; - case 10: + s.tmp_0 = Sprite_destroy__P168955_mk(s); + r0 = s.arg0.fields["icon"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = undefined; + s.tmp_0.arg2 = undefined; + s.callLocIdx = 1411; s.pc = 4; return s.tmp_0; + case 4: r0 = s.retval; + r0 = (s.arg0).fields["card"] = (undefined); + r0 = (s.arg0).fields["icon"] = (undefined); case 1: case 2: - r0 = (s.arg0).fields["pFlags"] = (0); - s.tmp_0 = particles_ParticleSource_setRate__P169695_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg2; - s.callLocIdx = 1568; s.pc = 11; return s.tmp_0; - case 11: - r0 = s.retval; - s.tmp_0 = particles_ParticleSource_setAcceleration__P169687_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.tmp_0.arg2 = 0; - s.callLocIdx = 1569; s.pc = 12; return s.tmp_0; - case 12: - r0 = s.retval; - s.tmp_0 = particles_ParticleSource_setAnchor__P169694_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 1570; 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___169698; - case 4: - // jmp value (already in r0) - s.tmp_1 = r0; - s.tmp_2 = particles_ParticleSource_setFactory__P169697_mk(s); - s.tmp_2.arg0 = s.arg0; - s.tmp_2.arg1 = s.tmp_1; - s.callLocIdx = 1571; s.pc = 14; return s.tmp_2; - case 14: - r0 = s.retval; - r0 = pxsim_Array__push(s.sources___190001, s.arg0); - s.tmp_0 = particles_ParticleSource_enabled__P169691_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = true; - s.callLocIdx = 1572; s.pc = 15; return s.tmp_0; - case 15: - r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ParticleSource_constructor__P169683.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"]} +scene_systemMenu_MenuOption_dispose__P169621.info = {"start":1812,"length":216,"line":77,"column":8,"endLine":84,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"dispose","argumentNames":["this"]} -function particles_ParticleSource_constructor__P169683_mk(s) { +function scene_systemMenu_MenuOption_dispose__P169621_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_constructor__P169683, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_MenuOption_dispose__P169621, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - sources___190001: undefined, - removedSource___190010: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function particles_sortSources__P172804(s) { +function scene_systemMenu_MenuOption_constructor__P169615(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -49631,34 +49516,38 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } - s.tmp_0 = helpers_arraySort__P166632_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = particles_sortSources_inline__P190207; - s.callLocIdx = 1610; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; + r0 = s.arg0; + if (!checkSubtype(r0, scene_systemMenu_MenuOption__C169614_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() } } } -particles_sortSources__P172804.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_constructor__P169615.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 particles_sortSources__P172804_mk(s) { +function scene_systemMenu_MenuOption_constructor__P169615_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_sortSources__P172804, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_MenuOption_constructor__P169615, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function particles_sortSources_inline__P190207(s) { +function helpers_screenBrightness__P168493(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -49670,54 +49559,27 @@ 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"]; - 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; + r0 = globals.brightness___168478; return leave(s, r0) default: oops() } } } -particles_sortSources_inline__P190207.info = {"start":10097,"length":50,"line":333,"column":21,"endLine":333,"endColumn":71,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["a","b"]} +helpers_screenBrightness__P168493.info = {"start":9161,"length":98,"line":288,"column":4,"endLine":290,"endColumn":5,"fileName":"pxt_modules/screen/image.ts","functionName":"screenBrightness","argumentNames":["img"]} -function particles_sortSources_inline__P190207_mk(s) { +function helpers_screenBrightness__P168493_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_sortSources_inline__P190207, depth: s.depth + 1, + parent: s, fn: helpers_screenBrightness__P168493, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, arg0: undefined, - arg1: undefined, } } -function particles_init__P172801(s) { +function music_volume__P168148(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -49727,59 +49589,29 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___190246 = undefined; - s.tmp_0 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1600; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - s.scene___190246 = (r0); - r0 = s.scene___190246.fields["particleSources"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 3; continue; } + s.tmp_0 = music_initVolume__P171992_mk(s); + s.callLocIdx = 83; s.pc = 1; return s.tmp_0; case 1: - case 2: - s.tmp_1 = r0 = s.scene___190246; - r0 = pxsim_Array__mk(); - s.tmp_2 = r0; - r0 = (s.tmp_1).fields["particleSources"] = (s.tmp_2); - r0 = pxsim.control.millis(); - globals.lastUpdate___172796 = (r0); - s.tmp_0 = game_onUpdate__P169550_mk(s); - s.tmp_0.arg0 = particles_updateParticles__P172802; - s.callLocIdx = 1601; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - s.tmp_0 = game_onUpdateInterval__P169551_mk(s); - s.tmp_0.arg0 = 250; - s.tmp_0.arg1 = particles_pruneParticles__P172803; - s.callLocIdx = 1602; s.pc = 6; return s.tmp_0; - case 6: r0 = s.retval; - case 3: - r0 = undefined; + r0 = globals.globalVolume___171988; return leave(s, r0) default: oops() } } } -particles_init__P172801.info = {"start":9236,"length":276,"line":304,"column":4,"endLine":311,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"init","argumentNames":[]} +music_volume__P168148.info = {"start":1781,"length":90,"line":61,"column":4,"endLine":64,"endColumn":5,"fileName":"pxt_modules/mixer/melody.ts","functionName":"volume","argumentNames":[]} -function particles_init__P172801_mk(s) { +function music_volume__P168148_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_init__P172801, depth: s.depth + 1, + parent: s, fn: music_volume__P168148, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - scene___190246: undefined, } } -function particles_updateParticles__P172802(s) { +function music_initVolume__P171992(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -49789,81 +49621,38 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sources___190261 = undefined; - s.time___190268 = undefined; - s.dt___190271 = undefined; - s.i___190277 = undefined; - s.tmp_0 = particles_particleSources__P172807_mk(s); - s.callLocIdx = 1603; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.sources___190261 = (r0); - r0 = pxsim_numops_toBoolDecr(s.sources___190261); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = (globals.globalVolume___171988 === null); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - { step = 5; continue; } - case 1: - case 2: - s.tmp_2 = particles_sortSources__P172804_mk(s); - s.tmp_2.arg0 = s.sources___190261; - s.callLocIdx = 1604; s.pc = 7; return s.tmp_2; - case 7: - r0 = s.retval; - r0 = pxsim.control.millis(); - s.time___190268 = (r0); - r0 = (s.time___190268 - globals.lastUpdate___172796); - s.dt___190271 = (r0); - globals.lastUpdate___172796 = (s.time___190268); - s.i___190277 = (0); + globals.globalVolume___171988 = (0); + s.tmp_0 = music_setVolume__P168147_mk(s); + r0 = pxsim_pxtcore.getConfig(59, 128); + s.tmp_0.arg0 = r0; + s.callLocIdx = 80; s.pc = 3; return s.tmp_0; case 3: - s.tmp_1 = r0 = s.i___190277; - r0 = pxsim_Array__length(s.sources___190261); - 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__P169685_mk(s); - r0 = pxsim_Array__getAt(s.sources___190261, s.i___190277); - s.tmp_3.arg0 = r0; - s.tmp_3.arg1 = s.dt___190271; - s.callLocIdx = 1605; s.pc = 8; return s.tmp_3; - case 8: r0 = s.retval; - r0 = (s.i___190277 + 1); - s.i___190277 = (r0); - { step = 3; continue; } - case 4: - case 5: + case 1: + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -particles_updateParticles__P172802.info = {"start":9518,"length":340,"line":313,"column":4,"endLine":325,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"updateParticles","argumentNames":[]} +music_initVolume__P171992.info = {"start":1014,"length":180,"line":33,"column":4,"endLine":38,"endColumn":5,"fileName":"pxt_modules/mixer/melody.ts","functionName":"initVolume","argumentNames":[]} -function particles_updateParticles__P172802_mk(s) { +function music_initVolume__P171992_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_updateParticles__P172802, depth: s.depth + 1, + parent: s, fn: music_initVolume__P171992, depth: s.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___190261: undefined, - time___190268: undefined, - dt___190271: undefined, - i___190277: undefined, } } -function particles_ParticleSource__update__P169685(s) { +function helpers_arrayConcat__P166640(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -49873,245 +49662,386 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.p___190340 = undefined; - s.current___190359 = undefined; - s.fixedDt___190367 = undefined; + s.out___189424 = undefined; + s.value___189427 = undefined; + s.unnamed784___U2 = undefined; + s.unnamed785___U3 = undefined; + s.value___189434 = undefined; + s.unnamed786___U5 = undefined; + s.unnamed787___U6 = 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__C169678_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; } - 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__P169692_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1576; s.pc = 28; return s.tmp_0; - case 28: - r0 = s.retval; + r0 = pxsim_Array__mk(); + s.out___189424 = (r0); + s.value___189427 = (undefined); + s.unnamed784___U2 = (s.arg0); + s.unnamed785___U3 = (0); case 1: + s.tmp_0 = r0 = s.unnamed785___U3; + r0 = pxsim_Array__length(s.unnamed784___U2); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 2; continue; } + r0 = pxsim_Array__getAt(s.unnamed784___U2, s.unnamed785___U3); + s.value___189427 = (r0); + r0 = pxsim_Array__push(s.out___189424, s.value___189427); + r0 = (s.unnamed785___U3 + 1); + s.unnamed785___U3 = (r0); + { step = 1; continue; } case 2: - { step = 10; continue; } + s.unnamed784___U2 = (undefined); + s.value___189434 = (undefined); + s.unnamed786___U5 = (s.arg1); + s.unnamed787___U6 = (0); case 3: - r0 = s.arg0.fields["anchor"]; + s.tmp_0 = r0 = s.unnamed787___U6; + r0 = pxsim_Array__length(s.unnamed786___U5); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 4; continue; } + r0 = pxsim_Array__getAt(s.unnamed786___U5, s.unnamed787___U6); + s.value___189434 = (r0); + r0 = pxsim_Array__push(s.out___189424, s.value___189434); + r0 = (s.unnamed787___U6 + 1); + s.unnamed787___U6 = (r0); + { step = 3; continue; } + case 4: + s.unnamed786___U5 = (undefined); + r0 = s.out___189424; + return leave(s, r0) + default: oops() +} } } +helpers_arrayConcat__P166640.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__P166640_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: helpers_arrayConcat__P166640, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + out___189424: undefined, + value___189427: undefined, + unnamed784___U2: undefined, + unnamed785___U3: undefined, + value___189434: undefined, + unnamed786___U5: undefined, + unnamed787___U6: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function scene_systemMenu_PauseMenu_show__P169624(s) { +let r0 = s.r0, 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___188740 = undefined; + s.i___188741 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C169622_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 = 1423; 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 = 1423; s.pc = 3; return s.tmp_2; } + else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 1423; s.pc = 3; return s.tmp_2;; } + else { s.callLocIdx = 1423; s.pc = 3; return s.tmp_2; } + } + case 3: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["options"] = (s.tmp_1); + r0 = (s.arg0).fields["selection"] = (0); + s.i___188741 = (0); + case 1: + s.tmp_1 = r0 = s.i___188741; + 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_toBool(s.tmp_0); - if (r0) { step = 4; continue; } - r0 = s.tmp_0; - { step = 5; continue; } + 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___188741); + s.current___188740 = (r0); + s.tmp_0 = scene_systemMenu_MenuOption_show__P169616_mk(s); + s.tmp_0.arg0 = s.current___188740; + s.callLocIdx = 1424; s.pc = 4; return s.tmp_0; case 4: - s.tmp_2 = if_flags_1_mk(s); - r0 = s.arg0.fields["anchor"]; + r0 = s.retval; + s.tmp_0 = scene_systemMenu_MenuOption_setTheme__P169619_mk(s); + s.tmp_0.arg0 = s.current___188740; + r0 = s.arg0.fields["theme"]; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1425; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.tmp_0 = scene_systemMenu_MenuOption_position__P169617_mk(s); + s.tmp_0.arg0 = s.current___188740; + 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, "flags"); + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "padding"); } 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"]; } + 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 = 1577; s.pc = 29; return s.tmp_2; } + else { s.callLocIdx = 1426; s.pc = 7; return s.tmp_2; } } - case 29: + case 7: 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"); + s.tmp_5 = r0 = s.i___188741; + 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_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 = 1578; s.pc = 30; return s.tmp_5; } + 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 = 1427; s.pc = 8; return s.tmp_7; } } - case 30: + case 8: 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: + 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 = 1428; s.pc = 9; return s.tmp_10; } + } case 9: + r0 = s.retval; + s.tmp_9 = r0; + s.tmp_12 = if_cardSpacing_1_mk(s); + r0 = s.arg0.fields["theme"]; + s.tmp_12.arg0 = r0; + if (!s.tmp_12.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_12.arg0, "cardSpacing"); + } else { + s.tmp_12.fn = s.tmp_12.arg0.vtable.iface["cardSpacing"]; + if (s.tmp_12.fn == null) { s.retval = s.tmp_12.arg0.fields["cardSpacing"]; } + else if (!s.tmp_12.fn.isGetter) { s.retval = bind(s.tmp_12); } + else { s.callLocIdx = 1429; s.pc = 10; return s.tmp_12; } + } case 10: + r0 = s.retval; + s.tmp_11 = r0; + r0 = (s.tmp_9 + s.tmp_11); + s.tmp_8 = r0; + r0 = (s.tmp_4 * s.tmp_8); + s.tmp_3 = r0; + r0 = (s.tmp_1 + s.tmp_3); + s.tmp_0.arg1 = r0; + s.tmp_14 = if_cardsTop_1_mk(s); + r0 = s.arg0.fields["theme"]; + s.tmp_14.arg0 = r0; + if (!s.tmp_14.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_14.arg0, "cardsTop"); + } else { + s.tmp_14.fn = s.tmp_14.arg0.vtable.iface["cardsTop"]; + if (s.tmp_14.fn == null) { s.retval = s.tmp_14.arg0.fields["cardsTop"]; } + else if (!s.tmp_14.fn.isGetter) { s.retval = bind(s.tmp_14); } + else { s.callLocIdx = 1430; s.pc = 11; return s.tmp_14; } + } 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; } + r0 = s.retval; + s.tmp_13 = r0; + s.tmp_17 = r0 = s.i___188741; + 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 = 1431; s.pc = 12; return s.tmp_19; } + } case 12: - s.tmp_2 = particles_ParticleSource_enabled__P169690_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 1579; s.pc = 31; return s.tmp_2; - case 31: 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 = 1432; s.pc = 13; return s.tmp_22; } + } 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__C169714_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__C169714_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___190340 = (r0); - r0 = pxsim_numops_toBoolDecr(s.p___190340); - 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; } + 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 = 1433; 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 = 1434; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + r0 = (s.i___188741 + 1); + s.i___188741 = (r0); + { step = 1; continue; } + case 2: + s.tmp_0 = controller__setUserEventsEnabled__P168733_mk(s); + s.tmp_0.arg0 = false; + s.callLocIdx = 1435; s.pc = 15; return s.tmp_0; case 15: - r0 = s.arg0.fields["head"]; - s.tmp_2 = r0; - r0 = (s.p___190340).fields["next"] = (s.tmp_2); - r0 = (s.arg0).fields["head"] = (s.p___190340); - { step = 11; continue; } + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P188804); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = controller_Button_onEvent__P168723_mk(s); + s.tmp_1.arg0 = globals.A___168640; + s.tmp_1.arg1 = 2053; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 1437; s.pc = 16; return s.tmp_1; 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); + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P188824); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 17; continue; } - { step = 27; continue; } + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = controller_Button_onEvent__P168723_mk(s); + s.tmp_1.arg0 = globals.A___168640; + s.tmp_1.arg1 = 2052; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 1439; s.pc = 17; return s.tmp_1; case 17: + r0 = s.retval; + s.tmp_0 = controller_Button_onEvent__P168723_mk(s); + s.tmp_0.arg0 = globals.B___168641; + s.tmp_0.arg1 = 2053; + s.tmp_0.arg2 = scene_systemMenu_PauseMenu_show_inline__P188853; + s.callLocIdx = 1441; s.pc = 18; return s.tmp_0; case 18: - r0 = s.arg0.fields["head"]; - s.current___190359 = (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___190367 = (r0); - r0 = pxsim_numops_toBoolDecr(s.fixedDt___190367); - if (!r0) { step = 23; continue; } + r0 = s.retval; + s.tmp_0 = controller_Button_onEvent__P168723_mk(s); + s.tmp_0.arg0 = globals.menu___168646; + s.tmp_0.arg1 = 2053; + s.tmp_0.arg2 = scene_systemMenu_PauseMenu_show_inline__P188858; + s.callLocIdx = 1443; s.pc = 19; return s.tmp_0; case 19: - r0 = s.current___190359.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___190359; - 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__C169678_v4_3_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.current___190359; - s.tmp_0.arg2 = s.fixedDt___190367; - if (!checkSubtype(s.tmp_0.arg0, particles_ParticleSource__C169678_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; + r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P188863); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = controller_Button_onEvent__P168723_mk(s); + s.tmp_1.arg0 = globals.up___168643; + s.tmp_1.arg1 = 2053; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 1447; s.pc = 20; return s.tmp_1; case 20: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P188875); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = controller_Button_onEvent__P168723_mk(s); + s.tmp_1.arg0 = globals.left___168642; + s.tmp_1.arg1 = 2053; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 1450; s.pc = 21; return s.tmp_1; case 21: - r0 = s.current___190359.fields["next"]; + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P188884); s.tmp_0 = r0; - s.current___190359 = (r0); - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 22; continue; } - { step = 19; continue; } + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = controller_Button_onEvent__P168723_mk(s); + s.tmp_1.arg0 = globals.down___168645; + s.tmp_1.arg1 = 2053; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 1454; s.pc = 22; return s.tmp_1; case 22: - r0 = (s.arg0).fields["_dt"] = (0); - { step = 26; continue; } + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P188900); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = controller_Button_onEvent__P168723_mk(s); + s.tmp_1.arg0 = globals.right___168644; + s.tmp_1.arg1 = 2053; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 1457; s.pc = 23; return s.tmp_1; case 23: - case 24: - s.tmp_0 = r0 = s.current___190359; - 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___190359.fields["next"]; + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P188912); s.tmp_0 = r0; - s.current___190359 = (r0); - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 25; continue; } - { step = 24; continue; } + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = game_onShade__P169544_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 1460; s.pc = 24; return s.tmp_1; + case 24: + r0 = s.retval; + s.tmp_0 = scene_systemMenu_PauseMenu_setSelection__P169626_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 1461; s.pc = 25; return s.tmp_0; case 25: - case 26: - case 27: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ParticleSource__update__P169685.info = {"start":3694,"length":1400,"line":124,"column":8,"endLine":164,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"_update","argumentNames":["this","dt"]} +scene_systemMenu_PauseMenu_show__P169624.info = {"start":3296,"length":2241,"line":123,"column":8,"endLine":181,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"show","argumentNames":["this"]} -function particles_ParticleSource__update__P169685_mk(s) { +function scene_systemMenu_PauseMenu_show__P169624_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource__update__P169685, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_show__P169624, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -50121,18 +50051,33 @@ function particles_ParticleSource__update__P169685_mk(s) { tmp_5: undefined, tmp_6: undefined, tmp_7: undefined, - p___190340: undefined, - current___190359: undefined, - fixedDt___190367: 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___188740: undefined, + i___188741: undefined, arg0: undefined, - arg1: undefined, } } -function particles_ParticleSource_updateParticle__P172798(s) { +function scene_systemMenu_PauseMenu_show_inline__P188804(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -50142,74 +50087,56 @@ 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__C169678_VT)) failedCast(r0); - r0 = (s.arg2 >> 10); - s.arg2 = (r0); - s.tmp_0 = r0 = s.arg1; - r0 = s.arg1.fields["vx"]; + r0 = s.caps[0].fields["options"]; 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); + r0 = pxsim_numops_toBoolDecr(s.tmp_2); 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); + 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.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"]; + 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.Math_.imul(s.tmp_4, s.arg2); - s.tmp_5 = r0; - r0 = (s.tmp_5 >> 8); + r0 = pxsim_numops_toBoolDecr(s.tmp_4); 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 = 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__P169620_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 = 1436; s.pc = 6; return s.tmp_8; + case 6: + r0 = s.retval; + case 5: r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ParticleSource_updateParticle__P172798.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"]} +scene_systemMenu_PauseMenu_show_inline__P188804.info = {"start":4025,"length":170,"line":140,"column":50,"endLine":143,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function particles_ParticleSource_updateParticle__P172798_mk(s) { +function scene_systemMenu_PauseMenu_show_inline__P188804_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_updateParticle__P172798, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P188804, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -50217,16 +50144,18 @@ function particles_ParticleSource_updateParticle__P172798_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, } } -function Fx_rightShift__P166698(s) { +function scene_systemMenu_PauseMenu_show_inline__P188824(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -50236,31 +50165,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.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = (s.arg0 >> s.arg1); + 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__P169620_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 = 1438; 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() } } } -Fx_rightShift__P166698.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_PauseMenu_show_inline__P188824.info = {"start":4247,"length":247,"line":145,"column":48,"endLine":149,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function Fx_rightShift__P166698_mk(s) { +function scene_systemMenu_PauseMenu_show_inline__P188824_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_rightShift__P166698, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P188824, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, - arg1: undefined, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, } } -function particles_ParticleFactory_createParticle__P169716(s) { +function scene_systemMenu_PauseMenu_show_inline__P188853(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -50270,83 +50251,29 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.p___190450 = 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__C169714_VT)) failedCast(r0); - r0 = pxsim_pxtcore_mkClassInstance(particles_Particle__C169659_VT); - s.p___190450 = (r0); - s.tmp_0 = r0 = s.p___190450; - 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 = 1630; s.pc = 1; return s.tmp_3; } - } + s.tmp_0 = scene_systemMenu_closeMenu__P169629_mk(s); + s.callLocIdx = 1440; 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___190450; - 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 = 1632; 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___190450).fields["vx"] = (0); - r0 = (s.p___190450).fields["vy"] = (0); - r0 = (s.p___190450).fields["lifespan"] = (500); - r0 = s.p___190450; + r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ParticleFactory_createParticle__P169716.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_PauseMenu_show_inline__P188853.info = {"start":4548,"length":50,"line":151,"column":50,"endLine":153,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function particles_ParticleFactory_createParticle__P169716_mk(s) { +function scene_systemMenu_PauseMenu_show_inline__P188853_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleFactory_createParticle__P169716, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P188853, depth: s.depth + 1, pc: 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___190450: undefined, - arg0: undefined, - arg1: undefined, } } -function MAX_SOURCES_inline__P190222(s) { +function scene_systemMenu_PauseMenu_show_inline__P188858(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -50356,54 +50283,29 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sz___190223 = undefined; - s.tmp_0 = control_ramSize__P166873_mk(s); - s.callLocIdx = 43; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.sz___190223 = (r0); - r0 = (s.sz___190223 <= 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; } + s.tmp_0 = scene_systemMenu_closeMenu__P169629_mk(s); + s.callLocIdx = 1442; s.pc = 1; return s.tmp_0; case 1: - r0 = (s.sz___190223 <= 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__P190222.info = {"start":240,"length":217,"line":9,"column":25,"endLine":18,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":[]} +scene_systemMenu_PauseMenu_show_inline__P188858.info = {"start":4655,"length":50,"line":155,"column":53,"endLine":157,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function MAX_SOURCES_inline__P190222_mk(s) { +function scene_systemMenu_PauseMenu_show_inline__P188858_mk(s) { checkStack(s.depth); return { - parent: s, fn: MAX_SOURCES_inline__P190222, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P188858, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - sz___190223: undefined, } } -function control_ramSize__P166873(s) { +function scene_systemMenu_PauseMenu_show_inline__P188863(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -50413,37 +50315,58 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_pxtcore.getConfig(205, 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } - case 1: - r0 = 33554432; + s.tmp_0 = scene_systemMenu_PauseMenu_setSelection__P169626_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_1 = Math_max__P166657_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 = 1444; 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 = 1445; s.pc = 2; return s.tmp_1; case 2: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = s.tmp_1; + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1446; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -control_ramSize__P166873.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_show_inline__P188863.info = {"start":4760,"length":110,"line":159,"column":51,"endLine":161,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function control_ramSize__P166873_mk(s) { +function scene_systemMenu_PauseMenu_show_inline__P188863_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_ramSize__P166873, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P188863, depth: s.depth + 1, pc: 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 control__ramSize__P171920(s) { +function scene_systemMenu_PauseMenu_show_inline__P188875(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -50453,24 +50376,42 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = 33554432; + s.tmp_0 = scene_systemMenu_PauseMenu_setSelection__P169626_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_1 = Math_max__P166657_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 = 1448; s.pc = 2; return s.tmp_1; + case 2: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1449; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -control__ramSize__P171920.info = {"start":4727,"length":60,"line":160,"column":4,"endLine":162,"endColumn":5,"fileName":"pxt_modules/base/control.ts","functionName":"_ramSize","argumentNames":[]} +scene_systemMenu_PauseMenu_show_inline__P188875.info = {"start":4927,"length":89,"line":163,"column":53,"endLine":165,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function control__ramSize__P171920_mk(s) { +function scene_systemMenu_PauseMenu_show_inline__P188875_mk(s) { checkStack(s.depth); return { - parent: s, fn: control__ramSize__P171920, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P188875, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, } } -function particles_SprayFactory_constructor__P169719(s) { +function scene_systemMenu_PauseMenu_show_inline__P188884(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -50480,56 +50421,65 @@ 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; + s.tmp_0 = scene_systemMenu_PauseMenu_setSelection__P169626_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_1 = Math_min__P166658_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 = 1451; s.pc = 3; return s.tmp_6; } } - r0 = s.arg0; - if (!checkSubtype(r0, particles_SprayFactory__C169718_VT)) failedCast(r0); - r0 = undefined; - s.tmp_0 = particles_initTrig__P172822_mk(s); - s.callLocIdx = 1637; s.pc = 1; return s.tmp_0; - case 1: + case 3: r0 = s.retval; - s.tmp_0 = particles_SprayFactory_setSpeed__P169722_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 1638; s.pc = 2; return s.tmp_0; + s.tmp_5 = r0; + r0 = (s.tmp_4 + s.tmp_5); + s.tmp_1.arg1 = r0; + s.callLocIdx = 1452; s.pc = 2; return s.tmp_1; case 2: r0 = s.retval; - s.tmp_0 = particles_SprayFactory_setDirection__P169723_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg2; - s.tmp_0.arg2 = s.arg3; - s.callLocIdx = 1639; s.pc = 3; return s.tmp_0; - case 3: + s.tmp_0.arg1 = r0; + s.callLocIdx = 1453; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -particles_SprayFactory_constructor__P169719.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_PauseMenu_show_inline__P188884.info = {"start":5073,"length":132,"line":167,"column":53,"endLine":169,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function particles_SprayFactory_constructor__P169719_mk(s) { +function scene_systemMenu_PauseMenu_show_inline__P188884_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_SprayFactory_constructor__P169719, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P188884, 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, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, } } -function particles_initTrig__P172822(s) { +function scene_systemMenu_PauseMenu_show_inline__P188900(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -50539,47 +50489,49 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.cachedSin___172808); - 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__P169712_mk(s); - s.tmp_2.arg0 = 100; - s.callLocIdx = 1625; s.pc = 3; return s.tmp_2; - case 3: - r0 = s.retval; - globals.cachedSin___172808 = (r0); - s.tmp_0 = particles_cacheCos__P169713_mk(s); - s.tmp_0.arg0 = 100; - s.callLocIdx = 1626; s.pc = 4; return s.tmp_0; - case 4: + s.tmp_0 = scene_systemMenu_PauseMenu_setSelection__P169626_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_1 = Math_min__P166658_mk(s); + r0 = s.caps[0].fields["options"]; + s.tmp_3 = r0; + r0 = pxsim_Array__length(s.tmp_3); + s.tmp_2 = r0; + r0 = (s.tmp_2 - 1); + s.tmp_1.arg0 = r0; + r0 = s.caps[0].fields["selection"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 + 1); + s.tmp_1.arg1 = r0; + s.callLocIdx = 1455; s.pc = 2; return s.tmp_1; + case 2: r0 = s.retval; - globals.cachedCos___172809 = (r0); + s.tmp_0.arg1 = r0; + s.callLocIdx = 1456; s.pc = 1; return s.tmp_0; case 1: - case 2: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -particles_initTrig__P172822.info = {"start":291,"length":155,"line":11,"column":4,"endLine":16,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"initTrig","argumentNames":[]} +scene_systemMenu_PauseMenu_show_inline__P188900.info = {"start":5263,"length":111,"line":171,"column":54,"endLine":173,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function particles_initTrig__P172822_mk(s) { +function scene_systemMenu_PauseMenu_show_inline__P188900_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_initTrig__P172822, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P188900, depth: s.depth + 1, pc: 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 particles_cacheCos__P169713(s) { +function scene_systemMenu_PauseMenu_show_inline__P188912(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -50589,65 +50541,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.cos___190104 = undefined; - s.anglePerSlice___190106 = undefined; - s.i___190112 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = pxsim_Array__mk(); - s.cos___190104 = (r0); - r0 = (6.283185307179586 / s.arg0); - s.anglePerSlice___190106 = (r0); - s.i___190112 = (0); + s.tmp_0 = scene_systemMenu_PauseMenu_onUpdate__P169625_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.callLocIdx = 1458; s.pc = 1; return s.tmp_0; case 1: - r0 = (s.i___190112 < s.arg0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.tmp_1 = r0 = s.cos___190104; - r0 = (s.i___190112 * s.anglePerSlice___190106); - 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___190112 + 1); - s.i___190112 = (r0); - { step = 1; continue; } + r0 = s.retval; + s.tmp_0 = scene_systemMenu_PauseMenu_drawText__P169627_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.callLocIdx = 1459; s.pc = 2; return s.tmp_0; case 2: - r0 = s.cos___190104; + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -particles_cacheCos__P169713.info = {"start":1005,"length":263,"line":35,"column":4,"endLine":42,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"cacheCos","argumentNames":["slices"]} +scene_systemMenu_PauseMenu_show_inline__P188912.info = {"start":5403,"length":87,"line":175,"column":25,"endLine":178,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function particles_cacheCos__P169713_mk(s) { +function scene_systemMenu_PauseMenu_show_inline__P188912_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_cacheCos__P169713, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P188912, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - cos___190104: undefined, - anglePerSlice___190106: undefined, - i___190112: undefined, - arg0: undefined, } } -function particles_cacheSin__P169712(s) { +function scene_systemMenu_PauseMenu_drawText__P169627(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -50657,47 +50579,277 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sin___190130 = undefined; - s.anglePerSlice___190132 = undefined; - s.i___190138 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = pxsim_Array__mk(); - s.sin___190130 = (r0); - r0 = (6.283185307179586 / s.arg0); - s.anglePerSlice___190132 = (r0); - s.i___190138 = (0); - case 1: - r0 = (s.i___190138 < s.arg0); + r0 = s.arg0; + if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C169622_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 = 2; continue; } - s.tmp_1 = r0 = s.sin___190130; - r0 = (s.i___190138 * s.anglePerSlice___190132); + if (!r0) { step = 1; continue; } + { step = 3; continue; } + case 1: + case 2: + s.tmp_3 = helpers_imageFillRect__P168483_mk(s); + s.tmp_3.arg0 = globals.screen___168559; + s.tmp_3.arg1 = 0; + s.tmp_3.arg2 = 0; + r0 = pxsim_ImageMethods.width(globals.screen___168559); + 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 = 1472; s.pc = 5; return s.tmp_5; } + } + case 5: + r0 = s.retval; s.tmp_4 = r0; - r0 = pxsim.Math_.sin(s.tmp_4); + r0 = (s.tmp_4 - 2); + s.tmp_3.arg4 = r0; + s.tmp_3.arg5 = 15; + s.callLocIdx = 1473; s.pc = 4; return s.tmp_3; + case 4: + r0 = s.retval; + s.tmp_0 = helpers_imagePrintCenter__P168516_mk(s); + s.tmp_0.arg0 = globals.screen___168559; + 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 = 1474; 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 = 1475; s.pc = 8; return s.tmp_2; } + } + case 8: + r0 = s.retval; + s.tmp_0.arg4 = r0; + s.callLocIdx = 1476; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + s.tmp_0 = helpers_imageFillRect__P168483_mk(s); + s.tmp_0.arg0 = globals.screen___168559; + 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 = 1477; 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___168559); + s.tmp_0.arg3 = r0; + r0 = pxsim_ImageMethods.height(globals.screen___168559); + 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 = 1478; 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 * 256); + r0 = (s.tmp_3 + 6); + s.tmp_0.arg4 = r0; + s.tmp_0.arg5 = 15; + s.callLocIdx = 1479; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; + s.tmp_0 = helpers_imageFillRect__P168483_mk(s); + s.tmp_0.arg0 = globals.screen___168559; + 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 = 1480; 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 = 1481; s.pc = 14; return s.tmp_2; } + } + case 14: + r0 = s.retval; + s.tmp_0.arg2 = r0; + r0 = pxsim_ImageMethods.width(globals.screen___168559); + 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 = 1482; s.pc = 15; return s.tmp_6; } + } + case 15: + r0 = s.retval; s.tmp_5 = r0; - r0 = (s.tmp_5 | 0); + 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 = 1483; 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 = 1484; 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 = 1485; s.pc = 12; return s.tmp_0; + case 12: + r0 = s.retval; + s.tmp_0 = helpers_imagePrintCenter__P168516_mk(s); + s.tmp_0.arg0 = globals.screen___168559; + s.tmp_1 = if_getText_1_mk(s); + r0 = s.arg0.fields["options"]; s.tmp_2 = r0; - r0 = pxsim_Array__push(s.tmp_1, s.tmp_2); - r0 = (s.i___190138 + 1); - s.i___190138 = (r0); - { step = 1; continue; } - case 2: - r0 = s.sin___190130; + 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 = 1486; 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 = 1486; s.pc = 19; return s.tmp_1; } + else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 1486; s.pc = 19; return s.tmp_1;; } + else { s.callLocIdx = 1486; 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 = 1487; 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 = 1488; s.pc = 21; return s.tmp_6; } + } + case 21: + r0 = s.retval; + s.tmp_0.arg4 = r0; + s.callLocIdx = 1489; s.pc = 18; return s.tmp_0; + case 18: + r0 = s.retval; + case 3: + r0 = undefined; return leave(s, r0) default: oops() } } } -particles_cacheSin__P169712.info = {"start":594,"length":263,"line":22,"column":4,"endLine":29,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"cacheSin","argumentNames":["slices"]} +scene_systemMenu_PauseMenu_drawText__P169627.info = {"start":6927,"length":795,"line":224,"column":8,"endLine":241,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"drawText","argumentNames":["this"]} -function particles_cacheSin__P169712_mk(s) { +function scene_systemMenu_PauseMenu_drawText__P169627_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_cacheSin__P169712, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_drawText__P169627, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -50705,9 +50857,10 @@ function particles_cacheSin__P169712_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - sin___190130: undefined, - anglePerSlice___190132: undefined, - i___190138: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, arg0: undefined, } } @@ -50715,7 +50868,7 @@ function particles_cacheSin__P169712_mk(s) { -function particles_SprayFactory_setDirection__P169723(s) { +function scene_systemMenu_PauseMenu_setSelection__P169626(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -50728,49 +50881,97 @@ 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_SprayFactory__C169718_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - s.tmp_4 = particles_toRadians__P172827_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 = 1647; s.pc = 1; return s.tmp_4; - case 1: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_3 / globals.angleSlice___172821); + if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C169622_VT)) failedCast(r0); + r0 = s.arg0.fields["options"]; 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__P172827_mk(s); - s.tmp_4.arg0 = s.arg2; - s.callLocIdx = 1648; 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; } + { step = 9; continue; } + case 1: case 2: - r0 = s.retval; + 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 = (s.tmp_3 / globals.angleSlice___172821); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 3; continue; } + s.tmp_6 = scene_systemMenu_MenuOption_setState__P169620_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 = 1469; 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.tmp_0).fields["spread"] = (s.tmp_1); + 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__C168716_v0_1_mk(s); + s.tmp_4.arg0 = globals.A___168640; + if (!checkSubtype(s.tmp_4.arg0, controller_Button__C168716_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__P169620_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 = 1470; s.pc = 12; return s.tmp_6; + case 12: + r0 = s.retval; + case 7: + case 8: + s.tmp_0 = scene_systemMenu_PauseMenu_updateScrollTarget__P172713_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1471; s.pc = 13; return s.tmp_0; + case 13: + r0 = s.retval; + case 9: r0 = undefined; return leave(s, r0) default: oops() } } } -particles_SprayFactory_setDirection__P169723.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"]} +scene_systemMenu_PauseMenu_setSelection__P169626.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 particles_SprayFactory_setDirection__P169723_mk(s) { +function scene_systemMenu_PauseMenu_setSelection__P169626_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_SprayFactory_setDirection__P169723, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_setSelection__P169626, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -50779,16 +50980,17 @@ function particles_SprayFactory_setDirection__P169723_mk(s) { tmp_4: undefined, tmp_5: undefined, tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function particles_toRadians__P172827(s) { +function scene_systemMenu_PauseMenu_updateScrollTarget__P172713(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -50798,44 +51000,133 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.row___189130 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = (s.arg0 < 0); + r0 = s.arg0; + if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C169622_VT)) failedCast(r0); + r0 = s.arg0.fields["selection"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_3 = Math_abs__P166655_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 1629; s.pc = 3; return s.tmp_3; - case 3: + 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 = 1492; s.pc = 8; return s.tmp_2; } + } + case 8: r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_2 % 360); s.tmp_1 = r0; - r0 = (360 - s.tmp_1); - s.arg0 = (r0); + r0 = pxsim.Math_.idiv(s.tmp_0, s.tmp_1); + s.row___189130 = (r0); + r0 = s.arg0.fields["scrollRow"]; + s.tmp_1 = r0; + r0 = (s.row___189130 === 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 % 360); - s.arg0 = (r0); + r0 = (s.row___189130 - 1); + s.tmp_2 = r0; + r0 = s.arg0.fields["scrollRow"]; + s.tmp_3 = r0; + r0 = (s.tmp_2 === s.tmp_3); case 2: - r0 = (s.arg0 * 0.017453292519943295); + // 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: + case 4: + r0 = s.arg0.fields["scrollRow"]; + s.tmp_6 = r0; + r0 = (s.row___189130 > 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 = 1493; 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 = 1494; 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() } } } -particles_toRadians__P172827.info = {"start":1307,"length":206,"line":45,"column":4,"endLine":52,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"toRadians","argumentNames":["degrees"]} +scene_systemMenu_PauseMenu_updateScrollTarget__P172713.info = {"start":7907,"length":458,"line":250,"column":8,"endLine":260,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"updateScrollTarget","argumentNames":["this"]} -function particles_toRadians__P172827_mk(s) { +function scene_systemMenu_PauseMenu_updateScrollTarget__P172713_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_toRadians__P172827, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_updateScrollTarget__P172713, depth: s.depth + 1, pc: 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___189130: undefined, arg0: undefined, } } @@ -50843,41 +51134,7 @@ function particles_toRadians__P172827_mk(s) { -function particles_ParticleFactory_constructor__P169715(s) { -let r0 = s.r0, 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_ParticleFactory__C169714_VT)) failedCast(r0); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -particles_ParticleFactory_constructor__P169715.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__P169715_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: particles_ParticleFactory_constructor__P169715, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function particles_ParticleSource_setFactory__P169697(s) { +function scene_systemMenu_PauseMenu_onUpdate__P169625(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -50887,38 +51144,186 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.t___188990 = undefined; + s.i___188994 = undefined; + s.dt___189023 = 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__C169678_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(s.arg1); - if (!r0) { step = 1; continue; } - r0 = (s.arg0).fields["_factory"] = (s.arg1); + if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C169622_VT)) failedCast(r0); + r0 = pxsim.control.millis(); + s.tmp_0 = r0; + r0 = (s.tmp_0 / 250); + s.t___188990 = (r0); + s.i___188994 = (0); case 1: + s.tmp_1 = r0 = s.i___188994; + 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__P169618_mk(s); + r0 = s.arg0.fields["options"]; + s.tmp_5 = r0; + r0 = pxsim_Array__getAt(s.tmp_5, s.i___188994); + s.tmp_4.arg0 = r0; + s.tmp_8 = r0 = s.t___188990; + s.tmp_11 = r0 = s.i___188994; + 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 = 1462; 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 = 1463; s.pc = 10; return s.tmp_4; + case 10: + r0 = s.retval; + r0 = (s.i___188994 + 1); + s.i___188994 = (r0); + { step = 1; continue; } case 2: + s.tmp_1 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1464; 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___189023 = (r0); + r0 = s.arg0.fields["scrollOffset"]; + s.tmp_1 = r0; + r0 = s.arg0.fields["scrollTarget"]; + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + s.tmp_3 = r0 = s.arg0; + r0 = s.tmp_3.fields["scrollOffset"]; + s.tmp_5 = r0; + r0 = (s.dt___189023 * 100); + s.tmp_6 = r0; + r0 = (s.tmp_5 + s.tmp_6); + s.tmp_4 = r0; + r0 = (s.tmp_3).fields["scrollOffset"] = (s.tmp_4); + { step = 6; continue; } + case 3: + r0 = s.arg0.fields["scrollOffset"]; + s.tmp_1 = r0; + r0 = s.arg0.fields["scrollTarget"]; + s.tmp_2 = r0; + r0 = (s.tmp_1 > s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + s.tmp_3 = r0 = s.arg0; + r0 = s.tmp_3.fields["scrollOffset"]; + s.tmp_5 = r0; + r0 = (s.dt___189023 * 100); + s.tmp_6 = r0; + r0 = (s.tmp_5 - s.tmp_6); + s.tmp_4 = r0; + r0 = (s.tmp_3).fields["scrollOffset"] = (s.tmp_4); + { step = 5; continue; } + case 4: + { step = 9; continue; } + case 5: + case 6: + s.tmp_2 = Math_abs__P166655_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 = 1466; 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__P169316_mk(s); + s.tmp_1 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1467; 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 = 1468; s.pc = 14; return s.tmp_0; + case 14: + r0 = s.retval; + case 9: r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ParticleSource_setFactory__P169697.info = {"start":8124,"length":114,"line":272,"column":8,"endLine":275,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"setFactory","argumentNames":["this","factory"]} +scene_systemMenu_PauseMenu_onUpdate__P169625.info = {"start":5547,"length":879,"line":183,"column":8,"endLine":206,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"onUpdate","argumentNames":["this"]} -function particles_ParticleSource_setFactory__P169697_mk(s) { +function scene_systemMenu_PauseMenu_onUpdate__P169625_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_setFactory__P169697, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_onUpdate__P169625, depth: s.depth + 1, pc: 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, + t___188990: undefined, + i___188994: undefined, + dt___189023: undefined, arg0: undefined, - arg1: undefined, } } -function particles_ParticleSource_setRate__P169695(s) { +function scene_systemMenu_MenuOption_setOffset__P169618(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -50934,28 +51339,43 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C169678_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, scene_systemMenu_MenuOption__C169614_VT)) failedCast(r0); + s.tmp_0 = Sprite_top__P168931_mk(s); + r0 = s.arg0.fields["card"]; + s.tmp_0.arg0 = r0; + r0 = s.arg0.fields["top"]; s.tmp_1 = r0; - r0 = (s.tmp_0).fields["period"] = (s.tmp_1); - r0 = (s.arg0).fields["timer"] = (0); + r0 = (s.tmp_1 + s.arg1); + s.tmp_0.arg1 = r0; + s.callLocIdx = 1405; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + s.tmp_0 = Sprite_y__P168884_mk(s); + r0 = s.arg0.fields["icon"]; + s.tmp_0.arg0 = r0; + s.tmp_1 = Sprite_y__P168883_mk(s); + r0 = s.arg0.fields["card"]; + s.tmp_1.arg0 = r0; + s.callLocIdx = 1406; s.pc = 3; return s.tmp_1; + case 3: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1407; s.pc = 2; return s.tmp_0; + case 2: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ParticleSource_setRate__P169695.info = {"start":7802,"length":139,"line":259,"column":8,"endLine":262,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"setRate","argumentNames":["this","particlesPerSecond"]} +scene_systemMenu_MenuOption_setOffset__P169618.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 particles_ParticleSource_setRate__P169695_mk(s) { +function scene_systemMenu_MenuOption_setOffset__P169618_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_setRate__P169695, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_MenuOption_setOffset__P169618, 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, } } @@ -50964,7 +51384,7 @@ function particles_ParticleSource_setRate__P169695_mk(s) { -function particles_ParticleSource_setAnchor__P169694(s) { +function scene_systemMenu_MenuOption_setState__P169620(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -50980,19 +51400,36 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C169678_VT)) failedCast(r0); - r0 = (s.arg0).fields["anchor"] = (s.arg1); + if (!checkSubtype(r0, scene_systemMenu_MenuOption__C169614_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__P172712_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1409; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + case 3: r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ParticleSource_setAnchor__P169694.info = {"start":7594,"length":79,"line":251,"column":8,"endLine":253,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"setAnchor","argumentNames":["this","anchor"]} +scene_systemMenu_MenuOption_setState__P169620.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_ParticleSource_setAnchor__P169694_mk(s) { +function scene_systemMenu_MenuOption_setState__P169620_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_setAnchor__P169694, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_MenuOption_setState__P169620, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, arg0: undefined, arg1: undefined, } } @@ -51001,7 +51438,7 @@ function particles_ParticleSource_setAnchor__P169694_mk(s) { -function particles_ParticleSource_destroy__P169692(s) { +function scene_systemMenu_MenuOption_updateCard__P172712(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -51016,38 +51453,138 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C169678_VT)) failedCast(r0); - s.tmp_0 = particles_ParticleSource_enabled__P169691_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = false; - s.callLocIdx = 1586; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["pFlags"]; + if (!checkSubtype(r0, scene_systemMenu_MenuOption__C169614_VT)) failedCast(r0); + r0 = s.arg0.fields["theme"]; s.tmp_2 = r0; - r0 = (s.tmp_2 | 2); + r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["pFlags"] = (s.tmp_1); - s.tmp_0 = particles_ParticleSource__prune__P169686_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1587; s.pc = 2; return s.tmp_0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + { step = 7; continue; } + case 1: case 2: + r0 = s.arg0.fields["state"]; + s.tmp_3 = r0; + r0 = pxsim_pxtcore.switch_eq(2, s.tmp_3); + if (r0) { step = 3; continue; } + r0 = pxsim_pxtcore.switch_eq(0, s.tmp_3); + if (r0) { step = 4; continue; } + r0 = pxsim_pxtcore.switch_eq(1, s.tmp_3); + if (r0) { step = 5; continue; } + r0 = s.tmp_3; + { step = 6; continue; } + case 3: + s.tmp_4 = Sprite_setImage__P168918_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 = 1412; s.pc = 9; return s.tmp_5; } + } + case 9: + r0 = s.retval; + s.tmp_4.arg1 = r0; + s.callLocIdx = 1413; s.pc = 8; return s.tmp_4; + case 8: + r0 = s.retval; + { step = 6; continue; } + case 4: + s.tmp_0 = Sprite_setImage__P168918_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 = 1414; s.pc = 11; return s.tmp_1; } + } + case 11: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1415; s.pc = 10; return s.tmp_0; + case 10: + r0 = s.retval; + { step = 6; continue; } + case 5: + s.tmp_0 = Sprite_setImage__P168918_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 = 1416; s.pc = 13; return s.tmp_1; } + } + case 13: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1417; s.pc = 12; return s.tmp_0; + case 12: + r0 = s.retval; + case 6: + s.tmp_0 = Sprite_x__P168882_mk(s); + r0 = s.arg0.fields["icon"]; + s.tmp_0.arg0 = r0; + s.tmp_1 = Sprite_x__P168881_mk(s); + r0 = s.arg0.fields["card"]; + s.tmp_1.arg0 = r0; + s.callLocIdx = 1418; s.pc = 15; return s.tmp_1; + case 15: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1419; s.pc = 14; return s.tmp_0; + case 14: + r0 = s.retval; + s.tmp_0 = Sprite_y__P168884_mk(s); + r0 = s.arg0.fields["icon"]; + s.tmp_0.arg0 = r0; + s.tmp_1 = Sprite_y__P168883_mk(s); + r0 = s.arg0.fields["card"]; + s.tmp_1.arg0 = r0; + s.callLocIdx = 1420; s.pc = 17; return s.tmp_1; + case 17: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1421; s.pc = 16; return s.tmp_0; + case 16: r0 = s.retval; + case 7: r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ParticleSource_destroy__P169692.info = {"start":7094,"length":240,"line":233,"column":8,"endLine":238,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"destroy","argumentNames":["this"]} +scene_systemMenu_MenuOption_updateCard__P172712.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_ParticleSource_destroy__P169692_mk(s) { +function scene_systemMenu_MenuOption_updateCard__P172712_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_destroy__P169692, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_MenuOption_updateCard__P172712, depth: s.depth + 1, pc: 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, } } @@ -51055,7 +51592,7 @@ function particles_ParticleSource_destroy__P169692_mk(s) { -function particles_ParticleSource_setAcceleration__P169687(s) { +function scene_systemMenu_MenuOption_setTheme__P169619(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -51068,47 +51605,37 @@ 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__C169678_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); + if (!checkSubtype(r0, scene_systemMenu_MenuOption__C169614_VT)) failedCast(r0); + r0 = (s.arg0).fields["theme"] = (s.arg1); + s.tmp_0 = scene_systemMenu_MenuOption_updateCard__P172712_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1408; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ParticleSource_setAcceleration__P169687.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_MenuOption_setTheme__P169619.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 particles_ParticleSource_setAcceleration__P169687_mk(s) { +function scene_systemMenu_MenuOption_setTheme__P169619_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_setAcceleration__P169687, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_MenuOption_setTheme__P169619, 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__P166629(s) { +function scene_systemMenu_MenuOption_position__P169617(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -51120,27 +51647,76 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = pxsim_Array_.removeAt(s.arg0, 0); + r0 = s.arg0; + if (!checkSubtype(r0, scene_systemMenu_MenuOption__C169614_VT)) failedCast(r0); + r0 = (s.arg0).fields["top"] = (s.arg2); + s.tmp_0 = Sprite_left__P168927_mk(s); + r0 = s.arg0.fields["card"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 1399; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + s.tmp_0 = Sprite_top__P168931_mk(s); + r0 = s.arg0.fields["card"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.arg2; + s.callLocIdx = 1400; s.pc = 2; return s.tmp_0; + case 2: + r0 = s.retval; + s.tmp_0 = Sprite_x__P168882_mk(s); + r0 = s.arg0.fields["icon"]; + s.tmp_0.arg0 = r0; + s.tmp_1 = Sprite_x__P168881_mk(s); + r0 = s.arg0.fields["card"]; + s.tmp_1.arg0 = r0; + s.callLocIdx = 1401; s.pc = 4; return s.tmp_1; + case 4: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1402; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.tmp_0 = Sprite_y__P168884_mk(s); + r0 = s.arg0.fields["icon"]; + s.tmp_0.arg0 = r0; + s.tmp_1 = Sprite_y__P168883_mk(s); + r0 = s.arg0.fields["card"]; + s.tmp_1.arg0 = r0; + s.callLocIdx = 1403; s.pc = 6; return s.tmp_1; + case 6: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1404; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_arrayShift__P166629.info = {"start":4045,"length":82,"line":153,"column":4,"endLine":155,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arrayShift","argumentNames":["arr"]} +scene_systemMenu_MenuOption_position__P169617.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 helpers_arrayShift__P166629_mk(s) { +function scene_systemMenu_MenuOption_position__P169617_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arrayShift__P166629, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_MenuOption_position__P169617, 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 particles_SprayFactory_setSpeed__P169722(s) { +function scene_systemMenu_MenuOption_show__P169616(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -51152,118 +51728,91 @@ 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__C169718_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; - return leave(s, r0) - default: oops() -} } } -particles_SprayFactory_setSpeed__P169722.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_SprayFactory_setSpeed__P169722_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: particles_SprayFactory_setSpeed__P169722, 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__P169746(s) { -let r0 = s.r0, 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.confetti___190482 = undefined; - s.i___190498 = 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__C169745_VT)) failedCast(r0); - r0 = pxsim_Array__mk(); + if (!checkSubtype(r0, scene_systemMenu_MenuOption__C169614_VT)) failedCast(r0); + r0 = s.arg0.fields["theme"]; s.tmp_0 = r0; - r0 = pxsim.image.ofBuffer(_hex190485); - s.tmp_1 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); - r0 = pxsim.image.ofBuffer(_hex190487); - s.tmp_2 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_2); - r0 = pxsim.image.ofBuffer(_hex190489); - s.tmp_3 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_3); - r0 = pxsim.image.ofBuffer(_hex190491); - s.tmp_4 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_4); - r0 = pxsim.image.ofBuffer(_hex190493); - s.tmp_5 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_5); - s.confetti___190482 = (s.tmp_0); - s.tmp_0 = particles_ShapeFactory_constructor__P169741_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___190482, 0); - s.tmp_0.arg3 = r0; - s.callLocIdx = 1671; s.pc = 3; return s.tmp_0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_1 = if_basicCard_1_mk(s); + r0 = s.arg0.fields["theme"]; + s.tmp_1.arg0 = r0; + if (!s.tmp_1.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "basicCard"); + } else { + s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["basicCard"]; + if (s.tmp_1.fn == null) { s.retval = s.tmp_1.arg0.fields["basicCard"]; } + else if (!s.tmp_1.fn.isGetter) { s.retval = bind(s.tmp_1); } + else { s.callLocIdx = 1394; s.pc = 3; return s.tmp_1; } + } case 3: r0 = s.retval; - s.i___190498 = (1); + { step = 2; continue; } case 1: - s.tmp_1 = r0 = s.i___190498; - r0 = pxsim_Array__length(s.confetti___190482); + r0 = globals.CARD_NORMAL___169638; + case 2: + // jmp value (already in r0) 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__P169742_mk(s); - s.tmp_3.arg0 = s.arg0; - r0 = pxsim_Array__getAt(s.confetti___190482, s.i___190498); - s.tmp_3.arg1 = r0; - s.callLocIdx = 1672; s.pc = 4; return s.tmp_3; + s.tmp_3 = r0 = s.arg0; + s.tmp_5 = sprites_create__P168802_mk(s); + s.tmp_5.arg0 = s.tmp_2; + s.tmp_5.arg1 = undefined; + s.callLocIdx = 1395; s.pc = 4; return s.tmp_5; case 4: r0 = s.retval; - r0 = (s.i___190498 + 1); - s.i___190498 = (r0); - { step = 1; continue; } - case 2: - r0 = (s.arg0).fields["minLifespan"] = (1000); - r0 = (s.arg0).fields["maxLifespan"] = (4500); + 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 = 1396; s.pc = 5; return s.tmp_0; } + } + case 5: + r0 = s.retval; + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = sprites_create__P168802_mk(s); + r0 = s.arg0.fields["iconImage"]; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = undefined; + s.callLocIdx = 1397; s.pc = 6; return s.tmp_2; + case 6: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["icon"] = (s.tmp_1); + s.tmp_0 = if_z_2_mk(s); + r0 = s.arg0.fields["icon"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = 2; + if (!s.tmp_0.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapSetByString(s.tmp_0.arg0, "z", s.tmp_0.arg1); + } else { + s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["set/z"]; + if (s.tmp_0.fn === null) { s.tmp_0.arg0.fields["z"] = s.tmp_0.arg1; } + else if (s.tmp_0.fn === undefined) { failedCast(s.tmp_0.arg0) } + else { s.callLocIdx = 1398; 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() } } } -particles_ConfettiFactory_constructor__P169746.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"]} +scene_systemMenu_MenuOption_show__P169616.info = {"start":904,"length":264,"line":41,"column":8,"endLine":49,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"show","argumentNames":["this"]} -function particles_ConfettiFactory_constructor__P169746_mk(s) { +function scene_systemMenu_MenuOption_show__P169616_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ConfettiFactory_constructor__P169746, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_MenuOption_show__P169616, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -51271,23 +51820,14 @@ function particles_ConfettiFactory_constructor__P169746_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - confetti___190482: undefined, - i___190498: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -const _hex190485 = pxsim.BufferMethods.createBufferFromHex("87040100010000000f000000") -const _hex190487 = pxsim.BufferMethods.createBufferFromHex("8704010002000000ff000000") -const _hex190489 = pxsim.BufferMethods.createBufferFromHex("87040200010000000f0000000f000000") -const _hex190491 = pxsim.BufferMethods.createBufferFromHex("8704020002000000ff0000000f000000") -const _hex190493 = pxsim.BufferMethods.createBufferFromHex("87040200020000000f000000ff000000") -function particles_ShapeFactory_addShape__P169742(s) { +function game_onShade__P169544(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -51299,39 +51839,52 @@ 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_ShapeFactory__C169740_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(s.arg1); - if (!r0) { step = 1; continue; } - r0 = s.arg0.fields["sources"]; + s.tmp_0 = game_init__P172465_mk(s); + s.tmp_0.arg0 = undefined; + s.callLocIdx = 1381; 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_Array__push(s.tmp_0, s.arg1); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + { step = 3; continue; } case 1: case 2: + s.tmp_2 = scene_createRenderable__P169332_mk(s); + s.tmp_2.arg0 = 80; + s.tmp_2.arg1 = s.arg0; + s.tmp_2.arg2 = undefined; + s.callLocIdx = 1382; s.pc = 5; return s.tmp_2; + case 5: + r0 = s.retval; + case 3: r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ShapeFactory_addShape__P169742.info = {"start":7079,"length":83,"line":225,"column":8,"endLine":227,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"addShape","argumentNames":["this","shape"]} +game_onShade__P169544.info = {"start":15517,"length":145,"line":464,"column":4,"endLine":468,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"onShade","argumentNames":["a"]} -function particles_ShapeFactory_addShape__P169742_mk(s) { +function game_onShade__P169544_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ShapeFactory_addShape__P169742, depth: s.depth + 1, + parent: s, fn: game_onShade__P169544, 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_ShapeFactory_constructor__P169741(s) { +function scene_systemMenu_PauseMenu_constructor__P169623(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -51345,71 +51898,57 @@ 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, particles_ShapeFactory__C169740_VT)) failedCast(r0); - s.tmp_0 = particles_AreaFactory_constructor__P169729_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 = 1661; s.pc = 1; return s.tmp_0; + if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C169622_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__P169631_mk(s); + r0 = pxsim_ImageMethods.width(globals.CARD_NORMAL___169638); + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 3; + s.tmp_1.arg2 = undefined; + s.tmp_1.arg3 = undefined; + s.callLocIdx = 1422; s.pc = 3; return s.tmp_1; + case 3: r0 = s.retval; - r0 = pxsim_Array__mk(); - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.arg3); - r0 = (s.arg0).fields["sources"] = (s.tmp_0); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_ImageMethods.width(s.arg3); - s.tmp_3 = r0; - r0 = (s.tmp_3 >> 1); - s.tmp_2 = r0; - r0 = (s.tmp_2 * 256); - s.tmp_4 = r0; - r0 = (s.tmp_4 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["ox"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_ImageMethods.height(s.arg3); - s.tmp_3 = r0; - r0 = (s.tmp_3 >> 1); + case 2: + // jmp value (already in r0) 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 = (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() } } } -particles_ShapeFactory_constructor__P169741.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"]} +scene_systemMenu_PauseMenu_constructor__P169623.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 particles_ShapeFactory_constructor__P169741_mk(s) { +function scene_systemMenu_PauseMenu_constructor__P169623_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ShapeFactory_constructor__P169741, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_constructor__P169623, depth: s.depth + 1, pc: 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__P169729(s) { +function scene_systemMenu_buildMenuTheme__P169631(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -51419,80 +51958,150 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.cardsPerRow___189775 = 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, particles_AreaFactory__C169724_VT)) failedCast(r0); - s.tmp_0 = particles_SprayFactory_constructor__P169719_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 = 1649; 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); + r0 = pxsim_ImageMethods.width(globals.screen___168559); + 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___189775 = (r0); + s.tmp_0 = r0 = s.arg2; + r0 = pxsim_numops_toBool(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = s.arg3; + r0 = s.tmp_0; { step = 2; continue; } case 1: - r0 = 150; + r0 = globals.font8___168502; 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); + 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.arg4; + r0 = s.tmp_0; { step = 4; continue; } case 3: - r0 = 850; + s.tmp_1 = image_doubledFont__P168505_mk(s); + s.tmp_1.arg0 = s.arg2; + s.callLocIdx = 1532; s.pc = 5; return s.tmp_1; + case 5: + r0 = s.retval; case 4: // jmp value (already in r0) + s.tmp_2 = r0; + s.arg3 = (s.tmp_2); + r0 = pxsim_pxtrt.mkMap(); s.tmp_0 = r0; - r0 = (s.arg0).fields["maxLifespan"] = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(Math_FastRandom__C169586_VT); - s.tmp_0 = r0; - s.tmp_1 = Math_FastRandom_constructor__P169588_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = undefined; - s.callLocIdx = 1650; s.pc = 6; return s.tmp_1; + 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___189775); + r0 = pxsim_ImageMethods.width(globals.screen___168559); + s.tmp_3 = r0; + r0 = (s.cardsPerRow___189775 * s.arg0); + s.tmp_5 = r0; + r0 = (s.cardsPerRow___189775 - 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 = 1533; s.pc = 6; return s.tmp_11; } + } case 6: r0 = s.retval; - r0 = (s.arg0).fields["galois"] = (s.tmp_0); - r0 = undefined; + 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___168559); + 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 = 1534; 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___169639); + r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "activeCard", globals.CARD_ACTIVE___169640); + r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "basicCard", globals.CARD_NORMAL___169638); + r0 = s.tmp_0; return leave(s, r0) default: oops() } } } -particles_AreaFactory_constructor__P169729.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"]} +scene_systemMenu_buildMenuTheme__P169631.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_AreaFactory_constructor__P169729_mk(s) { +function scene_systemMenu_buildMenuTheme__P169631_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_AreaFactory_constructor__P169729, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_buildMenuTheme__P169631, depth: s.depth + 1, pc: 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___189775: undefined, arg0: undefined, arg1: undefined, arg2: undefined, arg3: undefined, - arg4: undefined, } } -function effects_ScreenEffect_constructor__P169794(s) { +function image_doubledFont__P168505(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -51504,47 +52113,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.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, effects_ScreenEffect__C169793_VT)) failedCast(r0); - s.tmp_0 = effects_ParticleEffect_constructor__P169790_mk(s); + s.tmp_0 = image_scaledFont__P168506_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 = 1681; s.pc = 1; return s.tmp_0; + s.tmp_0.arg1 = 2; + s.callLocIdx = 158; 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() } } } -effects_ScreenEffect_constructor__P169794.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"]} +image_doubledFont__P168505.info = {"start":12008,"length":82,"line":146,"column":4,"endLine":148,"endColumn":5,"fileName":"pxt_modules/screen/text.ts","functionName":"doubledFont","argumentNames":["f"]} -function effects_ScreenEffect_constructor__P169794_mk(s) { +function image_doubledFont__P168505_mk(s) { checkStack(s.depth); return { - parent: s, fn: effects_ScreenEffect_constructor__P169794, depth: s.depth + 1, + parent: s, fn: image_doubledFont__P168505, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, } } -function effects_ParticleEffect_constructor__P169790(s) { +function image_scaledFont__P168506(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -51557,151 +52152,140 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, effects_ParticleEffect__C169789_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__P169790.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__P169790_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: effects_ParticleEffect_constructor__P169790, 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__P168450(s) { -let r0 = s.r0, 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(music_MelodyPlayable__C168443_VT); + r0 = (s.arg1 | 0); + s.arg1 = (r0); + r0 = (s.arg1 < 2); s.tmp_0 = r0; - s.tmp_1 = music_MelodyPlayable_constructor__P168444_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = s.arg0; - s.callLocIdx = 141; s.pc = 1; return s.tmp_1; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + 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 = 159; s.pc = 6; return s.tmp_4; } + } + case 6: r0 = s.retval; - r0 = s.tmp_0; - return leave(s, r0) - default: oops() -} } } -music_melodyPlayable__P168450.info = {"start":3172,"length":107,"line":121,"column":4,"endLine":123,"endColumn":5,"fileName":"pxt_modules/mixer/playable.ts","functionName":"melodyPlayable","argumentNames":["melody"]} - -function music_melodyPlayable__P168450_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: music_melodyPlayable__P168450, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, -} } - - - - - -function music_MelodyPlayable_constructor__P168444(s) { -let r0 = s.r0, 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_3 = r0; + r0 = (s.tmp_3 * s.arg1); + s.tmp_2 = r0; + r0 = pxsim_pxtrt.mapSetByString(s.tmp_1, "charWidth", s.tmp_2); + s.tmp_7 = if_charHeight_1_mk(s); + s.tmp_7.arg0 = s.arg0; + if (!s.tmp_7.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_7.arg0, "charHeight"); + } else { + s.tmp_7.fn = s.tmp_7.arg0.vtable.iface["charHeight"]; + if (s.tmp_7.fn == null) { s.retval = s.tmp_7.arg0.fields["charHeight"]; } + else if (!s.tmp_7.fn.isGetter) { s.retval = bind(s.tmp_7); } + else { s.callLocIdx = 160; s.pc = 7; return s.tmp_7; } } - r0 = s.arg0; - if (!checkSubtype(r0, music_MelodyPlayable__C168443_VT)) failedCast(r0); - r0 = (s.arg0).fields["melody"] = (s.arg1); - r0 = undefined; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -music_MelodyPlayable_constructor__P168444.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 music_MelodyPlayable_constructor__P168444_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: music_MelodyPlayable_constructor__P168444, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, - arg1: undefined, -} } - - - - - -function music_Playable_constructor__P168440(s) { -let r0 = s.r0, 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; + 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 = 161; s.pc = 8; return s.tmp_9; } } - r0 = s.arg0; - if (!checkSubtype(r0, music_Playable__C168438_VT)) failedCast(r0); - r0 = undefined; + 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 = 162; 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 = 163; 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() } } } -music_Playable_constructor__P168440.info = {"start":1086,"length":26,"line":47,"column":8,"endLine":49,"endColumn":9,"fileName":"pxt_modules/mixer/playable.ts","functionName":"inline","argumentNames":["this"]} +image_scaledFont__P168506.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 music_Playable_constructor__P168440_mk(s) { +function image_scaledFont__P168506_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_Playable_constructor__P168440, depth: s.depth + 1, + parent: s, fn: image_scaledFont__P168506, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, + tmp_11: undefined, + tmp_12: undefined, + tmp_13: undefined, + tmp_14: undefined, + tmp_15: undefined, arg0: undefined, + arg1: undefined, } } -function Fx8__P166676(s) { +function scene_systemMenu_initScreen__P172725(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -51711,32 +52295,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.brightness___189855 = undefined; + s.tmp_0 = settings_readNumber__P168595_mk(s); + s.tmp_0.arg0 = "#brightness"; + s.callLocIdx = 1541; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.brightness___189855 = (r0); + r0 = (s.brightness___189855 !== undefined); s.tmp_0 = r0; - r0 = (s.tmp_0 | 0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_1 = helpers_setScreenBrightness__P168492_mk(s); + s.tmp_1.arg0 = globals.screen___168559; + s.tmp_1.arg1 = s.brightness___189855; + s.callLocIdx = 1542; s.pc = 4; return s.tmp_1; + case 4: + r0 = s.retval; + case 1: + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -Fx8__P166676.info = {"start":42,"length":68,"line":4,"column":0,"endLine":6,"endColumn":1,"fileName":"pxt_modules/base/fixed.ts","functionName":"Fx8","argumentNames":["v"]} +scene_systemMenu_initScreen__P172725.info = {"start":13388,"length":175,"line":405,"column":4,"endLine":409,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"initScreen","argumentNames":[]} -function Fx8__P166676_mk(s) { +function scene_systemMenu_initScreen__P172725_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx8__P166676, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_initScreen__P172725, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - arg0: undefined, + tmp_1: undefined, + brightness___189855: undefined, } } -function SpriteKind_create__P169006(s) { +function scene_systemMenu_initVolume__P172724(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -51746,35 +52344,45 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = (globals.nextKind___172276 === undefined); + s.vol___189865 = undefined; + s.tmp_0 = settings_readNumber__P168595_mk(s); + s.tmp_0.arg0 = "#volume"; + s.callLocIdx = 1539; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.vol___189865 = (r0); + r0 = (s.vol___189865 !== undefined); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - globals.nextKind___172276 = (1000); + s.tmp_1 = music_setVolume__P168147_mk(s); + s.tmp_1.arg0 = s.vol___189865; + s.callLocIdx = 1540; s.pc = 4; return s.tmp_1; + case 4: + r0 = s.retval; case 1: case 2: - s.tmp_0 = r0 = globals.nextKind___172276; - r0 = (s.tmp_0 + 1); - globals.nextKind___172276 = (r0); - r0 = s.tmp_0; + r0 = undefined; return leave(s, r0) default: oops() } } } -SpriteKind_create__P169006.info = {"start":783,"length":112,"line":26,"column":4,"endLine":29,"endColumn":5,"fileName":"pxt_modules/game/spritekind.ts","functionName":"create","argumentNames":[]} +scene_systemMenu_initVolume__P172724.info = {"start":13238,"length":144,"line":399,"column":4,"endLine":403,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"initVolume","argumentNames":[]} -function SpriteKind_create__P169006_mk(s) { +function scene_systemMenu_initVolume__P172724_mk(s) { checkStack(s.depth); return { - parent: s, fn: SpriteKind_create__P169006, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_initVolume__P172724, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + vol___189865: undefined, } } -function controller_Button_constructor__P168722(s) { +function game_GameOverConfig_constructor__P169515(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -51786,66 +52394,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, controller_Button__C168716_VT)) failedCast(r0); - r0 = (s.arg0).fields["id"] = (s.arg1); - r0 = (s.arg0).fields["_pressed"] = (false); - r0 = (s.arg0).fields["repeatDelay"] = (undefined); - r0 = (s.arg0).fields["repeatInterval"] = (undefined); - r0 = (s.arg0).fields["_repeatCount"] = (0); - r0 = (s.arg1 > 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = pxsim_pxtcore_mkAction(1, controller_Button_inline__P190635); - 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__P190642); - 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; + if (!checkSubtype(r0, game_GameOverConfig__C169500_VT)) failedCast(r0); + s.tmp_0 = game_GameOverConfig_init__P169516_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1325; s.pc = 1; return s.tmp_0; case 1: - case 2: - case 3: - case 4: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Button_constructor__P168722.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"]} +game_GameOverConfig_constructor__P169515.info = {"start":893,"length":50,"line":35,"column":8,"endLine":37,"endColumn":9,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":["this"]} -function controller_Button_constructor__P168722_mk(s) { +function game_GameOverConfig_constructor__P169515_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_constructor__P168722, depth: s.depth + 1, + parent: s, fn: game_GameOverConfig_constructor__P169515, 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 controller_Button_inline__P190635(s) { +function game_GameOverConfig_init__P169516(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -51855,31 +52432,62 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = controller_Button_setPressed__P168729_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_0.arg1 = false; - s.callLocIdx = 297; s.pc = 1; return s.tmp_0; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, game_GameOverConfig__C169500_VT)) failedCast(r0); + r0 = (s.arg0).fields["scoringType"] = (0); + r0 = (s.arg0).fields["winEffect"] = (globals.confetti___169801); + r0 = (s.arg0).fields["loseEffect"] = (globals.melt___169823); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = music_melodyPlayable__P168450_mk(s); + s.tmp_2.arg0 = globals.powerUp___168177; + s.callLocIdx = 1326; 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__P168450_mk(s); + s.tmp_2.arg0 = globals.wawawawaa___168174; + s.callLocIdx = 1327; s.pc = 2; return s.tmp_2; + case 2: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["loseSound"] = (s.tmp_1); + r0 = (s.arg0).fields["winSoundLooping"] = (false); + r0 = (s.arg0).fields["loseSoundLooping"] = (false); + r0 = (s.arg0).fields["winMessage"] = ("YOU WIN!"); + r0 = (s.arg0).fields["winMessageMultiplayer"] = ("${WINNER} WINS!"); + r0 = (s.arg0).fields["loseMessage"] = ("GAME OVER"); + r0 = (s.arg0).fields["effectSetByUser"] = (false); + r0 = (s.arg0).fields["soundSetByUser"] = (false); + r0 = (s.arg0).fields["messageSetByUser"] = (false); + r0 = (s.arg0).fields["scoringTypeSetByUser"] = (false); r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Button_inline__P190635.info = {"start":2627,"length":28,"line":88,"column":66,"endLine":88,"endColumn":94,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"inline","argumentNames":[]} +game_GameOverConfig_init__P169516.info = {"start":953,"length":701,"line":39,"column":8,"endLine":54,"endColumn":9,"fileName":"pxt_modules/game/game.ts","functionName":"init","argumentNames":["this"]} -function controller_Button_inline__P190635_mk(s) { +function game_GameOverConfig_init__P169516_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_inline__P190635, depth: s.depth + 1, + parent: s, fn: game_GameOverConfig_init__P169516, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + arg0: undefined, } } -function controller_Button_inline__P190642(s) { +function melt_inline__P189923(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -51889,31 +52497,96 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = controller_Button_setPressed__P168729_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_0.arg1 = true; - s.callLocIdx = 298; s.pc = 1; return s.tmp_0; + s.rounds___189926 = undefined; + s.j___189934 = undefined; + s.x___189939 = undefined; + s.y___189945 = undefined; + s.c___189951 = 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___189926 = (r0); + s.j___189934 = (0); case 1: + r0 = (s.j___189934 < s.rounds___189926); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + s.tmp_1 = Math_FastRandom_randomRange__P169590_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 = 59; s.pc = 3; return s.tmp_1; + case 3: + r0 = s.retval; + s.x___189939 = (r0); + s.tmp_0 = Math_FastRandom_randomRange__P169590_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 = 60; s.pc = 4; return s.tmp_0; + case 4: r0 = s.retval; + s.y___189945 = (r0); + r0 = pxsim_ImageMethods.getPixel(s.arg0, s.x___189939, s.y___189945); + s.c___189951 = (r0); + s.tmp_0 = r0 = s.arg0; + s.tmp_1 = r0 = s.x___189939; + r0 = (s.y___189945 + 1); + s.tmp_2 = r0; + r0 = pxsim_ImageMethods.setPixel(s.tmp_0, s.tmp_1, s.tmp_2, s.c___189951); + s.tmp_0 = r0 = s.arg0; + s.tmp_1 = r0 = s.x___189939; + r0 = (s.y___189945 + 2); + s.tmp_2 = r0; + r0 = pxsim_ImageMethods.setPixel(s.tmp_0, s.tmp_1, s.tmp_2, s.c___189951); + r0 = (s.j___189934 + 1); + s.j___189934 = (r0); + { step = 1; continue; } + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Button_inline__P190642.info = {"start":2729,"length":27,"line":89,"column":68,"endLine":89,"endColumn":95,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"inline","argumentNames":[]} +melt_inline__P189923.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 controller_Button_inline__P190642_mk(s) { +function melt_inline__P189923_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_inline__P190642, depth: s.depth + 1, + parent: s, fn: melt_inline__P189923, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + rounds___189926: undefined, + j___189934: undefined, + x___189939: undefined, + y___189945: undefined, + c___189951: undefined, + arg0: undefined, + arg1: undefined, } } -function controller_setupButton__P172259(s) { +function confetti_inline__P189977(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -51923,22 +52596,89 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.factory___189980 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = undefined; + r0 = pxsim_pxtcore_mkClassInstance(particles_ConfettiFactory__C169745_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 = 47; 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 = 48; s.pc = 4; return s.tmp_3; } + } + case 4: + r0 = s.retval; + { step = 2; continue; } + case 1: + r0 = 16; + case 2: + // jmp value (already in r0) + s.tmp_4 = r0; + s.tmp_5 = particles_ConfettiFactory_constructor__P169746_mk(s); + s.tmp_5.arg0 = s.tmp_0; + s.tmp_5.arg1 = s.tmp_4; + s.tmp_5.arg2 = 16; + s.callLocIdx = 49; s.pc = 5; return s.tmp_5; + case 5: + r0 = s.retval; + s.factory___189980 = (s.tmp_0); + s.tmp_0 = particles_SprayFactory_setSpeed__P169722_mk(s); + s.tmp_0.arg0 = s.factory___189980; + s.tmp_0.arg1 = 30; + s.callLocIdx = 50; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + r0 = pxsim_pxtcore_mkClassInstance(particles_ParticleSource__C169678_VT); + s.tmp_0 = r0; + s.tmp_1 = particles_ParticleSource_constructor__P169683_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___189980; + s.callLocIdx = 51; s.pc = 7; return s.tmp_1; + case 7: + r0 = s.retval; + r0 = s.tmp_0; return leave(s, r0) default: oops() } } } -controller_setupButton__P172259.info = {"start":861,"length":93,"line":39,"column":4,"endLine":41,"endColumn":6,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"setupButton","argumentNames":["buttonId","key"]} +confetti_inline__P189977.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 controller_setupButton__P172259_mk(s) { +function confetti_inline__P189977_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_setupButton__P172259, depth: s.depth + 1, + parent: s, fn: confetti_inline__P189977, depth: s.depth + 1, pc: 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___189980: undefined, arg0: undefined, arg1: undefined, } } @@ -51947,7 +52687,7 @@ function controller_setupButton__P172259_mk(s) { -function controller_Button_setPressed__P168729(s) { +function particles_ParticleSource_constructor__P169683(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -51957,127 +52697,130 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.sources___190001 = undefined; + s.removedSource___190010 = 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, controller_Button__C168716_VT)) failedCast(r0); - r0 = s.arg0.fields["_pressed"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 != s.arg1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - s.tmp_2 = power_poke__P168456_mk(s); - s.callLocIdx = 301; s.pc = 7; return s.tmp_2; + if (!checkSubtype(r0, particles_ParticleSource__C169678_VT)) failedCast(r0); + s.tmp_0 = sprites_BaseSprite_constructor__P168623_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 1561; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.tmp_0 = particles_init__P172801_mk(s); + s.callLocIdx = 1562; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + s.tmp_0 = particles_particleSources__P172807_mk(s); + s.callLocIdx = 1563; s.pc = 7; return s.tmp_0; case 7: r0 = s.retval; - r0 = s.arg0.fields["_owner"]; + s.sources___190001 = (r0); + r0 = pxsim_Array__length(s.sources___190001); + s.tmp_1 = r0; + r0 = (s.tmp_1 >= globals.MAX_SOURCES___172793); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - s.tmp_1 = controller_Controller_connected__P168683_mk(s); - r0 = s.arg0.fields["_owner"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = true; - s.callLocIdx = 302; s.pc = 8; return s.tmp_1; + s.tmp_2 = particles_sortSources__P172804_mk(s); + s.tmp_2.arg0 = s.sources___190001; + s.callLocIdx = 1564; s.pc = 8; return s.tmp_2; case 8: r0 = s.retval; + r0 = pxsim_Array_.removeAt(s.sources___190001, 0); + s.removedSource___190010 = (r0); + s.tmp_0 = particles_ParticleSource_clear__P169693_mk(s); + s.tmp_0.arg0 = s.removedSource___190010; + s.callLocIdx = 1566; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; + s.tmp_0 = particles_ParticleSource_destroy__P169692_mk(s); + s.tmp_0.arg0 = s.removedSource___190010; + s.callLocIdx = 1567; s.pc = 10; return s.tmp_0; + case 10: + 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__P172243_mk(s); + r0 = (s.arg0).fields["pFlags"] = (0); + s.tmp_0 = particles_ParticleSource_setRate__P169695_mk(s); s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 303; s.pc = 9; return s.tmp_0; - case 9: + s.tmp_0.arg1 = s.arg2; + s.callLocIdx = 1568; s.pc = 11; return s.tmp_0; + case 11: + r0 = s.retval; + s.tmp_0 = particles_ParticleSource_setAcceleration__P169687_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.tmp_0.arg2 = 0; + s.callLocIdx = 1569; s.pc = 12; return s.tmp_0; + case 12: + r0 = s.retval; + s.tmp_0 = particles_ParticleSource_setAnchor__P169694_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 1570; 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 = (s.arg0).fields["_repeatCount"] = (0); - s.tmp_0 = controller_Button_raiseButtonUp__P172242_mk(s); + r0 = globals.defaultFactory___169698; + case 4: + // jmp value (already in r0) + s.tmp_1 = r0; + s.tmp_2 = particles_ParticleSource_setFactory__P169697_mk(s); + s.tmp_2.arg0 = s.arg0; + s.tmp_2.arg1 = s.tmp_1; + s.callLocIdx = 1571; s.pc = 14; return s.tmp_2; + case 14: + r0 = s.retval; + r0 = pxsim_Array__push(s.sources___190001, s.arg0); + s.tmp_0 = particles_ParticleSource_enabled__P169691_mk(s); s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 304; s.pc = 10; return s.tmp_0; - case 10: + s.tmp_0.arg1 = true; + s.callLocIdx = 1572; s.pc = 15; return s.tmp_0; + case 15: r0 = s.retval; - case 4: - case 5: - case 6: r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Button_setPressed__P168729.info = {"start":6774,"length":507,"line":201,"column":8,"endLine":215,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"setPressed","argumentNames":["this","pressed"]} +particles_ParticleSource_constructor__P169683.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 controller_Button_setPressed__P168729_mk(s) { +function particles_ParticleSource_constructor__P169683_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_setPressed__P168729, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_constructor__P169683, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, + sources___190001: undefined, + removedSource___190010: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function controller_Button_raiseButtonDown__P172243(s) { -let r0 = s.r0, 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__C168716_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(globals._userEventsEnabled___172253); - 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__P172243.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__P172243_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: controller_Button_raiseButtonDown__P172243, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, -} } - - - - - -function controller_Button_raiseButtonUp__P172242(s) { +function particles_sortSources__P172804(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -52091,29 +52834,22 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, controller_Button__C168716_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(globals._userEventsEnabled___172253); - 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; } + s.tmp_0 = helpers_arraySort__P166632_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = particles_sortSources_inline__P190207; + s.callLocIdx = 1610; s.pc = 1; return s.tmp_0; case 1: - r0 = s.arg0.fields["id"]; - s.tmp_0 = r0; - r0 = pxsim.control.raiseEvent(2052, s.tmp_0); - case 2: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Button_raiseButtonUp__P172242.info = {"start":2878,"length":200,"line":96,"column":8,"endLine":101,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"raiseButtonUp","argumentNames":["this"]} +particles_sortSources__P172804.info = {"start":10026,"length":129,"line":332,"column":4,"endLine":334,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"sortSources","argumentNames":["sources"]} -function controller_Button_raiseButtonUp__P172242_mk(s) { +function particles_sortSources__P172804_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_raiseButtonUp__P172242, depth: s.depth + 1, + parent: s, fn: particles_sortSources__P172804, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -52123,7 +52859,7 @@ function controller_Button_raiseButtonUp__P172242_mk(s) { -function game_addScenePushHandler__P169545(s) { +function particles_sortSources_inline__P190207(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -52135,118 +52871,54 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(globals._scenePushHandlers___172459); + r0 = s.arg0.fields["priority"]; s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = s.arg1.fields["priority"]; + s.tmp_2 = r0; + 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; } - r0 = pxsim_Array__mk(); - globals._scenePushHandlers___172459 = (r0); + 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: - r0 = pxsim_Array_.indexOf(globals._scenePushHandlers___172459, 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___172459, s.arg0); - case 3: - case 4: - r0 = undefined; + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = s.tmp_5; return leave(s, r0) default: oops() } } } -game_addScenePushHandler__P169545.info = {"start":16044,"length":242,"line":479,"column":4,"endLine":483,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"addScenePushHandler","argumentNames":["handler"]} +particles_sortSources_inline__P190207.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 game_addScenePushHandler__P169545_mk(s) { +function particles_sortSources_inline__P190207_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_addScenePushHandler__P169545, depth: s.depth + 1, + parent: s, fn: particles_sortSources_inline__P190207, depth: s.depth + 1, pc: 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 controller_Controller_id__P168668(s) { -let r0 = s.r0, 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__C168661_VT)) failedCast(r0); - r0 = s.arg0.fields["_id"]; - return leaveAccessor(s, r0) - default: oops() -} } } -controller_Controller_id__P168668.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__P168668.isGetter = true; - -function controller_Controller_id__P168668_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: controller_Controller_id__P168668, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function controller_Controller_connected__P168682(s) { -let r0 = s.r0, 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__C168661_VT)) failedCast(r0); - r0 = s.arg0.fields["_connected"]; - return leaveAccessor(s, r0) - default: oops() -} } } -controller_Controller_connected__P168682.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__P168682.isGetter = true; - -function controller_Controller_connected__P168682_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: controller_Controller_connected__P168682, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function game_currentScene__P169526(s) { +function particles_init__P172801(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -52256,139 +52928,59 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = game_init__P172465_mk(s); - s.tmp_0.arg0 = undefined; - s.callLocIdx = 1329; s.pc = 1; return s.tmp_0; - case 1: + s.scene___190246 = undefined; + s.tmp_0 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1600; s.pc = 4; return s.tmp_0; + case 4: r0 = s.retval; - r0 = globals._scene___172457; - return leave(s, r0) - default: oops() -} } } -game_currentScene__P169526.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__P169526_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: game_currentScene__P169526, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, -} } - - - - - -function game_addScenePopHandler__P169547(s) { -let r0 = s.r0, 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___172460); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + s.scene___190246 = (r0); + r0 = s.scene___190246.fields["particleSources"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = pxsim_Array__mk(); - globals._scenePopHandlers___172460 = (r0); + { step = 3; continue; } case 1: case 2: - r0 = pxsim_Array_.indexOf(globals._scenePopHandlers___172460, 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___172460, s.arg0); - case 3: - case 4: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -game_addScenePopHandler__P169547.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__P169547_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: game_addScenePopHandler__P169547, 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__P172147(s) { -let r0 = s.r0, 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___190737 = undefined; - s.tmp_1 = settings_runNumber__P168585_mk(s); - s.callLocIdx = 189; s.pc = 1; return s.tmp_1; - case 1: + s.tmp_1 = r0 = s.scene___190246; + r0 = pxsim_Array__mk(); + s.tmp_2 = r0; + r0 = (s.tmp_1).fields["particleSources"] = (s.tmp_2); + r0 = pxsim.control.millis(); + globals.lastUpdate___172796 = (r0); + s.tmp_0 = game_onUpdate__P169550_mk(s); + s.tmp_0.arg0 = particles_updateParticles__P172802; + s.callLocIdx = 1601; s.pc = 5; return s.tmp_0; + case 5: r0 = s.retval; - s.tmp_0 = r0; - r0 = (s.tmp_0 + 1); - s.rn___190737 = (r0); - s.tmp_0 = settings_writeNumber__P168590_mk(s); - s.tmp_0.arg0 = globals.RUN_KEY___172135; - s.tmp_0.arg1 = s.rn___190737; - s.callLocIdx = 190; s.pc = 2; return s.tmp_0; - case 2: + s.tmp_0 = game_onUpdateInterval__P169551_mk(s); + s.tmp_0.arg0 = 250; + s.tmp_0.arg1 = particles_pruneParticles__P172803; + s.callLocIdx = 1602; s.pc = 6; return s.tmp_0; + case 6: 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___190737); - s.tmp_0 = settings_setScope__P172146_mk(s); - r0 = pxsim_pxtcore.programName(); - s.tmp_0.arg0 = r0; - s.callLocIdx = 191; s.pc = 3; return s.tmp_0; case 3: - r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -settings_initScopes__P172147.info = {"start":1104,"length":230,"line":41,"column":4,"endLine":49,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"initScopes","argumentNames":[]} +particles_init__P172801.info = {"start":9236,"length":276,"line":304,"column":4,"endLine":311,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"init","argumentNames":[]} -function settings_initScopes__P172147_mk(s) { +function particles_init__P172801_mk(s) { checkStack(s.depth); return { - parent: s, fn: settings_initScopes__P172147, depth: s.depth + 1, + parent: s, fn: particles_init__P172801, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - rn___190737: undefined, + tmp_2: undefined, + scene___190246: undefined, } } -function settings_setScope__P172146(s) { +function particles_updateParticles__P172802(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -52398,74 +52990,81 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.currScope___190766 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = pxsim_numops_toBoolDecr(s.arg0); + s.sources___190261 = undefined; + s.time___190268 = undefined; + s.dt___190271 = undefined; + s.i___190277 = undefined; + s.tmp_0 = particles_particleSources__P172807_mk(s); + s.callLocIdx = 1603; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + s.sources___190261 = (r0); + r0 = pxsim_numops_toBoolDecr(s.sources___190261); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + { step = 5; continue; } case 1: - r0 = 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__P168593_mk(s); - s.tmp_0.arg0 = globals.SCOPE_KEY___172136; - s.callLocIdx = 187; s.pc = 7; return s.tmp_0; + s.tmp_2 = particles_sortSources__P172804_mk(s); + s.tmp_2.arg0 = s.sources___190261; + s.callLocIdx = 1604; s.pc = 7; return s.tmp_2; case 7: r0 = s.retval; - s.currScope___190766 = (r0); - r0 = (s.currScope___190766 != s.arg0); + r0 = pxsim.control.millis(); + s.time___190268 = (r0); + r0 = (s.time___190268 - globals.lastUpdate___172796); + s.dt___190271 = (r0); + globals.lastUpdate___172796 = (s.time___190268); + s.i___190277 = (0); + case 3: + s.tmp_1 = r0 = s.i___190277; + r0 = pxsim_Array__length(s.sources___190261); + 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; } - r0 = pxsim.settings._userClean(); - s.tmp_0 = settings_writeString__P168588_mk(s); - s.tmp_0.arg0 = globals.SCOPE_KEY___172136; - s.tmp_0.arg1 = s.arg0; - s.callLocIdx = 188; s.pc = 8; return s.tmp_0; + if (!r0) { step = 4; continue; } + s.tmp_3 = particles_ParticleSource__update__P169685_mk(s); + r0 = pxsim_Array__getAt(s.sources___190261, s.i___190277); + s.tmp_3.arg0 = r0; + s.tmp_3.arg1 = s.dt___190271; + s.callLocIdx = 1605; s.pc = 8; return s.tmp_3; case 8: r0 = s.retval; + r0 = (s.i___190277 + 1); + s.i___190277 = (r0); + { step = 3; continue; } + case 4: case 5: - case 6: r0 = undefined; return leave(s, r0) default: oops() } } } -settings_setScope__P172146.info = {"start":826,"length":272,"line":31,"column":4,"endLine":39,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"setScope","argumentNames":["scope"]} +particles_updateParticles__P172802.info = {"start":9518,"length":340,"line":313,"column":4,"endLine":325,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"updateParticles","argumentNames":[]} -function settings_setScope__P172146_mk(s) { +function particles_updateParticles__P172802_mk(s) { checkStack(s.depth); return { - parent: s, fn: settings_setScope__P172146, depth: s.depth + 1, + parent: s, fn: particles_updateParticles__P172802, depth: s.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___190766: undefined, - arg0: undefined, + sources___190261: undefined, + time___190268: undefined, + dt___190271: undefined, + i___190277: undefined, } } -function settings_readString__P168593(s) { +function particles_ParticleSource__update__P169685(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -52475,49 +53074,266 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.buf___190780 = undefined; + s.p___190340 = undefined; + s.current___190359 = undefined; + s.fixedDt___190367 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim.settings._get(s.arg0); - s.buf___190780 = (r0); - r0 = pxsim_numops_toBoolDecr(s.buf___190780); + r0 = s.arg0; + if (!checkSubtype(r0, particles_ParticleSource__C169678_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 = pxsim_Boolean__bang(s.tmp_1); + r0 = (s.tmp_0).fields["timer"] = (s.tmp_1); + r0 = s.arg0.fields["lifespan"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 !== undefined); s.tmp_0 = r0; r0 = pxsim_numops_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___190780); - { step = 3; continue; } + 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__P169692_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1576; s.pc = 28; return s.tmp_0; + case 28: + r0 = s.retval; + case 1: case 2: - r0 = undefined; + { 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 = 1577; 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 = 1578; 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__P169690_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 1579; 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__C169714_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__C169714_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___190340 = (r0); + r0 = pxsim_numops_toBoolDecr(s.p___190340); + 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___190340).fields["next"] = (s.tmp_2); + r0 = (s.arg0).fields["head"] = (s.p___190340); + { 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___190359 = (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___190367 = (r0); + r0 = pxsim_numops_toBoolDecr(s.fixedDt___190367); + if (!r0) { step = 23; continue; } + case 19: + r0 = s.current___190359.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___190359; + 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__C169678_v4_3_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.current___190359; + s.tmp_0.arg2 = s.fixedDt___190367; + if (!checkSubtype(s.tmp_0.arg0, particles_ParticleSource__C169678_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___190359.fields["next"]; + s.tmp_0 = r0; + s.current___190359 = (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___190359; + 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___190359.fields["next"]; + s.tmp_0 = r0; + s.current___190359 = (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() } } } -settings_readString__P168593.info = {"start":2827,"length":177,"line":110,"column":4,"endLine":116,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"readString","argumentNames":["key"]} +particles_ParticleSource__update__P169685.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 settings_readString__P168593_mk(s) { +function particles_ParticleSource__update__P169685_mk(s) { checkStack(s.depth); return { - parent: s, fn: settings_readString__P168593, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource__update__P169685, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - buf___190780: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + p___190340: undefined, + current___190359: undefined, + fixedDt___190367: undefined, arg0: undefined, + arg1: undefined, } } -function settings_runNumber__P168585(s) { +function particles_ParticleSource_updateParticle__P172798(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -52527,42 +53343,91 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_1 = settings_readNumber__P168595_mk(s); - s.tmp_1.arg0 = globals.RUN_KEY___172135; - s.callLocIdx = 186; 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) + 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__C169678_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.tmp_2; + 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() } } } -settings_runNumber__P168585.info = {"start":745,"length":75,"line":27,"column":4,"endLine":29,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"runNumber","argumentNames":[]} +particles_ParticleSource_updateParticle__P172798.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 settings_runNumber__P168585_mk(s) { +function particles_ParticleSource_updateParticle__P172798_mk(s) { checkStack(s.depth); return { - parent: s, fn: settings_runNumber__P168585, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_updateParticle__P172798, depth: s.depth + 1, pc: 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 control___screen_setupUpdate__P168521(s) { +function Fx_rightShift__P166698(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -52574,36 +53439,29 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - globals.__updated___172102 = (true); - globals.__update___172100 = (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 = 180; 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() } } } -control___screen_setupUpdate__P168521.info = {"start":198,"length":125,"line":10,"column":4,"endLine":14,"endColumn":5,"fileName":"pxt_modules/screen/frame.ts","functionName":"setupUpdate","argumentNames":["update"]} +Fx_rightShift__P166698.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 control___screen_setupUpdate__P168521_mk(s) { +function Fx_rightShift__P166698_mk(s) { checkStack(s.depth); return { - parent: s, fn: control___screen_setupUpdate__P168521, depth: s.depth + 1, + parent: s, fn: Fx_rightShift__P166698, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, + arg1: undefined, } } -function _screen_internal_getScreenHeight__P168564(s) { +function particles_ParticleFactory_createParticle__P169716(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -52613,29 +53471,83 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.p___190450 = undefined; 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_ParticleFactory__C169714_VT)) failedCast(r0); + r0 = pxsim_pxtcore_mkClassInstance(particles_Particle__C169659_VT); + s.p___190450 = (r0); + s.tmp_0 = r0 = s.p___190450; + 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 = 1630; 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___190450; + 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 = 1632; 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___190450).fields["vx"] = (0); + r0 = (s.p___190450).fields["vy"] = (0); + r0 = (s.p___190450).fields["lifespan"] = (500); + r0 = s.p___190450; return leave(s, r0) default: oops() } } } -_screen_internal_getScreenHeight__P168564.info = {"start":960,"length":127,"line":28,"column":4,"endLine":30,"endColumn":5,"fileName":"pxt_modules/screen/targetoverrides.ts","functionName":"getScreenHeight","argumentNames":["defl"]} +particles_ParticleFactory_createParticle__P169716.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 _screen_internal_getScreenHeight__P168564_mk(s) { +function particles_ParticleFactory_createParticle__P169716_mk(s) { checkStack(s.depth); return { - parent: s, fn: _screen_internal_getScreenHeight__P168564, depth: s.depth + 1, + parent: s, fn: particles_ParticleFactory_createParticle__P169716, depth: s.depth + 1, pc: 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___190450: undefined, arg0: undefined, + arg1: undefined, } } -function _screen_internal_getScreenWidth__P168563(s) { +function MAX_SOURCES_inline__P190222(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -52645,29 +53557,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_pxtcore.getConfig(2102, s.arg0); + s.sz___190223 = undefined; + s.tmp_0 = control_ramSize__P166873_mk(s); + s.callLocIdx = 43; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + s.sz___190223 = (r0); + r0 = (s.sz___190223 <= 102400); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = 8; + { step = 5; continue; } + { step = 4; continue; } + case 1: + r0 = (s.sz___190223 <= 204800); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 2; continue; } + r0 = 16; + { step = 5; continue; } + { step = 3; continue; } + case 2: + r0 = 50; + { step = 5; continue; } + case 3: + case 4: + r0 = undefined; + case 5: return leave(s, r0) default: oops() } } } -_screen_internal_getScreenWidth__P168563.info = {"start":810,"length":125,"line":23,"column":4,"endLine":25,"endColumn":5,"fileName":"pxt_modules/screen/targetoverrides.ts","functionName":"getScreenWidth","argumentNames":["defl"]} +MAX_SOURCES_inline__P190222.info = {"start":240,"length":217,"line":9,"column":25,"endLine":18,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":[]} -function _screen_internal_getScreenWidth__P168563_mk(s) { +function MAX_SOURCES_inline__P190222_mk(s) { checkStack(s.depth); return { - parent: s, fn: _screen_internal_getScreenWidth__P168563, depth: s.depth + 1, + parent: s, fn: MAX_SOURCES_inline__P190222, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, + tmp_0: undefined, + tmp_1: undefined, + sz___190223: undefined, } } -function control___screen_update__P168520(s) { +function control_ramSize__P166873(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -52677,36 +53614,37 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.__update___172100); + r0 = pxsim_pxtcore.getConfig(205, 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); if (!r0) { step = 1; continue; } - s.tmp_0 = lambda_1_mk(s); - s.tmp_0.argL = globals.__update___172100; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 179; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; + r0 = s.tmp_0; + { step = 2; continue; } case 1: + r0 = 33554432; case 2: - globals.__updated___172102 = (true); - r0 = undefined; + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = s.tmp_1; return leave(s, r0) default: oops() } } } -control___screen_update__P168520.info = {"start":90,"length":102,"line":4,"column":4,"endLine":8,"endColumn":5,"fileName":"pxt_modules/screen/frame.ts","functionName":"update","argumentNames":[]} +control_ramSize__P166873.info = {"start":4847,"length":100,"line":165,"column":4,"endLine":167,"endColumn":5,"fileName":"pxt_modules/base/control.ts","functionName":"ramSize","argumentNames":[]} -function control___screen_update__P168520_mk(s) { +function control_ramSize__P166873_mk(s) { checkStack(s.depth); return { - parent: s, fn: control___screen_update__P168520, depth: s.depth + 1, + parent: s, fn: control_ramSize__P166873, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, } } -function pause__P166940(s) { +function control__ramSize__P171920(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -52716,35 +53654,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; - } - setupResume(s, 1); - pxsim.loops.pause(s.arg0); - checkResumeConsumed(); - return; - case 1: - r0 = s.retval; - r0 = undefined; + r0 = 33554432; return leave(s, r0) default: oops() } } } -pause__P166940.info = {"start":246,"length":57,"line":7,"column":0,"endLine":9,"endColumn":1,"fileName":"pxt_modules/base/pause.ts","functionName":"pause","argumentNames":["ms"]} +control__ramSize__P171920.info = {"start":4727,"length":60,"line":160,"column":4,"endLine":162,"endColumn":5,"fileName":"pxt_modules/base/control.ts","functionName":"_ramSize","argumentNames":[]} -function pause__P166940_mk(s) { +function control__ramSize__P171920_mk(s) { checkStack(s.depth); return { - parent: s, fn: pause__P166940, depth: s.depth + 1, + parent: s, fn: control__ramSize__P171920, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, } } -function music_MelodyPlayable_play__P168445(s) { +function particles_SprayFactory_constructor__P169719(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -52757,80 +53684,239 @@ 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, music_MelodyPlayable__C168443_VT)) failedCast(r0); - r0 = (s.arg1 === 1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_1 = music_Melody_play__P168160_mk(s); - r0 = s.arg0.fields["melody"]; - s.tmp_1.arg0 = r0; - s.tmp_2 = music_volume__P168148_mk(s); - s.callLocIdx = 135; s.pc = 6; return s.tmp_2; - case 6: + if (!checkSubtype(r0, particles_SprayFactory__C169718_VT)) failedCast(r0); + r0 = undefined; + s.tmp_0 = particles_initTrig__P172822_mk(s); + s.callLocIdx = 1637; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - s.tmp_1.arg1 = r0; - s.callLocIdx = 136; s.pc = 5; return s.tmp_1; - case 5: + s.tmp_0 = particles_SprayFactory_setSpeed__P169722_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 1638; s.pc = 2; return s.tmp_0; + case 2: r0 = s.retval; - { step = 4; continue; } - case 1: - r0 = (s.arg1 === 0); + s.tmp_0 = particles_SprayFactory_setDirection__P169723_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg2; + s.tmp_0.arg2 = s.arg3; + s.callLocIdx = 1639; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +particles_SprayFactory_constructor__P169719.info = {"start":2623,"length":218,"line":98,"column":8,"endLine":103,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"inline","argumentNames":["this","speed","centerDegrees","arcDegrees"]} + +function particles_SprayFactory_constructor__P169719_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_SprayFactory_constructor__P169719, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, +} } + + + + + +function particles_initTrig__P172822(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + r0 = pxsim_numops_toBoolDecr(globals.cachedSin___172808); + 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 = music_Melody_playUntilDone__P168161_mk(s); - r0 = s.arg0.fields["melody"]; - s.tmp_1.arg0 = r0; - s.tmp_2 = music_volume__P168148_mk(s); - s.callLocIdx = 137; s.pc = 8; return s.tmp_2; - case 8: + if (!r0) { step = 1; continue; } + s.tmp_2 = particles_cacheSin__P169712_mk(s); + s.tmp_2.arg0 = 100; + s.callLocIdx = 1625; s.pc = 3; return s.tmp_2; + case 3: r0 = s.retval; - s.tmp_1.arg1 = r0; - s.callLocIdx = 138; s.pc = 7; return s.tmp_1; - case 7: + globals.cachedSin___172808 = (r0); + s.tmp_0 = particles_cacheCos__P169713_mk(s); + s.tmp_0.arg0 = 100; + s.callLocIdx = 1626; s.pc = 4; return s.tmp_0; + case 4: r0 = s.retval; - { step = 3; continue; } + globals.cachedCos___172809 = (r0); + case 1: case 2: - s.tmp_0 = music_Melody_loop__P168159_mk(s); - r0 = s.arg0.fields["melody"]; - s.tmp_0.arg0 = r0; - s.tmp_1 = music_volume__P168148_mk(s); - s.callLocIdx = 139; s.pc = 10; return s.tmp_1; - case 10: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 140; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; - case 3: - case 4: r0 = undefined; return leave(s, r0) default: oops() } } } -music_MelodyPlayable_play__P168445.info = {"start":1608,"length":390,"line":72,"column":8,"endLine":82,"endColumn":9,"fileName":"pxt_modules/mixer/playable.ts","functionName":"play","argumentNames":["this","playbackMode"]} +particles_initTrig__P172822.info = {"start":291,"length":155,"line":11,"column":4,"endLine":16,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"initTrig","argumentNames":[]} -function music_MelodyPlayable_play__P168445_mk(s) { +function particles_initTrig__P172822_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_MelodyPlayable_play__P168445, depth: s.depth + 1, + parent: s, fn: particles_initTrig__P172822, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, +} } + + + + + +function particles_cacheCos__P169713(s) { +let r0 = s.r0, 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.cos___190104 = undefined; + s.anglePerSlice___190106 = undefined; + s.i___190112 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = pxsim_Array__mk(); + s.cos___190104 = (r0); + r0 = (6.283185307179586 / s.arg0); + s.anglePerSlice___190106 = (r0); + s.i___190112 = (0); + case 1: + r0 = (s.i___190112 < s.arg0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + s.tmp_1 = r0 = s.cos___190104; + r0 = (s.i___190112 * s.anglePerSlice___190106); + 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___190112 + 1); + s.i___190112 = (r0); + { step = 1; continue; } + case 2: + r0 = s.cos___190104; + return leave(s, r0) + default: oops() +} } } +particles_cacheCos__P169713.info = {"start":1005,"length":263,"line":35,"column":4,"endLine":42,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"cacheCos","argumentNames":["slices"]} + +function particles_cacheCos__P169713_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_cacheCos__P169713, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + cos___190104: undefined, + anglePerSlice___190106: undefined, + i___190112: undefined, arg0: undefined, - arg1: undefined, } } -function music_Melody_playUntilDone__P168161(s) { +function particles_cacheSin__P169712(s) { +let r0 = s.r0, 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.sin___190130 = undefined; + s.anglePerSlice___190132 = undefined; + s.i___190138 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = pxsim_Array__mk(); + s.sin___190130 = (r0); + r0 = (6.283185307179586 / s.arg0); + s.anglePerSlice___190132 = (r0); + s.i___190138 = (0); + case 1: + r0 = (s.i___190138 < s.arg0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + s.tmp_1 = r0 = s.sin___190130; + r0 = (s.i___190138 * s.anglePerSlice___190132); + 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___190138 + 1); + s.i___190138 = (r0); + { step = 1; continue; } + case 2: + r0 = s.sin___190130; + return leave(s, r0) + default: oops() +} } } +particles_cacheSin__P169712.info = {"start":594,"length":263,"line":22,"column":4,"endLine":29,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"cacheSin","argumentNames":["slices"]} + +function particles_cacheSin__P169712_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_cacheSin__P169712, depth: s.depth + 1, + pc: 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___190130: undefined, + anglePerSlice___190132: undefined, + i___190138: undefined, + arg0: undefined, +} } + + + + + +function particles_SprayFactory_setDirection__P169723(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -52840,71 +53926,70 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.p___191747 = 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, music_Melody__C168153_VT)) failedCast(r0); - s.tmp_0 = music_Melody_stop__P168158_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 102; s.pc = 1; return s.tmp_0; + if (!checkSubtype(r0, particles_SprayFactory__C169718_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + s.tmp_4 = particles_toRadians__P172827_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 = 1647; s.pc = 1; return s.tmp_4; case 1: r0 = s.retval; - r0 = pxsim_pxtcore_mkClassInstance(music_MelodyPlayer__C168164_VT); - s.tmp_0 = r0; - s.tmp_1 = music_MelodyPlayer_constructor__P168167_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = s.arg0; - s.callLocIdx = 103; s.pc = 2; return s.tmp_1; + s.tmp_3 = r0; + r0 = (s.tmp_3 / globals.angleSlice___172821); + 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__P172827_mk(s); + s.tmp_4.arg0 = s.arg2; + s.callLocIdx = 1648; s.pc = 2; return s.tmp_4; case 2: r0 = s.retval; - r0 = (s.arg0).fields["_player"] = (s.tmp_0); - s.p___191747 = (s.tmp_0); - r0 = pxsim_pxtcore_mkAction(2, music_Melody_playUntilDone_inline__P191756); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.p___191747); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.arg0); - r0 = s.arg0.fields["_player"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 / globals.angleSlice___172821); + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); s.tmp_1 = r0; - r0 = (s.tmp_1).fields["onPlayFinished"] = (s.tmp_0); - s.tmp_0 = music_Melody_registerMelody__P171996_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 105; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.tmp_0 = music_MelodyPlayer_play__P168169_mk(s); - r0 = s.arg0.fields["_player"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 106; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; + r0 = (s.tmp_0).fields["spread"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -music_Melody_playUntilDone__P168161.info = {"start":9869,"length":344,"line":307,"column":8,"endLine":316,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"playUntilDone","argumentNames":["this","volume"]} +particles_SprayFactory_setDirection__P169723.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 music_Melody_playUntilDone__P168161_mk(s) { +function particles_SprayFactory_setDirection__P169723_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_Melody_playUntilDone__P168161, depth: s.depth + 1, + parent: s, fn: particles_SprayFactory_setDirection__P169723, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - p___191747: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function music_Melody_playUntilDone_inline__P191756(s) { +function particles_toRadians__P172827(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -52914,40 +53999,52 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = s.caps[1].fields["_player"]; - s.tmp_1 = r0; - r0 = (s.caps[0] == s.tmp_1); + 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 = music_Melody_unregisterMelody__P171997_mk(s); - s.tmp_2.arg0 = s.caps[1]; - s.callLocIdx = 104; s.pc = 3; return s.tmp_2; + s.tmp_3 = Math_abs__P166655_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 1629; 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 = (s.arg0 % 360); + s.arg0 = (r0); case 2: - r0 = undefined; + r0 = (s.arg0 * 0.017453292519943295); return leave(s, r0) default: oops() } } } -music_Melody_playUntilDone_inline__P191756.info = {"start":10025,"length":105,"line":310,"column":42,"endLine":313,"endColumn":13,"fileName":"pxt_modules/mixer/melody.ts","functionName":"inline","argumentNames":[]} +particles_toRadians__P172827.info = {"start":1307,"length":206,"line":45,"column":4,"endLine":52,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"toRadians","argumentNames":["degrees"]} -function music_Melody_playUntilDone_inline__P191756_mk(s) { +function particles_toRadians__P172827_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_Melody_playUntilDone_inline__P191756, depth: s.depth + 1, + parent: s, fn: particles_toRadians__P172827, depth: s.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 music_Melody_unregisterMelody__P171997(s) { +function particles_ParticleFactory_constructor__P169715(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -52962,22 +54059,17 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, music_Melody__C168153_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(globals.music_Melody_playingMelodies___171999); - if (!r0) { step = 1; continue; } - r0 = pxsim_Array_.removeElement(globals.music_Melody_playingMelodies___171999, s.arg0); - case 1: - case 2: + if (!checkSubtype(r0, particles_ParticleFactory__C169714_VT)) failedCast(r0); r0 = undefined; return leave(s, r0) default: oops() } } } -music_Melody_unregisterMelody__P171997.info = {"start":7598,"length":201,"line":240,"column":8,"endLine":245,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"unregisterMelody","argumentNames":["this"]} +particles_ParticleFactory_constructor__P169715.info = {"start":1617,"length":78,"line":59,"column":8,"endLine":61,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"inline","argumentNames":["this"]} -function music_Melody_unregisterMelody__P171997_mk(s) { +function particles_ParticleFactory_constructor__P169715_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_Melody_unregisterMelody__P171997, depth: s.depth + 1, + parent: s, fn: particles_ParticleFactory_constructor__P169715, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, } } @@ -52986,7 +54078,7 @@ function music_Melody_unregisterMelody__P171997_mk(s) { -function music_Melody_registerMelody__P171996(s) { +function particles_ParticleSource_setFactory__P169697(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -52998,66 +54090,82 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, music_Melody__C168153_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(globals.music_Melody_playingMelodies___171999); - 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, particles_ParticleSource__C169678_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(s.arg1); if (!r0) { step = 1; continue; } - r0 = pxsim_Array__mk(); - globals.music_Melody_playingMelodies___171999 = (r0); + r0 = (s.arg0).fields["_factory"] = (s.arg1); case 1: case 2: - r0 = pxsim_Array__length(globals.music_Melody_playingMelodies___171999); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +particles_ParticleSource_setFactory__P169697.info = {"start":8124,"length":114,"line":272,"column":8,"endLine":275,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"setFactory","argumentNames":["this","factory"]} + +function particles_ParticleSource_setFactory__P169697_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_ParticleSource_setFactory__P169697, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, + arg1: undefined, +} } + + + + + +function particles_ParticleSource_setRate__P169695(s) { +let r0 = s.r0, 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__C169678_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_1 > 4); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_2 = music_Melody_stop__P168158_mk(s); - s.tmp_3 = r0 = globals.music_Melody_playingMelodies___171999; - r0 = pxsim_Array__length(globals.music_Melody_playingMelodies___171999); - s.tmp_5 = r0; - r0 = (s.tmp_5 - 1); - s.tmp_4 = r0; - r0 = pxsim_Array__getAt(s.tmp_3, s.tmp_4); - s.tmp_2.arg0 = r0; - s.callLocIdx = 94; s.pc = 5; return s.tmp_2; - case 5: - r0 = s.retval; - case 3: - case 4: - r0 = pxsim_Array_.removeElement(globals.music_Melody_playingMelodies___171999, s.arg0); - r0 = pxsim_Array__push(globals.music_Melody_playingMelodies___171999, s.arg0); + r0 = (s.tmp_0).fields["period"] = (s.tmp_1); + r0 = (s.arg0).fields["timer"] = (0); r0 = undefined; return leave(s, r0) default: oops() } } } -music_Melody_registerMelody__P171996.info = {"start":7016,"length":573,"line":228,"column":8,"endLine":239,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"registerMelody","argumentNames":["this"]} +particles_ParticleSource_setRate__P169695.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 music_Melody_registerMelody__P171996_mk(s) { +function particles_ParticleSource_setRate__P169695_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_Melody_registerMelody__P171996, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_setRate__P169695, depth: s.depth + 1, pc: 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_MelodyPlayer_play__P168169(s) { +function particles_ParticleSource_setAnchor__P169694(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -53067,86 +54175,2179 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.notes___191117 = undefined; - s.pos___191121 = undefined; - s.duration___191122 = undefined; - s.octave___191123 = undefined; - s.tempo___191124 = undefined; - s.hz___191125 = undefined; - s.endHz___191126 = undefined; - s.ms___191129 = undefined; - s.timePos___191130 = undefined; - s.startTime___191131 = undefined; - s.now___191134 = undefined; - s.envA___191135 = undefined; - s.envD___191136 = undefined; - s.envS___191137 = undefined; - s.envR___191138 = undefined; - s.soundWave___191139 = undefined; - s.sndInstr___191140 = undefined; - s.sndInstrPtr___191146 = undefined; - s.addForm___191147 = undefined; - s.scanNextWord___191207 = undefined; - s.token___191264 = undefined; - s.tokenKind___191265 = undefined; - s.consumeToken___191268 = undefined; - s.currNote___191344 = undefined; - s.prevNote___191346 = undefined; - s.timeLeft___191349 = undefined; - s.note___191363 = undefined; - s.i___191367 = undefined; - s.noteChar___191373 = undefined; - s.keyNumber___191447 = undefined; - s.currMs___191464 = undefined; - s.beat___191468 = undefined; - s.timeLeft___191525 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, music_MelodyPlayer__C168164_VT)) failedCast(r0); - r0 = pxsim_pxtrt.mklocRef(); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.arg1); - s.arg1 = (s.tmp_0); - r0 = s.arg0.fields["melody"]; - 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 = 1; continue; } - { step = 59; continue; } - case 1: - case 2: - s.tmp_4 = r0 = s.arg1; - s.tmp_6 = Math_clamp__P166654_mk(s); - s.tmp_6.arg0 = 0; - s.tmp_6.arg1 = 255; - r0 = pxsim_pxtrt_ldlocRef(s.arg1); - s.tmp_8 = r0; - s.tmp_10 = music_volume__P168148_mk(s); - s.callLocIdx = 107; s.pc = 61; return s.tmp_10; - case 61: - r0 = s.retval; - s.tmp_9 = r0; - r0 = (s.tmp_8 * s.tmp_9); - s.tmp_7 = r0; - r0 = (s.tmp_7 >> 8); - s.tmp_6.arg2 = r0; - s.callLocIdx = 108; s.pc = 60; return s.tmp_6; - case 60: - r0 = s.retval; - s.tmp_5 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_4, s.tmp_5); - r0 = s.arg0.fields["melody"]; - r0 = r0.fields["_text"]; - s.notes___191117 = (r0); - r0 = pxsim_pxtrt.mklocRef(); - s.pos___191121 = (r0); + if (!checkSubtype(r0, particles_ParticleSource__C169678_VT)) failedCast(r0); + r0 = (s.arg0).fields["anchor"] = (s.arg1); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +particles_ParticleSource_setAnchor__P169694.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 particles_ParticleSource_setAnchor__P169694_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_ParticleSource_setAnchor__P169694, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, + arg1: undefined, +} } + + + + + +function particles_ParticleSource_destroy__P169692(s) { +let r0 = s.r0, 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__C169678_VT)) failedCast(r0); + s.tmp_0 = particles_ParticleSource_enabled__P169691_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = false; + s.callLocIdx = 1586; 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__P169686_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1587; s.pc = 2; return s.tmp_0; + case 2: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +particles_ParticleSource_destroy__P169692.info = {"start":7094,"length":240,"line":233,"column":8,"endLine":238,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"destroy","argumentNames":["this"]} + +function particles_ParticleSource_destroy__P169692_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_ParticleSource_destroy__P169692, 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_ParticleSource_setAcceleration__P169687(s) { +let r0 = s.r0, 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, particles_ParticleSource__C169678_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__P169687.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__P169687_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_ParticleSource_setAcceleration__P169687, 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__P166629(s) { +let r0 = s.r0, 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() +} } } +helpers_arrayShift__P166629.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 helpers_arrayShift__P166629_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: helpers_arrayShift__P166629, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function particles_SprayFactory_setSpeed__P169722(s) { +let r0 = s.r0, 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_SprayFactory__C169718_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; + return leave(s, r0) + default: oops() +} } } +particles_SprayFactory_setSpeed__P169722.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_SprayFactory_setSpeed__P169722_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_SprayFactory_setSpeed__P169722, 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__P169746(s) { +let r0 = s.r0, 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.confetti___190482 = undefined; + s.i___190498 = 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__C169745_VT)) failedCast(r0); + r0 = pxsim_Array__mk(); + s.tmp_0 = r0; + r0 = pxsim.image.ofBuffer(_hex190485); + s.tmp_1 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); + r0 = pxsim.image.ofBuffer(_hex190487); + s.tmp_2 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.tmp_2); + r0 = pxsim.image.ofBuffer(_hex190489); + s.tmp_3 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.tmp_3); + r0 = pxsim.image.ofBuffer(_hex190491); + s.tmp_4 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.tmp_4); + r0 = pxsim.image.ofBuffer(_hex190493); + s.tmp_5 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.tmp_5); + s.confetti___190482 = (s.tmp_0); + s.tmp_0 = particles_ShapeFactory_constructor__P169741_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___190482, 0); + s.tmp_0.arg3 = r0; + s.callLocIdx = 1671; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.i___190498 = (1); + case 1: + s.tmp_1 = r0 = s.i___190498; + r0 = pxsim_Array__length(s.confetti___190482); + 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__P169742_mk(s); + s.tmp_3.arg0 = s.arg0; + r0 = pxsim_Array__getAt(s.confetti___190482, s.i___190498); + s.tmp_3.arg1 = r0; + s.callLocIdx = 1672; s.pc = 4; return s.tmp_3; + case 4: + r0 = s.retval; + r0 = (s.i___190498 + 1); + s.i___190498 = (r0); + { step = 1; continue; } + case 2: + r0 = (s.arg0).fields["minLifespan"] = (1000); + r0 = (s.arg0).fields["maxLifespan"] = (4500); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +particles_ConfettiFactory_constructor__P169746.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_ConfettiFactory_constructor__P169746_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_ConfettiFactory_constructor__P169746, depth: s.depth + 1, + pc: 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___190482: undefined, + i___190498: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, +} } + +const _hex190485 = pxsim.BufferMethods.createBufferFromHex("87040100010000000f000000") +const _hex190487 = pxsim.BufferMethods.createBufferFromHex("8704010002000000ff000000") +const _hex190489 = pxsim.BufferMethods.createBufferFromHex("87040200010000000f0000000f000000") +const _hex190491 = pxsim.BufferMethods.createBufferFromHex("8704020002000000ff0000000f000000") +const _hex190493 = pxsim.BufferMethods.createBufferFromHex("87040200020000000f000000ff000000") + + + + +function particles_ShapeFactory_addShape__P169742(s) { +let r0 = s.r0, 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_ShapeFactory__C169740_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(s.arg1); + if (!r0) { step = 1; continue; } + r0 = s.arg0.fields["sources"]; + s.tmp_0 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.arg1); + case 1: + case 2: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +particles_ShapeFactory_addShape__P169742.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 particles_ShapeFactory_addShape__P169742_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_ShapeFactory_addShape__P169742, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function particles_ShapeFactory_constructor__P169741(s) { +let r0 = s.r0, 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, particles_ShapeFactory__C169740_VT)) failedCast(r0); + s.tmp_0 = particles_AreaFactory_constructor__P169729_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 = 1661; 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__P169741.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_ShapeFactory_constructor__P169741_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_ShapeFactory_constructor__P169741, depth: s.depth + 1, + pc: 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__P169729(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, particles_AreaFactory__C169724_VT)) failedCast(r0); + s.tmp_0 = particles_SprayFactory_constructor__P169719_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 = 1649; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + r0 = (s.arg0).fields["xRange"] = (s.arg1); + r0 = (s.arg0).fields["yRange"] = (s.arg2); + r0 = pxsim_numops_toBoolDecr(s.arg3); + if (!r0) { step = 1; continue; } + r0 = s.arg3; + { step = 2; continue; } + case 1: + r0 = 150; + case 2: + // jmp value (already in r0) + s.tmp_0 = r0; + r0 = (s.arg0).fields["minLifespan"] = (s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.arg4); + if (!r0) { step = 3; continue; } + r0 = s.arg4; + { step = 4; continue; } + case 3: + r0 = 850; + case 4: + // jmp value (already in r0) + s.tmp_0 = r0; + r0 = (s.arg0).fields["maxLifespan"] = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(Math_FastRandom__C169586_VT); + s.tmp_0 = r0; + s.tmp_1 = Math_FastRandom_constructor__P169588_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = undefined; + s.callLocIdx = 1650; 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() +} } } +particles_AreaFactory_constructor__P169729.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 particles_AreaFactory_constructor__P169729_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_AreaFactory_constructor__P169729, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, +} } + + + + + +function effects_ScreenEffect_constructor__P169794(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, effects_ScreenEffect__C169793_VT)) failedCast(r0); + s.tmp_0 = effects_ParticleEffect_constructor__P169790_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 = 1681; 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() +} } } +effects_ScreenEffect_constructor__P169794.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 effects_ScreenEffect_constructor__P169794_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: effects_ScreenEffect_constructor__P169794, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, +} } + + + + + +function effects_ParticleEffect_constructor__P169790(s) { +let r0 = s.r0, 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, effects_ParticleEffect__C169789_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__P169790.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__P169790_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: effects_ParticleEffect_constructor__P169790, 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__P168450(s) { +let r0 = s.r0, 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(music_MelodyPlayable__C168443_VT); + s.tmp_0 = r0; + s.tmp_1 = music_MelodyPlayable_constructor__P168444_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = s.arg0; + s.callLocIdx = 141; s.pc = 1; return s.tmp_1; + case 1: + r0 = s.retval; + r0 = s.tmp_0; + return leave(s, r0) + default: oops() +} } } +music_melodyPlayable__P168450.info = {"start":3172,"length":107,"line":121,"column":4,"endLine":123,"endColumn":5,"fileName":"pxt_modules/mixer/playable.ts","functionName":"melodyPlayable","argumentNames":["melody"]} + +function music_melodyPlayable__P168450_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: music_melodyPlayable__P168450, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + arg0: undefined, +} } + + + + + +function music_MelodyPlayable_constructor__P168444(s) { +let r0 = s.r0, 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, music_MelodyPlayable__C168443_VT)) failedCast(r0); + r0 = (s.arg0).fields["melody"] = (s.arg1); + r0 = undefined; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +music_MelodyPlayable_constructor__P168444.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 music_MelodyPlayable_constructor__P168444_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: music_MelodyPlayable_constructor__P168444, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, + arg1: undefined, +} } + + + + + +function music_Playable_constructor__P168440(s) { +let r0 = s.r0, 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_Playable__C168438_VT)) failedCast(r0); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +music_Playable_constructor__P168440.info = {"start":1086,"length":26,"line":47,"column":8,"endLine":49,"endColumn":9,"fileName":"pxt_modules/mixer/playable.ts","functionName":"inline","argumentNames":["this"]} + +function music_Playable_constructor__P168440_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: music_Playable_constructor__P168440, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function Fx8__P166676(s) { +let r0 = s.r0, 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); + s.tmp_0 = r0; + r0 = (s.tmp_0 | 0); + return leave(s, r0) + default: oops() +} } } +Fx8__P166676.info = {"start":42,"length":68,"line":4,"column":0,"endLine":6,"endColumn":1,"fileName":"pxt_modules/base/fixed.ts","functionName":"Fx8","argumentNames":["v"]} + +function Fx8__P166676_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Fx8__P166676, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function SpriteKind_create__P169006(s) { +let r0 = s.r0, 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 = (globals.nextKind___172276 === undefined); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + globals.nextKind___172276 = (1000); + case 1: + case 2: + s.tmp_0 = r0 = globals.nextKind___172276; + r0 = (s.tmp_0 + 1); + globals.nextKind___172276 = (r0); + r0 = s.tmp_0; + return leave(s, r0) + default: oops() +} } } +SpriteKind_create__P169006.info = {"start":783,"length":112,"line":26,"column":4,"endLine":29,"endColumn":5,"fileName":"pxt_modules/game/spritekind.ts","functionName":"create","argumentNames":[]} + +function SpriteKind_create__P169006_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: SpriteKind_create__P169006, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, +} } + + + + + +function controller_Button_constructor__P168722(s) { +let r0 = s.r0, 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, controller_Button__C168716_VT)) failedCast(r0); + r0 = (s.arg0).fields["id"] = (s.arg1); + r0 = (s.arg0).fields["_pressed"] = (false); + r0 = (s.arg0).fields["repeatDelay"] = (undefined); + r0 = (s.arg0).fields["repeatInterval"] = (undefined); + r0 = (s.arg0).fields["_repeatCount"] = (0); + r0 = (s.arg1 > 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = pxsim_pxtcore_mkAction(1, controller_Button_inline__P190635); + 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__P190642); + 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() +} } } +controller_Button_constructor__P168722.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 controller_Button_constructor__P168722_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_Button_constructor__P168722, 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 controller_Button_inline__P190635(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + s.tmp_0 = controller_Button_setPressed__P168729_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_0.arg1 = false; + s.callLocIdx = 297; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +controller_Button_inline__P190635.info = {"start":2627,"length":28,"line":88,"column":66,"endLine":88,"endColumn":94,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"inline","argumentNames":[]} + +function controller_Button_inline__P190635_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_Button_inline__P190635, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, +} } + + + + + +function controller_Button_inline__P190642(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + s.tmp_0 = controller_Button_setPressed__P168729_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_0.arg1 = true; + s.callLocIdx = 298; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +controller_Button_inline__P190642.info = {"start":2729,"length":27,"line":89,"column":68,"endLine":89,"endColumn":95,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"inline","argumentNames":[]} + +function controller_Button_inline__P190642_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_Button_inline__P190642, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, +} } + + + + + +function controller_setupButton__P172259(s) { +let r0 = s.r0, 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 = undefined; + return leave(s, r0) + default: oops() +} } } +controller_setupButton__P172259.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 controller_setupButton__P172259_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_setupButton__P172259, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, + arg1: undefined, +} } + + + + + +function controller_Button_setPressed__P168729(s) { +let r0 = s.r0, 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_Button__C168716_VT)) failedCast(r0); + r0 = s.arg0.fields["_pressed"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 != s.arg1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + s.tmp_2 = power_poke__P168456_mk(s); + s.callLocIdx = 301; 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__P168683_mk(s); + r0 = s.arg0.fields["_owner"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = true; + s.callLocIdx = 302; 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__P172243_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 303; 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__P172242_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 304; 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() +} } } +controller_Button_setPressed__P168729.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 controller_Button_setPressed__P168729_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_Button_setPressed__P168729, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function controller_Button_raiseButtonDown__P172243(s) { +let r0 = s.r0, 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__C168716_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(globals._userEventsEnabled___172253); + 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__P172243.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__P172243_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_Button_raiseButtonDown__P172243, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function controller_Button_raiseButtonUp__P172242(s) { +let r0 = s.r0, 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__C168716_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(globals._userEventsEnabled___172253); + 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__P172242.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__P172242_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_Button_raiseButtonUp__P172242, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function game_addScenePushHandler__P169545(s) { +let r0 = s.r0, 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___172459); + 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___172459 = (r0); + case 1: + case 2: + r0 = pxsim_Array_.indexOf(globals._scenePushHandlers___172459, 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___172459, s.arg0); + case 3: + case 4: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +game_addScenePushHandler__P169545.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__P169545_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: game_addScenePushHandler__P169545, 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__P168668(s) { +let r0 = s.r0, 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__C168661_VT)) failedCast(r0); + r0 = s.arg0.fields["_id"]; + return leaveAccessor(s, r0) + default: oops() +} } } +controller_Controller_id__P168668.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__P168668.isGetter = true; + +function controller_Controller_id__P168668_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_Controller_id__P168668, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function controller_Controller_connected__P168682(s) { +let r0 = s.r0, 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__C168661_VT)) failedCast(r0); + r0 = s.arg0.fields["_connected"]; + return leaveAccessor(s, r0) + default: oops() +} } } +controller_Controller_connected__P168682.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__P168682.isGetter = true; + +function controller_Controller_connected__P168682_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_Controller_connected__P168682, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function game_currentScene__P169526(s) { +let r0 = s.r0, 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__P172465_mk(s); + s.tmp_0.arg0 = undefined; + s.callLocIdx = 1329; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = globals._scene___172457; + return leave(s, r0) + default: oops() +} } } +game_currentScene__P169526.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__P169526_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: game_currentScene__P169526, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, +} } + + + + + +function game_addScenePopHandler__P169547(s) { +let r0 = s.r0, 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___172460); + 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___172460 = (r0); + case 1: + case 2: + r0 = pxsim_Array_.indexOf(globals._scenePopHandlers___172460, 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___172460, s.arg0); + case 3: + case 4: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +game_addScenePopHandler__P169547.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__P169547_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: game_addScenePopHandler__P169547, 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__P172147(s) { +let r0 = s.r0, 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___190737 = undefined; + s.tmp_1 = settings_runNumber__P168585_mk(s); + s.callLocIdx = 189; s.pc = 1; return s.tmp_1; + case 1: + r0 = s.retval; + s.tmp_0 = r0; + r0 = (s.tmp_0 + 1); + s.rn___190737 = (r0); + s.tmp_0 = settings_writeNumber__P168590_mk(s); + s.tmp_0.arg0 = globals.RUN_KEY___172135; + s.tmp_0.arg1 = s.rn___190737; + s.callLocIdx = 190; 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___190737); + s.tmp_0 = settings_setScope__P172146_mk(s); + r0 = pxsim_pxtcore.programName(); + s.tmp_0.arg0 = r0; + s.callLocIdx = 191; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +settings_initScopes__P172147.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__P172147_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: settings_initScopes__P172147, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + rn___190737: undefined, +} } + + + + + +function settings_setScope__P172146(s) { +let r0 = s.r0, 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___190766 = 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__P168593_mk(s); + s.tmp_0.arg0 = globals.SCOPE_KEY___172136; + s.callLocIdx = 187; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + s.currScope___190766 = (r0); + r0 = (s.currScope___190766 != 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__P168588_mk(s); + s.tmp_0.arg0 = globals.SCOPE_KEY___172136; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 188; 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__P172146.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__P172146_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: settings_setScope__P172146, depth: s.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___190766: undefined, + arg0: undefined, +} } + + + + + +function settings_readString__P168593(s) { +let r0 = s.r0, 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___190780 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = pxsim.settings._get(s.arg0); + s.buf___190780 = (r0); + r0 = pxsim_numops_toBoolDecr(s.buf___190780); + 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___190780); + { step = 3; continue; } + case 2: + r0 = undefined; + case 3: + return leave(s, r0) + default: oops() +} } } +settings_readString__P168593.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__P168593_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: settings_readString__P168593, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + buf___190780: undefined, + arg0: undefined, +} } + + + + + +function settings_runNumber__P168585(s) { +let r0 = s.r0, 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__P168595_mk(s); + s.tmp_1.arg0 = globals.RUN_KEY___172135; + s.callLocIdx = 186; 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__P168585.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__P168585_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: settings_runNumber__P168585, 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__P168521(s) { +let r0 = s.r0, 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___172102 = (true); + globals.__update___172100 = (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 = 180; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +control___screen_setupUpdate__P168521.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__P168521_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: control___screen_setupUpdate__P168521, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function _screen_internal_getScreenHeight__P168564(s) { +let r0 = s.r0, 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__P168564.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__P168564_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: _screen_internal_getScreenHeight__P168564, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function _screen_internal_getScreenWidth__P168563(s) { +let r0 = s.r0, 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__P168563.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__P168563_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: _screen_internal_getScreenWidth__P168563, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function control___screen_update__P168520(s) { +let r0 = s.r0, 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___172100); + if (!r0) { step = 1; continue; } + s.tmp_0 = lambda_1_mk(s); + s.tmp_0.argL = globals.__update___172100; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 179; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + case 1: + case 2: + globals.__updated___172102 = (true); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +control___screen_update__P168520.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__P168520_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: control___screen_update__P168520, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, +} } + + + + + +function pause__P166940(s) { +let r0 = s.r0, 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__P166940.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__P166940_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: pause__P166940, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function music_MelodyPlayable_play__P168445(s) { +let r0 = s.r0, 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, music_MelodyPlayable__C168443_VT)) failedCast(r0); + r0 = (s.arg1 === 1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_1 = music_Melody_play__P168160_mk(s); + r0 = s.arg0.fields["melody"]; + s.tmp_1.arg0 = r0; + s.tmp_2 = music_volume__P168148_mk(s); + s.callLocIdx = 135; s.pc = 6; return s.tmp_2; + case 6: + r0 = s.retval; + s.tmp_1.arg1 = r0; + s.callLocIdx = 136; s.pc = 5; return s.tmp_1; + case 5: + r0 = s.retval; + { 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 = music_Melody_playUntilDone__P168161_mk(s); + r0 = s.arg0.fields["melody"]; + s.tmp_1.arg0 = r0; + s.tmp_2 = music_volume__P168148_mk(s); + s.callLocIdx = 137; s.pc = 8; return s.tmp_2; + case 8: + r0 = s.retval; + s.tmp_1.arg1 = r0; + s.callLocIdx = 138; s.pc = 7; return s.tmp_1; + case 7: + r0 = s.retval; + { step = 3; continue; } + case 2: + s.tmp_0 = music_Melody_loop__P168159_mk(s); + r0 = s.arg0.fields["melody"]; + s.tmp_0.arg0 = r0; + s.tmp_1 = music_volume__P168148_mk(s); + s.callLocIdx = 139; s.pc = 10; return s.tmp_1; + case 10: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 140; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; + case 3: + case 4: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +music_MelodyPlayable_play__P168445.info = {"start":1608,"length":390,"line":72,"column":8,"endLine":82,"endColumn":9,"fileName":"pxt_modules/mixer/playable.ts","functionName":"play","argumentNames":["this","playbackMode"]} + +function music_MelodyPlayable_play__P168445_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: music_MelodyPlayable_play__P168445, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function music_Melody_playUntilDone__P168161(s) { +let r0 = s.r0, 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___191747 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, music_Melody__C168153_VT)) failedCast(r0); + s.tmp_0 = music_Melody_stop__P168158_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 102; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = pxsim_pxtcore_mkClassInstance(music_MelodyPlayer__C168164_VT); + s.tmp_0 = r0; + s.tmp_1 = music_MelodyPlayer_constructor__P168167_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = s.arg0; + s.callLocIdx = 103; s.pc = 2; return s.tmp_1; + case 2: + r0 = s.retval; + r0 = (s.arg0).fields["_player"] = (s.tmp_0); + s.p___191747 = (s.tmp_0); + r0 = pxsim_pxtcore_mkAction(2, music_Melody_playUntilDone_inline__P191756); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.p___191747); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.arg0); + r0 = s.arg0.fields["_player"]; + s.tmp_1 = r0; + r0 = (s.tmp_1).fields["onPlayFinished"] = (s.tmp_0); + s.tmp_0 = music_Melody_registerMelody__P171996_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 105; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.tmp_0 = music_MelodyPlayer_play__P168169_mk(s); + r0 = s.arg0.fields["_player"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 106; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +music_Melody_playUntilDone__P168161.info = {"start":9869,"length":344,"line":307,"column":8,"endLine":316,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"playUntilDone","argumentNames":["this","volume"]} + +function music_Melody_playUntilDone__P168161_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: music_Melody_playUntilDone__P168161, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + p___191747: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function music_Melody_playUntilDone_inline__P191756(s) { +let r0 = s.r0, 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[1].fields["_player"]; + s.tmp_1 = r0; + r0 = (s.caps[0] == s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_2 = music_Melody_unregisterMelody__P171997_mk(s); + s.tmp_2.arg0 = s.caps[1]; + s.callLocIdx = 104; s.pc = 3; return s.tmp_2; + case 3: + r0 = s.retval; + case 1: + case 2: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +music_Melody_playUntilDone_inline__P191756.info = {"start":10025,"length":105,"line":310,"column":42,"endLine":313,"endColumn":13,"fileName":"pxt_modules/mixer/melody.ts","functionName":"inline","argumentNames":[]} + +function music_Melody_playUntilDone_inline__P191756_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: music_Melody_playUntilDone_inline__P191756, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, +} } + + + + + +function music_Melody_unregisterMelody__P171997(s) { +let r0 = s.r0, 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__C168153_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(globals.music_Melody_playingMelodies___171999); + if (!r0) { step = 1; continue; } + r0 = pxsim_Array_.removeElement(globals.music_Melody_playingMelodies___171999, s.arg0); + case 1: + case 2: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +music_Melody_unregisterMelody__P171997.info = {"start":7598,"length":201,"line":240,"column":8,"endLine":245,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"unregisterMelody","argumentNames":["this"]} + +function music_Melody_unregisterMelody__P171997_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: music_Melody_unregisterMelody__P171997, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function music_Melody_registerMelody__P171996(s) { +let r0 = s.r0, 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__C168153_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(globals.music_Melody_playingMelodies___171999); + 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.music_Melody_playingMelodies___171999 = (r0); + case 1: + case 2: + r0 = pxsim_Array__length(globals.music_Melody_playingMelodies___171999); + 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; } + s.tmp_2 = music_Melody_stop__P168158_mk(s); + s.tmp_3 = r0 = globals.music_Melody_playingMelodies___171999; + r0 = pxsim_Array__length(globals.music_Melody_playingMelodies___171999); + s.tmp_5 = r0; + r0 = (s.tmp_5 - 1); + s.tmp_4 = r0; + r0 = pxsim_Array__getAt(s.tmp_3, s.tmp_4); + s.tmp_2.arg0 = r0; + s.callLocIdx = 94; s.pc = 5; return s.tmp_2; + case 5: + r0 = s.retval; + case 3: + case 4: + r0 = pxsim_Array_.removeElement(globals.music_Melody_playingMelodies___171999, s.arg0); + r0 = pxsim_Array__push(globals.music_Melody_playingMelodies___171999, s.arg0); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +music_Melody_registerMelody__P171996.info = {"start":7016,"length":573,"line":228,"column":8,"endLine":239,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"registerMelody","argumentNames":["this"]} + +function music_Melody_registerMelody__P171996_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: music_Melody_registerMelody__P171996, depth: s.depth + 1, + pc: 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 music_MelodyPlayer_play__P168169(s) { +let r0 = s.r0, 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.notes___191117 = undefined; + s.pos___191121 = undefined; + s.duration___191122 = undefined; + s.octave___191123 = undefined; + s.tempo___191124 = undefined; + s.hz___191125 = undefined; + s.endHz___191126 = undefined; + s.ms___191129 = undefined; + s.timePos___191130 = undefined; + s.startTime___191131 = undefined; + s.now___191134 = undefined; + s.envA___191135 = undefined; + s.envD___191136 = undefined; + s.envS___191137 = undefined; + s.envR___191138 = undefined; + s.soundWave___191139 = undefined; + s.sndInstr___191140 = undefined; + s.sndInstrPtr___191146 = undefined; + s.addForm___191147 = undefined; + s.scanNextWord___191207 = undefined; + s.token___191264 = undefined; + s.tokenKind___191265 = undefined; + s.consumeToken___191268 = undefined; + s.currNote___191344 = undefined; + s.prevNote___191346 = undefined; + s.timeLeft___191349 = undefined; + s.note___191363 = undefined; + s.i___191367 = undefined; + s.noteChar___191373 = undefined; + s.keyNumber___191447 = undefined; + s.currMs___191464 = undefined; + s.beat___191468 = undefined; + s.timeLeft___191525 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, music_MelodyPlayer__C168164_VT)) failedCast(r0); + r0 = pxsim_pxtrt.mklocRef(); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.arg1); + s.arg1 = (s.tmp_0); + r0 = s.arg0.fields["melody"]; + 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 = 1; continue; } + { step = 59; continue; } + case 1: + case 2: + s.tmp_4 = r0 = s.arg1; + s.tmp_6 = Math_clamp__P166654_mk(s); + s.tmp_6.arg0 = 0; + s.tmp_6.arg1 = 255; + r0 = pxsim_pxtrt_ldlocRef(s.arg1); + s.tmp_8 = r0; + s.tmp_10 = music_volume__P168148_mk(s); + s.callLocIdx = 107; s.pc = 61; return s.tmp_10; + case 61: + r0 = s.retval; + s.tmp_9 = r0; + r0 = (s.tmp_8 * s.tmp_9); + s.tmp_7 = r0; + r0 = (s.tmp_7 >> 8); + s.tmp_6.arg2 = r0; + s.callLocIdx = 108; s.pc = 60; return s.tmp_6; + case 60: + r0 = s.retval; + s.tmp_5 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_4, s.tmp_5); + r0 = s.arg0.fields["melody"]; + r0 = r0.fields["_text"]; + s.notes___191117 = (r0); + r0 = pxsim_pxtrt.mklocRef(); + s.pos___191121 = (r0); r0 = pxsim_pxtrt_stlocRef(s.pos___191121, 0); r0 = pxsim_pxtrt.mklocRef(); s.duration___191122 = (r0); @@ -53163,611 +56364,2983 @@ switch (step) { r0 = pxsim_pxtrt.mklocRef(); s.endHz___191126 = (r0); r0 = pxsim_pxtrt_stlocRef(s.endHz___191126, -1); - r0 = pxsim_pxtrt.mklocRef(); - s.ms___191129 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.ms___191129, 0); - s.timePos___191130 = (0); + r0 = pxsim_pxtrt.mklocRef(); + s.ms___191129 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.ms___191129, 0); + s.timePos___191130 = (0); + r0 = pxsim.control.millis(); + s.startTime___191131 = (r0); + s.now___191134 = (0); + r0 = pxsim_pxtrt.mklocRef(); + s.envA___191135 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.envA___191135, 0); + r0 = pxsim_pxtrt.mklocRef(); + s.envD___191136 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.envD___191136, 0); + r0 = pxsim_pxtrt.mklocRef(); + s.envS___191137 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.envS___191137, 255); + r0 = pxsim_pxtrt.mklocRef(); + s.envR___191138 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.envR___191138, 0); + r0 = pxsim_pxtrt.mklocRef(); + s.soundWave___191139 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.soundWave___191139, 1); + r0 = pxsim.control.createBuffer(60); + s.sndInstr___191140 = (r0); + r0 = pxsim_pxtrt.mklocRef(); + s.sndInstrPtr___191146 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.sndInstrPtr___191146, 0); + r0 = pxsim_pxtcore_mkAction(10, addForm_inline__P191148); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.hz___191125); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.endHz___191126); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.ms___191129); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 3, s.duration___191122); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 4, s.tempo___191124); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 5, s.envR___191138); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 6, s.sndInstrPtr___191146); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 7, s.sndInstr___191140); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 8, s.soundWave___191139); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 9, s.arg1); + s.addForm___191147 = (s.tmp_0); + r0 = pxsim_pxtcore_mkAction(3, scanNextWord_inline__P191208); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.pos___191121); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.notes___191117); + s.scanNextWord___191207 = (s.tmp_0); + r0 = pxsim_pxtrt.mklocRef(); + s.token___191264 = (r0); + s.tmp_0 = r0 = s.token___191264; + r0 = pxsim_String_.mkEmpty(); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + r0 = pxsim_pxtrt.mklocRef(); + s.tokenKind___191265 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.tokenKind___191265, 0); + r0 = pxsim_pxtcore_mkAction(13, consumeToken_inline__P191269); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.token___191264); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.tokenKind___191265); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.octave___191123); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 3, s.duration___191122); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 4, s.ms___191129); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 5, s.tempo___191124); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 6, s.hz___191125); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 7, s.soundWave___191139); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 8, s.envA___191135); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 9, s.envD___191136); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 10, s.envS___191137); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 11, s.envR___191138); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 12, s.endHz___191126); + s.consumeToken___191268 = (s.tmp_0); + case 3: + r0 = pxsim_numops_toBoolDecr(true); + if (!r0) { step = 58; continue; } + s.tmp_0 = lambda_1_mk(s); + s.tmp_0.argL = s.scanNextWord___191207; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 116; s.pc = 62; return s.tmp_0; + case 62: + r0 = s.retval; + s.currNote___191344 = (r0); + s.prevNote___191346 = (false); + r0 = pxsim_numops_toBoolDecr(s.currNote___191344); + 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 = 8; continue; } + r0 = (s.timePos___191130 - s.now___191134); + s.timeLeft___191349 = (r0); + r0 = (s.timeLeft___191349 > 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + s.tmp_1 = pause__P166940_mk(s); + s.tmp_1.arg0 = s.timeLeft___191349; + s.callLocIdx = 117; s.pc = 63; return s.tmp_1; + case 63: + r0 = s.retval; + case 4: + case 5: + r0 = s.arg0.fields["onPlayFinished"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 6; continue; } + s.tmp_1 = if_onPlayFinished_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, "onPlayFinished"), 1); + s.callLocIdx = 118; s.pc = 64; return s.tmp_1; + } else { + s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["onPlayFinished"]; + if (s.tmp_1.fn == null) { setupLambda(s.tmp_1, s.tmp_1.arg0.fields["onPlayFinished"], 1); s.callLocIdx = 118; s.pc = 64; return s.tmp_1; } + else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 118; s.pc = 64; return s.tmp_1;; } + else { s.callLocIdx = 118; s.pc = 64; return s.tmp_1; } + } + case 64: + r0 = s.retval; + case 6: + case 7: + { step = 59; continue; } + case 8: + case 9: + r0 = pxsim_pxtrt_stlocRef(s.hz___191125, -1); + s.note___191363 = (0); + s.tmp_0 = r0 = s.token___191264; + r0 = pxsim_String_.mkEmpty(); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + r0 = pxsim_pxtrt_stlocRef(s.tokenKind___191265, 0); + s.i___191367 = (0); + case 10: + s.tmp_1 = r0 = s.i___191367; + r0 = pxsim_String_.length(s.currNote___191344); + 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 = 41; continue; } + r0 = pxsim_String_.charAt(s.currNote___191344, s.i___191367); + s.noteChar___191373 = (r0); + s.tmp_0 = r0 = s.noteChar___191373; + r0 = pxsim_pxtcore.switch_eq("c", s.tmp_0); + if (r0) { step = 11; continue; } + r0 = pxsim_pxtcore.switch_eq("C", s.tmp_0); + if (r0) { step = 12; continue; } + r0 = pxsim_pxtcore.switch_eq("d", s.tmp_0); + if (r0) { step = 13; continue; } + r0 = pxsim_pxtcore.switch_eq("D", s.tmp_0); + if (r0) { step = 14; continue; } + r0 = pxsim_pxtcore.switch_eq("e", s.tmp_0); + if (r0) { step = 15; continue; } + r0 = pxsim_pxtcore.switch_eq("E", s.tmp_0); + if (r0) { step = 16; continue; } + r0 = pxsim_pxtcore.switch_eq("f", s.tmp_0); + if (r0) { step = 17; continue; } + r0 = pxsim_pxtcore.switch_eq("F", s.tmp_0); + if (r0) { step = 18; continue; } + r0 = pxsim_pxtcore.switch_eq("g", s.tmp_0); + if (r0) { step = 19; continue; } + r0 = pxsim_pxtcore.switch_eq("G", s.tmp_0); + if (r0) { step = 20; continue; } + r0 = pxsim_pxtcore.switch_eq("a", s.tmp_0); + if (r0) { step = 21; continue; } + r0 = pxsim_pxtcore.switch_eq("A", s.tmp_0); + if (r0) { step = 22; continue; } + r0 = pxsim_pxtcore.switch_eq("B", s.tmp_0); + if (r0) { step = 23; continue; } + r0 = pxsim_pxtcore.switch_eq("r", s.tmp_0); + if (r0) { step = 24; continue; } + r0 = pxsim_pxtcore.switch_eq("R", s.tmp_0); + if (r0) { step = 25; continue; } + r0 = pxsim_pxtcore.switch_eq("#", s.tmp_0); + if (r0) { step = 26; continue; } + r0 = pxsim_pxtcore.switch_eq("b", s.tmp_0); + if (r0) { step = 27; continue; } + r0 = pxsim_pxtcore.switch_eq(",", s.tmp_0); + if (r0) { step = 30; continue; } + r0 = pxsim_pxtcore.switch_eq("!", s.tmp_0); + if (r0) { step = 31; continue; } + r0 = pxsim_pxtcore.switch_eq("@", s.tmp_0); + if (r0) { step = 32; continue; } + r0 = pxsim_pxtcore.switch_eq("~", s.tmp_0); + if (r0) { step = 33; continue; } + r0 = pxsim_pxtcore.switch_eq(":", s.tmp_0); + if (r0) { step = 34; continue; } + r0 = pxsim_pxtcore.switch_eq("-", s.tmp_0); + if (r0) { step = 35; continue; } + r0 = pxsim_pxtcore.switch_eq("^", s.tmp_0); + if (r0) { step = 36; continue; } + r0 = s.tmp_0; + { step = 37; continue; } + case 11: + case 12: + s.note___191363 = (1); + s.prevNote___191346 = (true); + { step = 40; continue; } + case 13: + case 14: + s.note___191363 = (3); + s.prevNote___191346 = (true); + { step = 40; continue; } + case 15: + case 16: + s.note___191363 = (5); + s.prevNote___191346 = (true); + { step = 40; continue; } + case 17: + case 18: + s.note___191363 = (6); + s.prevNote___191346 = (true); + { step = 40; continue; } + case 19: + case 20: + s.note___191363 = (8); + s.prevNote___191346 = (true); + { step = 40; continue; } + case 21: + case 22: + s.note___191363 = (10); + s.prevNote___191346 = (true); + { step = 40; continue; } + case 23: + s.note___191363 = (12); + s.prevNote___191346 = (true); + { step = 40; continue; } + case 24: + case 25: + r0 = pxsim_pxtrt_stlocRef(s.hz___191125, 0); + s.prevNote___191346 = (false); + { step = 40; continue; } + case 26: + r0 = (s.note___191363 + 1); + s.note___191363 = (r0); + s.prevNote___191346 = (false); + { step = 40; continue; } + case 27: + r0 = pxsim_numops_toBoolDecr(s.prevNote___191346); + if (!r0) { step = 28; continue; } + r0 = (s.note___191363 - 1); + s.note___191363 = (r0); + { step = 29; continue; } + case 28: + s.note___191363 = (12); + s.prevNote___191346 = (true); + case 29: + { step = 40; continue; } + case 30: + s.tmp_0 = lambda_1_mk(s); + s.tmp_0.argL = s.consumeToken___191268; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 119; s.pc = 65; return s.tmp_0; + case 65: + r0 = s.retval; + s.prevNote___191346 = (false); + { step = 40; continue; } + case 31: + r0 = pxsim_pxtrt_stlocRef(s.tokenKind___191265, 4); + s.prevNote___191346 = (false); + { step = 40; continue; } + case 32: + s.tmp_0 = lambda_1_mk(s); + s.tmp_0.argL = s.consumeToken___191268; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 120; s.pc = 66; return s.tmp_0; + case 66: + r0 = s.retval; + r0 = pxsim_pxtrt_stlocRef(s.tokenKind___191265, 8); + s.prevNote___191346 = (false); + { step = 40; continue; } + case 33: + s.tmp_0 = lambda_1_mk(s); + s.tmp_0.argL = s.consumeToken___191268; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 121; s.pc = 67; return s.tmp_0; + case 67: + r0 = s.retval; + r0 = pxsim_pxtrt_stlocRef(s.tokenKind___191265, 7); + s.prevNote___191346 = (false); + { step = 40; continue; } + case 34: + s.tmp_0 = lambda_1_mk(s); + s.tmp_0.argL = s.consumeToken___191268; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 122; s.pc = 68; return s.tmp_0; + case 68: + r0 = s.retval; + r0 = pxsim_pxtrt_stlocRef(s.tokenKind___191265, 2); + s.prevNote___191346 = (false); + { step = 40; continue; } + case 35: + s.tmp_0 = lambda_1_mk(s); + s.tmp_0.argL = s.consumeToken___191268; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 123; s.pc = 69; return s.tmp_0; + case 69: + r0 = s.retval; + r0 = pxsim_pxtrt_stlocRef(s.tokenKind___191265, 3); + s.prevNote___191346 = (false); + { step = 40; continue; } + case 36: + s.tmp_0 = lambda_1_mk(s); + s.tmp_0.argL = s.consumeToken___191268; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 124; s.pc = 70; return s.tmp_0; + case 70: + r0 = s.retval; + r0 = pxsim_pxtrt_stlocRef(s.tokenKind___191265, 5); + { step = 40; continue; } + case 37: + r0 = pxsim_pxtrt_ldlocRef(s.tokenKind___191265); + s.tmp_1 = r0; + r0 = (s.tmp_1 == 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 38; continue; } + r0 = pxsim_pxtrt_stlocRef(s.tokenKind___191265, 1); + case 38: + case 39: + s.tmp_0 = r0 = s.token___191264; + r0 = pxsim_pxtrt_ldlocRef(s.token___191264); + s.tmp_3 = r0; + if ((s.tmp_3) && (s.tmp_3).vtable) { + setupResume(s, 71); + pxsim_String__stringConv(s.tmp_3); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_3) + ""; } + case 71: + r0 = s.retval; + s.tmp_2 = r0; + if ((s.noteChar___191373) && (s.noteChar___191373).vtable) { + setupResume(s, 72); + pxsim_String__stringConv(s.noteChar___191373); + checkResumeConsumed(); + return; + } else { s.retval = (s.noteChar___191373) + ""; } + case 72: + r0 = s.retval; + s.tmp_4 = r0; + r0 = pxsim_String__concat(s.tmp_2, s.tmp_4); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + s.prevNote___191346 = (false); + case 40: + r0 = (s.i___191367 + 1); + s.i___191367 = (r0); + { step = 10; continue; } + case 41: + s.tmp_0 = lambda_1_mk(s); + s.tmp_0.argL = s.consumeToken___191268; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 125; s.pc = 73; return s.tmp_0; + case 73: + r0 = s.retval; + s.tmp_0 = r0 = s.note___191363; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 42; continue; } + r0 = s.tmp_0; + { step = 43; continue; } + case 42: + r0 = pxsim_pxtrt_ldlocRef(s.hz___191125); + s.tmp_1 = r0; + r0 = (s.tmp_1 < 0); + case 43: + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 46; continue; } + s.tmp_3 = r0 = s.note___191363; + r0 = pxsim_pxtrt_ldlocRef(s.octave___191123); + s.tmp_6 = r0; + r0 = (s.tmp_6 - 1); + s.tmp_5 = r0; + r0 = (12 * s.tmp_5); + s.tmp_4 = r0; + r0 = (s.tmp_3 + s.tmp_4); + s.keyNumber___191447 = (r0); + s.tmp_1 = r0 = globals.freqs___171984; + r0 = (s.keyNumber___191447 * 2); + s.tmp_2 = r0; + r0 = pxsim.BufferMethods.getNumber(s.tmp_1, 4, s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 44; continue; } + r0 = s.tmp_0; + { step = 45; continue; } + case 44: + r0 = 0; + case 45: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_pxtrt_stlocRef(s.hz___191125, s.tmp_3); + case 46: + case 47: + r0 = pxsim_pxtrt_ldlocRef(s.ms___191129); + s.currMs___191464 = (r0); + r0 = (s.currMs___191464 <= 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 48; continue; } + r0 = pxsim_pxtrt_ldlocRef(s.tempo___191124); + s.tmp_1 = r0; + r0 = pxsim.Math_.idiv(15000, s.tmp_1); + s.beat___191468 = (r0); + r0 = pxsim_pxtrt_ldlocRef(s.duration___191122); + s.tmp_0 = r0; + r0 = (s.tmp_0 * s.beat___191468); + s.currMs___191464 = (r0); + case 48: + case 49: + r0 = pxsim_pxtrt_ldlocRef(s.hz___191125); + s.tmp_1 = r0; + r0 = (s.tmp_1 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 50; continue; } + { step = 55; continue; } + case 50: + r0 = pxsim_pxtrt_ldlocRef(s.hz___191125); + s.tmp_3 = r0; + r0 = (s.tmp_3 == 0); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 51; continue; } + r0 = (s.timePos___191130 + s.currMs___191464); + s.timePos___191130 = (r0); + { step = 54; continue; } + case 51: + r0 = pxsim_pxtrt_ldlocRef(s.endHz___191126); + s.tmp_1 = r0; + r0 = (s.tmp_1 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 52; continue; } + s.tmp_2 = r0 = s.endHz___191126; + r0 = pxsim_pxtrt_ldlocRef(s.hz___191125); + s.tmp_3 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_2, s.tmp_3); + case 52: + case 53: + r0 = pxsim_pxtrt_stlocRef(s.sndInstrPtr___191146, 0); + s.tmp_0 = lambda_5_mk(s); + s.tmp_0.argL = s.addForm___191147; + r0 = pxsim_pxtrt_ldlocRef(s.envA___191135); + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = 0; + s.tmp_0.arg2 = 255; + s.tmp_0.arg3 = 0; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 126; s.pc = 74; return s.tmp_0; + case 74: + r0 = s.retval; + s.tmp_0 = lambda_5_mk(s); + s.tmp_0.argL = s.addForm___191147; + r0 = pxsim_pxtrt_ldlocRef(s.envD___191136); + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = 255; + r0 = pxsim_pxtrt_ldlocRef(s.envS___191137); + s.tmp_0.arg2 = r0; + r0 = pxsim_pxtrt_ldlocRef(s.envA___191135); + s.tmp_0.arg3 = r0; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 127; s.pc = 75; return s.tmp_0; + case 75: + r0 = s.retval; + s.tmp_0 = lambda_5_mk(s); + s.tmp_0.argL = s.addForm___191147; + s.tmp_1 = r0 = s.currMs___191464; + r0 = pxsim_pxtrt_ldlocRef(s.envA___191135); + s.tmp_3 = r0; + r0 = pxsim_pxtrt_ldlocRef(s.envD___191136); + s.tmp_4 = r0; + r0 = (s.tmp_3 + s.tmp_4); + s.tmp_2 = r0; + r0 = (s.tmp_1 - s.tmp_2); + s.tmp_0.arg0 = r0; + r0 = pxsim_pxtrt_ldlocRef(s.envS___191137); + s.tmp_0.arg1 = r0; + r0 = pxsim_pxtrt_ldlocRef(s.envS___191137); + s.tmp_0.arg2 = r0; + r0 = pxsim_pxtrt_ldlocRef(s.envD___191136); + s.tmp_5 = r0; + r0 = pxsim_pxtrt_ldlocRef(s.envA___191135); + s.tmp_6 = r0; + r0 = (s.tmp_5 + s.tmp_6); + s.tmp_0.arg3 = r0; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 128; s.pc = 76; return s.tmp_0; + case 76: + r0 = s.retval; + s.tmp_0 = lambda_5_mk(s); + s.tmp_0.argL = s.addForm___191147; + r0 = pxsim_pxtrt_ldlocRef(s.envR___191138); + s.tmp_0.arg0 = r0; + r0 = pxsim_pxtrt_ldlocRef(s.envS___191137); + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = 0; + s.tmp_0.arg3 = s.currMs___191464; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 129; s.pc = 77; return s.tmp_0; + case 77: + r0 = s.retval; + s.tmp_0 = music_MelodyPlayer_queuePlayInstructions__P172000_mk(s); + s.tmp_0.arg0 = s.arg0; + r0 = (s.timePos___191130 - s.now___191134); + s.tmp_0.arg1 = r0; + s.tmp_1 = r0 = s.sndInstr___191140; + r0 = pxsim_pxtrt_ldlocRef(s.sndInstrPtr___191146); + s.tmp_2 = r0; + r0 = pxsim.BufferMethods.slice(s.tmp_1, 0, s.tmp_2); + s.tmp_0.arg2 = r0; + s.callLocIdx = 130; s.pc = 78; return s.tmp_0; + case 78: + r0 = s.retval; + r0 = pxsim_pxtrt_stlocRef(s.endHz___191126, -1); + r0 = (s.timePos___191130 + s.currMs___191464); + s.timePos___191130 = (r0); + case 54: + case 55: + r0 = (s.timePos___191130 - s.now___191134); + s.timeLeft___191525 = (r0); + r0 = (s.timeLeft___191525 > 200); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 56; continue; } + s.tmp_1 = pause__P166940_mk(s); + r0 = (s.timeLeft___191525 - 100); + s.tmp_1.arg0 = r0; + s.callLocIdx = 131; s.pc = 79; return s.tmp_1; + case 79: + r0 = s.retval; r0 = pxsim.control.millis(); - s.startTime___191131 = (r0); - s.now___191134 = (0); - r0 = pxsim_pxtrt.mklocRef(); - s.envA___191135 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.envA___191135, 0); - r0 = pxsim_pxtrt.mklocRef(); - s.envD___191136 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.envD___191136, 0); - r0 = pxsim_pxtrt.mklocRef(); - s.envS___191137 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.envS___191137, 255); - r0 = pxsim_pxtrt.mklocRef(); - s.envR___191138 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.envR___191138, 0); - r0 = pxsim_pxtrt.mklocRef(); - s.soundWave___191139 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.soundWave___191139, 1); - r0 = pxsim.control.createBuffer(60); - s.sndInstr___191140 = (r0); - r0 = pxsim_pxtrt.mklocRef(); - s.sndInstrPtr___191146 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.sndInstrPtr___191146, 0); - r0 = pxsim_pxtcore_mkAction(10, addForm_inline__P191148); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.hz___191125); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.endHz___191126); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.ms___191129); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 3, s.duration___191122); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 4, s.tempo___191124); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 5, s.envR___191138); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 6, s.sndInstrPtr___191146); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 7, s.sndInstr___191140); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 8, s.soundWave___191139); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 9, s.arg1); - s.addForm___191147 = (s.tmp_0); - r0 = pxsim_pxtcore_mkAction(3, scanNextWord_inline__P191208); + r0 = (s.tmp_0 - s.startTime___191131); + s.now___191134 = (r0); + case 56: + case 57: + { step = 3; continue; } + case 58: + case 59: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +music_MelodyPlayer_play__P168169.info = {"start":11570,"length":9259,"line":356,"column":8,"endLine":590,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"play","argumentNames":["this","volume"]} + +function music_MelodyPlayer_play__P168169_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: music_MelodyPlayer_play__P168169, depth: s.depth + 1, + pc: 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, + notes___191117: undefined, + pos___191121: undefined, + duration___191122: undefined, + octave___191123: undefined, + tempo___191124: undefined, + hz___191125: undefined, + endHz___191126: undefined, + ms___191129: undefined, + timePos___191130: undefined, + startTime___191131: undefined, + now___191134: undefined, + envA___191135: undefined, + envD___191136: undefined, + envS___191137: undefined, + envR___191138: undefined, + soundWave___191139: undefined, + sndInstr___191140: undefined, + sndInstrPtr___191146: undefined, + addForm___191147: undefined, + scanNextWord___191207: undefined, + token___191264: undefined, + tokenKind___191265: undefined, + consumeToken___191268: undefined, + currNote___191344: undefined, + prevNote___191346: undefined, + timeLeft___191349: undefined, + note___191363: undefined, + i___191367: undefined, + noteChar___191373: undefined, + keyNumber___191447: undefined, + currMs___191464: undefined, + beat___191468: undefined, + timeLeft___191525: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function addForm_inline__P191148(s) { +let r0 = s.r0, 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.freqStart___191153 = undefined; + s.freqEnd___191155 = undefined; + s.envelopeWidth___191157 = undefined; + s.slope___191175 = 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_pxtrt_ldlocRef(s.caps[0]); + s.freqStart___191153 = (r0); + r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + s.freqEnd___191155 = (r0); + r0 = pxsim_pxtrt_ldlocRef(s.caps[2]); + 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 = pxsim_pxtrt_ldlocRef(s.caps[2]); + { step = 2; continue; } + case 1: + r0 = pxsim_pxtrt_ldlocRef(s.caps[3]); + s.tmp_3 = r0; + r0 = pxsim_pxtrt_ldlocRef(s.caps[4]); + s.tmp_5 = r0; + r0 = pxsim.Math_.idiv(15000, s.tmp_5); + s.tmp_4 = r0; + r0 = (s.tmp_3 * s.tmp_4); + s.tmp_2 = r0; + r0 = pxsim_pxtrt_ldlocRef(s.caps[5]); + s.tmp_6 = r0; + r0 = (s.tmp_2 + s.tmp_6); + case 2: + // jmp value (already in r0) + s.tmp_7 = r0; + s.envelopeWidth___191157 = (s.tmp_7); + r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_ldlocRef(s.caps[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 = 3; continue; } + r0 = s.tmp_0; + { step = 4; continue; } + case 3: + r0 = (s.envelopeWidth___191157 != 0); + case 4: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 5; continue; } + r0 = (s.freqEnd___191155 - s.freqStart___191153); + s.tmp_4 = r0; + r0 = (s.tmp_4 / s.envelopeWidth___191157); + s.slope___191175 = (r0); + r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); + s.tmp_0 = r0; + r0 = (s.slope___191175 * s.arg3); + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); + s.freqStart___191153 = (r0); + r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); + s.tmp_0 = r0; + s.tmp_2 = r0 = s.slope___191175; + r0 = (s.arg3 + s.arg0); + s.tmp_3 = r0; + r0 = (s.tmp_2 * s.tmp_3); + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); + s.freqEnd___191155 = (r0); + case 5: + case 6: + s.tmp_0 = r0 = s.caps[6]; + s.tmp_2 = music_addNote__P168163_mk(s); + s.tmp_2.arg0 = s.caps[7]; + r0 = pxsim_pxtrt_ldlocRef(s.caps[6]); + s.tmp_2.arg1 = r0; + s.tmp_2.arg2 = s.arg0; + s.tmp_2.arg3 = s.arg1; + s.tmp_2.arg4 = s.arg2; + r0 = pxsim_pxtrt_ldlocRef(s.caps[8]); + s.tmp_2.arg5 = r0; + s.tmp_2.arg6 = s.freqStart___191153; + r0 = pxsim_pxtrt_ldlocRef(s.caps[9]); + s.tmp_2.arg7 = r0; + s.tmp_2.arg8 = s.freqEnd___191155; + s.callLocIdx = 109; s.pc = 7; return s.tmp_2; + case 7: + r0 = s.retval; + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +addForm_inline__P191148.info = {"start":12378,"length":643,"line":382,"column":28,"endLine":393,"endColumn":13,"fileName":"pxt_modules/mixer/melody.ts","functionName":"inline","argumentNames":["formDuration","beg","end","msOff"]} + +function addForm_inline__P191148_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: addForm_inline__P191148, depth: s.depth + 1, + pc: 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, + freqStart___191153: undefined, + freqEnd___191155: undefined, + envelopeWidth___191157: undefined, + slope___191175: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, +} } + + + + + +function scanNextWord_inline__P191208(s) { +let r0 = s.r0, 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___191217 = undefined; + s.note___191234 = undefined; + s.c___191240 = undefined; + r0 = s.caps[0].fields["melody"]; + 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_String_.mkEmpty(); + { step = 23; continue; } + case 1: + case 2: + case 3: + r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + s.tmp_4 = r0; + r0 = pxsim_String_.length(s.caps[2]); + 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 = 12; continue; } + s.tmp_6 = r0 = s.caps[2]; + r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + s.tmp_7 = r0; + r0 = pxsim_String_.charAt(s.tmp_6, s.tmp_7); + s.c___191217 = (r0); + r0 = (s.c___191217 != " "); + 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 = (s.c___191217 != "\r"); + case 5: + // jmp value (already in r0) + 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.c___191217 != "\n"); + case 7: + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = pxsim_numops_toBool(s.tmp_2); + if (r0) { step = 8; continue; } + r0 = s.tmp_2; + { step = 9; continue; } + case 8: + r0 = (s.c___191217 != "\t"); + case 9: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 10; continue; } + { step = 12; continue; } + case 10: + case 11: + s.tmp_4 = r0 = s.caps[1]; + r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + s.tmp_6 = r0; + r0 = (s.tmp_6 + 1); + s.tmp_5 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_4, s.tmp_5); + { step = 3; continue; } + case 12: + r0 = pxsim_String_.mkEmpty(); + s.note___191234 = (r0); + case 13: + r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + s.tmp_1 = r0; + r0 = pxsim_String_.length(s.caps[2]); + 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 = 22; continue; } + s.tmp_3 = r0 = s.caps[2]; + r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + s.tmp_4 = r0; + r0 = pxsim_String_.charAt(s.tmp_3, s.tmp_4); + s.c___191240 = (r0); + r0 = (s.c___191240 == " "); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 14; continue; } + r0 = s.tmp_0; + { step = 15; continue; } + case 14: + r0 = (s.c___191240 == "\r"); + case 15: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBool(s.tmp_1); + if (!r0) { step = 16; continue; } + r0 = s.tmp_1; + { step = 17; continue; } + case 16: + r0 = (s.c___191240 == "\n"); + case 17: + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = pxsim_numops_toBool(s.tmp_2); + if (!r0) { step = 18; continue; } + r0 = s.tmp_2; + { step = 19; continue; } + case 18: + r0 = (s.c___191240 == "\t"); + case 19: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 20; continue; } + { step = 22; continue; } + case 20: + case 21: + if ((s.note___191234) && (s.note___191234).vtable) { + setupResume(s, 24); + pxsim_String__stringConv(s.note___191234); + checkResumeConsumed(); + return; + } else { s.retval = (s.note___191234) + ""; } + case 24: + r0 = s.retval; + s.tmp_4 = r0; + if ((s.c___191240) && (s.c___191240).vtable) { + setupResume(s, 25); + pxsim_String__stringConv(s.c___191240); + checkResumeConsumed(); + return; + } else { s.retval = (s.c___191240) + ""; } + case 25: + r0 = s.retval; + s.tmp_5 = r0; + r0 = pxsim_String__concat(s.tmp_4, s.tmp_5); + s.note___191234 = (r0); + s.tmp_0 = r0 = s.caps[1]; + r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + s.tmp_2 = r0; + r0 = (s.tmp_2 + 1); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + { step = 13; continue; } + case 22: + r0 = s.note___191234; + case 23: + return leave(s, r0) + default: oops() +} } } +scanNextWord_inline__P191208.info = {"start":13056,"length":708,"line":395,"column":33,"endLine":417,"endColumn":13,"fileName":"pxt_modules/mixer/melody.ts","functionName":"inline","argumentNames":[]} + +function scanNextWord_inline__P191208_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: scanNextWord_inline__P191208, depth: s.depth + 1, + pc: 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, + c___191217: undefined, + note___191234: undefined, + c___191240: undefined, +} } + + + + + +function consumeToken_inline__P191269(s) { +let r0 = s.r0, 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.d___191275 = undefined; + r0 = pxsim_pxtrt_ldlocRef(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; } + case 1: + r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + s.tmp_1 = r0; + r0 = (s.tmp_1 != 0); + case 2: + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 15; continue; } + s.tmp_3 = parseInt__P166624_mk(s); + r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); + s.tmp_3.arg0 = r0; + s.tmp_3.arg1 = undefined; + s.callLocIdx = 110; s.pc = 17; return s.tmp_3; + case 17: + r0 = s.retval; + s.d___191275 = (r0); + r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + s.tmp_0 = r0; + r0 = pxsim_pxtcore.switch_eq(1, s.tmp_0); + if (r0) { step = 3; continue; } + r0 = pxsim_pxtcore.switch_eq(2, 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(6, s.tmp_0); + if (r0) { step = 7; continue; } + r0 = pxsim_pxtcore.switch_eq(7, s.tmp_0); + if (r0) { step = 8; continue; } + r0 = pxsim_pxtcore.switch_eq(8, s.tmp_0); + if (r0) { step = 9; continue; } + r0 = pxsim_pxtcore.switch_eq(9, s.tmp_0); + if (r0) { step = 10; continue; } + r0 = pxsim_pxtcore.switch_eq(10, 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(5, s.tmp_0); + if (r0) { step = 13; continue; } + r0 = s.tmp_0; + { step = 14; continue; } + case 3: + r0 = pxsim_pxtrt_stlocRef(s.caps[2], s.d___191275); + { step = 14; continue; } + case 4: + s.tmp_0 = r0 = s.caps[3]; + s.tmp_2 = Math_max__P166657_mk(s); + s.tmp_2.arg0 = 1; + s.tmp_3 = Math_min__P166658_mk(s); + s.tmp_3.arg0 = 16; + s.tmp_3.arg1 = s.d___191275; + s.callLocIdx = 111; s.pc = 19; return s.tmp_3; + case 19: + r0 = s.retval; + s.tmp_2.arg1 = r0; + s.callLocIdx = 112; s.pc = 18; return s.tmp_2; + case 18: + r0 = s.retval; + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + r0 = pxsim_pxtrt_stlocRef(s.caps[4], -1); + { step = 14; continue; } + case 5: + s.tmp_0 = r0 = s.caps[5]; + s.tmp_2 = Math_max__P166657_mk(s); + s.tmp_2.arg0 = 1; + s.tmp_2.arg1 = s.d___191275; + s.callLocIdx = 113; s.pc = 20; return s.tmp_2; + case 20: + r0 = s.retval; + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + { step = 14; continue; } + case 6: + r0 = pxsim_pxtrt_stlocRef(s.caps[6], s.d___191275); + r0 = pxsim_pxtrt_stlocRef(s.caps[1], 6); + { step = 14; continue; } + case 7: + r0 = pxsim_pxtrt_stlocRef(s.caps[4], s.d___191275); + { step = 14; continue; } + case 8: + s.tmp_0 = r0 = s.caps[7]; + s.tmp_2 = Math_clamp__P166654_mk(s); + s.tmp_2.arg0 = 1; + s.tmp_2.arg1 = 18; + s.tmp_2.arg2 = s.d___191275; + s.callLocIdx = 114; s.pc = 21; return s.tmp_2; + case 21: + r0 = s.retval; + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + { step = 14; continue; } + case 9: + r0 = pxsim_pxtrt_stlocRef(s.caps[8], s.d___191275); + r0 = pxsim_pxtrt_stlocRef(s.caps[1], 9); + { step = 14; continue; } + case 10: + r0 = pxsim_pxtrt_stlocRef(s.caps[9], s.d___191275); + r0 = pxsim_pxtrt_stlocRef(s.caps[1], 10); + { step = 14; continue; } + case 11: + s.tmp_0 = r0 = s.caps[10]; + s.tmp_2 = Math_clamp__P166654_mk(s); + s.tmp_2.arg0 = 0; + s.tmp_2.arg1 = 255; + s.tmp_2.arg2 = s.d___191275; + s.callLocIdx = 115; s.pc = 22; return s.tmp_2; + case 22: + r0 = s.retval; + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + r0 = pxsim_pxtrt_stlocRef(s.caps[1], 11); + { step = 14; continue; } + case 12: + r0 = pxsim_pxtrt_stlocRef(s.caps[11], s.d___191275); + { step = 14; continue; } + case 13: + r0 = pxsim_pxtrt_stlocRef(s.caps[12], s.d___191275); + case 14: + s.tmp_0 = r0 = s.caps[0]; + r0 = pxsim_String_.mkEmpty(); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + case 15: + case 16: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +consumeToken_inline__P191269.info = {"start":15050,"length":1189,"line":456,"column":33,"endLine":477,"endColumn":13,"fileName":"pxt_modules/mixer/melody.ts","functionName":"inline","argumentNames":[]} + +function consumeToken_inline__P191269_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: consumeToken_inline__P191269, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + d___191275: undefined, +} } + + + + + +function music_MelodyPlayer_queuePlayInstructions__P172000(s) { +let r0 = s.r0, 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, music_MelodyPlayer__C168164_VT)) failedCast(r0); + r0 = pxsim.music.queuePlayInstructions(s.arg1, s.arg2); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +music_MelodyPlayer_queuePlayInstructions__P172000.info = {"start":11435,"length":125,"line":352,"column":8,"endLine":354,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"queuePlayInstructions","argumentNames":["this","timeDelta","buf"]} + +function music_MelodyPlayer_queuePlayInstructions__P172000_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: music_MelodyPlayer_queuePlayInstructions__P172000, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, + arg1: undefined, + arg2: undefined, +} } + + + + + +function parseInt__P166624(s) { +let r0 = s.r0, 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.start___191562 = undefined; + s.sign___191592 = undefined; + s.output___191637 = undefined; + s.hasDigit___191638 = undefined; + s.i___191639 = undefined; + s.code___191646 = undefined; + s.val___191653 = undefined; + 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 = 6; continue; } + case 1: + r0 = (s.arg1 != null); + s.tmp_2 = r0; + r0 = pxsim_numops_toBool(s.tmp_2); + if (r0) { step = 2; continue; } + r0 = s.tmp_2; + { step = 5; continue; } + case 2: + r0 = (s.arg1 < 2); + s.tmp_3 = r0; + r0 = pxsim_numops_toBool(s.tmp_3); + if (!r0) { step = 3; continue; } + r0 = s.tmp_3; + { step = 4; continue; } + case 3: + r0 = (s.arg1 > 36); + case 4: + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = s.tmp_4; + case 5: + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = s.tmp_5; + case 6: + // jmp value (already in r0) + s.tmp_6 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_6); + if (!r0) { step = 7; continue; } + r0 = NaN; + { step = 46; continue; } + case 7: + case 8: + s.start___191562 = (0); + case 9: + s.tmp_1 = r0 = s.start___191562; + r0 = pxsim_String_.length(s.arg0); + 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 = 10; continue; } + r0 = s.tmp_0; + { step = 11; continue; } + case 10: + s.tmp_3 = helpers_isWhitespace__P166651_mk(s); + r0 = pxsim_String_.charCodeAt(s.arg0, s.start___191562); + s.tmp_3.arg0 = r0; + s.callLocIdx = 0; s.pc = 47; return s.tmp_3; + case 47: + r0 = s.retval; + case 11: + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + if (!r0) { step = 12; continue; } + r0 = (s.start___191562 + 1); + s.start___191562 = (r0); + { step = 9; continue; } + case 12: + s.tmp_1 = r0 = s.start___191562; + 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 = 13; continue; } + r0 = NaN; + { step = 46; continue; } + case 13: + case 14: + s.sign___191592 = (1); + r0 = pxsim_String_.charAt(s.arg0, s.start___191562); + s.tmp_0 = r0; + r0 = pxsim_pxtcore.switch_eq("-", s.tmp_0); + if (r0) { step = 15; continue; } + r0 = pxsim_pxtcore.switch_eq("+", s.tmp_0); + if (r0) { step = 16; continue; } + r0 = s.tmp_0; + { step = 17; continue; } + case 15: + s.sign___191592 = (-1); + case 16: + r0 = (s.start___191562 + 1); + s.start___191562 = (r0); + case 17: + 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 = 18; continue; } + r0 = s.tmp_0; + { step = 19; continue; } + case 18: + r0 = (s.arg1 == 16); + case 19: + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = pxsim_numops_toBool(s.tmp_2); + if (r0) { step = 20; continue; } + r0 = s.tmp_2; + { step = 21; continue; } + case 20: + r0 = pxsim_String_.charAt(s.arg0, s.start___191562); + s.tmp_3 = r0; + r0 = ("0" === s.tmp_3); + case 21: + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = pxsim_numops_toBool(s.tmp_4); + if (r0) { step = 22; continue; } + r0 = s.tmp_4; + { step = 25; continue; } + case 22: + s.tmp_7 = r0 = s.arg0; + r0 = (s.start___191562 + 1); + s.tmp_8 = r0; + r0 = pxsim_String_.charAt(s.tmp_7, s.tmp_8); + s.tmp_6 = r0; + r0 = ("x" === s.tmp_6); + s.tmp_5 = r0; + r0 = pxsim_numops_toBool(s.tmp_5); + if (!r0) { step = 23; continue; } + r0 = s.tmp_5; + { step = 24; continue; } + case 23: + s.tmp_10 = r0 = s.arg0; + r0 = (s.start___191562 + 1); + s.tmp_11 = r0; + r0 = pxsim_String_.charAt(s.tmp_10, s.tmp_11); + s.tmp_9 = r0; + r0 = ("X" === s.tmp_9); + case 24: + // jmp value (already in r0) + s.tmp_12 = r0; + r0 = s.tmp_12; + case 25: + // jmp value (already in r0) + s.tmp_13 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_13); + if (!r0) { step = 26; continue; } + s.arg1 = (16); + r0 = (s.start___191562 + 2); + s.start___191562 = (r0); + { step = 29; continue; } + case 26: + r0 = pxsim_numops_toBoolDecr(s.arg1); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 27; continue; } + s.arg1 = (10); + case 27: + case 28: + case 29: + s.output___191637 = (0); + s.hasDigit___191638 = (false); + s.i___191639 = (s.start___191562); + case 30: + s.tmp_1 = r0 = s.i___191639; + 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 = 45; continue; } + r0 = pxsim_String_.charCodeAt(s.arg0, s.i___191639); + s.tmp_3 = r0; + r0 = (s.tmp_3 | 32); + s.code___191646 = (r0); + s.val___191653 = (undefined); + r0 = (s.code___191646 >= 48); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 31; continue; } + r0 = s.tmp_0; + { step = 32; continue; } + case 31: + r0 = (s.code___191646 < 58); + case 32: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 33; continue; } + r0 = (s.code___191646 - 48); + s.val___191653 = (r0); + { step = 38; continue; } + case 33: + r0 = (s.code___191646 >= 97); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 34; continue; } + r0 = s.tmp_0; + { step = 35; continue; } + case 34: + r0 = (s.code___191646 < 123); + case 35: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 36; continue; } + r0 = (10 + s.code___191646); + s.tmp_2 = r0; + r0 = (s.tmp_2 - 97); + s.val___191653 = (r0); + case 36: + case 37: + case 38: + r0 = (s.val___191653 == undefined); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 39; continue; } + r0 = s.tmp_0; + { step = 40; continue; } + case 39: + r0 = (s.val___191653 >= s.arg1); + case 40: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 43; continue; } + r0 = pxsim_numops_toBoolDecr(s.hasDigit___191638); + 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 = 41; continue; } + r0 = NaN; + { step = 46; continue; } + case 41: + case 42: + { step = 45; continue; } + case 43: + case 44: + s.hasDigit___191638 = (true); + r0 = (s.output___191637 * s.arg1); + s.tmp_0 = r0; + r0 = (s.tmp_0 + s.val___191653); + s.output___191637 = (r0); + r0 = (s.i___191639 + 1); + s.i___191639 = (r0); + { step = 30; continue; } + case 45: + r0 = (s.sign___191592 * s.output___191637); + case 46: + return leave(s, r0) + default: oops() +} } } +parseInt__P166624.info = {"start":1064,"length":1690,"line":44,"column":0,"endLine":103,"endColumn":1,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"parseInt","argumentNames":["text","radix"]} + +function parseInt__P166624_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: parseInt__P166624, depth: s.depth + 1, + pc: 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, + start___191562: undefined, + sign___191592: undefined, + output___191637: undefined, + hasDigit___191638: undefined, + i___191639: undefined, + code___191646: undefined, + val___191653: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function music_MelodyPlayer_constructor__P168167(s) { +let r0 = s.r0, 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, music_MelodyPlayer__C168164_VT)) failedCast(r0); + r0 = (s.arg0).fields["melody"] = (s.arg1); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +music_MelodyPlayer_constructor__P168167.info = {"start":11304,"length":62,"line":344,"column":8,"endLine":346,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"inline","argumentNames":["this","m"]} + +function music_MelodyPlayer_constructor__P168167_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: music_MelodyPlayer_constructor__P168167, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, + arg1: undefined, +} } + + + + + +function music_Melody_stop__P168158(s) { +let r0 = s.r0, 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__C168153_VT)) failedCast(r0); + r0 = s.arg0.fields["_player"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_1 = music_MelodyPlayer_stop__P168168_mk(s); + r0 = s.arg0.fields["_player"]; + s.tmp_1.arg0 = r0; + s.callLocIdx = 92; s.pc = 3; return s.tmp_1; + case 3: + r0 = s.retval; + r0 = (s.arg0).fields["_player"] = (null); + case 1: + case 2: + s.tmp_0 = music_Melody_unregisterMelody__P171997_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 93; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +music_Melody_stop__P168158.info = {"start":6833,"length":173,"line":220,"column":8,"endLine":226,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"stop","argumentNames":["this"]} + +function music_Melody_stop__P168158_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: music_Melody_stop__P168158, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + arg0: undefined, +} } + + + + + +function music_MelodyPlayer_stop__P168168(s) { +let r0 = s.r0, 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_MelodyPlayer__C168164_VT)) failedCast(r0); + r0 = (s.arg0).fields["melody"] = (null); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +music_MelodyPlayer_stop__P168168.info = {"start":11376,"length":49,"line":348,"column":8,"endLine":350,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"stop","argumentNames":["this"]} + +function music_MelodyPlayer_stop__P168168_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: music_MelodyPlayer_stop__P168168, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function music_Melody_play__P168160(s) { +let r0 = s.r0, 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, music_Melody__C168153_VT)) failedCast(r0); + s.tmp_0 = music_Melody_playCore__P171998_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.tmp_0.arg2 = false; + s.callLocIdx = 101; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +music_Melody_play__P168160.info = {"start":9416,"length":71,"line":292,"column":8,"endLine":294,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"play","argumentNames":["this","volume"]} + +function music_Melody_play__P168160_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: music_Melody_play__P168160, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function music_Melody_playCore__P171998(s) { +let r0 = s.r0, 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___191074 = 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, music_Melody__C168153_VT)) failedCast(r0); + s.tmp_0 = music_Melody_stop__P168158_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 95; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = pxsim_pxtcore_mkClassInstance(music_MelodyPlayer__C168164_VT); + s.tmp_0 = r0; + s.tmp_1 = music_MelodyPlayer_constructor__P168167_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = s.arg0; + s.callLocIdx = 96; s.pc = 2; return s.tmp_1; + case 2: + r0 = s.retval; + r0 = (s.arg0).fields["_player"] = (s.tmp_0); + s.p___191074 = (s.tmp_0); + s.tmp_0 = music_Melody_registerMelody__P171996_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 97; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(4, music_Melody_playCore_inline__P191084); s.tmp_0 = r0; r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.pos___191121); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.notes___191117); - s.scanNextWord___191207 = (s.tmp_0); - r0 = pxsim_pxtrt.mklocRef(); - s.token___191264 = (r0); - s.tmp_0 = r0 = s.token___191264; - r0 = pxsim_String_.mkEmpty(); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.p___191074); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.arg1); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 3, s.arg2); + r0 = pxsim.control.runInParallel(s.tmp_0); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +music_Melody_playCore__P171998.info = {"start":7809,"length":815,"line":247,"column":8,"endLine":266,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"playCore","argumentNames":["this","volume","loop"]} + +function music_Melody_playCore__P171998_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: music_Melody_playCore__P171998, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + p___191074: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, +} } + + + + + +function music_Melody_playCore_inline__P191084(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + case 1: + r0 = s.caps[0].fields["_player"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 == s.caps[1]); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 6; continue; } + s.tmp_2 = music_MelodyPlayer_play__P168169_mk(s); + s.tmp_2.arg0 = s.caps[1]; + s.tmp_2.arg1 = s.caps[2]; + s.callLocIdx = 98; s.pc = 7; return s.tmp_2; + case 7: + r0 = s.retval; + r0 = pxsim_numops_toBoolDecr(s.caps[3]); + 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 = 4; continue; } + r0 = s.caps[0].fields["_player"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 == s.caps[1]); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 2; continue; } + s.tmp_4 = music_Melody_unregisterMelody__P171997_mk(s); + s.tmp_4.arg0 = s.caps[0]; + s.callLocIdx = 99; s.pc = 8; return s.tmp_4; + case 8: + r0 = s.retval; + case 2: + case 3: + { step = 6; continue; } + case 4: + case 5: + { step = 1; continue; } + case 6: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +music_Melody_playCore_inline__P191084.info = {"start":8012,"length":601,"line":251,"column":34,"endLine":265,"endColumn":13,"fileName":"pxt_modules/mixer/melody.ts","functionName":"inline","argumentNames":[]} + +function music_Melody_playCore_inline__P191084_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: music_Melody_playCore_inline__P191084, depth: s.depth + 1, + pc: 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 music_Melody_loop__P168159(s) { +let r0 = s.r0, 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, music_Melody__C168153_VT)) failedCast(r0); + s.tmp_0 = music_Melody_playCore__P171998_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.tmp_0.arg2 = true; + s.callLocIdx = 100; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +music_Melody_loop__P168159.info = {"start":8990,"length":70,"line":278,"column":8,"endLine":280,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"loop","argumentNames":["this","volume"]} + +function music_Melody_loop__P168159_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: music_Melody_loop__P168159, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function particles_ShapeFactory_createParticle__P169744(s) { +let r0 = s.r0, 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___190818 = 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__C169740_VT)) failedCast(r0); + s.tmp_0 = particles_AreaFactory_createParticle__P169730_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 1669; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + s.p___190818 = (r0); + s.tmp_0 = r0 = s.p___190818; + s.tmp_2 = Math_FastRandom_randomRange__P169590_mk(s); + r0 = s.arg0.fields["galois"]; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = 1; + s.tmp_2.arg2 = 14; + s.callLocIdx = 1670; s.pc = 2; return s.tmp_2; + case 2: + r0 = s.retval; s.tmp_1 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); - r0 = pxsim_pxtrt.mklocRef(); - s.tokenKind___191265 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.tokenKind___191265, 0); - r0 = pxsim_pxtcore_mkAction(13, consumeToken_inline__P191269); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.token___191264); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.tokenKind___191265); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.octave___191123); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 3, s.duration___191122); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 4, s.ms___191129); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 5, s.tempo___191124); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 6, s.hz___191125); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 7, s.soundWave___191139); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 8, s.envA___191135); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 9, s.envD___191136); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 10, s.envS___191137); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 11, s.envR___191138); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 12, s.endHz___191126); - s.consumeToken___191268 = (s.tmp_0); - case 3: - r0 = pxsim_numops_toBoolDecr(true); - if (!r0) { step = 58; continue; } - s.tmp_0 = lambda_1_mk(s); - s.tmp_0.argL = s.scanNextWord___191207; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 116; s.pc = 62; return s.tmp_0; - case 62: + r0 = (s.tmp_0).fields["color"] = (s.tmp_1); + r0 = s.p___190818; + return leave(s, r0) + default: oops() +} } } +particles_ShapeFactory_createParticle__P169744.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__P169744_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_ShapeFactory_createParticle__P169744, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + p___190818: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function particles_ShapeFactory_drawParticle__P169743(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + s.pImage___190832 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, particles_ShapeFactory__C169740_VT)) failedCast(r0); + s.tmp_1 = Math_FastRandom_pickRandom__P169591_mk(s); + r0 = s.arg0.fields["galois"]; + s.tmp_1.arg0 = r0; + r0 = s.arg0.fields["sources"]; + s.tmp_1.arg1 = r0; + s.callLocIdx = 1664; s.pc = 1; return s.tmp_1; + case 1: r0 = s.retval; - s.currNote___191344 = (r0); - s.prevNote___191346 = (false); - r0 = pxsim_numops_toBoolDecr(s.currNote___191344); + s.tmp_0 = r0; + r0 = pxsim_ImageMethods.clone(s.tmp_0); + s.pImage___190832 = (r0); + r0 = s.arg1.fields["color"]; + s.tmp_0 = r0; + r0 = pxsim_ImageMethods.replace(s.pImage___190832, 15, s.tmp_0); + s.tmp_0 = r0 = globals.screen___168559; + s.tmp_1 = r0 = s.pImage___190832; + r0 = s.arg0.fields["ox"]; + s.tmp_4 = r0; + r0 = (s.arg2 - s.tmp_4); + s.tmp_3 = r0; + r0 = (s.tmp_3 + 128); + s.tmp_5 = r0; + r0 = (s.tmp_5 >> 8); + s.tmp_2 = r0; + r0 = s.arg0.fields["oy"]; + s.tmp_8 = r0; + r0 = (s.arg3 - s.tmp_8); + s.tmp_7 = r0; + r0 = (s.tmp_7 + 128); + s.tmp_9 = r0; + r0 = (s.tmp_9 >> 8); + s.tmp_6 = r0; + r0 = pxsim_ImageMethods.drawTransparentImage(s.tmp_0, s.tmp_1, s.tmp_2, s.tmp_6); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +particles_ShapeFactory_drawParticle__P169743.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__P169743_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_ShapeFactory_drawParticle__P169743, depth: s.depth + 1, + pc: 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, + pImage___190832: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, +} } + + + + + +function Math_FastRandom_pickRandom__P169591(s) { +let r0 = s.r0, 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, Math_FastRandom__C169586_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(s.arg1); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 8; continue; } - r0 = (s.timePos___191130 - s.now___191134); - s.timeLeft___191349 = (r0); - r0 = (s.timeLeft___191349 > 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - s.tmp_1 = pause__P166940_mk(s); - s.tmp_1.arg0 = s.timeLeft___191349; - s.callLocIdx = 117; s.pc = 63; return s.tmp_1; - case 63: - r0 = s.retval; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + r0 = pxsim_Array__length(s.arg1); + s.tmp_2 = r0; + r0 = (s.tmp_2 == 0); + case 2: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 3; continue; } + r0 = undefined; + { step = 5; continue; } + case 3: case 4: + s.tmp_4 = r0 = s.arg1; + s.tmp_6 = Math_FastRandom_randomRange__P169590_mk(s); + s.tmp_6.arg0 = s.arg0; + s.tmp_6.arg1 = 0; + r0 = pxsim_Array__length(s.arg1); + s.tmp_7 = r0; + r0 = (s.tmp_7 - 1); + s.tmp_6.arg2 = r0; + s.callLocIdx = 1393; s.pc = 6; return s.tmp_6; + case 6: + r0 = s.retval; + s.tmp_5 = r0; + r0 = pxsim_Array__getAt(s.tmp_4, s.tmp_5); case 5: - r0 = s.arg0.fields["onPlayFinished"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 6; continue; } - s.tmp_1 = if_onPlayFinished_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, "onPlayFinished"), 1); - s.callLocIdx = 118; s.pc = 64; return s.tmp_1; - } else { - s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["onPlayFinished"]; - if (s.tmp_1.fn == null) { setupLambda(s.tmp_1, s.tmp_1.arg0.fields["onPlayFinished"], 1); s.callLocIdx = 118; s.pc = 64; return s.tmp_1; } - else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 118; s.pc = 64; return s.tmp_1;; } - else { s.callLocIdx = 118; s.pc = 64; return s.tmp_1; } + return leave(s, r0) + default: oops() +} } } +Math_FastRandom_pickRandom__P169591.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__P169591_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Math_FastRandom_pickRandom__P169591, depth: s.depth + 1, + pc: 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 particles_AreaFactory_drawParticle__P169731(s) { +let r0 = s.r0, 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.col___190878 = 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; } - case 64: - r0 = s.retval; - case 6: - case 7: - { step = 59; continue; } - case 8: - case 9: - r0 = pxsim_pxtrt_stlocRef(s.hz___191125, -1); - s.note___191363 = (0); - s.tmp_0 = r0 = s.token___191264; - r0 = pxsim_String_.mkEmpty(); + r0 = s.arg0; + if (!checkSubtype(r0, particles_AreaFactory__C169724_VT)) failedCast(r0); + r0 = s.arg1.fields["lifespan"]; s.tmp_1 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); - r0 = pxsim_pxtrt_stlocRef(s.tokenKind___191265, 0); - s.i___191367 = (0); - case 10: - s.tmp_1 = r0 = s.i___191367; - r0 = pxsim_String_.length(s.currNote___191344); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); + r0 = (s.tmp_1 > 500); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 41; continue; } - r0 = pxsim_String_.charAt(s.currNote___191344, s.i___191367); - s.noteChar___191373 = (r0); - s.tmp_0 = r0 = s.noteChar___191373; - r0 = pxsim_pxtcore.switch_eq("c", s.tmp_0); - if (r0) { step = 11; continue; } - r0 = pxsim_pxtcore.switch_eq("C", s.tmp_0); - if (r0) { step = 12; continue; } - r0 = pxsim_pxtcore.switch_eq("d", s.tmp_0); - if (r0) { step = 13; continue; } - r0 = pxsim_pxtcore.switch_eq("D", s.tmp_0); - if (r0) { step = 14; continue; } - r0 = pxsim_pxtcore.switch_eq("e", s.tmp_0); - if (r0) { step = 15; continue; } - r0 = pxsim_pxtcore.switch_eq("E", s.tmp_0); - if (r0) { step = 16; continue; } - r0 = pxsim_pxtcore.switch_eq("f", s.tmp_0); - if (r0) { step = 17; continue; } - r0 = pxsim_pxtcore.switch_eq("F", s.tmp_0); - if (r0) { step = 18; continue; } - r0 = pxsim_pxtcore.switch_eq("g", s.tmp_0); - if (r0) { step = 19; continue; } - r0 = pxsim_pxtcore.switch_eq("G", s.tmp_0); - if (r0) { step = 20; continue; } - r0 = pxsim_pxtcore.switch_eq("a", s.tmp_0); - if (r0) { step = 21; continue; } - r0 = pxsim_pxtcore.switch_eq("A", s.tmp_0); - if (r0) { step = 22; continue; } - r0 = pxsim_pxtcore.switch_eq("B", s.tmp_0); - if (r0) { step = 23; continue; } - r0 = pxsim_pxtcore.switch_eq("r", s.tmp_0); - if (r0) { step = 24; continue; } - r0 = pxsim_pxtcore.switch_eq("R", s.tmp_0); - if (r0) { step = 25; continue; } - r0 = pxsim_pxtcore.switch_eq("#", s.tmp_0); - if (r0) { step = 26; continue; } - r0 = pxsim_pxtcore.switch_eq("b", s.tmp_0); - if (r0) { step = 27; continue; } - r0 = pxsim_pxtcore.switch_eq(",", s.tmp_0); - if (r0) { step = 30; continue; } - r0 = pxsim_pxtcore.switch_eq("!", s.tmp_0); - if (r0) { step = 31; continue; } - r0 = pxsim_pxtcore.switch_eq("@", s.tmp_0); - if (r0) { step = 32; continue; } - r0 = pxsim_pxtcore.switch_eq("~", s.tmp_0); - if (r0) { step = 33; continue; } - r0 = pxsim_pxtcore.switch_eq(":", s.tmp_0); - if (r0) { step = 34; continue; } - r0 = pxsim_pxtcore.switch_eq("-", s.tmp_0); - if (r0) { step = 35; continue; } - r0 = pxsim_pxtcore.switch_eq("^", s.tmp_0); - if (r0) { step = 36; continue; } - r0 = s.tmp_0; - { step = 37; continue; } - case 11: - case 12: - s.note___191363 = (1); - s.prevNote___191346 = (true); - { step = 40; continue; } - case 13: - case 14: - s.note___191363 = (3); - s.prevNote___191346 = (true); - { step = 40; continue; } - case 15: - case 16: - s.note___191363 = (5); - s.prevNote___191346 = (true); - { step = 40; continue; } - case 17: - case 18: - s.note___191363 = (6); - s.prevNote___191346 = (true); - { step = 40; continue; } - case 19: - case 20: - s.note___191363 = (8); - s.prevNote___191346 = (true); - { step = 40; continue; } - case 21: - case 22: - s.note___191363 = (10); - s.prevNote___191346 = (true); - { step = 40; continue; } - case 23: - s.note___191363 = (12); - s.prevNote___191346 = (true); - { step = 40; continue; } - case 24: - case 25: - r0 = pxsim_pxtrt_stlocRef(s.hz___191125, 0); - s.prevNote___191346 = (false); - { step = 40; continue; } - case 26: - r0 = (s.note___191363 + 1); - s.note___191363 = (r0); - s.prevNote___191346 = (false); - { step = 40; continue; } - case 27: - r0 = pxsim_numops_toBoolDecr(s.prevNote___191346); - if (!r0) { step = 28; continue; } - r0 = (s.note___191363 - 1); - s.note___191363 = (r0); - { step = 29; continue; } - case 28: - s.note___191363 = (12); - s.prevNote___191346 = (true); - case 29: - { step = 40; continue; } - case 30: - s.tmp_0 = lambda_1_mk(s); - s.tmp_0.argL = s.consumeToken___191268; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 119; s.pc = 65; return s.tmp_0; - case 65: - r0 = s.retval; - s.prevNote___191346 = (false); - { step = 40; continue; } - case 31: - r0 = pxsim_pxtrt_stlocRef(s.tokenKind___191265, 4); - s.prevNote___191346 = (false); - { step = 40; continue; } - case 32: - s.tmp_0 = lambda_1_mk(s); - s.tmp_0.argL = s.consumeToken___191268; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 120; s.pc = 66; return s.tmp_0; - case 66: - r0 = s.retval; - r0 = pxsim_pxtrt_stlocRef(s.tokenKind___191265, 8); - s.prevNote___191346 = (false); - { step = 40; continue; } - case 33: - s.tmp_0 = lambda_1_mk(s); - s.tmp_0.argL = s.consumeToken___191268; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 121; s.pc = 67; return s.tmp_0; - case 67: - r0 = s.retval; - r0 = pxsim_pxtrt_stlocRef(s.tokenKind___191265, 7); - s.prevNote___191346 = (false); - { step = 40; continue; } - case 34: - s.tmp_0 = lambda_1_mk(s); - s.tmp_0.argL = s.consumeToken___191268; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 122; s.pc = 68; return s.tmp_0; - case 68: - r0 = s.retval; - r0 = pxsim_pxtrt_stlocRef(s.tokenKind___191265, 2); - s.prevNote___191346 = (false); - { step = 40; continue; } - case 35: - s.tmp_0 = lambda_1_mk(s); - s.tmp_0.argL = s.consumeToken___191268; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 123; s.pc = 69; return s.tmp_0; - case 69: - r0 = s.retval; - r0 = pxsim_pxtrt_stlocRef(s.tokenKind___191265, 3); - s.prevNote___191346 = (false); - { step = 40; continue; } - case 36: - s.tmp_0 = lambda_1_mk(s); - s.tmp_0.argL = s.consumeToken___191268; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 124; s.pc = 70; return s.tmp_0; - case 70: - r0 = s.retval; - r0 = pxsim_pxtrt_stlocRef(s.tokenKind___191265, 5); - { step = 40; continue; } - case 37: - r0 = pxsim_pxtrt_ldlocRef(s.tokenKind___191265); + if (!r0) { step = 1; continue; } + r0 = 4; + { step = 4; continue; } + case 1: + r0 = s.arg1.fields["lifespan"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 > 250); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 2; continue; } + r0 = 5; + { step = 3; continue; } + case 2: + r0 = 1; + case 3: + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = s.tmp_4; + case 4: + // jmp value (already in r0) + s.tmp_5 = r0; + s.col___190878 = (s.tmp_5); + s.tmp_0 = r0 = globals.screen___168559; + r0 = (s.arg2 + 128); + s.tmp_2 = r0; + r0 = (s.tmp_2 >> 8); s.tmp_1 = r0; - r0 = (s.tmp_1 == 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 38; continue; } - r0 = pxsim_pxtrt_stlocRef(s.tokenKind___191265, 1); - case 38: - case 39: - s.tmp_0 = r0 = s.token___191264; - r0 = pxsim_pxtrt_ldlocRef(s.token___191264); + r0 = (s.arg3 + 128); + s.tmp_4 = r0; + r0 = (s.tmp_4 >> 8); s.tmp_3 = r0; - if ((s.tmp_3) && (s.tmp_3).vtable) { - setupResume(s, 71); - pxsim_String__stringConv(s.tmp_3); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_3) + ""; } - case 71: + r0 = pxsim_ImageMethods.setPixel(s.tmp_0, s.tmp_1, s.tmp_3, s.col___190878); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +particles_AreaFactory_drawParticle__P169731.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__P169731_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_AreaFactory_drawParticle__P169731, depth: s.depth + 1, + pc: 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, + col___190878: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, +} } + + + + + +function particles_AreaFactory_createParticle__P169730(s) { +let r0 = s.r0, 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___190896 = 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__C169724_VT)) failedCast(r0); + s.tmp_0 = particles_SprayFactory_createParticle__P169720_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 1651; s.pc = 3; return s.tmp_0; + case 3: r0 = s.retval; - s.tmp_2 = r0; - if ((s.noteChar___191373) && (s.noteChar___191373).vtable) { - setupResume(s, 72); - pxsim_String__stringConv(s.noteChar___191373); - checkResumeConsumed(); - return; - } else { s.retval = (s.noteChar___191373) + ""; } - case 72: + s.p___190896 = (r0); + s.tmp_0 = r0 = s.p___190896; + s.tmp_2 = Math_FastRandom_randomRange__P169590_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 = 1652; s.pc = 4; return s.tmp_2; + case 4: r0 = s.retval; - s.tmp_4 = r0; - r0 = pxsim_String__concat(s.tmp_2, s.tmp_4); s.tmp_1 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); - s.prevNote___191346 = (false); - case 40: - r0 = (s.i___191367 + 1); - s.i___191367 = (r0); - { step = 10; continue; } - case 41: - s.tmp_0 = lambda_1_mk(s); - s.tmp_0.argL = s.consumeToken___191268; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 125; s.pc = 73; return s.tmp_0; - case 73: + r0 = (s.tmp_0).fields["lifespan"] = (s.tmp_1); + s.tmp_0 = r0 = s.p___190896; + s.tmp_4 = Math_FastRandom_randomRange__P169590_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 = 1653; s.pc = 5; return s.tmp_4; + case 5: r0 = s.retval; - s.tmp_0 = r0 = s.note___191363; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 42; continue; } - r0 = s.tmp_0; - { step = 43; continue; } - case 42: - r0 = pxsim_pxtrt_ldlocRef(s.hz___191125); - s.tmp_1 = r0; - r0 = (s.tmp_1 < 0); - case 43: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 46; continue; } - s.tmp_3 = r0 = s.note___191363; - r0 = pxsim_pxtrt_ldlocRef(s.octave___191123); + s.tmp_3 = r0; + r0 = s.arg0.fields["xRange"]; s.tmp_6 = r0; - r0 = (s.tmp_6 - 1); + r0 = (s.tmp_6 >> 1); s.tmp_5 = r0; - r0 = (12 * s.tmp_5); - s.tmp_4 = r0; - r0 = (s.tmp_3 + s.tmp_4); - s.keyNumber___191447 = (r0); - s.tmp_1 = r0 = globals.freqs___171984; - r0 = (s.keyNumber___191447 * 2); + r0 = (s.tmp_3 - s.tmp_5); s.tmp_2 = r0; - r0 = pxsim.BufferMethods.getNumber(s.tmp_1, 4, s.tmp_2); + r0 = s.p___190896.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 = 1656; s.pc = 6; return s.tmp_1; } + } + case 6: + r0 = s.retval; s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 44; continue; } - r0 = s.tmp_0; - { step = 45; continue; } - case 44: + 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 = 1657; 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 45: + case 2: // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_pxtrt_stlocRef(s.hz___191125, s.tmp_3); - case 46: - case 47: - r0 = pxsim_pxtrt_ldlocRef(s.ms___191129); - s.currMs___191464 = (r0); - r0 = (s.currMs___191464 <= 0); + s.tmp_4 = r0; + s.tmp_5 = r0 = s.p___190896; + s.tmp_9 = Math_FastRandom_randomRange__P169590_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 = 1655; 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___190896.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___190896; + return leave(s, r0) + default: oops() +} } } +particles_AreaFactory_createParticle__P169730.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__P169730_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_AreaFactory_createParticle__P169730, depth: s.depth + 1, + pc: 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___190896: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function Fx_iadd__P166685(s) { +let r0 = s.r0, 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 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 48; continue; } - r0 = pxsim_pxtrt_ldlocRef(s.tempo___191124); + r0 = (s.tmp_0 + s.arg1); + return leave(s, r0) + default: oops() +} } } +Fx_iadd__P166685.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__P166685_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Fx_iadd__P166685, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function particles_SprayFactory_drawParticle__P169721(s) { +let r0 = s.r0, 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, particles_SprayFactory__C169718_VT)) failedCast(r0); + s.tmp_0 = r0 = globals.screen___168559; + r0 = (s.arg2 + 128); + s.tmp_2 = r0; + r0 = (s.tmp_2 >> 8); s.tmp_1 = r0; - r0 = pxsim.Math_.idiv(15000, s.tmp_1); - s.beat___191468 = (r0); - r0 = pxsim_pxtrt_ldlocRef(s.duration___191122); - s.tmp_0 = r0; - r0 = (s.tmp_0 * s.beat___191468); - s.currMs___191464 = (r0); - case 48: - case 49: - r0 = pxsim_pxtrt_ldlocRef(s.hz___191125); + r0 = (s.arg3 + 128); + s.tmp_4 = r0; + r0 = (s.tmp_4 >> 8); + s.tmp_3 = r0; + r0 = pxsim_ImageMethods.setPixel(s.tmp_0, s.tmp_1, s.tmp_3, 1); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +particles_SprayFactory_drawParticle__P169721.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__P169721_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_SprayFactory_drawParticle__P169721, depth: s.depth + 1, + pc: 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_SprayFactory_createParticle__P169720(s) { +let r0 = s.r0, 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___190963 = undefined; + s.angle___190967 = 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__C169718_VT)) failedCast(r0); + s.tmp_0 = particles_ParticleFactory_createParticle__P169716_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 1640; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + s.p___190963 = (r0); + r0 = s.arg0.fields["minAngle"]; s.tmp_1 = r0; - r0 = (s.tmp_1 < 0); + s.tmp_3 = Math_FastRandom_randomRange__P169590_mk(s); + s.tmp_3.arg0 = globals.galois___172813; + s.tmp_3.arg1 = 0; + r0 = s.arg0.fields["spread"]; + s.tmp_3.arg2 = r0; + s.callLocIdx = 1641; 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 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 50; continue; } - { step = 55; continue; } - case 50: - r0 = pxsim_pxtrt_ldlocRef(s.hz___191125); + r0 = (s.tmp_0 % 100); + s.angle___190967 = (r0); + s.tmp_0 = r0 = s.p___190963; + r0 = pxsim_Array__getAt(globals.cachedSin___172808, s.angle___190967); + s.tmp_2 = r0; + r0 = s.arg0.fields["speed"]; s.tmp_3 = r0; - r0 = (s.tmp_3 == 0); + 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___190963; + r0 = pxsim_Array__getAt(globals.cachedCos___172809, s.angle___190967); + 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___190963; + return leave(s, r0) + default: oops() +} } } +particles_SprayFactory_createParticle__P169720.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__P169720_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_SprayFactory_createParticle__P169720, depth: s.depth + 1, + pc: 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___190963: undefined, + angle___190967: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function effects_ScreenEffect_startScreenEffect__P169795(s) { +let r0 = s.r0, 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, effects_ScreenEffect__C169793_VT)) failedCast(r0); + r0 = s.arg0.fields["sourceFactory"]; s.tmp_2 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 51; continue; } - r0 = (s.timePos___191130 + s.currMs___191464); - s.timePos___191130 = (r0); - { step = 54; continue; } - case 51: - r0 = pxsim_pxtrt_ldlocRef(s.endHz___191126); s.tmp_1 = r0; - r0 = (s.tmp_1 < 0); + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 52; continue; } - s.tmp_2 = r0 = s.endHz___191126; - r0 = pxsim_pxtrt_ldlocRef(s.hz___191125); + if (!r0) { step = 1; continue; } + { step = 13; continue; } + case 1: + case 2: + r0 = s.arg0.fields["source"]; s.tmp_3 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_2, s.tmp_3); - case 52: - case 53: - r0 = pxsim_pxtrt_stlocRef(s.sndInstrPtr___191146, 0); - s.tmp_0 = lambda_5_mk(s); - s.tmp_0.argL = s.addForm___191147; - r0 = pxsim_pxtrt_ldlocRef(s.envA___191135); - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = 0; - s.tmp_0.arg2 = 255; - s.tmp_0.arg3 = 0; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 126; s.pc = 74; return s.tmp_0; - case 74: - r0 = s.retval; - s.tmp_0 = lambda_5_mk(s); - s.tmp_0.argL = s.addForm___191147; - r0 = pxsim_pxtrt_ldlocRef(s.envD___191136); - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = 255; - r0 = pxsim_pxtrt_ldlocRef(s.envS___191137); - s.tmp_0.arg2 = r0; - r0 = pxsim_pxtrt_ldlocRef(s.envA___191135); - s.tmp_0.arg3 = r0; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 127; s.pc = 75; return s.tmp_0; - case 75: + r0 = pxsim_numops_toBool(s.tmp_3); + if (r0) { step = 3; continue; } + r0 = s.tmp_3; + { step = 4; continue; } + case 3: + s.tmp_4 = particles_ParticleSource_enabled__P169690_mk(s); + r0 = s.arg0.fields["source"]; + s.tmp_4.arg0 = r0; + s.callLocIdx = 1682; s.pc = 14; return s.tmp_4; + case 14: r0 = s.retval; - s.tmp_0 = lambda_5_mk(s); - s.tmp_0.argL = s.addForm___191147; - s.tmp_1 = r0 = s.currMs___191464; - r0 = pxsim_pxtrt_ldlocRef(s.envA___191135); - s.tmp_3 = r0; - r0 = pxsim_pxtrt_ldlocRef(s.envD___191136); - s.tmp_4 = r0; - r0 = (s.tmp_3 + s.tmp_4); - s.tmp_2 = r0; - r0 = (s.tmp_1 - s.tmp_2); - s.tmp_0.arg0 = r0; - r0 = pxsim_pxtrt_ldlocRef(s.envS___191137); - s.tmp_0.arg1 = r0; - r0 = pxsim_pxtrt_ldlocRef(s.envS___191137); - s.tmp_0.arg2 = r0; - r0 = pxsim_pxtrt_ldlocRef(s.envD___191136); + case 4: + // jmp value (already in r0) s.tmp_5 = r0; - r0 = pxsim_pxtrt_ldlocRef(s.envA___191135); + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + if (!r0) { step = 7; continue; } + r0 = pxsim_numops_toBoolDecr(s.arg1); + if (!r0) { step = 5; continue; } + r0 = s.arg0.fields["source"]; s.tmp_6 = r0; - r0 = (s.tmp_5 + s.tmp_6); - s.tmp_0.arg3 = r0; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 128; s.pc = 76; return s.tmp_0; - case 76: + r0 = (s.tmp_6).fields["lifespan"] = (s.arg1); + case 5: + case 6: + { step = 13; continue; } + case 7: + case 8: + s.tmp_0 = effects_ScreenEffect_endScreenEffect__P169796_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1683; s.pc = 15; return s.tmp_0; + case 15: r0 = s.retval; - s.tmp_0 = lambda_5_mk(s); - s.tmp_0.argL = s.addForm___191147; - r0 = pxsim_pxtrt_ldlocRef(s.envR___191138); - s.tmp_0.arg0 = r0; - r0 = pxsim_pxtrt_ldlocRef(s.envS___191137); - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = 0; - s.tmp_0.arg3 = s.currMs___191464; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 129; s.pc = 77; return s.tmp_0; - case 77: + r0 = pxsim_pxtcore_mkClassInstance(effects_SceneAnchor__C172841_VT); + s.tmp_0 = r0; + s.tmp_1 = effects_SceneAnchor_constructor__P172846_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 1684; s.pc = 16; return s.tmp_1; + case 16: r0 = s.retval; - s.tmp_0 = music_MelodyPlayer_queuePlayInstructions__P172000_mk(s); - s.tmp_0.arg0 = s.arg0; - r0 = (s.timePos___191130 - s.now___191134); - s.tmp_0.arg1 = r0; - s.tmp_1 = r0 = s.sndInstr___191140; - r0 = pxsim_pxtrt_ldlocRef(s.sndInstrPtr___191146); + r0 = pxsim_numops_toBoolDecr(s.arg2); + if (!r0) { step = 9; continue; } + r0 = s.arg2; + { step = 10; continue; } + case 9: + r0 = s.arg0.fields["sceneDefaultRate"]; + case 10: + // jmp value (already in r0) s.tmp_2 = r0; - r0 = pxsim.BufferMethods.slice(s.tmp_1, 0, s.tmp_2); - s.tmp_0.arg2 = r0; - s.callLocIdx = 130; s.pc = 78; return s.tmp_0; - case 78: + s.tmp_3 = r0 = s.arg0; + s.tmp_5 = if_sourceFactory_3_mk(s); + s.tmp_5.arg0 = s.arg0; + s.tmp_5.arg1 = s.tmp_0; + s.tmp_5.arg2 = s.tmp_2; + if (!s.tmp_5.arg0.vtable.iface) { + setupLambda(s.tmp_5, pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "sourceFactory"), 3); + s.callLocIdx = 1685; s.pc = 17; return s.tmp_5; + } else { + s.tmp_5.fn = s.tmp_5.arg0.vtable.iface["sourceFactory"]; + if (s.tmp_5.fn == null) { setupLambda(s.tmp_5, s.tmp_5.arg0.fields["sourceFactory"], 3); s.callLocIdx = 1685; s.pc = 17; return s.tmp_5; } + else if (s.tmp_5.fn.isGetter) { s.tmp_5.stage2Call = true; s.callLocIdx = 1685; s.pc = 17; return s.tmp_5;; } + else { s.callLocIdx = 1685; s.pc = 17; return s.tmp_5; } + } + case 17: r0 = s.retval; - r0 = pxsim_pxtrt_stlocRef(s.endHz___191126, -1); - r0 = (s.timePos___191130 + s.currMs___191464); - s.timePos___191130 = (r0); - case 54: - case 55: - r0 = (s.timePos___191130 - s.now___191134); - s.timeLeft___191525 = (r0); - r0 = (s.timeLeft___191525 > 200); + s.tmp_4 = r0; + r0 = (s.tmp_3).fields["source"] = (s.tmp_4); + r0 = s.arg0.fields["source"]; + s.tmp_0 = r0; + r0 = (s.tmp_0).fields["priority"] = (10); + r0 = pxsim_numops_toBoolDecr(s.arg1); + if (!r0) { step = 11; continue; } + r0 = s.arg0.fields["source"]; + s.tmp_0 = r0; + r0 = (s.tmp_0).fields["lifespan"] = (s.arg1); + case 11: + case 12: + case 13: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +effects_ScreenEffect_startScreenEffect__P169795.info = {"start":3680,"length":601,"line":97,"column":8,"endLine":112,"endColumn":9,"fileName":"pxt_modules/game/particleeffects.ts","functionName":"startScreenEffect","argumentNames":["this","duration","particlesPerSecond"]} + +function effects_ScreenEffect_startScreenEffect__P169795_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: effects_ScreenEffect_startScreenEffect__P169795, depth: s.depth + 1, + pc: 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 effects_SceneAnchor_constructor__P172846(s) { +let r0 = s.r0, 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, effects_SceneAnchor__C172841_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1678; s.pc = 1; return s.tmp_2; + case 1: + r0 = s.retval; + r0 = r0.fields["camera"]; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["camera"] = (s.tmp_1); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +effects_SceneAnchor_constructor__P172846.info = {"start":2296,"length":79,"line":55,"column":8,"endLine":57,"endColumn":9,"fileName":"pxt_modules/game/particleeffects.ts","functionName":"inline","argumentNames":["this"]} + +function effects_SceneAnchor_constructor__P172846_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: effects_SceneAnchor_constructor__P172846, 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 effects_ScreenEffect_endScreenEffect__P169796(s) { +let r0 = s.r0, 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, effects_ScreenEffect__C169793_VT)) failedCast(r0); + r0 = s.arg0.fields["source"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 56; continue; } - s.tmp_1 = pause__P166940_mk(s); - r0 = (s.timeLeft___191525 - 100); + if (!r0) { step = 1; continue; } + s.tmp_1 = particles_ParticleSource_destroy__P169692_mk(s); + r0 = s.arg0.fields["source"]; s.tmp_1.arg0 = r0; - s.callLocIdx = 131; s.pc = 79; return s.tmp_1; - case 79: + s.callLocIdx = 1686; s.pc = 3; return s.tmp_1; + case 3: r0 = s.retval; - r0 = pxsim.control.millis(); + r0 = (s.arg0).fields["source"] = (undefined); + case 1: + case 2: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +effects_ScreenEffect_endScreenEffect__P169796.info = {"start":4677,"length":160,"line":122,"column":8,"endLine":127,"endColumn":9,"fileName":"pxt_modules/game/particleeffects.ts","functionName":"endScreenEffect","argumentNames":["this"]} + +function effects_ScreenEffect_endScreenEffect__P169796_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: effects_ScreenEffect_endScreenEffect__P169796, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + arg0: undefined, +} } + + + + + +function Render_Animations_constructor__P171808(s) { +let r0 = s.r0, 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, Render_Animations__C171807_VT)) failedCast(r0); + r0 = (s.arg0).fields["frameInterval"] = (s.arg1); + r0 = (s.arg0).fields["animations"] = (s.arg2); + r0 = (s.arg0).fields["msLast"] = (0); + r0 = (s.arg0).fields["index"] = (0); + r0 = (s.arg0).fields["iAnimation"] = (0); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +Render_Animations_constructor__P171808.info = {"start":460,"length":83,"line":21,"column":8,"endLine":22,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_blocks.ts","functionName":"inline","argumentNames":["this","frameInterval","animations"]} + +function Render_Animations_constructor__P171808_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Render_Animations_constructor__P171808, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, + arg1: undefined, + arg2: undefined, +} } + + + + + +function sprites_BaseSpriteSayRenderer_constructor__P168787(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, sprites_BaseSpriteSayRenderer__C168786_VT)) failedCast(r0); + r0 = (s.arg0).fields["text"] = (s.arg1); + r0 = (s.arg0).fields["fgColor"] = (s.arg2); + r0 = (s.arg0).fields["bgColor"] = (s.arg3); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +sprites_BaseSpriteSayRenderer_constructor__P168787.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__P168787_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: sprites_BaseSpriteSayRenderer_constructor__P168787, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, +} } + + + + + +function info_PlayerInfo_id__P169171(s) { +let r0 = s.r0, 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, info_PlayerInfo__C169144_VT)) failedCast(r0); + r0 = s.arg0.fields["impl"]; s.tmp_0 = r0; - r0 = (s.tmp_0 - s.startTime___191131); - s.now___191134 = (r0); - case 56: - case 57: - { step = 3; continue; } - case 58: - case 59: + r0 = s.tmp_0.fields["_player"]; + return leave(s, r0) + default: oops() +} } } +info_PlayerInfo_id__P169171.info = {"start":27670,"length":59,"line":921,"column":8,"endLine":923,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"id","argumentNames":["this"]} + +function info_PlayerInfo_id__P169171_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: info_PlayerInfo_id__P169171, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function info_PlayerInfo_y__P169165(s) { +let r0 = s.r0, 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, info_PlayerInfo__C169144_VT)) failedCast(r0); + r0 = s.arg0.fields["impl"]; + s.tmp_0 = r0; + r0 = (s.tmp_0).fields["y"] = (s.arg1); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +info_PlayerInfo_y__P169165.info = {"start":27116,"length":65,"line":895,"column":8,"endLine":897,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"y","argumentNames":["this","value"]} + +function info_PlayerInfo_y__P169165_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: info_PlayerInfo_y__P169165, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function info_PlayerInfo_y__P169164(s) { +let r0 = s.r0, 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, info_PlayerInfo__C169144_VT)) failedCast(r0); + r0 = s.arg0.fields["impl"]; + r0 = r0.fields["y"]; + return leaveAccessor(s, r0) + default: oops() +} } } +info_PlayerInfo_y__P169164.info = {"start":27047,"length":59,"line":891,"column":8,"endLine":893,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"y","argumentNames":["this"]} +info_PlayerInfo_y__P169164.isGetter = true; + +function info_PlayerInfo_y__P169164_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: info_PlayerInfo_y__P169164, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function info_PlayerInfo_x__P169163(s) { +let r0 = s.r0, 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, info_PlayerInfo__C169144_VT)) failedCast(r0); + r0 = s.arg0.fields["impl"]; + s.tmp_0 = r0; + r0 = (s.tmp_0).fields["x"] = (s.arg1); r0 = undefined; return leave(s, r0) default: oops() } } } -music_MelodyPlayer_play__P168169.info = {"start":11570,"length":9259,"line":356,"column":8,"endLine":590,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"play","argumentNames":["this","volume"]} +info_PlayerInfo_x__P169163.info = {"start":26972,"length":65,"line":887,"column":8,"endLine":889,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"x","argumentNames":["this","value"]} + +function info_PlayerInfo_x__P169163_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: info_PlayerInfo_x__P169163, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function info_PlayerInfo_x__P169162(s) { +let r0 = s.r0, 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, info_PlayerInfo__C169144_VT)) failedCast(r0); + r0 = s.arg0.fields["impl"]; + r0 = r0.fields["x"]; + return leaveAccessor(s, r0) + default: oops() +} } } +info_PlayerInfo_x__P169162.info = {"start":26903,"length":59,"line":883,"column":8,"endLine":885,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"x","argumentNames":["this"]} +info_PlayerInfo_x__P169162.isGetter = true; + +function info_PlayerInfo_x__P169162_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: info_PlayerInfo_x__P169162, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function info_PlayerInfoImpl_id__P169132(s) { +let r0 = s.r0, 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, info_PlayerInfoImpl__C169122_VT)) failedCast(r0); + r0 = s.arg0.fields["_player"]; + return leave(s, r0) + default: oops() +} } } +info_PlayerInfoImpl_id__P169132.info = {"start":21391,"length":57,"line":688,"column":8,"endLine":690,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"id","argumentNames":["this"]} -function music_MelodyPlayer_play__P168169_mk(s) { +function info_PlayerInfoImpl_id__P169132_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_MelodyPlayer_play__P168169, depth: s.depth + 1, + parent: s, fn: info_PlayerInfoImpl_id__P169132, depth: s.depth + 1, pc: 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, - notes___191117: undefined, - pos___191121: undefined, - duration___191122: undefined, - octave___191123: undefined, - tempo___191124: undefined, - hz___191125: undefined, - endHz___191126: undefined, - ms___191129: undefined, - timePos___191130: undefined, - startTime___191131: undefined, - now___191134: undefined, - envA___191135: undefined, - envD___191136: undefined, - envS___191137: undefined, - envR___191138: undefined, - soundWave___191139: undefined, - sndInstr___191140: undefined, - sndInstrPtr___191146: undefined, - addForm___191147: undefined, - scanNextWord___191207: undefined, - token___191264: undefined, - tokenKind___191265: undefined, - consumeToken___191268: undefined, - currNote___191344: undefined, - prevNote___191346: undefined, - timeLeft___191349: undefined, - note___191363: undefined, - i___191367: undefined, - noteChar___191373: undefined, - keyNumber___191447: undefined, - currMs___191464: undefined, - beat___191468: undefined, - timeLeft___191525: undefined, arg0: undefined, - arg1: undefined, } } -function addForm_inline__P191148(s) { +function effects_ImageEffect_startScreenEffect__P169821(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -53777,112 +59350,78 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.freqStart___191153 = undefined; - s.freqEnd___191155 = undefined; - s.envelopeWidth___191157 = undefined; - s.slope___191175 = undefined; + s.wasRunning___191812 = 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_pxtrt_ldlocRef(s.caps[0]); - s.freqStart___191153 = (r0); - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); - s.freqEnd___191155 = (r0); - r0 = pxsim_pxtrt_ldlocRef(s.caps[2]); + r0 = s.arg0; + if (!checkSubtype(r0, effects_ImageEffect__C169817_VT)) failedCast(r0); + s.tmp_4 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1699; s.pc = 8; return s.tmp_4; + case 8: + r0 = s.retval; + r0 = r0.fields["background"]; + s.tmp_3 = r0; + r0 = s.tmp_3.fields["_image"]; + s.tmp_8 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_8); + s.tmp_7 = r0; + r0 = pxsim_Boolean__bang(s.tmp_7); + s.tmp_6 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_6); + s.tmp_5 = r0; + r0 = pxsim_Boolean__bang(s.tmp_5); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; - r0 = (s.tmp_1 > 0); + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = pxsim_pxtrt_ldlocRef(s.caps[2]); - { step = 2; continue; } + { step = 7; continue; } case 1: - r0 = pxsim_pxtrt_ldlocRef(s.caps[3]); - s.tmp_3 = r0; - r0 = pxsim_pxtrt_ldlocRef(s.caps[4]); - s.tmp_5 = r0; - r0 = pxsim.Math_.idiv(15000, s.tmp_5); - s.tmp_4 = r0; - r0 = (s.tmp_3 * s.tmp_4); - s.tmp_2 = r0; - r0 = pxsim_pxtrt_ldlocRef(s.caps[5]); - s.tmp_6 = r0; - r0 = (s.tmp_2 + s.tmp_6); case 2: - // jmp value (already in r0) - s.tmp_7 = r0; - s.envelopeWidth___191157 = (s.tmp_7); - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_ldlocRef(s.caps[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 = 3; continue; } - r0 = s.tmp_0; + r0 = s.arg0.fields["times"]; + s.tmp_9 = r0; + r0 = (s.tmp_9 != undefined); + s.wasRunning___191812 = (r0); + r0 = pxsim_numops_toBoolDecr(s.arg1); + if (!r0) { step = 3; continue; } + r0 = s.arg1; { step = 4; continue; } case 3: - r0 = (s.envelopeWidth___191157 != 0); + r0 = 15; case 4: // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 5; continue; } - r0 = (s.freqEnd___191155 - s.freqStart___191153); - s.tmp_4 = r0; - r0 = (s.tmp_4 / s.envelopeWidth___191157); - s.slope___191175 = (r0); - r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); s.tmp_0 = r0; - r0 = (s.slope___191175 * s.arg3); + r0 = (s.arg0).fields["times"] = (s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.wasRunning___191812); s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.freqStart___191153 = (r0); - r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - s.tmp_2 = r0 = s.slope___191175; - r0 = (s.arg3 + s.arg0); - s.tmp_3 = r0; - r0 = (s.tmp_2 * s.tmp_3); - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.freqEnd___191155 = (r0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + r0 = pxsim_pxtcore_mkAction(2, effects_ImageEffect_startScreenEffect_inline__P191825); + s.tmp_2 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_2, 0, s.arg0); + r0 = pxsim_pxtrt_stclo(s.tmp_2, 1, s.arg2); + r0 = pxsim.control.runInParallel(s.tmp_2); case 5: case 6: - s.tmp_0 = r0 = s.caps[6]; - s.tmp_2 = music_addNote__P168163_mk(s); - s.tmp_2.arg0 = s.caps[7]; - r0 = pxsim_pxtrt_ldlocRef(s.caps[6]); - s.tmp_2.arg1 = r0; - s.tmp_2.arg2 = s.arg0; - s.tmp_2.arg3 = s.arg1; - s.tmp_2.arg4 = s.arg2; - r0 = pxsim_pxtrt_ldlocRef(s.caps[8]); - s.tmp_2.arg5 = r0; - s.tmp_2.arg6 = s.freqStart___191153; - r0 = pxsim_pxtrt_ldlocRef(s.caps[9]); - s.tmp_2.arg7 = r0; - s.tmp_2.arg8 = s.freqEnd___191155; - s.callLocIdx = 109; s.pc = 7; return s.tmp_2; case 7: - r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -addForm_inline__P191148.info = {"start":12378,"length":643,"line":382,"column":28,"endLine":393,"endColumn":13,"fileName":"pxt_modules/mixer/melody.ts","functionName":"inline","argumentNames":["formDuration","beg","end","msOff"]} +effects_ImageEffect_startScreenEffect__P169821.info = {"start":1457,"length":637,"line":41,"column":8,"endLine":56,"endColumn":9,"fileName":"pxt_modules/game/effects.ts","functionName":"startScreenEffect","argumentNames":["this","times","delay"]} -function addForm_inline__P191148_mk(s) { +function effects_ImageEffect_startScreenEffect__P169821_mk(s) { checkStack(s.depth); return { - parent: s, fn: addForm_inline__P191148, depth: s.depth + 1, + parent: s, fn: effects_ImageEffect_startScreenEffect__P169821, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -53892,21 +59431,19 @@ function addForm_inline__P191148_mk(s) { tmp_5: undefined, tmp_6: undefined, tmp_7: undefined, - freqStart___191153: undefined, - freqEnd___191155: undefined, - envelopeWidth___191157: undefined, - slope___191175: undefined, + tmp_8: undefined, + tmp_9: undefined, + wasRunning___191812: undefined, arg0: undefined, arg1: undefined, arg2: undefined, - arg3: undefined, } } -function scanNextWord_inline__P191208(s) { +function effects_ImageEffect_startScreenEffect_inline__P191825(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -53916,185 +59453,68 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.c___191217 = undefined; - s.note___191234 = undefined; - s.c___191240 = undefined; - r0 = s.caps[0].fields["melody"]; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + case 1: + r0 = s.caps[0].fields["times"]; s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = (s.tmp_1 > 0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = pxsim_String_.mkEmpty(); - { step = 23; continue; } - case 1: + if (!r0) { step = 4; continue; } + s.tmp_2 = effects_ImageEffect_change__P169820_mk(s); + s.tmp_2.arg0 = s.caps[0]; + s.tmp_3 = scene_backgroundImage__P169413_mk(s); + s.callLocIdx = 1701; s.pc = 6; return s.tmp_3; + case 6: + r0 = s.retval; + s.tmp_2.arg1 = r0; + s.callLocIdx = 1702; s.pc = 5; return s.tmp_2; + case 5: + r0 = s.retval; + r0 = pxsim_numops_toBoolDecr(s.caps[1]); + if (!r0) { step = 2; continue; } + r0 = s.caps[1]; + { step = 3; continue; } case 2: + r0 = s.caps[0].fields["preferredDelay"]; case 3: - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); - s.tmp_4 = r0; - r0 = pxsim_String_.length(s.caps[2]); - 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 = 12; continue; } - s.tmp_6 = r0 = s.caps[2]; - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); - s.tmp_7 = r0; - r0 = pxsim_String_.charAt(s.tmp_6, s.tmp_7); - s.c___191217 = (r0); - r0 = (s.c___191217 != " "); - 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 = (s.c___191217 != "\r"); - case 5: - // jmp value (already in r0) - 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.c___191217 != "\n"); - case 7: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = pxsim_numops_toBool(s.tmp_2); - if (r0) { step = 8; continue; } - r0 = s.tmp_2; - { step = 9; continue; } - case 8: - r0 = (s.c___191217 != "\t"); - case 9: // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 10; continue; } - { step = 12; continue; } - case 10: - case 11: - s.tmp_4 = r0 = s.caps[1]; - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); - s.tmp_6 = r0; - r0 = (s.tmp_6 + 1); - s.tmp_5 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_4, s.tmp_5); - { step = 3; continue; } - case 12: - r0 = pxsim_String_.mkEmpty(); - s.note___191234 = (r0); - case 13: - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); - s.tmp_1 = r0; - r0 = pxsim_String_.length(s.caps[2]); - 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 = 22; continue; } - s.tmp_3 = r0 = s.caps[2]; - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); - s.tmp_4 = r0; - r0 = pxsim_String_.charAt(s.tmp_3, s.tmp_4); - s.c___191240 = (r0); - r0 = (s.c___191240 == " "); s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 14; continue; } - r0 = s.tmp_0; - { step = 15; continue; } - case 14: - r0 = (s.c___191240 == "\r"); - case 15: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBool(s.tmp_1); - if (!r0) { step = 16; continue; } - r0 = s.tmp_1; - { step = 17; continue; } - case 16: - r0 = (s.c___191240 == "\n"); - case 17: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = pxsim_numops_toBool(s.tmp_2); - if (!r0) { step = 18; continue; } - r0 = s.tmp_2; - { step = 19; continue; } - case 18: - r0 = (s.c___191240 == "\t"); - case 19: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 20; continue; } - { step = 22; continue; } - case 20: - case 21: - if ((s.note___191234) && (s.note___191234).vtable) { - setupResume(s, 24); - pxsim_String__stringConv(s.note___191234); - checkResumeConsumed(); - return; - } else { s.retval = (s.note___191234) + ""; } - case 24: - r0 = s.retval; - s.tmp_4 = r0; - if ((s.c___191240) && (s.c___191240).vtable) { - setupResume(s, 25); - pxsim_String__stringConv(s.c___191240); - checkResumeConsumed(); - return; - } else { s.retval = (s.c___191240) + ""; } - case 25: + s.tmp_1 = pause__P166940_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 1703; s.pc = 7; return s.tmp_1; + case 7: r0 = s.retval; - s.tmp_5 = r0; - r0 = pxsim_String__concat(s.tmp_4, s.tmp_5); - s.note___191234 = (r0); - s.tmp_0 = r0 = s.caps[1]; - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + s.tmp_0 = r0 = s.caps[0]; + r0 = s.tmp_0.fields["times"]; s.tmp_2 = r0; - r0 = (s.tmp_2 + 1); + r0 = (s.tmp_2 - 1); s.tmp_1 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); - { step = 13; continue; } - case 22: - r0 = s.note___191234; - case 23: + r0 = (s.tmp_0).fields["times"] = (s.tmp_1); + { step = 1; continue; } + case 4: + r0 = (s.caps[0]).fields["times"] = (undefined); + r0 = undefined; return leave(s, r0) default: oops() } } } -scanNextWord_inline__P191208.info = {"start":13056,"length":708,"line":395,"column":33,"endLine":417,"endColumn":13,"fileName":"pxt_modules/mixer/melody.ts","functionName":"inline","argumentNames":[]} +effects_ImageEffect_startScreenEffect_inline__P191825.info = {"start":1764,"length":304,"line":47,"column":38,"endLine":54,"endColumn":17,"fileName":"pxt_modules/game/effects.ts","functionName":"inline","argumentNames":[]} -function scanNextWord_inline__P191208_mk(s) { +function effects_ImageEffect_startScreenEffect_inline__P191825_mk(s) { checkStack(s.depth); return { - parent: s, fn: scanNextWord_inline__P191208, depth: s.depth + 1, + parent: s, fn: effects_ImageEffect_startScreenEffect_inline__P191825, depth: s.depth + 1, pc: 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, - c___191217: undefined, - note___191234: undefined, - c___191240: undefined, } } -function consumeToken_inline__P191269(s) { +function scene_backgroundImage__P169413(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -54104,163 +59524,83 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.d___191275 = undefined; - r0 = pxsim_pxtrt_ldlocRef(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; } + s.scene___191844 = undefined; + s.tmp_0 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1170; s.pc = 1; return s.tmp_0; case 1: - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); - s.tmp_1 = r0; - r0 = (s.tmp_1 != 0); - case 2: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 15; continue; } - s.tmp_3 = parseInt__P166624_mk(s); - r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); - s.tmp_3.arg0 = r0; - s.tmp_3.arg1 = undefined; - s.callLocIdx = 110; s.pc = 17; return s.tmp_3; - case 17: - r0 = s.retval; - s.d___191275 = (r0); - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); - s.tmp_0 = r0; - r0 = pxsim_pxtcore.switch_eq(1, s.tmp_0); - if (r0) { step = 3; continue; } - r0 = pxsim_pxtcore.switch_eq(2, 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(6, s.tmp_0); - if (r0) { step = 7; continue; } - r0 = pxsim_pxtcore.switch_eq(7, s.tmp_0); - if (r0) { step = 8; continue; } - r0 = pxsim_pxtcore.switch_eq(8, s.tmp_0); - if (r0) { step = 9; continue; } - r0 = pxsim_pxtcore.switch_eq(9, s.tmp_0); - if (r0) { step = 10; continue; } - r0 = pxsim_pxtcore.switch_eq(10, 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(5, s.tmp_0); - if (r0) { step = 13; continue; } - r0 = s.tmp_0; - { step = 14; continue; } - case 3: - r0 = pxsim_pxtrt_stlocRef(s.caps[2], s.d___191275); - { step = 14; continue; } - case 4: - s.tmp_0 = r0 = s.caps[3]; - s.tmp_2 = Math_max__P166657_mk(s); - s.tmp_2.arg0 = 1; - s.tmp_3 = Math_min__P166658_mk(s); - s.tmp_3.arg0 = 16; - s.tmp_3.arg1 = s.d___191275; - s.callLocIdx = 111; s.pc = 19; return s.tmp_3; - case 19: - r0 = s.retval; - s.tmp_2.arg1 = r0; - s.callLocIdx = 112; s.pc = 18; return s.tmp_2; - case 18: - r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); - r0 = pxsim_pxtrt_stlocRef(s.caps[4], -1); - { step = 14; continue; } - case 5: - s.tmp_0 = r0 = s.caps[5]; - s.tmp_2 = Math_max__P166657_mk(s); - s.tmp_2.arg0 = 1; - s.tmp_2.arg1 = s.d___191275; - s.callLocIdx = 113; s.pc = 20; return s.tmp_2; - case 20: - r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); - { step = 14; continue; } - case 6: - r0 = pxsim_pxtrt_stlocRef(s.caps[6], s.d___191275); - r0 = pxsim_pxtrt_stlocRef(s.caps[1], 6); - { step = 14; continue; } - case 7: - r0 = pxsim_pxtrt_stlocRef(s.caps[4], s.d___191275); - { step = 14; continue; } - case 8: - s.tmp_0 = r0 = s.caps[7]; - s.tmp_2 = Math_clamp__P166654_mk(s); - s.tmp_2.arg0 = 1; - s.tmp_2.arg1 = 18; - s.tmp_2.arg2 = s.d___191275; - s.callLocIdx = 114; s.pc = 21; return s.tmp_2; - case 21: - r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); - { step = 14; continue; } - case 9: - r0 = pxsim_pxtrt_stlocRef(s.caps[8], s.d___191275); - r0 = pxsim_pxtrt_stlocRef(s.caps[1], 9); - { step = 14; continue; } - case 10: - r0 = pxsim_pxtrt_stlocRef(s.caps[9], s.d___191275); - r0 = pxsim_pxtrt_stlocRef(s.caps[1], 10); - { step = 14; continue; } - case 11: - s.tmp_0 = r0 = s.caps[10]; - s.tmp_2 = Math_clamp__P166654_mk(s); - s.tmp_2.arg0 = 0; - s.tmp_2.arg1 = 255; - s.tmp_2.arg2 = s.d___191275; - s.callLocIdx = 115; s.pc = 22; return s.tmp_2; - case 22: r0 = s.retval; + s.scene___191844 = (r0); + s.tmp_0 = scene_Background_image__P169202_mk(s); + r0 = s.scene___191844.fields["background"]; + s.tmp_0.arg0 = r0; + s.callLocIdx = 1171; s.pc = 2; return s.tmp_0; + case 2: + r0 = s.retval; + return leave(s, r0) + default: oops() +} } } +scene_backgroundImage__P169413.info = {"start":2297,"length":130,"line":90,"column":4,"endLine":93,"endColumn":5,"fileName":"pxt_modules/game/scenes.ts","functionName":"backgroundImage","argumentNames":[]} + +function scene_backgroundImage__P169413_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: scene_backgroundImage__P169413, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + scene___191844: undefined, +} } + + + + + +function scene_Background_hasBackgroundImage__P169204(s) { +let r0 = s.r0, 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_Background__C169196_VT)) failedCast(r0); + r0 = s.arg0.fields["_image"]; + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); s.tmp_1 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); - r0 = pxsim_pxtrt_stlocRef(s.caps[1], 11); - { step = 14; continue; } - case 12: - r0 = pxsim_pxtrt_stlocRef(s.caps[11], s.d___191275); - { step = 14; continue; } - case 13: - r0 = pxsim_pxtrt_stlocRef(s.caps[12], s.d___191275); - case 14: - s.tmp_0 = r0 = s.caps[0]; - r0 = pxsim_String_.mkEmpty(); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); - case 15: - case 16: - 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() } } } -consumeToken_inline__P191269.info = {"start":15050,"length":1189,"line":456,"column":33,"endLine":477,"endColumn":13,"fileName":"pxt_modules/mixer/melody.ts","functionName":"inline","argumentNames":[]} +scene_Background_hasBackgroundImage__P169204.info = {"start":1081,"length":75,"line":44,"column":8,"endLine":46,"endColumn":9,"fileName":"pxt_modules/game/background.ts","functionName":"hasBackgroundImage","argumentNames":["this"]} -function consumeToken_inline__P191269_mk(s) { +function scene_Background_hasBackgroundImage__P169204_mk(s) { checkStack(s.depth); return { - parent: s, fn: consumeToken_inline__P191269, depth: s.depth + 1, + parent: s, fn: scene_Background_hasBackgroundImage__P169204, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - d___191275: undefined, + arg0: undefined, } } -function music_MelodyPlayer_queuePlayInstructions__P172000(s) { +function scene_Renderable___visible__P169329(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -54272,34 +59612,42 @@ 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_MelodyPlayer__C168164_VT)) failedCast(r0); - r0 = pxsim.music.queuePlayInstructions(s.arg1, s.arg2); - r0 = undefined; + if (!checkSubtype(r0, scene_Renderable__C169327_VT)) failedCast(r0); + s.tmp_0 = if_shouldBeVisible_1_mk(s); + s.tmp_0.arg0 = s.arg0; + if (!s.tmp_0.arg0.vtable.iface) { + setupLambda(s.tmp_0, pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "shouldBeVisible"), 1); + s.callLocIdx = 1131; s.pc = 1; return s.tmp_0; + } else { + s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["shouldBeVisible"]; + if (s.tmp_0.fn == null) { setupLambda(s.tmp_0, s.tmp_0.arg0.fields["shouldBeVisible"], 1); s.callLocIdx = 1131; s.pc = 1; return s.tmp_0; } + else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 1131; s.pc = 1; return s.tmp_0;; } + else { s.callLocIdx = 1131; s.pc = 1; return s.tmp_0; } + } + case 1: + r0 = s.retval; return leave(s, r0) default: oops() } } } -music_MelodyPlayer_queuePlayInstructions__P172000.info = {"start":11435,"length":125,"line":352,"column":8,"endLine":354,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"queuePlayInstructions","argumentNames":["this","timeDelta","buf"]} +scene_Renderable___visible__P169329.info = {"start":305,"length":75,"line":10,"column":8,"endLine":12,"endColumn":9,"fileName":"pxt_modules/game/renderable.ts","functionName":"__visible","argumentNames":["this"]} -function music_MelodyPlayer_queuePlayInstructions__P172000_mk(s) { +function scene_Renderable___visible__P169329_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_MelodyPlayer_queuePlayInstructions__P172000, depth: s.depth + 1, + parent: s, fn: scene_Renderable___visible__P169329, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function parseInt__P166624(s) { +function sprites_SpriteSet_toString__P169001(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -54309,313 +59657,53 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.start___191562 = undefined; - s.sign___191592 = undefined; - s.output___191637 = undefined; - s.hasDigit___191638 = undefined; - s.i___191639 = undefined; - s.code___191646 = undefined; - s.val___191653 = undefined; 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 = 6; continue; } - case 1: - r0 = (s.arg1 != null); - s.tmp_2 = r0; - r0 = pxsim_numops_toBool(s.tmp_2); - if (r0) { step = 2; continue; } - r0 = s.tmp_2; - { step = 5; continue; } - case 2: - r0 = (s.arg1 < 2); - s.tmp_3 = r0; - r0 = pxsim_numops_toBool(s.tmp_3); - if (!r0) { step = 3; continue; } - r0 = s.tmp_3; - { step = 4; continue; } - case 3: - r0 = (s.arg1 > 36); - case 4: - // jmp value (already in r0) - s.tmp_4 = r0; - r0 = s.tmp_4; - case 5: - // jmp value (already in r0) - s.tmp_5 = r0; - r0 = s.tmp_5; - case 6: - // jmp value (already in r0) - s.tmp_6 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_6); - if (!r0) { step = 7; continue; } - r0 = NaN; - { step = 46; continue; } - case 7: - case 8: - s.start___191562 = (0); - case 9: - s.tmp_1 = r0 = s.start___191562; - r0 = pxsim_String_.length(s.arg0); - 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 = 10; continue; } - r0 = s.tmp_0; - { step = 11; continue; } - case 10: - s.tmp_3 = helpers_isWhitespace__P166651_mk(s); - r0 = pxsim_String_.charCodeAt(s.arg0, s.start___191562); - s.tmp_3.arg0 = r0; - s.callLocIdx = 0; s.pc = 47; return s.tmp_3; - case 47: - r0 = s.retval; - case 11: - // jmp value (already in r0) - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - if (!r0) { step = 12; continue; } - r0 = (s.start___191562 + 1); - s.start___191562 = (r0); - { step = 9; continue; } - case 12: - s.tmp_1 = r0 = s.start___191562; - 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 = 13; continue; } - r0 = NaN; - { step = 46; continue; } - case 13: - case 14: - s.sign___191592 = (1); - r0 = pxsim_String_.charAt(s.arg0, s.start___191562); - s.tmp_0 = r0; - r0 = pxsim_pxtcore.switch_eq("-", s.tmp_0); - if (r0) { step = 15; continue; } - r0 = pxsim_pxtcore.switch_eq("+", s.tmp_0); - if (r0) { step = 16; continue; } - r0 = s.tmp_0; - { step = 17; continue; } - case 15: - s.sign___191592 = (-1); - case 16: - r0 = (s.start___191562 + 1); - s.start___191562 = (r0); - case 17: - r0 = pxsim_numops_toBoolDecr(s.arg1); + r0 = s.arg0; + if (!checkSubtype(r0, sprites_SpriteSet__C168990_VT)) failedCast(r0); + r0 = pxsim_String_.mkEmpty(); 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 = 18; continue; } - r0 = s.tmp_0; - { step = 19; continue; } - case 18: - r0 = (s.arg1 == 16); - case 19: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = pxsim_numops_toBool(s.tmp_2); - if (r0) { step = 20; continue; } - r0 = s.tmp_2; - { step = 21; continue; } - case 20: - r0 = pxsim_String_.charAt(s.arg0, s.start___191562); - s.tmp_3 = r0; - r0 = ("0" === s.tmp_3); - case 21: - // jmp value (already in r0) + r0 = s.arg0.fields["_sprites"]; s.tmp_4 = r0; - r0 = pxsim_numops_toBool(s.tmp_4); - if (r0) { step = 22; continue; } - r0 = s.tmp_4; - { step = 25; continue; } - case 22: - s.tmp_7 = r0 = s.arg0; - r0 = (s.start___191562 + 1); - s.tmp_8 = r0; - r0 = pxsim_String_.charAt(s.tmp_7, s.tmp_8); - s.tmp_6 = r0; - r0 = ("x" === s.tmp_6); - s.tmp_5 = r0; - r0 = pxsim_numops_toBool(s.tmp_5); - if (!r0) { step = 23; continue; } - r0 = s.tmp_5; - { step = 24; continue; } - case 23: - s.tmp_10 = r0 = s.arg0; - r0 = (s.start___191562 + 1); - s.tmp_11 = r0; - r0 = pxsim_String_.charAt(s.tmp_10, s.tmp_11); - s.tmp_9 = r0; - r0 = ("X" === s.tmp_9); - case 24: - // jmp value (already in r0) - s.tmp_12 = r0; - r0 = s.tmp_12; - case 25: - // jmp value (already in r0) - s.tmp_13 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_13); - if (!r0) { step = 26; continue; } - s.arg1 = (16); - r0 = (s.start___191562 + 2); - s.start___191562 = (r0); - { step = 29; continue; } - case 26: - r0 = pxsim_numops_toBoolDecr(s.arg1); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 27; continue; } - s.arg1 = (10); - case 27: - case 28: - case 29: - s.output___191637 = (0); - s.hasDigit___191638 = (false); - s.i___191639 = (s.start___191562); - case 30: - s.tmp_1 = r0 = s.i___191639; - 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 = 45; continue; } - r0 = pxsim_String_.charCodeAt(s.arg0, s.i___191639); - s.tmp_3 = r0; - r0 = (s.tmp_3 | 32); - s.code___191646 = (r0); - s.val___191653 = (undefined); - r0 = (s.code___191646 >= 48); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 31; continue; } - r0 = s.tmp_0; - { step = 32; continue; } - case 31: - r0 = (s.code___191646 < 58); - case 32: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 33; continue; } - r0 = (s.code___191646 - 48); - s.val___191653 = (r0); - { step = 38; continue; } - case 33: - r0 = (s.code___191646 >= 97); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 34; continue; } - r0 = s.tmp_0; - { step = 35; continue; } - case 34: - r0 = (s.code___191646 < 123); - case 35: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 36; continue; } - r0 = (10 + s.code___191646); - s.tmp_2 = r0; - r0 = (s.tmp_2 - 97); - s.val___191653 = (r0); - case 36: - case 37: - case 38: - r0 = (s.val___191653 == undefined); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 39; continue; } - r0 = s.tmp_0; - { step = 40; continue; } - case 39: - r0 = (s.val___191653 >= s.arg1); - case 40: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 43; continue; } - r0 = pxsim_numops_toBoolDecr(s.hasDigit___191638); + r0 = pxsim_Array__length(s.tmp_4); s.tmp_3 = r0; - r0 = pxsim_Boolean__bang(s.tmp_3); + if ((s.tmp_3) && (s.tmp_3).vtable) { + setupResume(s, 1); + pxsim_String__stringConv(s.tmp_3); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_3) + ""; } + case 1: + r0 = s.retval; s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 41; continue; } - r0 = NaN; - { step = 46; continue; } - case 41: - case 42: - { step = 45; continue; } - case 43: - case 44: - s.hasDigit___191638 = (true); - r0 = (s.output___191637 * s.arg1); + r0 = pxsim_String__concat(s.tmp_1, s.tmp_2); s.tmp_0 = r0; - r0 = (s.tmp_0 + s.val___191653); - s.output___191637 = (r0); - r0 = (s.i___191639 + 1); - s.i___191639 = (r0); - { step = 30; continue; } - case 45: - r0 = (s.sign___191592 * s.output___191637); - case 46: + r0 = pxsim_String__concat(s.tmp_0, " sprites"); return leave(s, r0) default: oops() } } } -parseInt__P166624.info = {"start":1064,"length":1690,"line":44,"column":0,"endLine":103,"endColumn":1,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"parseInt","argumentNames":["text","radix"]} +sprites_SpriteSet_toString__P169001.info = {"start":2586,"length":66,"line":97,"column":8,"endLine":99,"endColumn":9,"fileName":"pxt_modules/game/spriteset.ts","functionName":"toString","argumentNames":["this"]} -function parseInt__P166624_mk(s) { +function sprites_SpriteSet_toString__P169001_mk(s) { checkStack(s.depth); return { - parent: s, fn: parseInt__P166624, depth: s.depth + 1, + parent: s, fn: sprites_SpriteSet_toString__P169001, depth: s.depth + 1, pc: 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, - start___191562: undefined, - sign___191592: undefined, - output___191637: undefined, - hasDigit___191638: undefined, - i___191639: undefined, - code___191646: undefined, - val___191653: undefined, arg0: undefined, - arg1: undefined, } } -function music_MelodyPlayer_constructor__P168167(s) { +function sprites_SpriteSet_length__P168993(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -54627,32 +59715,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, music_MelodyPlayer__C168164_VT)) failedCast(r0); - r0 = (s.arg0).fields["melody"] = (s.arg1); - r0 = undefined; - return leave(s, r0) + if (!checkSubtype(r0, sprites_SpriteSet__C168990_VT)) failedCast(r0); + r0 = s.arg0.fields["_sprites"]; + s.tmp_0 = r0; + r0 = pxsim_Array__length(s.tmp_0); + return leaveAccessor(s, r0) default: oops() } } } -music_MelodyPlayer_constructor__P168167.info = {"start":11304,"length":62,"line":344,"column":8,"endLine":346,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"inline","argumentNames":["this","m"]} +sprites_SpriteSet_length__P168993.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__P168993.isGetter = true; -function music_MelodyPlayer_constructor__P168167_mk(s) { +function sprites_SpriteSet_length__P168993_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_MelodyPlayer_constructor__P168167, depth: s.depth + 1, + parent: s, fn: sprites_SpriteSet_length__P168993, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, - arg1: undefined, } } -function music_Melody_stop__P168158(s) { +function sprites_SpriteMap_toString__P168981(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -54667,38 +59756,69 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, music_Melody__C168153_VT)) failedCast(r0); - r0 = s.arg0.fields["_player"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_1 = music_MelodyPlayer_stop__P168168_mk(s); - r0 = s.arg0.fields["_player"]; - s.tmp_1.arg0 = r0; - s.callLocIdx = 92; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; - r0 = (s.arg0).fields["_player"] = (null); + if (!checkSubtype(r0, sprites_SpriteMap__C168973_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__P166637_mk(s); + r0 = s.arg0.fields["buckets"]; + s.tmp_10.arg0 = r0; + s.tmp_10.arg1 = length_inline__P191882; + s.callLocIdx = 618; s.pc = 2; return s.tmp_10; case 2: - s.tmp_0 = music_Melody_unregisterMelody__P171997_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 93; s.pc = 4; return s.tmp_0; - case 4: r0 = s.retval; - r0 = undefined; + 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() } } } -music_Melody_stop__P168158.info = {"start":6833,"length":173,"line":220,"column":8,"endLine":226,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"stop","argumentNames":["this"]} +sprites_SpriteMap_toString__P168981.info = {"start":4109,"length":123,"line":112,"column":8,"endLine":114,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"toString","argumentNames":["this"]} -function music_Melody_stop__P168158_mk(s) { +function sprites_SpriteMap_toString__P168981_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_Melody_stop__P168158, depth: s.depth + 1, + parent: s, fn: sprites_SpriteMap_toString__P168981, depth: s.depth + 1, pc: 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, } } @@ -54706,7 +59826,7 @@ function music_Melody_stop__P168158_mk(s) { -function music_MelodyPlayer_stop__P168168(s) { +function length_inline__P191882(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -54720,20 +59840,26 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, music_MelodyPlayer__C168164_VT)) failedCast(r0); - r0 = (s.arg0).fields["melody"] = (null); - r0 = undefined; + 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() } } } -music_MelodyPlayer_stop__P168168.info = {"start":11376,"length":49,"line":348,"column":8,"endLine":350,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"stop","argumentNames":["this"]} +length_inline__P191882.info = {"start":4196,"length":8,"line":113,"column":74,"endLine":113,"endColumn":82,"fileName":"pxt_modules/game/spritemap.ts","functionName":"inline","argumentNames":["b"]} -function music_MelodyPlayer_stop__P168168_mk(s) { +function length_inline__P191882_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_MelodyPlayer_stop__P168168, depth: s.depth + 1, + parent: s, fn: length_inline__P191882, 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, } } @@ -54741,7 +59867,7 @@ function music_MelodyPlayer_stop__P168168_mk(s) { -function music_Melody_play__P168160(s) { +function ArcadePhysicsEngine_moveSprite__P169068(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -54751,41 +59877,206 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.tm___191914 = undefined; + s.maxDist___191922 = undefined; + s.ms___191942 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, music_Melody__C168153_VT)) failedCast(r0); - s.tmp_0 = music_Melody_playCore__P171998_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.tmp_0.arg2 = false; - s.callLocIdx = 101; s.pc = 1; return s.tmp_0; + if (!checkSubtype(r0, ArcadePhysicsEngine__C169054_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__P169526_mk(s); + s.callLocIdx = 859; s.pc = 13; return s.tmp_0; + case 13: + r0 = s.retval; + r0 = r0.fields["tileMap"]; + s.tm___191914 = (r0); + s.tmp_0 = r0 = s.tm___191914; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: + r0 = s.tm___191914.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___191922 = (r0); + s.tmp_2 = Math_abs__P166655_mk(s); + r0 = (s.arg2 + 128); + s.tmp_3 = r0; + r0 = (s.tmp_3 >> 8); + s.tmp_2.arg0 = r0; + s.callLocIdx = 863; s.pc = 14; return s.tmp_2; + case 14: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_1 <= s.maxDist___191922); + 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__P166655_mk(s); + r0 = (s.arg3 + 128); + s.tmp_6 = r0; + r0 = (s.tmp_6 >> 8); + s.tmp_5.arg0 = r0; + s.callLocIdx = 865; s.pc = 15; return s.tmp_5; + case 15: + r0 = s.retval; + s.tmp_4 = r0; + r0 = (s.tmp_4 <= s.maxDist___191922); + 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__C169052_VT); + s.tmp_8 = r0; + s.tmp_9 = MovingSprite_constructor__P169053_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 = 866; s.pc = 16; return s.tmp_9; + case 16: + r0 = s.retval; + s.ms___191942 = (s.tmp_8); + s.tmp_0 = ArcadePhysicsEngine_tilemapCollisions__P172313_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.ms___191942; + s.tmp_0.arg2 = s.tm___191914; + s.callLocIdx = 867; s.pc = 17; return s.tmp_0; + case 17: + r0 = s.retval; + { step = 10; continue; } + case 5: + s.tmp_1 = tiles_TileMap_isOnWall__P169285_mk(s); + s.tmp_1.arg0 = s.tm___191914; + s.tmp_1.arg1 = s.arg1; + s.callLocIdx = 868; 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__P172315_mk(s); + s.tmp_4.arg0 = s.arg0; + s.tmp_4.arg1 = s.arg1; + s.tmp_4.arg2 = s.tm___191914; + s.callLocIdx = 869; s.pc = 19; return s.tmp_4; + case 19: r0 = s.retval; + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); + case 7: + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + if (!r0) { step = 8; continue; } + s.tmp_6 = r0 = s.arg1; + r0 = s.tmp_6.fields["flags"]; + s.tmp_8 = r0; + r0 = (s.tmp_8 | 256); + s.tmp_7 = r0; + r0 = (s.tmp_6).fields["flags"] = (s.tmp_7); + { step = 9; continue; } + case 8: + s.tmp_0 = r0 = s.arg1; + r0 = s.tmp_0.fields["flags"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 & -257); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["flags"] = (s.tmp_1); + case 9: + case 10: + case 11: + case 12: r0 = undefined; return leave(s, r0) default: oops() } } } -music_Melody_play__P168160.info = {"start":9416,"length":71,"line":292,"column":8,"endLine":294,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"play","argumentNames":["this","volume"]} +ArcadePhysicsEngine_moveSprite__P169068.info = {"start":23898,"length":1208,"line":654,"column":4,"endLine":685,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"moveSprite","argumentNames":["this","s","dx","dy"]} -function music_Melody_play__P168160_mk(s) { +function ArcadePhysicsEngine_moveSprite__P169068_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_Melody_play__P168160, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_moveSprite__P169068, depth: s.depth + 1, pc: 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___191914: undefined, + maxDist___191922: undefined, + ms___191942: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function music_Melody_playCore__P171998(s) { +function ArcadePhysicsEngine_canResolveClipping__P172315(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -54795,7 +60086,19 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.p___191074 = undefined; + s.hbox___191987 = undefined; + s.sz___191990 = undefined; + s.maxMove___191995 = undefined; + s.origY___191997 = undefined; + s.origX___192000 = undefined; + s.l___192003 = undefined; + s.r___192008 = undefined; + s.t___192013 = undefined; + s.b___192018 = undefined; + s.offset___192023 = undefined; + s.offset___192048 = undefined; + s.offset___192079 = undefined; + s.offset___192104 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); @@ -54803,48 +60106,281 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, music_Melody__C168153_VT)) failedCast(r0); - s.tmp_0 = music_Melody_stop__P168158_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 95; s.pc = 1; return s.tmp_0; + if (!checkSubtype(r0, ArcadePhysicsEngine__C169054_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__C168868_v4_1_mk(s); + s.tmp_4.arg0 = s.arg1; + if (!checkSubtype(s.tmp_4.arg0, Sprite__C168868_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___191987 = (r0); + r0 = s.arg2.fields["_scale"]; + s.tmp_0 = r0; + r0 = (1 << s.tmp_0); + s.sz___191990 = (r0); + s.tmp_0 = ArcadePhysicsEngine_maxStep__P169060_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 872; s.pc = 21; return s.tmp_0; + case 21: + r0 = s.retval; + s.maxMove___191995 = (r0); + r0 = s.arg1.fields["_y"]; + s.origY___191997 = (r0); + r0 = s.arg1.fields["_x"]; + s.origX___192000 = (r0); + s.tmp_1 = game_Hitbox_left__P168743_mk(s); + s.tmp_1.arg0 = s.hbox___191987; + s.callLocIdx = 873; s.pc = 22; return s.tmp_1; + case 22: r0 = s.retval; - r0 = pxsim_pxtcore_mkClassInstance(music_MelodyPlayer__C168164_VT); s.tmp_0 = r0; - s.tmp_1 = music_MelodyPlayer_constructor__P168167_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = s.arg0; - s.callLocIdx = 96; s.pc = 2; return s.tmp_1; - case 2: + r0 = (s.tmp_0 + 128); + s.tmp_2 = r0; + r0 = (s.tmp_2 >> 8); + s.l___192003 = (r0); + s.tmp_1 = game_Hitbox_right__P168745_mk(s); + s.tmp_1.arg0 = s.hbox___191987; + s.callLocIdx = 875; s.pc = 23; return s.tmp_1; + case 23: r0 = s.retval; - r0 = (s.arg0).fields["_player"] = (s.tmp_0); - s.p___191074 = (s.tmp_0); - s.tmp_0 = music_Melody_registerMelody__P171996_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 97; s.pc = 3; return s.tmp_0; + s.tmp_0 = r0; + r0 = (s.tmp_0 + 128); + s.tmp_2 = r0; + r0 = (s.tmp_2 >> 8); + s.r___192008 = (r0); + s.tmp_1 = game_Hitbox_top__P168744_mk(s); + s.tmp_1.arg0 = s.hbox___191987; + s.callLocIdx = 877; 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___192013 = (r0); + s.tmp_1 = game_Hitbox_bottom__P168746_mk(s); + s.tmp_1.arg0 = s.hbox___191987; + s.callLocIdx = 879; 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___192018 = (r0); + r0 = (s.b___192018 + 1); + s.tmp_0 = r0; + r0 = (s.tmp_0 % s.sz___191990); + s.offset___192023 = (r0); + r0 = (s.offset___192023 <= s.maxMove___191995); + 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___192023 * 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__P169285_mk(s); + s.tmp_3.arg0 = s.arg2; + s.tmp_3.arg1 = s.arg1; + s.callLocIdx = 883; 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___191997); + case 4: + case 5: + case 6: + r0 = (s.t___192013 / s.sz___191990); + 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___191990); + s.tmp_0 = r0; + r0 = (s.tmp_0 - s.t___192013); + s.offset___192048 = (r0); + r0 = (s.offset___192048 <= s.maxMove___191995); + 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___192048 * 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__P169285_mk(s); + s.tmp_3.arg0 = s.arg2; + s.tmp_3.arg1 = s.arg1; + s.callLocIdx = 886; s.pc = 27; return s.tmp_3; + case 27: r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(4, music_Melody_playCore_inline__P191084); + 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_stclo(s.tmp_0, 0, s.arg0); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.p___191074); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.arg1); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 3, s.arg2); - r0 = pxsim.control.runInParallel(s.tmp_0); - r0 = undefined; + 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___191997); + case 8: + case 9: + case 10: + r0 = (s.r___192008 + 1); + s.tmp_0 = r0; + r0 = (s.tmp_0 % s.sz___191990); + s.offset___192079 = (r0); + r0 = (s.offset___192079 <= s.maxMove___191995); + 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___192079 * 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__P169285_mk(s); + s.tmp_3.arg0 = s.arg2; + s.tmp_3.arg1 = s.arg1; + s.callLocIdx = 889; 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___192000); + case 12: + case 13: + case 14: + r0 = (s.l___192003 / s.sz___191990); + 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___191990); + s.tmp_0 = r0; + r0 = (s.tmp_0 - s.l___192003); + s.offset___192104 = (r0); + r0 = (s.offset___192104 <= s.maxMove___191995); + 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___192104 * 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__P169285_mk(s); + s.tmp_3.arg0 = s.arg2; + s.tmp_3.arg1 = s.arg1; + s.callLocIdx = 892; 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___192000); + case 16: + case 17: + case 18: + r0 = false; + case 19: return leave(s, r0) default: oops() } } } -music_Melody_playCore__P171998.info = {"start":7809,"length":815,"line":247,"column":8,"endLine":266,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"playCore","argumentNames":["this","volume","loop"]} +ArcadePhysicsEngine_canResolveClipping__P172315.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 music_Melody_playCore__P171998_mk(s) { +function ArcadePhysicsEngine_canResolveClipping__P172315_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_Melody_playCore__P171998, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_canResolveClipping__P172315, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - p___191074: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + hbox___191987: undefined, + sz___191990: undefined, + maxMove___191995: undefined, + origY___191997: undefined, + origX___192000: undefined, + l___192003: undefined, + r___192008: undefined, + t___192013: undefined, + b___192018: undefined, + offset___192023: undefined, + offset___192048: undefined, + offset___192079: undefined, + offset___192104: undefined, arg0: undefined, arg1: undefined, arg2: undefined, @@ -54854,7 +60390,7 @@ function music_Melody_playCore__P171998_mk(s) { -function music_Melody_playCore_inline__P191084(s) { +function Sprite_isStatic__P168922(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -54864,66 +60400,34 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - case 1: - r0 = s.caps[0].fields["_player"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 == s.caps[1]); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 6; continue; } - s.tmp_2 = music_MelodyPlayer_play__P168169_mk(s); - s.tmp_2.arg0 = s.caps[1]; - s.tmp_2.arg1 = s.caps[2]; - s.callLocIdx = 98; s.pc = 7; return s.tmp_2; - case 7: - r0 = s.retval; - r0 = pxsim_numops_toBoolDecr(s.caps[3]); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + r0 = s.arg0.fields["_image"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - r0 = s.caps[0].fields["_player"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 == s.caps[1]); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 2; continue; } - s.tmp_4 = music_Melody_unregisterMelody__P171997_mk(s); - s.tmp_4.arg0 = s.caps[0]; - s.callLocIdx = 99; s.pc = 8; return s.tmp_4; - case 8: - r0 = s.retval; - case 2: - case 3: - { step = 6; continue; } - case 4: - case 5: - { step = 1; continue; } - case 6: - r0 = undefined; + r0 = pxsim_ImageMethods.isStatic(s.tmp_0); return leave(s, r0) default: oops() } } } -music_Melody_playCore_inline__P191084.info = {"start":8012,"length":601,"line":251,"column":34,"endLine":265,"endColumn":13,"fileName":"pxt_modules/mixer/melody.ts","functionName":"inline","argumentNames":[]} +Sprite_isStatic__P168922.info = {"start":9841,"length":57,"line":355,"column":4,"endLine":357,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"isStatic","argumentNames":["this"]} -function music_Melody_playCore_inline__P191084_mk(s) { +function Sprite_isStatic__P168922_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_Melody_playCore_inline__P191084, depth: s.depth + 1, + parent: s, fn: Sprite_isStatic__P168922, depth: s.depth + 1, pc: 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 music_Melody_loop__P168159(s) { +function game_Hitbox_bottom__P168746(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -54935,39 +60439,44 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, music_Melody__C168153_VT)) failedCast(r0); - s.tmp_0 = music_Melody_playCore__P171998_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.tmp_0.arg2 = true; - s.callLocIdx = 100; s.pc = 1; return s.tmp_0; + if (!checkSubtype(r0, game_Hitbox__C168735_VT)) failedCast(r0); + r0 = s.arg0.fields["height"]; + s.tmp_1 = r0; + s.tmp_3 = game_Hitbox_top__P168744_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 323; s.pc = 1; return s.tmp_3; case 1: r0 = s.retval; - r0 = undefined; - return leave(s, r0) + s.tmp_2 = r0; + r0 = (s.tmp_1 + s.tmp_2); + s.tmp_0 = r0; + r0 = (s.tmp_0 - 256); + return leaveAccessor(s, r0) default: oops() } } } -music_Melody_loop__P168159.info = {"start":8990,"length":70,"line":278,"column":8,"endLine":280,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"loop","argumentNames":["this","volume"]} +game_Hitbox_bottom__P168746.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__P168746.isGetter = true; -function music_Melody_loop__P168159_mk(s) { +function game_Hitbox_bottom__P168746_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_Melody_loop__P168159, depth: s.depth + 1, + parent: s, fn: game_Hitbox_bottom__P168746, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, arg0: undefined, - arg1: undefined, } } -function particles_ShapeFactory_createParticle__P169744(s) { +function game_Hitbox_right__P168745(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -54977,56 +60486,46 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.p___190818 = 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__C169740_VT)) failedCast(r0); - s.tmp_0 = particles_AreaFactory_createParticle__P169730_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 1669; s.pc = 1; return s.tmp_0; + if (!checkSubtype(r0, game_Hitbox__C168735_VT)) failedCast(r0); + r0 = s.arg0.fields["width"]; + s.tmp_1 = r0; + s.tmp_3 = game_Hitbox_left__P168743_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 320; s.pc = 1; return s.tmp_3; case 1: r0 = s.retval; - s.p___190818 = (r0); - s.tmp_0 = r0 = s.p___190818; - s.tmp_2 = Math_FastRandom_randomRange__P169590_mk(s); - r0 = s.arg0.fields["galois"]; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = 1; - s.tmp_2.arg2 = 14; - s.callLocIdx = 1670; 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___190818; - return leave(s, r0) + s.tmp_2 = r0; + r0 = (s.tmp_1 + s.tmp_2); + s.tmp_0 = r0; + r0 = (s.tmp_0 - 256); + return leaveAccessor(s, r0) default: oops() } } } -particles_ShapeFactory_createParticle__P169744.info = {"start":7505,"length":178,"line":239,"column":8,"endLine":243,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"createParticle","argumentNames":["this","anchor"]} +game_Hitbox_right__P168745.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__P168745.isGetter = true; -function particles_ShapeFactory_createParticle__P169744_mk(s) { +function game_Hitbox_right__P168745_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ShapeFactory_createParticle__P169744, depth: s.depth + 1, + parent: s, fn: game_Hitbox_right__P168745, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - p___190818: undefined, + tmp_3: undefined, arg0: undefined, - arg1: undefined, } } -function particles_ShapeFactory_drawParticle__P169743(s) { +function game_Hitbox_top__P168744(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -55036,82 +60535,39 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.pImage___190832 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ShapeFactory__C169740_VT)) failedCast(r0); - s.tmp_1 = Math_FastRandom_pickRandom__P169591_mk(s); - r0 = s.arg0.fields["galois"]; - s.tmp_1.arg0 = r0; - r0 = s.arg0.fields["sources"]; - s.tmp_1.arg1 = r0; - s.callLocIdx = 1664; s.pc = 1; return s.tmp_1; - case 1: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_ImageMethods.clone(s.tmp_0); - s.pImage___190832 = (r0); - r0 = s.arg1.fields["color"]; - s.tmp_0 = r0; - r0 = pxsim_ImageMethods.replace(s.pImage___190832, 15, s.tmp_0); - s.tmp_0 = r0 = globals.screen___168559; - s.tmp_1 = r0 = s.pImage___190832; - r0 = s.arg0.fields["ox"]; - s.tmp_4 = r0; - r0 = (s.arg2 - s.tmp_4); - s.tmp_3 = r0; - r0 = (s.tmp_3 + 128); - s.tmp_5 = r0; - r0 = (s.tmp_5 >> 8); - s.tmp_2 = r0; + if (!checkSubtype(r0, game_Hitbox__C168735_VT)) failedCast(r0); r0 = s.arg0.fields["oy"]; - s.tmp_8 = r0; - r0 = (s.arg3 - s.tmp_8); - s.tmp_7 = r0; - r0 = (s.tmp_7 + 128); - s.tmp_9 = r0; - r0 = (s.tmp_9 >> 8); - s.tmp_6 = r0; - r0 = pxsim_ImageMethods.drawTransparentImage(s.tmp_0, s.tmp_1, s.tmp_2, s.tmp_6); - r0 = undefined; - return leave(s, r0) + 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() } } } -particles_ShapeFactory_drawParticle__P169743.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"]} +game_Hitbox_top__P168744.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__P168744.isGetter = true; -function particles_ShapeFactory_drawParticle__P169743_mk(s) { +function game_Hitbox_top__P168744_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ShapeFactory_drawParticle__P169743, depth: s.depth + 1, + parent: s, fn: game_Hitbox_top__P168744, depth: s.depth + 1, pc: 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, - pImage___190832: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function Math_FastRandom_pickRandom__P169591(s) { +function game_Hitbox_left__P168743(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -55123,73 +60579,37 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Math_FastRandom__C169586_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(s.arg1); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + if (!checkSubtype(r0, game_Hitbox__C168735_VT)) failedCast(r0); + r0 = s.arg0.fields["ox"]; 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__length(s.arg1); - s.tmp_2 = r0; - r0 = (s.tmp_2 == 0); - case 2: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 3; continue; } - r0 = undefined; - { step = 5; continue; } - case 3: - case 4: - s.tmp_4 = r0 = s.arg1; - s.tmp_6 = Math_FastRandom_randomRange__P169590_mk(s); - s.tmp_6.arg0 = s.arg0; - s.tmp_6.arg1 = 0; - r0 = pxsim_Array__length(s.arg1); - s.tmp_7 = r0; - r0 = (s.tmp_7 - 1); - s.tmp_6.arg2 = r0; - s.callLocIdx = 1393; s.pc = 6; return s.tmp_6; - case 6: - r0 = s.retval; - s.tmp_5 = r0; - r0 = pxsim_Array__getAt(s.tmp_4, s.tmp_5); - case 5: - return leave(s, r0) + r0 = s.arg0.fields["parent"]; + r0 = r0.fields["_x"]; + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); + return leaveAccessor(s, r0) default: oops() } } } -Math_FastRandom_pickRandom__P169591.info = {"start":2358,"length":192,"line":70,"column":8,"endLine":75,"endColumn":9,"fileName":"pxt_modules/game/mathUtil.ts","functionName":"pickRandom","argumentNames":["this","list"]} +game_Hitbox_left__P168743.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__P168743.isGetter = true; -function Math_FastRandom_pickRandom__P169591_mk(s) { +function game_Hitbox_left__P168743_mk(s) { checkStack(s.depth); return { - parent: s, fn: Math_FastRandom_pickRandom__P169591, depth: s.depth + 1, + parent: s, fn: game_Hitbox_left__P168743, depth: s.depth + 1, pc: 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 particles_AreaFactory_drawParticle__P169731(s) { +function ArcadePhysicsEngine_tilemapCollisions__P172313(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -55199,526 +60619,1011 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.col___190878 = undefined; + s.s___192236 = undefined; + s.hbox___192261 = undefined; + s.tileScale___192264 = undefined; + s.tileSize___192267 = undefined; + s.xDiff___192271 = undefined; + s.yDiff___192278 = undefined; + s.right___192294 = undefined; + s.x0___192298 = undefined; + s.collidedTiles___192313 = undefined; + s.y___192315 = undefined; + s.y0___192329 = undefined; + s.obstacle___192345 = undefined; + s.collisionDirection___192372 = undefined; + s.tile___192398 = undefined; + s.unnamed818___U14 = undefined; + s.unnamed819___U15 = undefined; + s.down___192489 = undefined; + s.y0___192493 = undefined; + s.collidedTiles___192508 = undefined; + s.x___192510 = undefined; + s.x0___192520 = undefined; + s.obstacle___192534 = undefined; + s.collisionDirection___192561 = undefined; + s.tile___192587 = undefined; + s.unnamed820___U24 = undefined; + s.unnamed821___U25 = undefined; + s.overlappedTiles___192681 = undefined; + s.x___192683 = undefined; + s.x0___192693 = undefined; + s.y___192703 = undefined; + s.y0___192713 = 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_AreaFactory__C169724_VT)) failedCast(r0); - r0 = s.arg1.fields["lifespan"]; + if (!checkSubtype(r0, ArcadePhysicsEngine__C169054_VT)) failedCast(r0); + r0 = s.arg1.fields["sprite"]; + s.s___192236 = (r0); + r0 = s.s___192236.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__P169285_mk(s); + s.tmp_5.arg0 = s.arg2; + s.tmp_5.arg1 = s.s___192236; + s.callLocIdx = 755; s.pc = 97; return s.tmp_5; + case 97: + r0 = s.retval; + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + s.tmp_3 = r0; + r0 = pxsim_Boolean__bang(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 1; continue; } + s.tmp_6 = r0 = s.s___192236; + r0 = s.tmp_6.fields["flags"]; + s.tmp_8 = r0; + r0 = (s.tmp_8 & -257); + s.tmp_7 = r0; + r0 = (s.tmp_6).fields["flags"] = (s.tmp_7); + case 1: + case 2: + case 3: + case 4: + r0 = s.s___192236.fields["_image"]; + s.tmp_3 = r0; + r0 = pxsim_ImageMethods.isStatic(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + s.tmp_4 = Sprite__C168868_v4_1_mk(s); + s.tmp_4.arg0 = s.s___192236; + if (!checkSubtype(s.tmp_4.arg0, Sprite__C168868_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___192236.fields["_hitbox"]; + s.hbox___192261 = (r0); + r0 = s.arg2.fields["_scale"]; + s.tileScale___192264 = (r0); + r0 = (1 << s.tileScale___192264); + s.tileSize___192267 = (r0); + r0 = s.s___192236.fields["_x"]; + s.tmp_0 = r0; + r0 = s.s___192236.fields["_lastX"]; + s.tmp_1 = r0; + r0 = (s.tmp_0 - s.tmp_1); + s.xDiff___192271 = (r0); + r0 = s.s___192236.fields["_y"]; + s.tmp_0 = r0; + r0 = s.s___192236.fields["_lastY"]; + s.tmp_1 = r0; + r0 = (s.tmp_0 - s.tmp_1); + s.yDiff___192278 = (r0); + r0 = s.s___192236.fields["flags"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 & 2818); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 83; continue; } + r0 = (s.xDiff___192271 !== 0); + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + if (!r0) { step = 43; continue; } + r0 = (s.xDiff___192271 > 0); + s.right___192294 = (r0); + r0 = pxsim_numops_toBoolDecr(s.right___192294); + if (!r0) { step = 7; continue; } + s.tmp_1 = game_Hitbox_right__P168745_mk(s); + s.tmp_1.arg0 = s.hbox___192261; + s.callLocIdx = 760; s.pc = 99; return s.tmp_1; + case 99: + r0 = s.retval; + s.tmp_0 = r0; + r0 = (s.tmp_0 + 256); + { step = 8; continue; } + case 7: + s.tmp_3 = game_Hitbox_left__P168743_mk(s); + s.tmp_3.arg0 = s.hbox___192261; + s.callLocIdx = 762; s.pc = 100; return s.tmp_3; + case 100: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_2 - 256); + case 8: + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = (s.tmp_4 + 128); + s.tmp_5 = r0; + r0 = (s.tileScale___192264 + 8); + s.tmp_6 = r0; + r0 = (s.tmp_5 >> s.tmp_6); + s.x0___192298 = (r0); + r0 = pxsim_Array__mk(); + s.collidedTiles___192313 = (r0); + s.tmp_1 = game_Hitbox_top__P168744_mk(s); + s.tmp_1.arg0 = s.hbox___192261; + s.callLocIdx = 766; s.pc = 101; return s.tmp_1; + case 101: + r0 = s.retval; + s.tmp_0 = r0; + r0 = (s.tmp_0 - s.yDiff___192278); + s.y___192315 = (r0); + case 9: + s.tmp_1 = r0 = s.y___192315; + s.tmp_3 = r0 = s.tileSize___192267; + s.tmp_6 = game_Hitbox_bottom__P168746_mk(s); + s.tmp_6.arg0 = s.hbox___192261; + s.callLocIdx = 768; s.pc = 102; return s.tmp_6; + case 102: + r0 = s.retval; + s.tmp_5 = r0; + r0 = (s.tmp_5 - s.yDiff___192278); + s.tmp_4 = r0; + r0 = (s.tmp_3 << 8); + s.tmp_7 = r0; + r0 = (s.tmp_7 + s.tmp_4); + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 14; continue; } + s.tmp_10 = Fx_min__P166693_mk(s); + s.tmp_10.arg0 = s.y___192315; + s.tmp_12 = game_Hitbox_bottom__P168746_mk(s); + s.tmp_12.arg0 = s.hbox___192261; + s.callLocIdx = 771; s.pc = 104; return s.tmp_12; + case 104: + r0 = s.retval; + s.tmp_11 = r0; + r0 = (s.tmp_11 - s.yDiff___192278); + s.tmp_10.arg1 = r0; + s.callLocIdx = 773; s.pc = 103; return s.tmp_10; + case 103: + r0 = s.retval; + s.tmp_9 = r0; + r0 = (s.tmp_9 + 128); + s.tmp_8 = r0; + r0 = (s.tileScale___192264 + 8); + s.tmp_13 = r0; + r0 = (s.tmp_8 >> s.tmp_13); + s.y0___192329 = (r0); + s.tmp_1 = tiles_TileMap_isObstacle__P169283_mk(s); + s.tmp_1.arg0 = s.arg2; + s.tmp_1.arg1 = s.x0___192298; + s.tmp_1.arg2 = s.y0___192329; + s.callLocIdx = 776; 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__P169284_mk(s); + s.tmp_2.arg0 = s.arg2; + s.tmp_2.arg1 = s.x0___192298; + s.tmp_2.arg2 = s.y0___192329; + s.callLocIdx = 777; s.pc = 106; return s.tmp_2; + case 106: + r0 = s.retval; + s.obstacle___192345 = (r0); + r0 = pxsim_pxtcore_mkAction(1, ArcadePhysicsEngine_tilemapCollisions_inline__P192353); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.obstacle___192345); + s.tmp_4 = helpers_arraySome__P166634_mk(s); + s.tmp_4.arg0 = s.collidedTiles___192313; + s.tmp_4.arg1 = s.tmp_0; + s.callLocIdx = 778; s.pc = 107; return s.tmp_4; + case 107: + r0 = s.retval; + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 10; continue; } + r0 = pxsim_Array__push(s.collidedTiles___192313, s.obstacle___192345); + case 10: + case 11: + case 12: + case 13: + r0 = (s.tileSize___192267 << 8); + s.tmp_0 = r0; + r0 = (s.tmp_0 + s.y___192315); + s.y___192315 = (r0); + { step = 9; continue; } + case 14: + r0 = pxsim_Array__length(s.collidedTiles___192313); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 41; continue; } + r0 = pxsim_numops_toBoolDecr(s.right___192294); + if (!r0) { step = 15; continue; } + r0 = 2; + { step = 16; continue; } + case 15: + r0 = 0; + case 16: + // jmp value (already in r0) + s.tmp_1 = r0; + s.collisionDirection___192372 = (s.tmp_1); + r0 = pxsim_numops_toBoolDecr(s.right___192294); + if (!r0) { step = 17; continue; } + r0 = (s.x0___192298 << s.tileScale___192264); + 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___192261.fields["width"]; + s.tmp_3 = r0; + r0 = (s.tmp_0 - s.tmp_3); + { step = 18; continue; } + case 17: + r0 = (s.x0___192298 + 1); + s.tmp_5 = r0; + r0 = (s.tmp_5 << s.tileScale___192264); + s.tmp_4 = r0; + r0 = (s.tmp_4 * 256); + s.tmp_6 = r0; + r0 = (s.tmp_6 | 0); + case 18: + // jmp value (already in r0) + s.tmp_7 = r0; + s.tmp_8 = r0 = s.s___192236; + r0 = s.hbox___192261.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___192398 = (undefined); + s.unnamed818___U14 = (s.collidedTiles___192313); + s.unnamed819___U15 = (0); + case 19: + s.tmp_0 = r0 = s.unnamed819___U15; + r0 = pxsim_Array__length(s.unnamed818___U14); s.tmp_1 = r0; - r0 = (s.tmp_1 > 500); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = 4; - { step = 4; continue; } - case 1: - r0 = s.arg1.fields["lifespan"]; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 22; continue; } + r0 = pxsim_Array__getAt(s.unnamed818___U14, s.unnamed819___U15); + s.tile___192398 = (r0); + r0 = s.s___192236.fields["flags"]; + s.tmp_5 = r0; + r0 = (s.tmp_5 & 2818); + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); s.tmp_3 = r0; - r0 = (s.tmp_3 > 250); + r0 = pxsim_Boolean__bang(s.tmp_3); s.tmp_2 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 2; continue; } - r0 = 5; - { step = 3; continue; } - case 2: - r0 = 1; - case 3: - // jmp value (already in r0) + if (!r0) { step = 20; continue; } + s.tmp_6 = Sprite_registerObstacle__P168953_mk(s); + s.tmp_6.arg0 = s.s___192236; + s.tmp_6.arg1 = s.collisionDirection___192372; + s.tmp_6.arg2 = s.tile___192398; + s.tmp_6.arg3 = s.arg2; + s.callLocIdx = 784; s.pc = 108; return s.tmp_6; + case 108: + r0 = s.retval; + case 20: + case 21: + r0 = (s.unnamed819___U15 + 1); + s.unnamed819___U15 = (r0); + { step = 19; continue; } + case 22: + s.unnamed818___U14 = (undefined); + r0 = s.s___192236.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__P168955_mk(s); + s.tmp_2.arg0 = s.s___192236; + s.tmp_2.arg1 = undefined; + s.tmp_2.arg2 = undefined; + s.callLocIdx = 785; s.pc = 109; return s.tmp_2; + case 109: + r0 = s.retval; + { step = 40; continue; } + case 23: + r0 = s.s___192236.fields["_vx"]; + s.tmp_1 = r0; + r0 = s.arg1.fields["cachedVx"]; + s.tmp_2 = r0; + r0 = (s.tmp_1 === s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 24; continue; } + r0 = s.tmp_0; + { step = 25; continue; } + case 24: + r0 = s.s___192236.fields["flags"]; + s.tmp_5 = r0; + r0 = (s.tmp_5 & 2818); s.tmp_4 = r0; - r0 = s.tmp_4; - case 4: + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + s.tmp_3 = r0; + r0 = pxsim_Boolean__bang(s.tmp_3); + case 25: // jmp value (already in r0) - s.tmp_5 = r0; - s.col___190878 = (s.tmp_5); - s.tmp_0 = r0 = globals.screen___168559; - r0 = (s.arg2 + 128); + s.tmp_6 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_6); + if (!r0) { step = 36; continue; } + r0 = s.s___192236.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___192294); + s.tmp_10 = r0; + r0 = pxsim_Boolean__bang(s.tmp_10); + s.tmp_9 = r0; + r0 = pxsim_numops_toBool(s.tmp_9); + if (r0) { step = 26; continue; } + r0 = s.tmp_9; + { step = 27; continue; } + case 26: + s.tmp_12 = Sprite_vx__P168885_mk(s); + s.tmp_12.arg0 = s.s___192236; + s.callLocIdx = 786; s.pc = 110; return s.tmp_12; + case 110: + r0 = s.retval; + s.tmp_11 = r0; + r0 = (s.tmp_11 < 0); + case 27: + // jmp value (already in r0) + s.tmp_13 = r0; + r0 = pxsim_numops_toBool(s.tmp_13); + if (!r0) { step = 28; continue; } + r0 = s.tmp_13; + { step = 31; continue; } + case 28: + s.tmp_14 = r0 = s.right___192294; + 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__P168885_mk(s); + s.tmp_16.arg0 = s.s___192236; + s.callLocIdx = 787; s.pc = 111; return s.tmp_16; + case 111: + r0 = s.retval; + s.tmp_15 = r0; + r0 = (s.tmp_15 > 0); + case 30: + // jmp value (already in r0) + s.tmp_17 = r0; + r0 = s.tmp_17; + case 31: + // jmp value (already in r0) + s.tmp_18 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_18); + if (!r0) { step = 32; continue; } + s.tmp_19 = r0 = s.s___192236; + r0 = s.s___192236.fields["_vx"]; + s.tmp_21 = r0; + r0 = (0 - s.tmp_21); + s.tmp_20 = r0; + r0 = (s.tmp_19).fields["_vx"] = (s.tmp_20); + s.tmp_0 = r0 = s.arg1; + r0 = s.arg1.fields["xStep"]; s.tmp_2 = r0; - r0 = (s.tmp_2 >> 8); + r0 = (0 - s.tmp_2); s.tmp_1 = r0; - r0 = (s.arg3 + 128); + r0 = (s.tmp_0).fields["xStep"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg1; + r0 = s.arg1.fields["dx"]; + s.tmp_2 = r0; + r0 = (0 - s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["dx"] = (s.tmp_1); + case 32: + case 33: + { step = 35; continue; } + case 34: + r0 = (s.arg1).fields["dx"] = (0); + r0 = (s.s___192236).fields["_vx"] = (0); + case 35: + { step = 39; continue; } + case 36: + s.tmp_2 = Math_sign__P166656_mk(s); + r0 = s.s___192236.fields["_vx"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 + 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, s.col___190878); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -particles_AreaFactory_drawParticle__P169731.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__P169731_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: particles_AreaFactory_drawParticle__P169731, depth: s.depth + 1, - pc: 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, - col___190878: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, -} } - - - - - -function particles_AreaFactory_createParticle__P169730(s) { -let r0 = s.r0, 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___190896 = 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__C169724_VT)) failedCast(r0); - s.tmp_0 = particles_SprayFactory_createParticle__P169720_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 1651; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.p___190896 = (r0); - s.tmp_0 = r0 = s.p___190896; - s.tmp_2 = Math_FastRandom_randomRange__P169590_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 = 1652; s.pc = 4; return s.tmp_2; - case 4: + s.callLocIdx = 792; s.pc = 112; return s.tmp_2; + case 112: r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_0).fields["lifespan"] = (s.tmp_1); - s.tmp_0 = r0 = s.p___190896; - s.tmp_4 = Math_FastRandom_randomRange__P169590_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 = 1653; 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___190896.fields["_x"]; + s.tmp_6 = Math_sign__P166656_mk(s); + r0 = s.arg1.fields["cachedVx"]; s.tmp_7 = r0; - r0 = (s.tmp_2 << 8); + r0 = (s.tmp_7 + 128); 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 = 1656; s.pc = 6; return s.tmp_1; } - } - case 6: + r0 = (s.tmp_8 >> 8); + s.tmp_6.arg0 = r0; + s.callLocIdx = 794; s.pc = 113; return s.tmp_6; + case 113: r0 = s.retval; + s.tmp_5 = r0; + r0 = (s.tmp_1 === s.tmp_5); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 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 = 1657; s.pc = 7; return s.tmp_3; } - } - case 7: + if (!r0) { step = 37; continue; } + r0 = (s.arg1).fields["dx"] = (0); + case 37: + case 38: + case 39: + case 40: + case 41: + case 42: + case 43: + case 44: + r0 = (s.yDiff___192278 !== 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 81; continue; } + r0 = (s.yDiff___192278 > 0); + s.down___192489 = (r0); + r0 = pxsim_numops_toBoolDecr(s.down___192489); + if (!r0) { step = 45; continue; } + s.tmp_1 = game_Hitbox_bottom__P168746_mk(s); + s.tmp_1.arg0 = s.hbox___192261; + s.callLocIdx = 795; s.pc = 114; return s.tmp_1; + case 114: + r0 = s.retval; + s.tmp_0 = r0; + r0 = (s.tmp_0 + 256); + { step = 46; continue; } + case 45: + s.tmp_3 = game_Hitbox_top__P168744_mk(s); + s.tmp_3.arg0 = s.hbox___192261; + s.callLocIdx = 797; s.pc = 115; return s.tmp_3; + case 115: r0 = s.retval; s.tmp_2 = r0; - r0 = (s.tmp_2 >> 1); - { step = 2; continue; } - case 1: - r0 = 0; - case 2: + r0 = (s.tmp_2 - 256); + case 46: // jmp value (already in r0) s.tmp_4 = r0; - s.tmp_5 = r0 = s.p___190896; - s.tmp_9 = Math_FastRandom_randomRange__P169590_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 = 1655; s.pc = 8; return s.tmp_9; - case 8: + r0 = (s.tmp_4 + 128); + s.tmp_5 = r0; + r0 = (s.tileScale___192264 + 8); + s.tmp_6 = r0; + r0 = (s.tmp_5 >> s.tmp_6); + s.y0___192493 = (r0); + r0 = pxsim_Array__mk(); + s.collidedTiles___192508 = (r0); + s.tmp_0 = game_Hitbox_left__P168743_mk(s); + s.tmp_0.arg0 = s.hbox___192261; + s.callLocIdx = 801; s.pc = 116; return s.tmp_0; + case 116: + r0 = s.retval; + s.x___192510 = (r0); + case 47: + s.tmp_1 = r0 = s.x___192510; + s.tmp_3 = r0 = s.tileSize___192267; + s.tmp_5 = game_Hitbox_right__P168745_mk(s); + s.tmp_5.arg0 = s.hbox___192261; + s.callLocIdx = 802; s.pc = 117; return s.tmp_5; + case 117: + r0 = s.retval; + s.tmp_4 = r0; + r0 = (s.tmp_3 << 8); + s.tmp_6 = r0; + r0 = (s.tmp_6 + s.tmp_4); + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 52; continue; } + s.tmp_9 = Fx_min__P166693_mk(s); + s.tmp_9.arg0 = s.x___192510; + s.tmp_10 = game_Hitbox_right__P168745_mk(s); + s.tmp_10.arg0 = s.hbox___192261; + s.callLocIdx = 804; s.pc = 119; return s.tmp_10; + case 119: + r0 = s.retval; + s.tmp_9.arg1 = r0; + s.callLocIdx = 805; s.pc = 118; return s.tmp_9; + case 118: r0 = s.retval; s.tmp_8 = r0; - r0 = (s.tmp_8 - s.tmp_4); + r0 = (s.tmp_8 + 128); s.tmp_7 = r0; - r0 = s.p___190896.fields["_y"]; - s.tmp_10 = r0; - r0 = (s.tmp_7 << 8); + r0 = (s.tileScale___192264 + 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___190896; - return leave(s, r0) - default: oops() -} } } -particles_AreaFactory_createParticle__P169730.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__P169730_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: particles_AreaFactory_createParticle__P169730, depth: s.depth + 1, - pc: 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___190896: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function Fx_iadd__P166685(s) { -let r0 = s.r0, 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 = (s.tmp_7 >> s.tmp_11); + s.x0___192520 = (r0); + s.tmp_1 = tiles_TileMap_isObstacle__P169283_mk(s); + s.tmp_1.arg0 = s.arg2; + s.tmp_1.arg1 = s.x0___192520; + s.tmp_1.arg2 = s.y0___192493; + s.callLocIdx = 808; s.pc = 120; return s.tmp_1; + case 120: + r0 = s.retval; s.tmp_0 = r0; - r0 = (s.tmp_0 + s.arg1); - return leave(s, r0) - default: oops() -} } } -Fx_iadd__P166685.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__P166685_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Fx_iadd__P166685, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function particles_SprayFactory_drawParticle__P169721(s) { -let r0 = s.r0, 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, particles_SprayFactory__C169718_VT)) failedCast(r0); - s.tmp_0 = r0 = globals.screen___168559; - r0 = (s.arg2 + 128); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 50; continue; } + s.tmp_2 = tiles_TileMap_getObstacle__P169284_mk(s); + s.tmp_2.arg0 = s.arg2; + s.tmp_2.arg1 = s.x0___192520; + s.tmp_2.arg2 = s.y0___192493; + s.callLocIdx = 809; s.pc = 121; return s.tmp_2; + case 121: + r0 = s.retval; + s.obstacle___192534 = (r0); + r0 = pxsim_pxtcore_mkAction(1, ArcadePhysicsEngine_tilemapCollisions_inline__P192542); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.obstacle___192534); + s.tmp_4 = helpers_arraySome__P166634_mk(s); + s.tmp_4.arg0 = s.collidedTiles___192508; + s.tmp_4.arg1 = s.tmp_0; + s.callLocIdx = 810; s.pc = 122; return s.tmp_4; + case 122: + r0 = s.retval; + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); s.tmp_2 = r0; - r0 = (s.tmp_2 >> 8); + r0 = pxsim_Boolean__bang(s.tmp_2); s.tmp_1 = r0; - r0 = (s.arg3 + 128); + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 48; continue; } + r0 = pxsim_Array__push(s.collidedTiles___192508, s.obstacle___192534); + case 48: + case 49: + case 50: + case 51: + r0 = (s.tileSize___192267 << 8); + s.tmp_0 = r0; + r0 = (s.tmp_0 + s.x___192510); + s.x___192510 = (r0); + { step = 47; continue; } + case 52: + r0 = pxsim_Array__length(s.collidedTiles___192508); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 79; continue; } + r0 = pxsim_numops_toBoolDecr(s.down___192489); + if (!r0) { step = 53; continue; } + r0 = 3; + { step = 54; continue; } + case 53: + r0 = 1; + case 54: + // jmp value (already in r0) + s.tmp_1 = r0; + s.collisionDirection___192561 = (s.tmp_1); + r0 = pxsim_numops_toBoolDecr(s.down___192489); + if (!r0) { step = 55; continue; } + r0 = (s.y0___192493 << s.tileScale___192264); + 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___192261.fields["height"]; + s.tmp_3 = r0; + r0 = (s.tmp_0 - s.tmp_3); + { step = 56; continue; } + case 55: + r0 = (s.y0___192493 + 1); + s.tmp_5 = r0; + r0 = (s.tmp_5 << s.tileScale___192264); s.tmp_4 = r0; - r0 = (s.tmp_4 >> 8); + r0 = (s.tmp_4 * 256); + s.tmp_6 = r0; + r0 = (s.tmp_6 | 0); + case 56: + // jmp value (already in r0) + s.tmp_7 = r0; + s.tmp_8 = r0 = s.s___192236; + r0 = s.hbox___192261.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___192587 = (undefined); + s.unnamed820___U24 = (s.collidedTiles___192508); + s.unnamed821___U25 = (0); + case 57: + s.tmp_0 = r0 = s.unnamed821___U25; + r0 = pxsim_Array__length(s.unnamed820___U24); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 60; continue; } + r0 = pxsim_Array__getAt(s.unnamed820___U24, s.unnamed821___U25); + s.tile___192587 = (r0); + r0 = s.s___192236.fields["flags"]; + s.tmp_5 = r0; + r0 = (s.tmp_5 & 2818); + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); s.tmp_3 = r0; - r0 = pxsim_ImageMethods.setPixel(s.tmp_0, s.tmp_1, s.tmp_3, 1); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -particles_SprayFactory_drawParticle__P169721.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__P169721_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: particles_SprayFactory_drawParticle__P169721, depth: s.depth + 1, - pc: 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_SprayFactory_createParticle__P169720(s) { -let r0 = s.r0, 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___190963 = undefined; - s.angle___190967 = 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__C169718_VT)) failedCast(r0); - s.tmp_0 = particles_ParticleFactory_createParticle__P169716_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 1640; s.pc = 1; return s.tmp_0; - case 1: + r0 = pxsim_Boolean__bang(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 58; continue; } + s.tmp_6 = Sprite_registerObstacle__P168953_mk(s); + s.tmp_6.arg0 = s.s___192236; + s.tmp_6.arg1 = s.collisionDirection___192561; + s.tmp_6.arg2 = s.tile___192587; + s.tmp_6.arg3 = s.arg2; + s.callLocIdx = 816; s.pc = 123; return s.tmp_6; + case 123: r0 = s.retval; - s.p___190963 = (r0); - r0 = s.arg0.fields["minAngle"]; + case 58: + case 59: + r0 = (s.unnamed821___U25 + 1); + s.unnamed821___U25 = (r0); + { step = 57; continue; } + case 60: + s.unnamed820___U24 = (undefined); + r0 = s.s___192236.fields["flags"]; s.tmp_1 = r0; - s.tmp_3 = Math_FastRandom_randomRange__P169590_mk(s); - s.tmp_3.arg0 = globals.galois___172813; - s.tmp_3.arg1 = 0; - r0 = s.arg0.fields["spread"]; - s.tmp_3.arg2 = r0; - s.callLocIdx = 1641; s.pc = 2; return s.tmp_3; - case 2: + 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__P168955_mk(s); + s.tmp_2.arg0 = s.s___192236; + s.tmp_2.arg1 = undefined; + s.tmp_2.arg2 = undefined; + s.callLocIdx = 817; s.pc = 124; return s.tmp_2; + case 124: r0 = s.retval; + { step = 78; continue; } + case 61: + r0 = s.s___192236.fields["_vy"]; + s.tmp_1 = r0; + r0 = s.arg1.fields["cachedVy"]; s.tmp_2 = r0; - r0 = (s.tmp_1 + s.tmp_2); + r0 = (s.tmp_1 === s.tmp_2); s.tmp_0 = r0; - r0 = (s.tmp_0 % 100); - s.angle___190967 = (r0); - s.tmp_0 = r0 = s.p___190963; - r0 = pxsim_Array__getAt(globals.cachedSin___172808, s.angle___190967); - s.tmp_2 = r0; - r0 = s.arg0.fields["speed"]; - s.tmp_3 = r0; - r0 = pxsim.Math_.imul(s.tmp_2, s.tmp_3); + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 62; continue; } + r0 = s.tmp_0; + { step = 63; continue; } + case 62: + r0 = s.s___192236.fields["flags"]; + s.tmp_5 = r0; + r0 = (s.tmp_5 & 2818); s.tmp_4 = r0; - r0 = (s.tmp_4 >> 8); + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + s.tmp_3 = r0; + r0 = pxsim_Boolean__bang(s.tmp_3); + case 63: + // jmp value (already in r0) + s.tmp_6 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_6); + if (!r0) { step = 74; continue; } + r0 = s.s___192236.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___192489); + s.tmp_10 = r0; + r0 = pxsim_Boolean__bang(s.tmp_10); + s.tmp_9 = r0; + r0 = pxsim_numops_toBool(s.tmp_9); + if (r0) { step = 64; continue; } + r0 = s.tmp_9; + { step = 65; continue; } + case 64: + s.tmp_12 = Sprite_vy__P168887_mk(s); + s.tmp_12.arg0 = s.s___192236; + s.callLocIdx = 818; s.pc = 125; return s.tmp_12; + case 125: + r0 = s.retval; + s.tmp_11 = r0; + r0 = (s.tmp_11 < 0); + case 65: + // jmp value (already in r0) + s.tmp_13 = r0; + r0 = pxsim_numops_toBool(s.tmp_13); + if (!r0) { step = 66; continue; } + r0 = s.tmp_13; + { step = 69; continue; } + case 66: + s.tmp_14 = r0 = s.down___192489; + 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__P168887_mk(s); + s.tmp_16.arg0 = s.s___192236; + s.callLocIdx = 819; s.pc = 126; return s.tmp_16; + case 126: + r0 = s.retval; + s.tmp_15 = r0; + r0 = (s.tmp_15 > 0); + case 68: + // jmp value (already in r0) + s.tmp_17 = r0; + r0 = s.tmp_17; + case 69: + // jmp value (already in r0) + s.tmp_18 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_18); + if (!r0) { step = 70; continue; } + s.tmp_19 = r0 = s.s___192236; + r0 = s.s___192236.fields["_vy"]; + s.tmp_21 = r0; + r0 = (0 - s.tmp_21); + s.tmp_20 = r0; + r0 = (s.tmp_19).fields["_vy"] = (s.tmp_20); + s.tmp_0 = r0 = s.arg1; + r0 = s.arg1.fields["yStep"]; + s.tmp_2 = r0; + r0 = (0 - s.tmp_2); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["vx"] = (s.tmp_1); - s.tmp_0 = r0 = s.p___190963; - r0 = pxsim_Array__getAt(globals.cachedCos___172809, s.angle___190967); + r0 = (s.tmp_0).fields["yStep"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg1; + r0 = s.arg1.fields["dy"]; s.tmp_2 = r0; - r0 = s.arg0.fields["speed"]; + r0 = (0 - s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["dy"] = (s.tmp_1); + case 70: + case 71: + { step = 73; continue; } + case 72: + r0 = (s.arg1).fields["dy"] = (0); + r0 = (s.s___192236).fields["_vy"] = (0); + case 73: + { step = 77; continue; } + case 74: + s.tmp_2 = Math_sign__P166656_mk(s); + r0 = s.s___192236.fields["_vy"]; s.tmp_3 = r0; - r0 = pxsim.Math_.imul(s.tmp_2, s.tmp_3); + r0 = (s.tmp_3 + 128); s.tmp_4 = r0; r0 = (s.tmp_4 >> 8); + s.tmp_2.arg0 = r0; + s.callLocIdx = 824; s.pc = 127; return s.tmp_2; + case 127: + r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_0).fields["vy"] = (s.tmp_1); - r0 = s.p___190963; - return leave(s, r0) - default: oops() -} } } -particles_SprayFactory_createParticle__P169720.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__P169720_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: particles_SprayFactory_createParticle__P169720, depth: s.depth + 1, - pc: 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___190963: undefined, - angle___190967: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function effects_ScreenEffect_startScreenEffect__P169795(s) { -let r0 = s.r0, 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, effects_ScreenEffect__C169793_VT)) failedCast(r0); - r0 = s.arg0.fields["sourceFactory"]; + s.tmp_6 = Math_sign__P166656_mk(s); + r0 = s.arg1.fields["cachedVy"]; + s.tmp_7 = r0; + r0 = (s.tmp_7 + 128); + s.tmp_8 = r0; + r0 = (s.tmp_8 >> 8); + s.tmp_6.arg0 = r0; + s.callLocIdx = 826; s.pc = 128; return s.tmp_6; + case 128: + r0 = s.retval; + s.tmp_5 = r0; + r0 = (s.tmp_1 === s.tmp_5); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 75; continue; } + r0 = (s.arg1).fields["dy"] = (0); + case 75: + case 76: + case 77: + case 78: + case 79: + case 80: + case 81: + case 82: + case 83: + case 84: + r0 = s.s___192236.fields["flags"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 & 1538); s.tmp_2 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 13; continue; } - case 1: - case 2: - r0 = s.arg0.fields["source"]; - s.tmp_3 = r0; - r0 = pxsim_numops_toBool(s.tmp_3); - if (r0) { step = 3; continue; } - r0 = s.tmp_3; - { step = 4; continue; } - case 3: - s.tmp_4 = particles_ParticleSource_enabled__P169690_mk(s); - r0 = s.arg0.fields["source"]; - s.tmp_4.arg0 = r0; - s.callLocIdx = 1682; s.pc = 14; return s.tmp_4; - case 14: + if (!r0) { step = 95; continue; } + r0 = pxsim_Array__mk(); + s.overlappedTiles___192681 = (r0); + s.tmp_0 = game_Hitbox_left__P168743_mk(s); + s.tmp_0.arg0 = s.hbox___192261; + s.callLocIdx = 827; s.pc = 129; return s.tmp_0; + case 129: r0 = s.retval; - case 4: - // jmp value (already in r0) - s.tmp_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); - if (!r0) { step = 7; continue; } - r0 = pxsim_numops_toBoolDecr(s.arg1); - if (!r0) { step = 5; continue; } - r0 = s.arg0.fields["source"]; - s.tmp_6 = r0; - r0 = (s.tmp_6).fields["lifespan"] = (s.arg1); - case 5: - case 6: - { step = 13; continue; } - case 7: - case 8: - s.tmp_0 = effects_ScreenEffect_endScreenEffect__P169796_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1683; s.pc = 15; return s.tmp_0; - case 15: + s.x___192683 = (r0); + case 85: + s.tmp_1 = r0 = s.x___192683; + s.tmp_3 = r0 = s.tileSize___192267; + s.tmp_5 = game_Hitbox_right__P168745_mk(s); + s.tmp_5.arg0 = s.hbox___192261; + s.callLocIdx = 828; s.pc = 130; return s.tmp_5; + case 130: r0 = s.retval; - r0 = pxsim_pxtcore_mkClassInstance(effects_SceneAnchor__C172841_VT); + s.tmp_4 = r0; + r0 = (s.tmp_3 << 8); + s.tmp_6 = r0; + r0 = (s.tmp_6 + s.tmp_4); + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); s.tmp_0 = r0; - s.tmp_1 = effects_SceneAnchor_constructor__P172846_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 1684; s.pc = 16; return s.tmp_1; - case 16: + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 92; continue; } + s.tmp_9 = Fx_min__P166693_mk(s); + s.tmp_9.arg0 = s.x___192683; + s.tmp_10 = game_Hitbox_right__P168745_mk(s); + s.tmp_10.arg0 = s.hbox___192261; + s.callLocIdx = 830; s.pc = 132; return s.tmp_10; + case 132: r0 = s.retval; - r0 = pxsim_numops_toBoolDecr(s.arg2); - if (!r0) { step = 9; continue; } - r0 = s.arg2; - { step = 10; continue; } - case 9: - r0 = s.arg0.fields["sceneDefaultRate"]; - case 10: - // jmp value (already in r0) + s.tmp_9.arg1 = r0; + s.callLocIdx = 831; s.pc = 131; return s.tmp_9; + case 131: + r0 = s.retval; + s.tmp_8 = r0; + r0 = (s.tmp_8 + 128); + s.tmp_7 = r0; + r0 = (s.tileScale___192264 + 8); + s.tmp_11 = r0; + r0 = (s.tmp_7 >> s.tmp_11); + s.x0___192693 = (r0); + s.tmp_0 = game_Hitbox_top__P168744_mk(s); + s.tmp_0.arg0 = s.hbox___192261; + s.callLocIdx = 834; s.pc = 133; return s.tmp_0; + case 133: + r0 = s.retval; + s.y___192703 = (r0); + case 86: + s.tmp_1 = r0 = s.y___192703; + s.tmp_3 = r0 = s.tileSize___192267; + s.tmp_5 = game_Hitbox_bottom__P168746_mk(s); + s.tmp_5.arg0 = s.hbox___192261; + s.callLocIdx = 835; s.pc = 134; return s.tmp_5; + case 134: + r0 = s.retval; + s.tmp_4 = r0; + r0 = (s.tmp_3 << 8); + s.tmp_6 = r0; + r0 = (s.tmp_6 + s.tmp_4); s.tmp_2 = r0; - s.tmp_3 = r0 = s.arg0; - s.tmp_5 = if_sourceFactory_3_mk(s); - s.tmp_5.arg0 = s.arg0; - s.tmp_5.arg1 = s.tmp_0; - s.tmp_5.arg2 = s.tmp_2; - if (!s.tmp_5.arg0.vtable.iface) { - setupLambda(s.tmp_5, pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "sourceFactory"), 3); - s.callLocIdx = 1685; s.pc = 17; return s.tmp_5; - } else { - s.tmp_5.fn = s.tmp_5.arg0.vtable.iface["sourceFactory"]; - if (s.tmp_5.fn == null) { setupLambda(s.tmp_5, s.tmp_5.arg0.fields["sourceFactory"], 3); s.callLocIdx = 1685; s.pc = 17; return s.tmp_5; } - else if (s.tmp_5.fn.isGetter) { s.tmp_5.stage2Call = true; s.callLocIdx = 1685; s.pc = 17; return s.tmp_5;; } - else { s.callLocIdx = 1685; s.pc = 17; return s.tmp_5; } - } - case 17: + r0 = (s.tmp_1 < s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 91; continue; } + s.tmp_9 = Fx_min__P166693_mk(s); + s.tmp_9.arg0 = s.y___192703; + s.tmp_10 = game_Hitbox_bottom__P168746_mk(s); + s.tmp_10.arg0 = s.hbox___192261; + s.callLocIdx = 837; s.pc = 136; return s.tmp_10; + case 136: + r0 = s.retval; + s.tmp_9.arg1 = r0; + s.callLocIdx = 838; s.pc = 135; return s.tmp_9; + case 135: + r0 = s.retval; + s.tmp_8 = r0; + r0 = (s.tmp_8 + 128); + s.tmp_7 = r0; + r0 = (s.tileScale___192264 + 8); + s.tmp_11 = r0; + r0 = (s.tmp_7 >> s.tmp_11); + s.y0___192713 = (r0); + s.tmp_3 = tiles_TileMap_isObstacle__P169283_mk(s); + s.tmp_3.arg0 = s.arg2; + s.tmp_3.arg1 = s.x0___192693; + s.tmp_3.arg2 = s.y0___192713; + s.callLocIdx = 841; s.pc = 137; return s.tmp_3; + case 137: r0 = s.retval; + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 87; continue; } + r0 = s.tmp_0; + { step = 88; continue; } + case 87: + r0 = s.s___192236.fields["flags"]; + s.tmp_8 = r0; + r0 = (s.tmp_8 & 2048); + s.tmp_7 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_7); + s.tmp_6 = r0; + r0 = pxsim_Boolean__bang(s.tmp_6); + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); s.tmp_4 = r0; - r0 = (s.tmp_3).fields["source"] = (s.tmp_4); - r0 = s.arg0.fields["source"]; + r0 = pxsim_Boolean__bang(s.tmp_4); + case 88: + // jmp value (already in r0) + s.tmp_9 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_9); + if (!r0) { step = 89; continue; } + s.tmp_10 = r0 = s.overlappedTiles___192681; + s.tmp_12 = tiles_TileMap_getTile__P169276_mk(s); + s.tmp_12.arg0 = s.arg2; + s.tmp_12.arg1 = s.x0___192693; + s.tmp_12.arg2 = s.y0___192713; + s.callLocIdx = 842; s.pc = 138; return s.tmp_12; + case 138: + r0 = s.retval; + s.tmp_11 = r0; + r0 = pxsim_Array__push(s.tmp_10, s.tmp_11); + case 89: + case 90: + r0 = (s.tileSize___192267 << 8); s.tmp_0 = r0; - r0 = (s.tmp_0).fields["priority"] = (10); - r0 = pxsim_numops_toBoolDecr(s.arg1); - if (!r0) { step = 11; continue; } - r0 = s.arg0.fields["source"]; + r0 = (s.tmp_0 + s.y___192703); + s.y___192703 = (r0); + { step = 86; continue; } + case 91: + r0 = (s.tileSize___192267 << 8); s.tmp_0 = r0; - r0 = (s.tmp_0).fields["lifespan"] = (s.arg1); - case 11: - case 12: - case 13: + r0 = (s.tmp_0 + s.x___192683); + s.x___192683 = (r0); + { step = 85; continue; } + case 92: + r0 = pxsim_Array__length(s.overlappedTiles___192681); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 93; continue; } + s.tmp_1 = ArcadePhysicsEngine_tilemapOverlaps__P172314_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_1.arg1 = s.s___192236; + s.tmp_1.arg2 = s.overlappedTiles___192681; + s.callLocIdx = 845; s.pc = 139; return s.tmp_1; + case 139: + r0 = s.retval; + case 93: + case 94: + case 95: + case 96: r0 = undefined; return leave(s, r0) default: oops() } } } -effects_ScreenEffect_startScreenEffect__P169795.info = {"start":3680,"length":601,"line":97,"column":8,"endLine":112,"endColumn":9,"fileName":"pxt_modules/game/particleeffects.ts","functionName":"startScreenEffect","argumentNames":["this","duration","particlesPerSecond"]} +ArcadePhysicsEngine_tilemapCollisions__P172313.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 effects_ScreenEffect_startScreenEffect__P169795_mk(s) { +function ArcadePhysicsEngine_tilemapCollisions__P172313_mk(s) { checkStack(s.depth); return { - parent: s, fn: effects_ScreenEffect_startScreenEffect__P169795, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_tilemapCollisions__P172313, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -55727,6 +61632,52 @@ function effects_ScreenEffect_startScreenEffect__P169795_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, + s___192236: undefined, + hbox___192261: undefined, + tileScale___192264: undefined, + tileSize___192267: undefined, + xDiff___192271: undefined, + yDiff___192278: undefined, + right___192294: undefined, + x0___192298: undefined, + collidedTiles___192313: undefined, + y___192315: undefined, + y0___192329: undefined, + obstacle___192345: undefined, + collisionDirection___192372: undefined, + tile___192398: undefined, + unnamed818___U14: undefined, + unnamed819___U15: undefined, + down___192489: undefined, + y0___192493: undefined, + collidedTiles___192508: undefined, + x___192510: undefined, + x0___192520: undefined, + obstacle___192534: undefined, + collisionDirection___192561: undefined, + tile___192587: undefined, + unnamed820___U24: undefined, + unnamed821___U25: undefined, + overlappedTiles___192681: undefined, + x___192683: undefined, + x0___192693: undefined, + y___192703: undefined, + y0___192713: undefined, arg0: undefined, arg1: undefined, arg2: undefined, @@ -55736,7 +61687,7 @@ function effects_ScreenEffect_startScreenEffect__P169795_mk(s) { -function effects_SceneAnchor_constructor__P172846(s) { +function ArcadePhysicsEngine_tilemapCollisions_inline__P192353(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -55750,30 +61701,23 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, effects_SceneAnchor__C172841_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1678; s.pc = 1; return s.tmp_2; - case 1: - r0 = s.retval; - r0 = r0.fields["camera"]; + r0 = s.arg0.fields["tileIndex"]; + s.tmp_0 = r0; + r0 = s.caps[0].fields["tileIndex"]; s.tmp_1 = r0; - r0 = (s.tmp_0).fields["camera"] = (s.tmp_1); - r0 = undefined; + r0 = (s.tmp_0 === s.tmp_1); return leave(s, r0) default: oops() } } } -effects_SceneAnchor_constructor__P172846.info = {"start":2296,"length":79,"line":55,"column":8,"endLine":57,"endColumn":9,"fileName":"pxt_modules/game/particleeffects.ts","functionName":"inline","argumentNames":["this"]} +ArcadePhysicsEngine_tilemapCollisions_inline__P192353.info = {"start":15147,"length":39,"line":441,"column":48,"endLine":441,"endColumn":87,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["o"]} -function effects_SceneAnchor_constructor__P172846_mk(s) { +function ArcadePhysicsEngine_tilemapCollisions_inline__P192353_mk(s) { checkStack(s.depth); return { - parent: s, fn: effects_SceneAnchor_constructor__P172846, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_tilemapCollisions_inline__P192353, 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, } } @@ -55781,7 +61725,7 @@ function effects_SceneAnchor_constructor__P172846_mk(s) { -function effects_ScreenEffect_endScreenEffect__P169796(s) { +function ArcadePhysicsEngine_tilemapCollisions_inline__P192542(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -55795,31 +61739,20 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, effects_ScreenEffect__C169793_VT)) failedCast(r0); - r0 = s.arg0.fields["source"]; + r0 = s.arg0.fields["tileIndex"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_1 = particles_ParticleSource_destroy__P169692_mk(s); - r0 = s.arg0.fields["source"]; - s.tmp_1.arg0 = r0; - s.callLocIdx = 1686; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; - r0 = (s.arg0).fields["source"] = (undefined); - case 1: - case 2: - r0 = undefined; + r0 = s.caps[0].fields["tileIndex"]; + s.tmp_1 = r0; + r0 = (s.tmp_0 === s.tmp_1); return leave(s, r0) default: oops() } } } -effects_ScreenEffect_endScreenEffect__P169796.info = {"start":4677,"length":160,"line":122,"column":8,"endLine":127,"endColumn":9,"fileName":"pxt_modules/game/particleeffects.ts","functionName":"endScreenEffect","argumentNames":["this"]} +ArcadePhysicsEngine_tilemapCollisions_inline__P192542.info = {"start":18668,"length":39,"line":522,"column":48,"endLine":522,"endColumn":87,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["o"]} -function effects_ScreenEffect_endScreenEffect__P169796_mk(s) { +function ArcadePhysicsEngine_tilemapCollisions_inline__P192542_mk(s) { checkStack(s.depth); return { - parent: s, fn: effects_ScreenEffect_endScreenEffect__P169796, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_tilemapCollisions_inline__P192542, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -55830,50 +61763,7 @@ function effects_ScreenEffect_endScreenEffect__P169796_mk(s) { -function Render_Animations_constructor__P171808(s) { -let r0 = s.r0, 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, Render_Animations__C171807_VT)) failedCast(r0); - r0 = (s.arg0).fields["frameInterval"] = (s.arg1); - r0 = (s.arg0).fields["animations"] = (s.arg2); - r0 = (s.arg0).fields["msLast"] = (0); - r0 = (s.arg0).fields["index"] = (0); - r0 = (s.arg0).fields["iAnimation"] = (0); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -Render_Animations_constructor__P171808.info = {"start":460,"length":83,"line":21,"column":8,"endLine":22,"endColumn":9,"fileName":"pxt_modules/pxt-raycasting/render_blocks.ts","functionName":"inline","argumentNames":["this","frameInterval","animations"]} - -function Render_Animations_constructor__P171808_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Render_Animations_constructor__P171808, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, - arg1: undefined, - arg2: undefined, -} } - - - - - -function sprites_BaseSpriteSayRenderer_constructor__P168787(s) { +function ArcadePhysicsEngine_tilemapOverlaps__P172314(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -55883,77 +61773,115 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.alreadyHandled___192760 = undefined; + s.tile___192763 = undefined; + s.unnamed822___U2 = undefined; + s.unnamed823___U3 = undefined; + s.tileOverlapHandlers___192784 = 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_BaseSpriteSayRenderer__C168786_VT)) failedCast(r0); - r0 = (s.arg0).fields["text"] = (s.arg1); - r0 = (s.arg0).fields["fgColor"] = (s.arg2); - r0 = (s.arg0).fields["bgColor"] = (s.arg3); + if (!checkSubtype(r0, ArcadePhysicsEngine__C169054_VT)) failedCast(r0); + r0 = pxsim_Array__mk(); + s.alreadyHandled___192760 = (r0); + s.tile___192763 = (undefined); + s.unnamed822___U2 = (s.arg2); + s.unnamed823___U3 = (0); + case 1: + s.tmp_0 = r0 = s.unnamed823___U3; + r0 = pxsim_Array__length(s.unnamed822___U2); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 7; continue; } + r0 = pxsim_Array__getAt(s.unnamed822___U2, s.unnamed823___U3); + s.tile___192763 = (r0); + r0 = pxsim_pxtcore_mkAction(1, ArcadePhysicsEngine_tilemapOverlaps_inline__P192767); + s.tmp_2 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_2, 0, s.tile___192763); + s.tmp_4 = helpers_arraySome__P166634_mk(s); + s.tmp_4.arg0 = s.alreadyHandled___192760; + s.tmp_4.arg1 = s.tmp_2; + s.callLocIdx = 850; s.pc = 8; return s.tmp_4; + case 8: + r0 = s.retval; + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 2; continue; } + { step = 6; continue; } + case 2: + case 3: + r0 = pxsim_Array__push(s.alreadyHandled___192760, s.tile___192763); + s.tmp_0 = game_currentScene__P169526_mk(s); + s.callLocIdx = 851; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; + r0 = r0.fields["tileOverlapHandlers"]; + s.tileOverlapHandlers___192784 = (r0); + r0 = pxsim_numops_toBoolDecr(s.tileOverlapHandlers___192784); + if (!r0) { step = 4; continue; } + r0 = pxsim_pxtcore_mkAction(2, forEach_inline__P192792); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.tile___192763); + r0 = pxsim_pxtcore_mkAction(2, ArcadePhysicsEngine_tilemapOverlaps_inline__P192808); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.arg1); + r0 = pxsim_pxtrt_stclo(s.tmp_1, 1, s.tile___192763); + s.tmp_2 = helpers_arrayForEach__P166636_mk(s); + s.tmp_3 = helpers_arrayFilter__P166637_mk(s); + s.tmp_3.arg0 = s.tileOverlapHandlers___192784; + s.tmp_3.arg1 = s.tmp_0; + s.callLocIdx = 854; s.pc = 11; return s.tmp_3; + case 11: + r0 = s.retval; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = s.tmp_1; + s.callLocIdx = 856; s.pc = 10; return s.tmp_2; + case 10: + r0 = s.retval; + case 4: + case 5: + case 6: + r0 = (s.unnamed823___U3 + 1); + s.unnamed823___U3 = (r0); + { step = 1; continue; } + case 7: + s.unnamed822___U2 = (undefined); r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_BaseSpriteSayRenderer_constructor__P168787.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"]} +ArcadePhysicsEngine_tilemapOverlaps__P172314.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 sprites_BaseSpriteSayRenderer_constructor__P168787_mk(s) { +function ArcadePhysicsEngine_tilemapOverlaps__P172314_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_BaseSpriteSayRenderer_constructor__P168787, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_tilemapOverlaps__P172314, depth: s.depth + 1, pc: 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___192760: undefined, + tile___192763: undefined, + unnamed822___U2: undefined, + unnamed823___U3: undefined, + tileOverlapHandlers___192784: undefined, arg0: undefined, arg1: undefined, arg2: undefined, - arg3: undefined, -} } - - - - - -function info_PlayerInfo_id__P169171(s) { -let r0 = s.r0, 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, info_PlayerInfo__C169144_VT)) failedCast(r0); - r0 = s.arg0.fields["impl"]; - s.tmp_0 = r0; - r0 = s.tmp_0.fields["_player"]; - return leave(s, r0) - default: oops() -} } } -info_PlayerInfo_id__P169171.info = {"start":27670,"length":59,"line":921,"column":8,"endLine":923,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"id","argumentNames":["this"]} - -function info_PlayerInfo_id__P169171_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: info_PlayerInfo_id__P169171, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, } } -function info_PlayerInfo_y__P169165(s) { +function ArcadePhysicsEngine_tilemapOverlaps_inline__P192767(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -55965,63 +61893,44 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, info_PlayerInfo__C169144_VT)) failedCast(r0); - r0 = s.arg0.fields["impl"]; + r0 = s.arg0.fields["_col"]; + s.tmp_1 = r0; + r0 = s.caps[0].fields["_col"]; + s.tmp_2 = r0; + r0 = (s.tmp_1 === s.tmp_2); s.tmp_0 = r0; - r0 = (s.tmp_0).fields["y"] = (s.arg1); - r0 = undefined; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + r0 = s.arg0.fields["_row"]; + s.tmp_3 = r0; + r0 = s.caps[0].fields["_row"]; + s.tmp_4 = r0; + r0 = (s.tmp_3 === s.tmp_4); + case 2: + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = s.tmp_5; return leave(s, r0) default: oops() } } } -info_PlayerInfo_y__P169165.info = {"start":27116,"length":65,"line":895,"column":8,"endLine":897,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"y","argumentNames":["this","value"]} +ArcadePhysicsEngine_tilemapOverlaps_inline__P192767.info = {"start":23075,"length":51,"line":630,"column":36,"endLine":630,"endColumn":87,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["l"]} -function info_PlayerInfo_y__P169165_mk(s) { +function ArcadePhysicsEngine_tilemapOverlaps_inline__P192767_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_PlayerInfo_y__P169165, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_tilemapOverlaps_inline__P192767, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function info_PlayerInfo_y__P169164(s) { -let r0 = s.r0, 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, info_PlayerInfo__C169144_VT)) failedCast(r0); - r0 = s.arg0.fields["impl"]; - r0 = r0.fields["y"]; - return leaveAccessor(s, r0) - default: oops() -} } } -info_PlayerInfo_y__P169164.info = {"start":27047,"length":59,"line":891,"column":8,"endLine":893,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"y","argumentNames":["this"]} -info_PlayerInfo_y__P169164.isGetter = true; - -function info_PlayerInfo_y__P169164_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: info_PlayerInfo_y__P169164, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, arg0: undefined, } } @@ -56029,7 +61938,7 @@ function info_PlayerInfo_y__P169164_mk(s) { -function info_PlayerInfo_x__P169163(s) { +function forEach_inline__P192792(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -56041,63 +61950,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, info_PlayerInfo__C169144_VT)) failedCast(r0); - r0 = s.arg0.fields["impl"]; + r0 = s.arg0.fields["spriteKind"]; + s.tmp_1 = r0; + r0 = s.caps[0].fields["_kind"]; + s.tmp_2 = r0; + r0 = (s.tmp_1 == s.tmp_2); s.tmp_0 = r0; - r0 = (s.tmp_0).fields["x"] = (s.arg1); - r0 = undefined; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + r0 = s.arg0.fields["tileKind"]; + s.tmp_3 = r0; + s.tmp_5 = tiles_getTileImage__P169295_mk(s); + s.tmp_5.arg0 = s.caps[1]; + s.callLocIdx = 853; s.pc = 3; return s.tmp_5; + case 3: + r0 = s.retval; + s.tmp_4 = r0; + r0 = pxsim_ImageMethods.equals(s.tmp_3, s.tmp_4); + case 2: + // jmp value (already in r0) + s.tmp_6 = r0; + r0 = s.tmp_6; return leave(s, r0) default: oops() } } } -info_PlayerInfo_x__P169163.info = {"start":26972,"length":65,"line":887,"column":8,"endLine":889,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"x","argumentNames":["this","value"]} +forEach_inline__P192792.info = {"start":23395,"length":81,"line":638,"column":28,"endLine":638,"endColumn":109,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["h"]} -function info_PlayerInfo_x__P169163_mk(s) { +function forEach_inline__P192792_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_PlayerInfo_x__P169163, depth: s.depth + 1, + parent: s, fn: forEach_inline__P192792, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function info_PlayerInfo_x__P169162(s) { -let r0 = s.r0, 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, info_PlayerInfo__C169144_VT)) failedCast(r0); - r0 = s.arg0.fields["impl"]; - r0 = r0.fields["x"]; - return leaveAccessor(s, r0) - default: oops() -} } } -info_PlayerInfo_x__P169162.info = {"start":26903,"length":59,"line":883,"column":8,"endLine":885,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"x","argumentNames":["this"]} -info_PlayerInfo_x__P169162.isGetter = true; - -function info_PlayerInfo_x__P169162_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: info_PlayerInfo_x__P169162, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, arg0: undefined, } } @@ -56105,7 +62000,7 @@ function info_PlayerInfo_x__P169162_mk(s) { -function info_PlayerInfoImpl_id__P169132(s) { +function ArcadePhysicsEngine_tilemapOverlaps_inline__P192808(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -56119,19 +62014,33 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, info_PlayerInfoImpl__C169122_VT)) failedCast(r0); - r0 = s.arg0.fields["_player"]; + 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 = 855; 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 = 855; s.pc = 1; return s.tmp_0; } + else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 855; s.pc = 1; return s.tmp_0;; } + else { s.callLocIdx = 855; s.pc = 1; return s.tmp_0; } + } + case 1: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -info_PlayerInfoImpl_id__P169132.info = {"start":21391,"length":57,"line":688,"column":8,"endLine":690,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"id","argumentNames":["this"]} +ArcadePhysicsEngine_tilemapOverlaps_inline__P192808.info = {"start":23507,"length":28,"line":639,"column":29,"endLine":639,"endColumn":57,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["h"]} -function info_PlayerInfoImpl_id__P169132_mk(s) { +function ArcadePhysicsEngine_tilemapOverlaps_inline__P192808_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_PlayerInfoImpl_id__P169132, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_tilemapOverlaps_inline__P192808, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, } } @@ -56139,7 +62048,7 @@ function info_PlayerInfoImpl_id__P169132_mk(s) { -function effects_ImageEffect_startScreenEffect__P169821(s) { +function tiles_getTileImage__P169295(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -56149,78 +62058,61 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.wasRunning___191812 = undefined; + s.scene___192816 = 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, effects_ImageEffect__C169817_VT)) failedCast(r0); - s.tmp_4 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1699; s.pc = 8; return s.tmp_4; - case 8: + s.tmp_0 = game_currentScene__P169526_mk(s); + s.callLocIdx = 1104; s.pc = 6; return s.tmp_0; + case 6: r0 = s.retval; - r0 = r0.fields["background"]; - s.tmp_3 = r0; - r0 = s.tmp_3.fields["_image"]; - s.tmp_8 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_8); - s.tmp_7 = r0; - r0 = pxsim_Boolean__bang(s.tmp_7); - s.tmp_6 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_6); - s.tmp_5 = r0; - r0 = pxsim_Boolean__bang(s.tmp_5); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.scene___192816 = (r0); + 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); + 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 = s.scene___192816.fields["tileMap"]; + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); case 2: - r0 = s.arg0.fields["times"]; - s.tmp_9 = r0; - r0 = (s.tmp_9 != undefined); - s.wasRunning___191812 = (r0); - r0 = pxsim_numops_toBoolDecr(s.arg1); + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); if (!r0) { step = 3; continue; } - r0 = s.arg1; - { step = 4; continue; } + r0 = pxsim.image.ofBuffer(_hex192826); + { step = 5; continue; } case 3: - r0 = 15; case 4: - // jmp value (already in r0) - s.tmp_0 = r0; - r0 = (s.arg0).fields["times"] = (s.tmp_0); - r0 = pxsim_numops_toBoolDecr(s.wasRunning___191812); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - r0 = pxsim_pxtcore_mkAction(2, effects_ImageEffect_startScreenEffect_inline__P191825); - s.tmp_2 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_2, 0, s.arg0); - r0 = pxsim_pxtrt_stclo(s.tmp_2, 1, s.arg2); - r0 = pxsim.control.runInParallel(s.tmp_2); - case 5: - case 6: + s.tmp_5 = tiles_TileMap_getTileImage__P169286_mk(s); + r0 = s.scene___192816.fields["tileMap"]; + s.tmp_5.arg0 = r0; + s.tmp_6 = tiles_Location_tileSet__P169231_mk(s); + s.tmp_6.arg0 = s.arg0; + s.callLocIdx = 1105; s.pc = 8; return s.tmp_6; + case 8: + r0 = s.retval; + s.tmp_5.arg1 = r0; + s.callLocIdx = 1106; s.pc = 7; return s.tmp_5; case 7: - r0 = undefined; + r0 = s.retval; + case 5: return leave(s, r0) default: oops() } } } -effects_ImageEffect_startScreenEffect__P169821.info = {"start":1457,"length":637,"line":41,"column":8,"endLine":56,"endColumn":9,"fileName":"pxt_modules/game/effects.ts","functionName":"startScreenEffect","argumentNames":["this","times","delay"]} +tiles_getTileImage__P169295.info = {"start":21871,"length":207,"line":673,"column":4,"endLine":677,"endColumn":5,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTileImage","argumentNames":["loc"]} -function effects_ImageEffect_startScreenEffect__P169821_mk(s) { +function tiles_getTileImage__P169295_mk(s) { checkStack(s.depth); return { - parent: s, fn: effects_ImageEffect_startScreenEffect__P169821, depth: s.depth + 1, + parent: s, fn: tiles_getTileImage__P169295, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -56229,20 +62121,16 @@ function effects_ImageEffect_startScreenEffect__P169821_mk(s) { tmp_4: undefined, tmp_5: undefined, tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - wasRunning___191812: undefined, + scene___192816: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } +const _hex192826 = pxsim.BufferMethods.createBufferFromHex("8704000000000000") -function effects_ImageEffect_startScreenEffect_inline__P191825(s) { +function tiles_TileMap_getTileImage__P169286(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -56252,68 +62140,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.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMap__C169262_VT)) failedCast(r0); + s.tmp_0 = tiles_TileMapData_getTileImage__P169253_mk(s); + r0 = s.arg0.fields["_map"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 1098; s.pc = 1; return s.tmp_0; case 1: - r0 = s.caps[0].fields["times"]; - 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 = effects_ImageEffect_change__P169820_mk(s); - s.tmp_2.arg0 = s.caps[0]; - s.tmp_3 = scene_backgroundImage__P169413_mk(s); - s.callLocIdx = 1701; s.pc = 6; return s.tmp_3; - case 6: - r0 = s.retval; - s.tmp_2.arg1 = r0; - s.callLocIdx = 1702; s.pc = 5; return s.tmp_2; - case 5: - r0 = s.retval; - r0 = pxsim_numops_toBoolDecr(s.caps[1]); - if (!r0) { step = 2; continue; } - r0 = s.caps[1]; - { step = 3; continue; } - case 2: - r0 = s.caps[0].fields["preferredDelay"]; - case 3: - // jmp value (already in r0) - s.tmp_0 = r0; - s.tmp_1 = pause__P166940_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 1703; s.pc = 7; return s.tmp_1; - case 7: r0 = s.retval; - s.tmp_0 = r0 = s.caps[0]; - r0 = s.tmp_0.fields["times"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 - 1); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["times"] = (s.tmp_1); - { step = 1; continue; } - case 4: - r0 = (s.caps[0]).fields["times"] = (undefined); - r0 = undefined; return leave(s, r0) default: oops() } } } -effects_ImageEffect_startScreenEffect_inline__P191825.info = {"start":1764,"length":304,"line":47,"column":38,"endLine":54,"endColumn":17,"fileName":"pxt_modules/game/effects.ts","functionName":"inline","argumentNames":[]} +tiles_TileMap_getTileImage__P169286.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 effects_ImageEffect_startScreenEffect_inline__P191825_mk(s) { +function tiles_TileMap_getTileImage__P169286_mk(s) { checkStack(s.depth); return { - parent: s, fn: effects_ImageEffect_startScreenEffect_inline__P191825, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_getTileImage__P169286, depth: s.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_backgroundImage__P169413(s) { +function tiles_Location_tileSet__P169231(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -56323,37 +62183,47 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___191844 = undefined; - s.tmp_0 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1170; s.pc = 1; return s.tmp_0; - case 1: + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, tiles_Location__C169220_VT)) failedCast(r0); + s.tmp_0 = tiles_TileMap_getTileIndex__P169277_mk(s); + s.tmp_1 = tiles_Location_tileMap__P169222_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 1023; s.pc = 2; return s.tmp_1; + case 2: r0 = s.retval; - s.scene___191844 = (r0); - s.tmp_0 = scene_Background_image__P169202_mk(s); - r0 = s.scene___191844.fields["background"]; s.tmp_0.arg0 = r0; - s.callLocIdx = 1171; s.pc = 2; return s.tmp_0; - case 2: + r0 = s.arg0.fields["_col"]; + s.tmp_0.arg1 = r0; + r0 = s.arg0.fields["_row"]; + s.tmp_0.arg2 = r0; + s.callLocIdx = 1024; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - return leave(s, r0) + return leaveAccessor(s, r0) default: oops() } } } -scene_backgroundImage__P169413.info = {"start":2297,"length":130,"line":90,"column":4,"endLine":93,"endColumn":5,"fileName":"pxt_modules/game/scenes.ts","functionName":"backgroundImage","argumentNames":[]} +tiles_Location_tileSet__P169231.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__P169231.isGetter = true; -function scene_backgroundImage__P169413_mk(s) { +function tiles_Location_tileSet__P169231_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_backgroundImage__P169413, depth: s.depth + 1, + parent: s, fn: tiles_Location_tileSet__P169231, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - scene___191844: undefined, + tmp_1: undefined, + arg0: undefined, } } -function scene_Background_hasBackgroundImage__P169204(s) { +function tiles_TileMap_getTileIndex__P169277(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -56365,41 +62235,41 @@ 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_Background__C169196_VT)) failedCast(r0); - r0 = s.arg0.fields["_image"]; - 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); + if (!checkSubtype(r0, tiles_TileMap__C169262_VT)) failedCast(r0); + s.tmp_0 = tiles_TileMapData_getTile__P169250_mk(s); + r0 = s.arg0.fields["_map"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.arg1; + s.tmp_0.arg2 = s.arg2; + s.callLocIdx = 1053; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; return leave(s, r0) default: oops() } } } -scene_Background_hasBackgroundImage__P169204.info = {"start":1081,"length":75,"line":44,"column":8,"endLine":46,"endColumn":9,"fileName":"pxt_modules/game/background.ts","functionName":"hasBackgroundImage","argumentNames":["this"]} +tiles_TileMap_getTileIndex__P169277.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 scene_Background_hasBackgroundImage__P169204_mk(s) { +function tiles_TileMap_getTileIndex__P169277_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Background_hasBackgroundImage__P169204, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_getTileIndex__P169277, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function scene_Renderable___visible__P169329(s) { +function tiles_Location_row__P169224(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -56414,31 +62284,19 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_Renderable__C169327_VT)) failedCast(r0); - s.tmp_0 = if_shouldBeVisible_1_mk(s); - s.tmp_0.arg0 = s.arg0; - if (!s.tmp_0.arg0.vtable.iface) { - setupLambda(s.tmp_0, pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "shouldBeVisible"), 1); - s.callLocIdx = 1131; s.pc = 1; return s.tmp_0; - } else { - s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["shouldBeVisible"]; - if (s.tmp_0.fn == null) { setupLambda(s.tmp_0, s.tmp_0.arg0.fields["shouldBeVisible"], 1); s.callLocIdx = 1131; s.pc = 1; return s.tmp_0; } - else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 1131; s.pc = 1; return s.tmp_0;; } - else { s.callLocIdx = 1131; s.pc = 1; return s.tmp_0; } - } - case 1: - r0 = s.retval; - return leave(s, r0) + if (!checkSubtype(r0, tiles_Location__C169220_VT)) failedCast(r0); + r0 = s.arg0.fields["_row"]; + return leaveAccessor(s, r0) default: oops() } } } -scene_Renderable___visible__P169329.info = {"start":305,"length":75,"line":10,"column":8,"endLine":12,"endColumn":9,"fileName":"pxt_modules/game/renderable.ts","functionName":"__visible","argumentNames":["this"]} +tiles_Location_row__P169224.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__P169224.isGetter = true; -function scene_Renderable___visible__P169329_mk(s) { +function tiles_Location_row__P169224_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Renderable___visible__P169329, depth: s.depth + 1, + parent: s, fn: tiles_Location_row__P169224, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, } } @@ -56446,7 +62304,7 @@ function scene_Renderable___visible__P169329_mk(s) { -function sprites_SpriteSet_toString__P169001(s) { +function tiles_Location_column__P169223(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -56461,40 +62319,19 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_SpriteSet__C168990_VT)) failedCast(r0); - r0 = pxsim_String_.mkEmpty(); - s.tmp_1 = r0; - r0 = s.arg0.fields["_sprites"]; - s.tmp_4 = r0; - r0 = pxsim_Array__length(s.tmp_4); - s.tmp_3 = r0; - if ((s.tmp_3) && (s.tmp_3).vtable) { - setupResume(s, 1); - pxsim_String__stringConv(s.tmp_3); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_3) + ""; } - case 1: - r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_String__concat(s.tmp_1, s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_String__concat(s.tmp_0, " sprites"); - return leave(s, r0) + if (!checkSubtype(r0, tiles_Location__C169220_VT)) failedCast(r0); + r0 = s.arg0.fields["_col"]; + return leaveAccessor(s, r0) default: oops() } } } -sprites_SpriteSet_toString__P169001.info = {"start":2586,"length":66,"line":97,"column":8,"endLine":99,"endColumn":9,"fileName":"pxt_modules/game/spriteset.ts","functionName":"toString","argumentNames":["this"]} +tiles_Location_column__P169223.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__P169223.isGetter = true; -function sprites_SpriteSet_toString__P169001_mk(s) { +function tiles_Location_column__P169223_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteSet_toString__P169001, depth: s.depth + 1, + parent: s, fn: tiles_Location_column__P169223, depth: s.depth + 1, pc: 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, } } @@ -56502,7 +62339,7 @@ function sprites_SpriteSet_toString__P169001_mk(s) { -function sprites_SpriteSet_length__P168993(s) { +function tiles_TileMap_getObstacle__P169284(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -56512,35 +62349,100 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.index___192960 = undefined; + s.tile___192972 = 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_SpriteSet__C168990_VT)) failedCast(r0); - r0 = s.arg0.fields["_sprites"]; + if (!checkSubtype(r0, tiles_TileMap__C169262_VT)) failedCast(r0); + s.tmp_1 = tiles_TileMapData_isOutsideMap__P169256_mk(s); + r0 = s.arg0.fields["_map"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.arg1; + s.tmp_1.arg2 = s.arg2; + s.callLocIdx = 1077; s.pc = 3; return s.tmp_1; + case 3: + r0 = s.retval; s.tmp_0 = r0; - r0 = pxsim_Array__length(s.tmp_0); - return leaveAccessor(s, r0) + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = 0; + { step = 2; continue; } + case 1: + s.tmp_2 = tiles_TileMapData_getTile__P169250_mk(s); + r0 = s.arg0.fields["_map"]; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = s.arg1; + s.tmp_2.arg2 = s.arg2; + s.callLocIdx = 1078; s.pc = 4; return s.tmp_2; + case 4: + r0 = s.retval; + case 2: + // jmp value (already in r0) + s.tmp_3 = r0; + s.index___192960 = (s.tmp_3); + s.tmp_0 = tiles_TileMapData_getTileImage__P169253_mk(s); + r0 = s.arg0.fields["_map"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.index___192960; + s.callLocIdx = 1079; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.tile___192972 = (r0); + r0 = pxsim_pxtcore_mkClassInstance(sprites_StaticObstacle__C169025_VT); + s.tmp_0 = r0; + s.tmp_1 = sprites_StaticObstacle_constructor__P169031_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = s.tile___192972; + s.tmp_2 = r0 = s.arg2; + r0 = s.arg0.fields["_scale"]; + s.tmp_3 = r0; + r0 = (s.tmp_2 << s.tmp_3); + s.tmp_1.arg2 = r0; + s.tmp_4 = r0 = s.arg1; + r0 = s.arg0.fields["_scale"]; + s.tmp_5 = r0; + r0 = (s.tmp_4 << s.tmp_5); + s.tmp_1.arg3 = r0; + r0 = s.arg0.fields["_layer"]; + s.tmp_1.arg4 = r0; + s.tmp_1.arg5 = s.index___192960; + s.callLocIdx = 1083; s.pc = 6; return s.tmp_1; + case 6: + r0 = s.retval; + r0 = s.tmp_0; + return leave(s, r0) default: oops() } } } -sprites_SpriteSet_length__P168993.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__P168993.isGetter = true; +tiles_TileMap_getObstacle__P169284.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 sprites_SpriteSet_length__P168993_mk(s) { +function tiles_TileMap_getObstacle__P169284_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteSet_length__P168993, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_getObstacle__P169284, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + index___192960: undefined, + tile___192972: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function sprites_SpriteMap_toString__P168981(s) { +function tiles_TileMap_layer__P169272(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -56555,69 +62457,19 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_SpriteMap__C168973_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__P166637_mk(s); - r0 = s.arg0.fields["buckets"]; - s.tmp_10.arg0 = r0; - s.tmp_10.arg1 = length_inline__P191882; - s.callLocIdx = 618; 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) + if (!checkSubtype(r0, tiles_TileMap__C169262_VT)) failedCast(r0); + r0 = s.arg0.fields["_layer"]; + return leaveAccessor(s, r0) default: oops() } } } -sprites_SpriteMap_toString__P168981.info = {"start":4109,"length":123,"line":112,"column":8,"endLine":114,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"toString","argumentNames":["this"]} +tiles_TileMap_layer__P169272.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__P169272.isGetter = true; -function sprites_SpriteMap_toString__P168981_mk(s) { +function tiles_TileMap_layer__P169272_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_toString__P168981, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_layer__P169272, depth: s.depth + 1, pc: 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, } } @@ -56625,7 +62477,7 @@ function sprites_SpriteMap_toString__P168981_mk(s) { -function length_inline__P191882(s) { +function sprites_StaticObstacle_constructor__P169031(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -56637,36 +62489,44 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); + s.arg5 = (s.lambdaArgs[5]); 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, sprites_StaticObstacle__C169025_VT)) failedCast(r0); + r0 = (s.arg0).fields["image"] = (s.arg1); + r0 = (s.arg0).fields["layer"] = (s.arg4); + r0 = (s.arg0).fields["top"] = (s.arg2); + r0 = (s.arg0).fields["left"] = (s.arg3); + r0 = (s.arg0).fields["tileIndex"] = (s.arg5); + r0 = undefined; return leave(s, r0) default: oops() } } } -length_inline__P191882.info = {"start":4196,"length":8,"line":113,"column":74,"endLine":113,"endColumn":82,"fileName":"pxt_modules/game/spritemap.ts","functionName":"inline","argumentNames":["b"]} +sprites_StaticObstacle_constructor__P169031.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 length_inline__P191882_mk(s) { +function sprites_StaticObstacle_constructor__P169031_mk(s) { checkStack(s.depth); return { - parent: s, fn: length_inline__P191882, depth: s.depth + 1, + parent: s, fn: sprites_StaticObstacle_constructor__P169031, 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 ArcadePhysicsEngine_moveSprite__P169068(s) { +function tiles_TileMap_isObstacle__P169283(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -56676,49 +62536,19 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tm___191914 = undefined; - s.maxDist___191922 = undefined; - s.ms___191942 = 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__C169054_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__P169526_mk(s); - s.callLocIdx = 859; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; - r0 = r0.fields["tileMap"]; - s.tm___191914 = (r0); - s.tmp_0 = r0 = s.tm___191914; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } - case 1: - r0 = s.tm___191914.fields["_map"]; + if (!checkSubtype(r0, tiles_TileMap__C169262_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; @@ -56727,130 +62557,45 @@ switch (step) { 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___191922 = (r0); - s.tmp_2 = Math_abs__P166655_mk(s); - r0 = (s.arg2 + 128); - s.tmp_3 = r0; - r0 = (s.tmp_3 >> 8); - s.tmp_2.arg0 = r0; - s.callLocIdx = 863; s.pc = 14; return s.tmp_2; - case 14: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_1 <= s.maxDist___191922); 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__P166655_mk(s); - r0 = (s.arg3 + 128); - s.tmp_6 = r0; - r0 = (s.tmp_6 >> 8); - s.tmp_5.arg0 = r0; - s.callLocIdx = 865; s.pc = 15; return s.tmp_5; - case 15: + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = false; + { step = 5; continue; } + case 1: + case 2: + s.tmp_8 = tiles_TileMapData_isOutsideMap__P169256_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 = 1075; s.pc = 6; return s.tmp_8; + case 6: r0 = s.retval; - s.tmp_4 = r0; - r0 = (s.tmp_4 <= s.maxDist___191922); - 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__C169052_VT); - s.tmp_8 = r0; - s.tmp_9 = MovingSprite_constructor__P169053_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 = 866; s.pc = 16; return s.tmp_9; - case 16: - r0 = s.retval; - s.ms___191942 = (s.tmp_8); - s.tmp_0 = ArcadePhysicsEngine_tilemapCollisions__P172313_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.ms___191942; - s.tmp_0.arg2 = s.tm___191914; - s.callLocIdx = 867; s.pc = 17; return s.tmp_0; - case 17: - r0 = s.retval; - { step = 10; continue; } + 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: - s.tmp_1 = tiles_TileMap_isOnWall__P169285_mk(s); - s.tmp_1.arg0 = s.tm___191914; - s.tmp_1.arg1 = s.arg1; - s.callLocIdx = 868; 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__P172315_mk(s); - s.tmp_4.arg0 = s.arg0; - s.tmp_4.arg1 = s.arg1; - s.tmp_4.arg2 = s.tm___191914; - s.callLocIdx = 869; 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__P169068.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"]} +tiles_TileMap_isObstacle__P169283.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 ArcadePhysicsEngine_moveSprite__P169068_mk(s) { +function tiles_TileMap_isObstacle__P169283_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_moveSprite__P169068, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_isObstacle__P169283, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -56862,20 +62607,18 @@ function ArcadePhysicsEngine_moveSprite__P169068_mk(s) { tmp_7: undefined, tmp_8: undefined, tmp_9: undefined, - tm___191914: undefined, - maxDist___191922: undefined, - ms___191942: undefined, + tmp_10: undefined, + tmp_11: undefined, arg0: undefined, arg1: undefined, arg2: undefined, - arg3: undefined, } } -function ArcadePhysicsEngine_canResolveClipping__P172315(s) { +function Sprite_registerObstacle__P168953(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -56885,281 +62628,166 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.hbox___191987 = undefined; - s.sz___191990 = undefined; - s.maxMove___191995 = undefined; - s.origY___191997 = undefined; - s.origX___192000 = undefined; - s.l___192003 = undefined; - s.r___192008 = undefined; - s.t___192013 = undefined; - s.b___192018 = undefined; - s.offset___192023 = undefined; - s.offset___192048 = undefined; - s.offset___192079 = undefined; - s.offset___192104 = undefined; + s.collisionHandlers___192873 = undefined; + s.wallCollisionHandlers___192880 = undefined; + s.wallHandlersToRun___192905 = undefined; + s.asTileLocation___192918 = 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__C169054_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__C168868_v4_1_mk(s); - s.tmp_4.arg0 = s.arg1; - if (!checkSubtype(s.tmp_4.arg0, Sprite__C168868_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___191987 = (r0); - r0 = s.arg2.fields["_scale"]; + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + r0 = s.arg0.fields["_obstacles"]; s.tmp_0 = r0; - r0 = (1 << s.tmp_0); - s.sz___191990 = (r0); - s.tmp_0 = ArcadePhysicsEngine_maxStep__P169060_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 872; s.pc = 21; return s.tmp_0; - case 21: - r0 = s.retval; - s.maxMove___191995 = (r0); - r0 = s.arg1.fields["_y"]; - s.origY___191997 = (r0); - r0 = s.arg1.fields["_x"]; - s.origX___192000 = (r0); - s.tmp_1 = game_Hitbox_left__P168743_mk(s); - s.tmp_1.arg0 = s.hbox___191987; - s.callLocIdx = 873; s.pc = 22; return s.tmp_1; - case 22: + r0 = pxsim_Array_.setAt(s.tmp_0, s.arg1, s.arg2); + s.tmp_1 = game_currentScene__P169526_mk(s); + s.callLocIdx = 518; s.pc = 9; return s.tmp_1; + case 9: r0 = s.retval; + r0 = r0.fields["collisionHandlers"]; s.tmp_0 = r0; - r0 = (s.tmp_0 + 128); - s.tmp_2 = r0; - r0 = (s.tmp_2 >> 8); - s.l___192003 = (r0); - s.tmp_1 = game_Hitbox_right__P168745_mk(s); - s.tmp_1.arg0 = s.hbox___191987; - s.callLocIdx = 875; s.pc = 23; return s.tmp_1; - case 23: + 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 = 519; s.pc = 10; return s.tmp_3; } + } + case 10: r0 = s.retval; - s.tmp_0 = r0; - r0 = (s.tmp_0 + 128); s.tmp_2 = r0; - r0 = (s.tmp_2 >> 8); - s.r___192008 = (r0); - s.tmp_1 = game_Hitbox_top__P168744_mk(s); - s.tmp_1.arg0 = s.hbox___191987; - s.callLocIdx = 877; s.pc = 24; return s.tmp_1; - case 24: + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_2); + s.collisionHandlers___192873 = (r0); + s.tmp_0 = game_currentScene__P169526_mk(s); + s.callLocIdx = 520; s.pc = 11; return s.tmp_0; + case 11: r0 = s.retval; + r0 = r0.fields["wallCollisionHandlers"]; + s.wallCollisionHandlers___192880 = (r0); + r0 = pxsim_numops_toBoolDecr(s.collisionHandlers___192873); + if (!r0) { step = 1; continue; } + r0 = pxsim_pxtcore_mkAction(1, forEach_inline__P192888); s.tmp_0 = r0; - r0 = (s.tmp_0 + 128); - s.tmp_2 = r0; - r0 = (s.tmp_2 >> 8); - s.t___192013 = (r0); - s.tmp_1 = game_Hitbox_bottom__P168746_mk(s); - s.tmp_1.arg0 = s.hbox___191987; - s.callLocIdx = 879; s.pc = 25; return s.tmp_1; - case 25: + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + r0 = pxsim_pxtcore_mkAction(1, Sprite_registerObstacle_inline__P192894); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.arg0); + s.tmp_2 = helpers_arrayForEach__P166636_mk(s); + s.tmp_3 = helpers_arrayFilter__P166637_mk(s); + s.tmp_3.arg0 = s.collisionHandlers___192873; + s.tmp_3.arg1 = s.tmp_0; + s.callLocIdx = 522; s.pc = 13; return s.tmp_3; + case 13: r0 = s.retval; - s.tmp_0 = r0; - r0 = (s.tmp_0 + 128); - s.tmp_2 = r0; - r0 = (s.tmp_2 >> 8); - s.b___192018 = (r0); - r0 = (s.b___192018 + 1); - s.tmp_0 = r0; - r0 = (s.tmp_0 % s.sz___191990); - s.offset___192023 = (r0); - r0 = (s.offset___192023 <= s.maxMove___191995); - 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___192023 * 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__P169285_mk(s); - s.tmp_3.arg0 = s.arg2; - s.tmp_3.arg1 = s.arg1; - s.callLocIdx = 883; s.pc = 26; return s.tmp_3; - case 26: + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = s.tmp_1; + s.callLocIdx = 524; s.pc = 12; return s.tmp_2; + case 12: 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); + case 1: + case 2: + r0 = pxsim_numops_toBoolDecr(s.wallCollisionHandlers___192880); + if (!r0) { step = 7; continue; } + s.tmp_0 = r0 = s.arg3; + r0 = pxsim_numops_toBool(s.tmp_0); if (!r0) { step = 3; continue; } - r0 = true; - { step = 19; continue; } + r0 = s.tmp_0; { step = 4; continue; } case 3: - r0 = (s.arg1).fields["_y"] = (s.origY___191997); + s.tmp_1 = game_currentScene__P169526_mk(s); + s.callLocIdx = 525; s.pc = 14; return s.tmp_1; + case 14: + r0 = s.retval; + r0 = r0.fields["tileMap"]; case 4: - case 5: - case 6: - r0 = (s.t___192013 / s.sz___191990); - s.tmp_3 = r0; - r0 = pxsim.Math_.floor(s.tmp_3); + // jmp value (already in r0) s.tmp_2 = r0; - r0 = (s.tmp_2 + 1); - s.tmp_1 = r0; - r0 = (s.tmp_1 * s.sz___191990); + s.arg3 = (s.tmp_2); + r0 = pxsim_pxtcore_mkAction(1, wallHandlersToRun_inline__P192907); s.tmp_0 = r0; - r0 = (s.tmp_0 - s.t___192013); - s.offset___192048 = (r0); - r0 = (s.offset___192048 <= s.maxMove___191995); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = helpers_arrayFilter__P166637_mk(s); + s.tmp_1.arg0 = s.wallCollisionHandlers___192880; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 527; s.pc = 15; return s.tmp_1; + case 15: + r0 = s.retval; + s.wallHandlersToRun___192905 = (r0); + r0 = pxsim_Array__length(s.wallHandlersToRun___192905); 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___192048 * 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__P169285_mk(s); + if (!r0) { step = 5; continue; } + s.tmp_1 = tiles_TileMap_getTile__P169276_mk(s); + s.tmp_1.arg0 = s.arg3; + s.tmp_3 = if_left_1_mk(s); s.tmp_3.arg0 = s.arg2; - s.tmp_3.arg1 = s.arg1; - s.callLocIdx = 886; s.pc = 27; return s.tmp_3; - case 27: + 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 = 528; s.pc = 17; return s.tmp_3; } + } + case 17: 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___191997); - case 8: - case 9: - case 10: - r0 = (s.r___192008 + 1); - s.tmp_0 = r0; - r0 = (s.tmp_0 % s.sz___191990); - s.offset___192079 = (r0); - r0 = (s.offset___192079 <= s.maxMove___191995); - 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___192079 * 256); - s.tmp_5 = r0; - r0 = (s.tmp_5 | 0); + r0 = s.arg3.fields["_scale"]; 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__P169285_mk(s); - s.tmp_3.arg0 = s.arg2; - s.tmp_3.arg1 = s.arg1; - s.callLocIdx = 889; s.pc = 28; return s.tmp_3; - case 28: + 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 = 530; s.pc = 18; return s.tmp_6; } + } + case 18: 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___192000); - case 12: - case 13: - case 14: - r0 = (s.l___192003 / s.sz___191990); - 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___191990); - s.tmp_0 = r0; - r0 = (s.tmp_0 - s.l___192003); - s.offset___192104 = (r0); - r0 = (s.offset___192104 <= s.maxMove___191995); - 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___192104 * 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__P169285_mk(s); - s.tmp_3.arg0 = s.arg2; - s.tmp_3.arg1 = s.arg1; - s.callLocIdx = 892; s.pc = 29; return s.tmp_3; - case 29: + r0 = s.arg3.fields["_scale"]; + s.tmp_7 = r0; + r0 = (s.tmp_5 >> s.tmp_7); + s.tmp_1.arg2 = r0; + s.callLocIdx = 532; s.pc = 16; return s.tmp_1; + case 16: 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.asTileLocation___192918 = (r0); + r0 = pxsim_pxtcore_mkAction(2, Sprite_registerObstacle_inline__P192934); 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___192000); - case 16: - case 17: - case 18: - r0 = false; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.asTileLocation___192918); + s.tmp_1 = helpers_arrayForEach__P166636_mk(s); + s.tmp_1.arg0 = s.wallHandlersToRun___192905; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 534; 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() } } } -ArcadePhysicsEngine_canResolveClipping__P172315.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"]} +Sprite_registerObstacle__P168953.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 ArcadePhysicsEngine_canResolveClipping__P172315_mk(s) { +function Sprite_registerObstacle__P168953_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_canResolveClipping__P172315, depth: s.depth + 1, + parent: s, fn: Sprite_registerObstacle__P168953, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -57167,29 +62795,23 @@ function ArcadePhysicsEngine_canResolveClipping__P172315_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - hbox___191987: undefined, - sz___191990: undefined, - maxMove___191995: undefined, - origY___191997: undefined, - origX___192000: undefined, - l___192003: undefined, - r___192008: undefined, - t___192013: undefined, - b___192018: undefined, - offset___192023: undefined, - offset___192048: undefined, - offset___192079: undefined, - offset___192104: undefined, + tmp_6: undefined, + tmp_7: undefined, + collisionHandlers___192873: undefined, + wallCollisionHandlers___192880: undefined, + wallHandlersToRun___192905: undefined, + asTileLocation___192918: undefined, arg0: undefined, arg1: undefined, arg2: undefined, + arg3: undefined, } } -function Sprite_isStatic__P168922(s) { +function forEach_inline__P192888(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -57203,22 +62825,23 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - r0 = s.arg0.fields["_image"]; + r0 = s.arg0.fields["kind"]; s.tmp_0 = r0; - r0 = pxsim_ImageMethods.isStatic(s.tmp_0); + r0 = s.caps[0].fields["_kind"]; + s.tmp_1 = r0; + r0 = (s.tmp_0 == s.tmp_1); return leave(s, r0) default: oops() } } } -Sprite_isStatic__P168922.info = {"start":9841,"length":57,"line":355,"column":4,"endLine":357,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"isStatic","argumentNames":["this"]} +forEach_inline__P192888.info = {"start":25390,"length":26,"line":824,"column":24,"endLine":824,"endColumn":50,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["h"]} -function Sprite_isStatic__P168922_mk(s) { +function forEach_inline__P192888_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_isStatic__P168922, depth: s.depth + 1, + parent: s, fn: forEach_inline__P192888, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, arg0: undefined, } } @@ -57226,7 +62849,7 @@ function Sprite_isStatic__P168922_mk(s) { -function game_Hitbox_bottom__P168746(s) { +function Sprite_registerObstacle_inline__P192894(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -57240,34 +62863,70 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, game_Hitbox__C168735_VT)) failedCast(r0); - r0 = s.arg0.fields["height"]; - s.tmp_1 = r0; - s.tmp_3 = game_Hitbox_top__P168744_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 323; s.pc = 1; return s.tmp_3; + 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 = 523; 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 = 523; s.pc = 1; return s.tmp_0; } + else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 523; s.pc = 1; return s.tmp_0;; } + else { s.callLocIdx = 523; s.pc = 1; return s.tmp_0; } + } case 1: r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_1 + s.tmp_2); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +Sprite_registerObstacle_inline__P192894.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__P192894_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Sprite_registerObstacle_inline__P192894, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function wallHandlersToRun_inline__P192907(s) { +let r0 = s.r0, 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.tmp_0 - 256); - return leaveAccessor(s, r0) + r0 = s.caps[0].fields["_kind"]; + s.tmp_1 = r0; + r0 = (s.tmp_0 == s.tmp_1); + return leave(s, r0) default: oops() } } } -game_Hitbox_bottom__P168746.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__P168746.isGetter = true; +wallHandlersToRun_inline__P192907.info = {"start":25649,"length":32,"line":830,"column":24,"endLine":830,"endColumn":56,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["h"]} -function game_Hitbox_bottom__P168746_mk(s) { +function wallHandlersToRun_inline__P192907_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_Hitbox_bottom__P168746, depth: s.depth + 1, + parent: s, fn: wallHandlersToRun_inline__P192907, depth: s.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, } } @@ -57275,7 +62934,7 @@ function game_Hitbox_bottom__P168746_mk(s) { -function game_Hitbox_right__P168745(s) { +function Sprite_registerObstacle_inline__P192934(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -57289,34 +62948,84 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, game_Hitbox__C168735_VT)) failedCast(r0); - r0 = s.arg0.fields["width"]; - s.tmp_1 = r0; - s.tmp_3 = game_Hitbox_left__P168743_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 320; s.pc = 1; return s.tmp_3; + 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 = 533; 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 = 533; s.pc = 1; return s.tmp_0; } + else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 533; s.pc = 1; return s.tmp_0;; } + else { s.callLocIdx = 533; s.pc = 1; return s.tmp_0; } + } case 1: r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_1 + s.tmp_2); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +Sprite_registerObstacle_inline__P192934.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__P192934_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Sprite_registerObstacle_inline__P192934, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function Math_sign__P166656(s) { +let r0 = s.r0, 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 = (s.tmp_0 - 256); - return leaveAccessor(s, r0) + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = 0; + { step = 5; continue; } + case 1: + case 2: + r0 = (s.arg0 > 0); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 3; continue; } + r0 = 1; + { step = 5; continue; } + case 3: + case 4: + r0 = -1; + case 5: + return leave(s, r0) default: oops() } } } -game_Hitbox_right__P168745.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__P168745.isGetter = true; +Math_sign__P166656.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 game_Hitbox_right__P168745_mk(s) { +function Math_sign__P166656_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_Hitbox_right__P168745, depth: s.depth + 1, + parent: s, fn: Math_sign__P166656, depth: s.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, } } @@ -57324,7 +63033,7 @@ function game_Hitbox_right__P168745_mk(s) { -function game_Hitbox_top__P168744(s) { +function helpers_arraySome__P166634(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -57334,39 +63043,67 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.len___192942 = undefined; + s.i___192945 = 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__C168735_VT)) failedCast(r0); - r0 = s.arg0.fields["oy"]; + r0 = pxsim_Array__length(s.arg0); + s.len___192942 = (r0); + s.i___192945 = (0); + case 1: + r0 = (s.i___192945 < s.len___192942); s.tmp_0 = r0; - r0 = s.arg0.fields["parent"]; - r0 = r0.fields["_y"]; + 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___192945); + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = s.i___192945; + setupLambda(s.tmp_2, s.tmp_2.argL); + s.callLocIdx = 5; s.pc = 6; return s.tmp_2; + case 6: + r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - return leaveAccessor(s, 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___192945 + 1); + s.i___192945 = (r0); + { step = 1; continue; } + case 4: + r0 = false; + case 5: + return leave(s, r0) default: oops() } } } -game_Hitbox_top__P168744.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__P168744.isGetter = true; +helpers_arraySome__P166634.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 game_Hitbox_top__P168744_mk(s) { +function helpers_arraySome__P166634_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_Hitbox_top__P168744, depth: s.depth + 1, + parent: s, fn: helpers_arraySome__P166634, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + len___192942: undefined, + i___192945: undefined, arg0: undefined, + arg1: undefined, } } -function game_Hitbox_left__P168743(s) { +function tiles_TileMap_isOnWall__P169285(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -57376,39 +63113,136 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.hbox___192170 = undefined; + s.left___192173 = undefined; + s.right___192179 = undefined; + s.top___192185 = undefined; + s.bottom___192191 = undefined; + s.col___192197 = undefined; + s.row___192203 = 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__C168735_VT)) failedCast(r0); - r0 = s.arg0.fields["ox"]; + if (!checkSubtype(r0, tiles_TileMap__C169262_VT)) failedCast(r0); + r0 = s.arg1.fields["_hitbox"]; + s.hbox___192170 = (r0); + s.tmp_1 = game_Hitbox_left__P168743_mk(s); + s.tmp_1.arg0 = s.hbox___192170; + s.callLocIdx = 1084; s.pc = 8; return s.tmp_1; + case 8: + r0 = s.retval; s.tmp_0 = r0; - r0 = s.arg0.fields["parent"]; - r0 = r0.fields["_x"]; + 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___192173 = (r0); + s.tmp_1 = game_Hitbox_right__P168745_mk(s); + s.tmp_1.arg0 = s.hbox___192170; + s.callLocIdx = 1087; 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___192179 = (r0); + s.tmp_1 = game_Hitbox_top__P168744_mk(s); + s.tmp_1.arg0 = s.hbox___192170; + s.callLocIdx = 1090; 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___192185 = (r0); + s.tmp_1 = game_Hitbox_bottom__P168746_mk(s); + s.tmp_1.arg0 = s.hbox___192170; + s.callLocIdx = 1093; 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___192191 = (r0); + s.col___192197 = (s.left___192173); + case 1: + r0 = (s.col___192197 <= s.right___192179); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 6; continue; } + s.row___192203 = (s.top___192185); + case 2: + r0 = (s.row___192203 <= s.bottom___192191); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + s.tmp_2 = tiles_TileMap_isObstacle__P169283_mk(s); + s.tmp_2.arg0 = s.arg0; + s.tmp_2.arg1 = s.col___192197; + s.tmp_2.arg2 = s.row___192203; + s.callLocIdx = 1096; s.pc = 12; return s.tmp_2; + case 12: + r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - return leaveAccessor(s, 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___192203 + 1); + s.row___192203 = (r0); + { step = 2; continue; } + case 5: + r0 = (s.col___192197 + 1); + s.col___192197 = (r0); + { step = 1; continue; } + case 6: + r0 = false; + case 7: + return leave(s, r0) default: oops() } } } -game_Hitbox_left__P168743.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__P168743.isGetter = true; +tiles_TileMap_isOnWall__P169285.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 game_Hitbox_left__P168743_mk(s) { +function tiles_TileMap_isOnWall__P169285_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_Hitbox_left__P168743, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_isOnWall__P169285, depth: s.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___192170: undefined, + left___192173: undefined, + right___192179: undefined, + top___192185: undefined, + bottom___192191: undefined, + col___192197: undefined, + row___192203: undefined, arg0: undefined, + arg1: undefined, } } -function ArcadePhysicsEngine_tilemapCollisions__P172313(s) { +function MovingSprite_constructor__P169053(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -57418,1011 +63252,1030 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.s___192236 = undefined; - s.hbox___192261 = undefined; - s.tileScale___192264 = undefined; - s.tileSize___192267 = undefined; - s.xDiff___192271 = undefined; - s.yDiff___192278 = undefined; - s.right___192294 = undefined; - s.x0___192298 = undefined; - s.collidedTiles___192313 = undefined; - s.y___192315 = undefined; - s.y0___192329 = undefined; - s.obstacle___192345 = undefined; - s.collisionDirection___192372 = undefined; - s.tile___192398 = undefined; - s.unnamed818___U14 = undefined; - s.unnamed819___U15 = undefined; - s.down___192489 = undefined; - s.y0___192493 = undefined; - s.collidedTiles___192508 = undefined; - s.x___192510 = undefined; - s.x0___192520 = undefined; - s.obstacle___192534 = undefined; - s.collisionDirection___192561 = undefined; - s.tile___192587 = undefined; - s.unnamed820___U24 = undefined; - s.unnamed821___U25 = undefined; - s.overlappedTiles___192681 = undefined; - s.x___192683 = undefined; - s.x0___192693 = undefined; - s.y___192703 = undefined; - s.y0___192713 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); + 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__C169052_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() +} } } +MovingSprite_constructor__P169053.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 MovingSprite_constructor__P169053_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: MovingSprite_constructor__P169053, 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 ArcadePhysicsEngine_move__P169066(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + s.dtMs___193016 = undefined; + s.dt2___193022 = undefined; + s.scene___193026 = undefined; + s.tileMap___193029 = undefined; + s.movingSprites___193032 = undefined; + s.MAX_STEP_COUNT___193063 = undefined; + s.overlapHandlers___193075 = undefined; + s.selected___193082 = undefined; + s.buffers___193083 = undefined; + s.count___193087 = undefined; + s.currMovers___193097 = undefined; + s.remainingMovers___193104 = undefined; + s.ms___193109 = undefined; + s.unnamed812___U13 = undefined; + s.unnamed813___U14 = undefined; + s.s___193111 = undefined; + s.stepX___193204 = undefined; + s.stepY___193218 = undefined; + s.bounce___193281 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; if (!checkSubtype(r0, ArcadePhysicsEngine__C169054_VT)) failedCast(r0); - r0 = s.arg1.fields["sprite"]; - s.s___192236 = (r0); - r0 = s.s___192236.fields["flags"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 256); + s.tmp_0 = Math_min__P166658_mk(s); + s.tmp_0.arg0 = 100; + r0 = (s.arg1 * 1000); + s.tmp_0.arg1 = r0; + s.callLocIdx = 647; s.pc = 53; return s.tmp_0; + case 53: + r0 = s.retval; + s.dtMs___193016 = (r0); + r0 = pxsim.Math_.idiv(s.dtMs___193016, 2); + s.dt2___193022 = (r0); + s.tmp_0 = game_currentScene__P169526_mk(s); + s.callLocIdx = 648; s.pc = 54; return s.tmp_0; + case 54: + r0 = s.retval; + s.scene___193026 = (r0); + r0 = s.scene___193026.fields["tileMap"]; + s.tileMap___193029 = (r0); + r0 = pxsim_pxtcore_mkAction(3, movingSprites_inline__P193034); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_5 = tiles_TileMap_isOnWall__P169285_mk(s); - s.tmp_5.arg0 = s.arg2; - s.tmp_5.arg1 = s.s___192236; - s.callLocIdx = 755; s.pc = 97; return s.tmp_5; - case 97: + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.dtMs___193016); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.dt2___193022); + s.tmp_1 = helpers_arrayMap__P166633_mk(s); + r0 = s.arg0.fields["sprites"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 650; s.pc = 55; return s.tmp_1; + case 55: r0 = s.retval; - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - s.tmp_3 = r0; - r0 = pxsim_Boolean__bang(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 1; continue; } - s.tmp_6 = r0 = s.s___192236; - r0 = s.tmp_6.fields["flags"]; - s.tmp_8 = r0; - r0 = (s.tmp_8 & -257); - s.tmp_7 = r0; - r0 = (s.tmp_6).fields["flags"] = (s.tmp_7); - case 1: - case 2: - case 3: - case 4: - r0 = s.s___192236.fields["_image"]; + s.movingSprites___193032 = (r0); + s.tmp_0 = helpers_arrayForEach__P166636_mk(s); + r0 = s.arg0.fields["sprites"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = ArcadePhysicsEngine_move_inline__P193046; + s.callLocIdx = 654; s.pc = 56; return s.tmp_0; + case 56: + r0 = s.retval; + s.tmp_0 = sprites_SpriteMap_clear__P168979_mk(s); + r0 = s.arg0.fields["map"]; + s.tmp_0.arg0 = r0; + s.callLocIdx = 655; s.pc = 57; return s.tmp_0; + case 57: + r0 = s.retval; + s.tmp_0 = sprites_SpriteMap_resizeBuckets__P168978_mk(s); + r0 = s.arg0.fields["map"]; + s.tmp_0.arg0 = r0; + r0 = s.arg0.fields["sprites"]; + s.tmp_0.arg1 = r0; + s.callLocIdx = 656; s.pc = 58; return s.tmp_0; + case 58: + r0 = s.retval; + r0 = s.arg0.fields["maxVelocity"]; s.tmp_3 = r0; - r0 = pxsim_ImageMethods.isStatic(s.tmp_3); + 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_numops_toBoolDecr(s.tmp_2); + r0 = pxsim.Math_.imul(s.tmp_2, s.dtMs___193016); s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = pxsim.Math_.idiv(s.tmp_1, 1000); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - s.tmp_4 = Sprite__C168868_v4_1_mk(s); - s.tmp_4.arg0 = s.s___192236; - if (!checkSubtype(s.tmp_4.arg0, Sprite__C168868_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.tmp_0 + 128); + s.tmp_6 = r0; + r0 = (s.tmp_6 >> 8); + s.MAX_STEP_COUNT___193063 = (r0); + s.tmp_0 = helpers_arraySlice__P166642_mk(s); + r0 = s.scene___193026.fields["overlapHandlers"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = undefined; + s.tmp_0.arg2 = undefined; + s.callLocIdx = 661; s.pc = 59; return s.tmp_0; + case 59: r0 = s.retval; - case 5: - case 6: - r0 = s.s___192236.fields["_hitbox"]; - s.hbox___192261 = (r0); - r0 = s.arg2.fields["_scale"]; - s.tileScale___192264 = (r0); - r0 = (1 << s.tileScale___192264); - s.tileSize___192267 = (r0); - r0 = s.s___192236.fields["_x"]; + s.overlapHandlers___193075 = (r0); + s.selected___193082 = (0); + r0 = pxsim_Array__mk(); s.tmp_0 = r0; - r0 = s.s___192236.fields["_lastX"]; + r0 = pxsim_Array__push(s.tmp_0, s.movingSprites___193032); + r0 = pxsim_Array__mk(); s.tmp_1 = r0; - r0 = (s.tmp_0 - s.tmp_1); - s.xDiff___192271 = (r0); - r0 = s.s___192236.fields["_y"]; + r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); + s.buffers___193083 = (s.tmp_0); + s.count___193087 = (0); + case 1: + r0 = (s.count___193087 < s.MAX_STEP_COUNT___193063); s.tmp_0 = r0; - r0 = s.s___192236.fields["_lastY"]; + 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___193083, s.selected___193082); + s.tmp_2 = r0; + r0 = pxsim_Array__length(s.tmp_2); s.tmp_1 = r0; - r0 = (s.tmp_0 - s.tmp_1); - s.yDiff___192278 = (r0); - r0 = s.s___192236.fields["flags"]; + r0 = (s.tmp_1 !== 0); + case 3: + // jmp value (already in r0) s.tmp_3 = r0; - r0 = (s.tmp_3 & 2818); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 52; continue; } + r0 = pxsim_Array__getAt(s.buffers___193083, s.selected___193082); + s.currMovers___193097 = (r0); + r0 = (s.selected___193082 ^ 1); + s.selected___193082 = (r0); + r0 = pxsim_Array__getAt(s.buffers___193083, s.selected___193082); + s.remainingMovers___193104 = (r0); + s.ms___193109 = (undefined); + s.unnamed812___U13 = (s.currMovers___193097); + s.unnamed813___U14 = (0); + case 4: + s.tmp_0 = r0 = s.unnamed813___U14; + r0 = pxsim_Array__length(s.unnamed812___U13); s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 49; continue; } + r0 = pxsim_Array__getAt(s.unnamed812___U13, s.unnamed813___U14); + s.ms___193109 = (r0); + r0 = s.ms___193109.fields["sprite"]; + s.s___193111 = (r0); + r0 = s.ms___193109.fields["cachedVx"]; + s.tmp_1 = r0; + r0 = s.s___193111.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 = 83; continue; } - r0 = (s.xDiff___192271 !== 0); + if (!r0) { step = 15; continue; } + r0 = s.s___193111.fields["_vx"]; s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - if (!r0) { step = 43; continue; } - r0 = (s.xDiff___192271 > 0); - s.right___192294 = (r0); - r0 = pxsim_numops_toBoolDecr(s.right___192294); - if (!r0) { step = 7; continue; } - s.tmp_1 = game_Hitbox_right__P168745_mk(s); - s.tmp_1.arg0 = s.hbox___192261; - s.callLocIdx = 760; s.pc = 99; return s.tmp_1; - case 99: - r0 = s.retval; + r0 = (s.tmp_4 == 0); + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 5; continue; } + r0 = (s.ms___193109).fields["dx"] = (0); + { step = 14; continue; } + case 5: + r0 = s.s___193111.fields["_vx"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 < 0); s.tmp_0 = r0; - r0 = (s.tmp_0 + 256); - { step = 8; continue; } - case 7: - s.tmp_3 = game_Hitbox_left__P168743_mk(s); - s.tmp_3.arg0 = s.hbox___192261; - s.callLocIdx = 762; s.pc = 100; return s.tmp_3; - case 100: - r0 = s.retval; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 6; continue; } + r0 = s.tmp_0; + { step = 7; continue; } + case 6: + r0 = s.ms___193109.fields["cachedVx"]; s.tmp_2 = r0; - r0 = (s.tmp_2 - 256); - case 8: + r0 = (s.tmp_2 > 0); + case 7: // jmp value (already in r0) - s.tmp_4 = r0; - r0 = (s.tmp_4 + 128); - s.tmp_5 = r0; - r0 = (s.tileScale___192264 + 8); - s.tmp_6 = r0; - r0 = (s.tmp_5 >> s.tmp_6); - s.x0___192298 = (r0); - r0 = pxsim_Array__mk(); - s.collidedTiles___192313 = (r0); - s.tmp_1 = game_Hitbox_top__P168744_mk(s); - s.tmp_1.arg0 = s.hbox___192261; - s.callLocIdx = 766; s.pc = 101; return s.tmp_1; - case 101: - r0 = s.retval; - s.tmp_0 = r0; - r0 = (s.tmp_0 - s.yDiff___192278); - s.y___192315 = (r0); - case 9: - s.tmp_1 = r0 = s.y___192315; - s.tmp_3 = r0 = s.tileSize___192267; - s.tmp_6 = game_Hitbox_bottom__P168746_mk(s); - s.tmp_6.arg0 = s.hbox___192261; - s.callLocIdx = 768; s.pc = 102; return s.tmp_6; - case 102: - r0 = s.retval; + 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___193111.fields["_vx"]; s.tmp_5 = r0; - r0 = (s.tmp_5 - s.yDiff___192278); + r0 = (s.tmp_5 > 0); s.tmp_4 = r0; - r0 = (s.tmp_3 << 8); + r0 = pxsim_numops_toBool(s.tmp_4); + if (r0) { step = 9; continue; } + r0 = s.tmp_4; + { step = 10; continue; } + case 9: + r0 = s.ms___193109.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 + s.tmp_4); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 14; continue; } - s.tmp_10 = Fx_min__P166693_mk(s); - s.tmp_10.arg0 = s.y___192315; - s.tmp_12 = game_Hitbox_bottom__P168746_mk(s); - s.tmp_12.arg0 = s.hbox___192261; - s.callLocIdx = 771; s.pc = 104; return s.tmp_12; - case 104: - r0 = s.retval; - s.tmp_11 = r0; - r0 = (s.tmp_11 - s.yDiff___192278); - s.tmp_10.arg1 = r0; - s.callLocIdx = 773; s.pc = 103; return s.tmp_10; - case 103: - r0 = s.retval; - s.tmp_9 = r0; - r0 = (s.tmp_9 + 128); + r0 = s.tmp_7; + case 11: + // jmp value (already in r0) s.tmp_8 = r0; - r0 = (s.tileScale___192264 + 8); - s.tmp_13 = r0; - r0 = (s.tmp_8 >> s.tmp_13); - s.y0___192329 = (r0); - s.tmp_1 = tiles_TileMap_isObstacle__P169283_mk(s); - s.tmp_1.arg0 = s.arg2; - s.tmp_1.arg1 = s.x0___192298; - s.tmp_1.arg2 = s.y0___192329; - s.callLocIdx = 776; s.pc = 105; return s.tmp_1; - case 105: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.tmp_8); if (!r0) { step = 12; continue; } - s.tmp_2 = tiles_TileMap_getObstacle__P169284_mk(s); - s.tmp_2.arg0 = s.arg2; - s.tmp_2.arg1 = s.x0___192298; - s.tmp_2.arg2 = s.y0___192329; - s.callLocIdx = 777; s.pc = 106; return s.tmp_2; - case 106: - r0 = s.retval; - s.obstacle___192345 = (r0); - r0 = pxsim_pxtcore_mkAction(1, ArcadePhysicsEngine_tilemapCollisions_inline__P192353); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.obstacle___192345); - s.tmp_4 = helpers_arraySome__P166634_mk(s); - s.tmp_4.arg0 = s.collidedTiles___192313; - s.tmp_4.arg1 = s.tmp_0; - s.callLocIdx = 778; s.pc = 107; return s.tmp_4; - case 107: - r0 = s.retval; - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); + s.tmp_9 = r0 = s.ms___193109; + r0 = s.ms___193109.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___193109; + r0 = s.ms___193109.fields["xStep"]; s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); + r0 = (0 - s.tmp_2); s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 10; continue; } - r0 = pxsim_Array__push(s.collidedTiles___192313, s.obstacle___192345); - case 10: - case 11: + r0 = (s.tmp_0).fields["xStep"] = (s.tmp_1); case 12: case 13: - r0 = (s.tileSize___192267 << 8); - s.tmp_0 = r0; - r0 = (s.tmp_0 + s.y___192315); - s.y___192315 = (r0); - { step = 9; continue; } case 14: - r0 = pxsim_Array__length(s.collidedTiles___192313); + r0 = s.s___193111.fields["_vx"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 41; continue; } - r0 = pxsim_numops_toBoolDecr(s.right___192294); - if (!r0) { step = 15; continue; } - r0 = 2; - { step = 16; continue; } + r0 = (s.ms___193109).fields["cachedVx"] = (s.tmp_0); case 15: - r0 = 0; case 16: - // jmp value (already in r0) - s.tmp_1 = r0; - s.collisionDirection___192372 = (s.tmp_1); - r0 = pxsim_numops_toBoolDecr(s.right___192294); - if (!r0) { step = 17; continue; } - r0 = (s.x0___192298 << s.tileScale___192264); + r0 = s.ms___193109.fields["cachedVy"]; s.tmp_1 = r0; - r0 = (s.tmp_1 * 256); + r0 = s.s___193111.fields["_vy"]; s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); + r0 = (s.tmp_1 !== s.tmp_2); s.tmp_0 = r0; - r0 = s.hbox___192261.fields["width"]; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 27; continue; } + r0 = s.s___193111.fields["_vy"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 == 0); s.tmp_3 = r0; - r0 = (s.tmp_0 - s.tmp_3); - { step = 18; continue; } + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 17; continue; } + r0 = (s.ms___193109).fields["dy"] = (0); + { step = 26; continue; } case 17: - r0 = (s.x0___192298 + 1); - s.tmp_5 = r0; - r0 = (s.tmp_5 << s.tileScale___192264); - s.tmp_4 = r0; - r0 = (s.tmp_4 * 256); - s.tmp_6 = r0; - r0 = (s.tmp_6 | 0); + r0 = s.s___193111.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: - // jmp value (already in r0) - s.tmp_7 = r0; - s.tmp_8 = r0 = s.s___192236; - r0 = s.hbox___192261.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___192398 = (undefined); - s.unnamed818___U14 = (s.collidedTiles___192313); - s.unnamed819___U15 = (0); + r0 = s.ms___193109.fields["cachedVy"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 > 0); case 19: - s.tmp_0 = r0 = s.unnamed819___U15; - r0 = pxsim_Array__length(s.unnamed818___U14); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 22; continue; } - r0 = pxsim_Array__getAt(s.unnamed818___U14, s.unnamed819___U15); - s.tile___192398 = (r0); - r0 = s.s___192236.fields["flags"]; - s.tmp_5 = r0; - r0 = (s.tmp_5 & 2818); - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); + // jmp value (already in r0) s.tmp_3 = r0; - r0 = pxsim_Boolean__bang(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + r0 = pxsim_numops_toBool(s.tmp_3); if (!r0) { step = 20; continue; } - s.tmp_6 = Sprite_registerObstacle__P168953_mk(s); - s.tmp_6.arg0 = s.s___192236; - s.tmp_6.arg1 = s.collisionDirection___192372; - s.tmp_6.arg2 = s.tile___192398; - s.tmp_6.arg3 = s.arg2; - s.callLocIdx = 784; s.pc = 108; return s.tmp_6; - case 108: - r0 = s.retval; + r0 = s.tmp_3; + { step = 23; continue; } case 20: + r0 = s.s___193111.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.unnamed819___U15 + 1); - s.unnamed819___U15 = (r0); - { step = 19; continue; } + r0 = s.ms___193109.fields["cachedVy"]; + s.tmp_6 = r0; + r0 = (s.tmp_6 < 0); case 22: - s.unnamed818___U14 = (undefined); - r0 = s.s___192236.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__P168955_mk(s); - s.tmp_2.arg0 = s.s___192236; - s.tmp_2.arg1 = undefined; - s.tmp_2.arg2 = undefined; - s.callLocIdx = 785; s.pc = 109; return s.tmp_2; - case 109: - r0 = s.retval; - { step = 40; continue; } + // jmp value (already in r0) + s.tmp_7 = r0; + r0 = s.tmp_7; case 23: - r0 = s.s___192236.fields["_vx"]; - s.tmp_1 = r0; - r0 = s.arg1.fields["cachedVx"]; - s.tmp_2 = r0; - r0 = (s.tmp_1 === s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 24; continue; } - r0 = s.tmp_0; - { step = 25; continue; } - case 24: - r0 = s.s___192236.fields["flags"]; - s.tmp_5 = r0; - r0 = (s.tmp_5 & 2818); - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - s.tmp_3 = r0; - r0 = pxsim_Boolean__bang(s.tmp_3); - case 25: // jmp value (already in r0) - s.tmp_6 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_6); - if (!r0) { step = 36; continue; } - r0 = s.s___192236.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___192294); + r0 = pxsim_numops_toBoolDecr(s.tmp_8); + if (!r0) { step = 24; continue; } + s.tmp_9 = r0 = s.ms___193109; + r0 = s.ms___193109.fields["dy"]; + s.tmp_11 = r0; + r0 = (0 - s.tmp_11); s.tmp_10 = r0; - r0 = pxsim_Boolean__bang(s.tmp_10); - s.tmp_9 = r0; - r0 = pxsim_numops_toBool(s.tmp_9); - if (r0) { step = 26; continue; } - r0 = s.tmp_9; - { step = 27; continue; } + r0 = (s.tmp_9).fields["dy"] = (s.tmp_10); + s.tmp_0 = r0 = s.ms___193109; + r0 = s.ms___193109.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: - s.tmp_12 = Sprite_vx__P168885_mk(s); - s.tmp_12.arg0 = s.s___192236; - s.callLocIdx = 786; s.pc = 110; return s.tmp_12; - case 110: - r0 = s.retval; - s.tmp_11 = r0; - r0 = (s.tmp_11 < 0); + r0 = s.s___193111.fields["_vy"]; + s.tmp_0 = r0; + r0 = (s.ms___193109).fields["cachedVy"] = (s.tmp_0); case 27: - // jmp value (already in r0) - s.tmp_13 = r0; - r0 = pxsim_numops_toBool(s.tmp_13); - if (!r0) { step = 28; continue; } - r0 = s.tmp_13; - { step = 31; continue; } case 28: - s.tmp_14 = r0 = s.right___192294; - r0 = pxsim_numops_toBool(s.tmp_14); - if (r0) { step = 29; continue; } - r0 = s.tmp_14; + s.tmp_2 = Fx_abs__P166692_mk(s); + r0 = s.ms___193109.fields["xStep"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 666; s.pc = 60; return s.tmp_2; + case 60: + r0 = s.retval; + s.tmp_1 = r0; + s.tmp_4 = Fx_abs__P166692_mk(s); + r0 = s.ms___193109.fields["dx"]; + s.tmp_4.arg0 = r0; + s.callLocIdx = 667; 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___193109.fields["dx"]; { step = 30; continue; } case 29: - s.tmp_16 = Sprite_vx__P168885_mk(s); - s.tmp_16.arg0 = s.s___192236; - s.callLocIdx = 787; s.pc = 111; return s.tmp_16; - case 111: - r0 = s.retval; - s.tmp_15 = r0; - r0 = (s.tmp_15 > 0); + r0 = s.ms___193109.fields["xStep"]; case 30: // jmp value (already in r0) - s.tmp_17 = r0; - r0 = s.tmp_17; + s.tmp_5 = r0; + s.stepX___193204 = (s.tmp_5); + s.tmp_2 = Fx_abs__P166692_mk(s); + r0 = s.ms___193109.fields["yStep"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 668; s.pc = 62; return s.tmp_2; + case 62: + r0 = s.retval; + s.tmp_1 = r0; + s.tmp_4 = Fx_abs__P166692_mk(s); + r0 = s.ms___193109.fields["dy"]; + s.tmp_4.arg0 = r0; + s.callLocIdx = 669; 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___193109.fields["dy"]; + { step = 32; continue; } case 31: + r0 = s.ms___193109.fields["yStep"]; + case 32: // jmp value (already in r0) - s.tmp_18 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_18); - if (!r0) { step = 32; continue; } - s.tmp_19 = r0 = s.s___192236; - r0 = s.s___192236.fields["_vx"]; - s.tmp_21 = r0; - r0 = (0 - s.tmp_21); - s.tmp_20 = r0; - r0 = (s.tmp_19).fields["_vx"] = (s.tmp_20); - s.tmp_0 = r0 = s.arg1; - r0 = s.arg1.fields["xStep"]; + s.tmp_5 = r0; + s.stepY___193218 = (s.tmp_5); + s.tmp_0 = r0 = s.ms___193109; + r0 = s.ms___193109.fields["dx"]; s.tmp_2 = r0; - r0 = (0 - s.tmp_2); + r0 = (s.tmp_2 - s.stepX___193204); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["xStep"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg1; - r0 = s.arg1.fields["dx"]; + r0 = (s.tmp_0).fields["dx"] = (s.tmp_1); + s.tmp_0 = r0 = s.ms___193109; + r0 = s.ms___193109.fields["dy"]; s.tmp_2 = r0; - r0 = (0 - s.tmp_2); + r0 = (s.tmp_2 - s.stepY___193218); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["dx"] = (s.tmp_1); - case 32: + r0 = (s.tmp_0).fields["dy"] = (s.tmp_1); + r0 = s.s___193111.fields["_x"]; + s.tmp_0 = r0; + r0 = (s.s___193111).fields["_lastX"] = (s.tmp_0); + r0 = s.s___193111.fields["_y"]; + s.tmp_0 = r0; + r0 = (s.s___193111).fields["_lastY"] = (s.tmp_0); + s.tmp_0 = r0 = s.s___193111; + r0 = s.s___193111.fields["_x"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + s.stepX___193204); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_x"] = (s.tmp_1); + s.tmp_0 = r0 = s.s___193111; + r0 = s.s___193111.fields["_y"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + s.stepY___193218); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_y"] = (s.tmp_1); + r0 = s.s___193111.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__P168980_mk(s); + r0 = s.arg0.fields["map"]; + s.tmp_4.arg0 = r0; + s.tmp_4.arg1 = s.s___193111; + s.callLocIdx = 674; s.pc = 64; return s.tmp_4; + case 64: + r0 = s.retval; case 33: - { step = 35; continue; } case 34: - r0 = (s.arg1).fields["dx"] = (0); - r0 = (s.s___192236).fields["_vx"] = (0); + s.tmp_0 = r0 = s.tileMap___193029; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 35; continue; } + r0 = s.tmp_0; + { step = 36; continue; } case 35: - { step = 39; continue; } - case 36: - s.tmp_2 = Math_sign__P166656_mk(s); - r0 = s.s___192236.fields["_vx"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 + 128); + r0 = s.tileMap___193029.fields["_map"]; s.tmp_4 = r0; - r0 = (s.tmp_4 >> 8); - s.tmp_2.arg0 = r0; - s.callLocIdx = 792; s.pc = 112; return s.tmp_2; - case 112: - r0 = s.retval; + 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; - s.tmp_6 = Math_sign__P166656_mk(s); - r0 = s.arg1.fields["cachedVx"]; - s.tmp_7 = r0; - r0 = (s.tmp_7 + 128); - s.tmp_8 = r0; - r0 = (s.tmp_8 >> 8); - s.tmp_6.arg0 = r0; - s.callLocIdx = 794; s.pc = 113; return s.tmp_6; - case 113: - r0 = s.retval; + r0 = pxsim_Boolean__bang(s.tmp_1); + case 36: + // jmp value (already in r0) s.tmp_5 = r0; - r0 = (s.tmp_1 === s.tmp_5); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.tmp_5); if (!r0) { step = 37; continue; } - r0 = (s.arg1).fields["dx"] = (0); + s.tmp_6 = ArcadePhysicsEngine_tilemapCollisions__P172313_mk(s); + s.tmp_6.arg0 = s.arg0; + s.tmp_6.arg1 = s.ms___193109; + s.tmp_6.arg2 = s.tileMap___193029; + s.callLocIdx = 676; s.pc = 65; return s.tmp_6; + case 65: + r0 = s.retval; case 37: case 38: + r0 = s.s___193111.fields["flags"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 & 32); + s.bounce___193281 = (r0); + r0 = s.s___193111.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___193281; + 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___193029); + 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__P172312_mk(s); + s.tmp_6.arg0 = s.arg0; + s.tmp_6.arg1 = s.ms___193109; + s.tmp_6.arg2 = s.bounce___193281; + r0 = s.scene___193026.fields["camera"]; + s.tmp_6.arg3 = r0; + s.callLocIdx = 677; s.pc = 66; return s.tmp_6; + case 66: + r0 = s.retval; case 43: case 44: - r0 = (s.yDiff___192278 !== 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 81; continue; } - r0 = (s.yDiff___192278 > 0); - s.down___192489 = (r0); - r0 = pxsim_numops_toBoolDecr(s.down___192489); - if (!r0) { step = 45; continue; } - s.tmp_1 = game_Hitbox_bottom__P168746_mk(s); - s.tmp_1.arg0 = s.hbox___192261; - s.callLocIdx = 795; s.pc = 114; return s.tmp_1; - case 114: + s.tmp_2 = Fx_abs__P166692_mk(s); + r0 = s.ms___193109.fields["dx"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 678; s.pc = 67; return s.tmp_2; + case 67: r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_1 > globals.MIN_MOVE_GAP___169048); s.tmp_0 = r0; - r0 = (s.tmp_0 + 256); + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 45; continue; } + r0 = s.tmp_0; { step = 46; continue; } case 45: - s.tmp_3 = game_Hitbox_top__P168744_mk(s); - s.tmp_3.arg0 = s.hbox___192261; - s.callLocIdx = 797; s.pc = 115; return s.tmp_3; - case 115: + s.tmp_4 = Fx_abs__P166692_mk(s); + r0 = s.ms___193109.fields["dy"]; + s.tmp_4.arg0 = r0; + s.callLocIdx = 679; s.pc = 68; return s.tmp_4; + case 68: r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_2 - 256); + s.tmp_3 = r0; + r0 = (s.tmp_3 > globals.MIN_MOVE_GAP___169048); case 46: // jmp value (already in r0) - s.tmp_4 = r0; - r0 = (s.tmp_4 + 128); s.tmp_5 = r0; - r0 = (s.tileScale___192264 + 8); - s.tmp_6 = r0; - r0 = (s.tmp_5 >> s.tmp_6); - s.y0___192493 = (r0); - r0 = pxsim_Array__mk(); - s.collidedTiles___192508 = (r0); - s.tmp_0 = game_Hitbox_left__P168743_mk(s); - s.tmp_0.arg0 = s.hbox___192261; - s.callLocIdx = 801; s.pc = 116; return s.tmp_0; - case 116: - r0 = s.retval; - s.x___192510 = (r0); + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + if (!r0) { step = 47; continue; } + r0 = pxsim_Array__push(s.remainingMovers___193104, s.ms___193109); case 47: - s.tmp_1 = r0 = s.x___192510; - s.tmp_3 = r0 = s.tileSize___192267; - s.tmp_5 = game_Hitbox_right__P168745_mk(s); - s.tmp_5.arg0 = s.hbox___192261; - s.callLocIdx = 802; s.pc = 117; return s.tmp_5; - case 117: + case 48: + r0 = (s.unnamed813___U14 + 1); + s.unnamed813___U14 = (r0); + { step = 4; continue; } + case 49: + s.unnamed812___U13 = (undefined); + s.tmp_0 = ArcadePhysicsEngine_spriteCollisions__P172311_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.currMovers___193097; + s.tmp_0.arg2 = s.overlapHandlers___193075; + s.callLocIdx = 680; s.pc = 69; return s.tmp_0; + case 69: r0 = s.retval; - s.tmp_4 = r0; - r0 = (s.tmp_3 << 8); - s.tmp_6 = r0; - r0 = (s.tmp_6 + s.tmp_4); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); + case 50: + r0 = pxsim_Array__length(s.currMovers___193097); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 52; continue; } - s.tmp_9 = Fx_min__P166693_mk(s); - s.tmp_9.arg0 = s.x___192510; - s.tmp_10 = game_Hitbox_right__P168745_mk(s); - s.tmp_10.arg0 = s.hbox___192261; - s.callLocIdx = 804; s.pc = 119; return s.tmp_10; - case 119: + if (!r0) { step = 51; continue; } + r0 = pxsim_Array_.pop(s.currMovers___193097); + { step = 50; continue; } + case 51: + r0 = (s.count___193087 + 1); + s.count___193087 = (r0); + { step = 1; continue; } + case 52: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +ArcadePhysicsEngine_move__P169066.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 ArcadePhysicsEngine_move__P169066_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: ArcadePhysicsEngine_move__P169066, depth: s.depth + 1, + pc: 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___193016: undefined, + dt2___193022: undefined, + scene___193026: undefined, + tileMap___193029: undefined, + movingSprites___193032: undefined, + MAX_STEP_COUNT___193063: undefined, + overlapHandlers___193075: undefined, + selected___193082: undefined, + buffers___193083: undefined, + count___193087: undefined, + currMovers___193097: undefined, + remainingMovers___193104: undefined, + ms___193109: undefined, + unnamed812___U13: undefined, + unnamed813___U14: undefined, + s___193111: undefined, + stepX___193204: undefined, + stepY___193218: undefined, + bounce___193281: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function movingSprites_inline__P193034(s) { +let r0 = s.r0, 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 = ArcadePhysicsEngine_createMovingSprite__P172310_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 = 649; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - s.tmp_9.arg1 = r0; - s.callLocIdx = 805; s.pc = 118; return s.tmp_9; - case 118: + return leave(s, r0) + default: oops() +} } } +movingSprites_inline__P193034.info = {"start":3181,"length":52,"line":121,"column":17,"endLine":121,"endColumn":69,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["sprite"]} + +function movingSprites_inline__P193034_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: movingSprites_inline__P193034, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function ArcadePhysicsEngine_move_inline__P193046(s) { +let r0 = s.r0, 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_1 = Sprite_vx__P168885_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 651; s.pc = 5; return s.tmp_1; + case 5: r0 = s.retval; - s.tmp_8 = r0; - r0 = (s.tmp_8 + 128); - s.tmp_7 = r0; - r0 = (s.tileScale___192264 + 8); - s.tmp_11 = r0; - r0 = (s.tmp_7 >> s.tmp_11); - s.x0___192520 = (r0); - s.tmp_1 = tiles_TileMap_isObstacle__P169283_mk(s); - s.tmp_1.arg0 = s.arg2; - s.tmp_1.arg1 = s.x0___192520; - s.tmp_1.arg2 = s.y0___192493; - s.callLocIdx = 808; s.pc = 120; return s.tmp_1; - case 120: + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + s.tmp_2 = Sprite_vy__P168887_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 652; 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__P168952_mk(s); + s.tmp_4.arg0 = s.arg0; + s.callLocIdx = 653; s.pc = 7; return s.tmp_4; + case 7: r0 = s.retval; + case 3: + case 4: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +ArcadePhysicsEngine_move_inline__P193046.info = {"start":3316,"length":66,"line":124,"column":29,"endLine":126,"endColumn":9,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["s"]} + +function ArcadePhysicsEngine_move_inline__P193046_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: ArcadePhysicsEngine_move_inline__P193046, depth: s.depth + 1, + pc: 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 ArcadePhysicsEngine_screenEdgeCollisions__P172312(s) { +let r0 = s.r0, 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___193794 = undefined; + s.offset___193809 = 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__C169054_VT)) failedCast(r0); + r0 = s.arg1.fields["sprite"]; + s.s___193794 = (r0); + r0 = s.s___193794.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 = 50; continue; } - s.tmp_2 = tiles_TileMap_getObstacle__P169284_mk(s); - s.tmp_2.arg0 = s.arg2; - s.tmp_2.arg1 = s.x0___192520; - s.tmp_2.arg2 = s.y0___192493; - s.callLocIdx = 809; s.pc = 121; return s.tmp_2; - case 121: + if (!r0) { step = 1; continue; } + s.tmp_4 = Sprite__C168868_v4_1_mk(s); + s.tmp_4.arg0 = s.s___193794; + if (!checkSubtype(s.tmp_4.arg0, Sprite__C168868_VT)) failedCast(s.tmp_4.arg0); + s.tmp_4.fn = s.tmp_4.arg0.vtable.methods.setHitbox; + s.pc = 21; return s.tmp_4; + case 21: r0 = s.retval; - s.obstacle___192534 = (r0); - r0 = pxsim_pxtcore_mkAction(1, ArcadePhysicsEngine_tilemapCollisions_inline__P192542); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.obstacle___192534); - s.tmp_4 = helpers_arraySome__P166634_mk(s); - s.tmp_4.arg0 = s.collidedTiles___192508; - s.tmp_4.arg1 = s.tmp_0; - s.callLocIdx = 810; s.pc = 122; return s.tmp_4; - case 122: + case 1: + case 2: + s.tmp_3 = scene_Camera_isUpdated__P169324_mk(s); + s.tmp_3.arg0 = s.arg3; + s.callLocIdx = 725; s.pc = 22; return s.tmp_3; + case 22: 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); + r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 48; continue; } - r0 = pxsim_Array__push(s.collidedTiles___192508, s.obstacle___192534); - case 48: - case 49: - case 50: - case 51: - r0 = (s.tileSize___192267 << 8); - s.tmp_0 = r0; - r0 = (s.tmp_0 + s.x___192510); - s.x___192510 = (r0); - { step = 47; continue; } - case 52: - r0 = pxsim_Array__length(s.collidedTiles___192508); + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 79; continue; } - r0 = pxsim_numops_toBoolDecr(s.down___192489); - if (!r0) { step = 53; continue; } - r0 = 3; - { step = 54; continue; } - case 53: - r0 = 1; - case 54: - // jmp value (already in r0) - s.tmp_1 = r0; - s.collisionDirection___192561 = (s.tmp_1); - r0 = pxsim_numops_toBoolDecr(s.down___192489); - if (!r0) { step = 55; continue; } - r0 = (s.y0___192493 << s.tileScale___192264); + if (!r0) { step = 3; continue; } + s.tmp_4 = scene_Camera_update__P169325_mk(s); + s.tmp_4.arg0 = s.arg3; + s.callLocIdx = 726; s.pc = 23; return s.tmp_4; + case 23: + r0 = s.retval; + case 3: + case 4: + s.tmp_2 = game_Hitbox_left__P168743_mk(s); + r0 = s.s___193794.fields["_hitbox"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 727; s.pc = 24; return s.tmp_2; + case 24: + r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_1 * 256); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); + r0 = (s.tmp_1 / 256); s.tmp_0 = r0; - r0 = s.hbox___192261.fields["height"]; + r0 = s.arg3.fields["_offsetX"]; s.tmp_3 = r0; r0 = (s.tmp_0 - s.tmp_3); - { step = 56; continue; } - case 55: - r0 = (s.y0___192493 + 1); - s.tmp_5 = r0; - r0 = (s.tmp_5 << s.tileScale___192264); - s.tmp_4 = r0; - r0 = (s.tmp_4 * 256); - s.tmp_6 = r0; - r0 = (s.tmp_6 | 0); - case 56: - // jmp value (already in r0) - s.tmp_7 = r0; - s.tmp_8 = r0 = s.s___192236; - r0 = s.hbox___192261.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___192587 = (undefined); - s.unnamed820___U24 = (s.collidedTiles___192508); - s.unnamed821___U25 = (0); - case 57: - s.tmp_0 = r0 = s.unnamed821___U25; - r0 = pxsim_Array__length(s.unnamed820___U24); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 60; continue; } - r0 = pxsim_Array__getAt(s.unnamed820___U24, s.unnamed821___U25); - s.tile___192587 = (r0); - r0 = s.s___192236.fields["flags"]; - s.tmp_5 = r0; - r0 = (s.tmp_5 & 2818); - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - s.tmp_3 = r0; - r0 = pxsim_Boolean__bang(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 58; continue; } - s.tmp_6 = Sprite_registerObstacle__P168953_mk(s); - s.tmp_6.arg0 = s.s___192236; - s.tmp_6.arg1 = s.collisionDirection___192561; - s.tmp_6.arg2 = s.tile___192587; - s.tmp_6.arg3 = s.arg2; - s.callLocIdx = 816; s.pc = 123; return s.tmp_6; - case 123: - r0 = s.retval; - case 58: - case 59: - r0 = (s.unnamed821___U25 + 1); - s.unnamed821___U25 = (r0); - { step = 57; continue; } - case 60: - s.unnamed820___U24 = (undefined); - r0 = s.s___192236.fields["flags"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 16); + s.offset___193809 = (r0); + r0 = (s.offset___193809 < 0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 61; continue; } - s.tmp_2 = Sprite_destroy__P168955_mk(s); - s.tmp_2.arg0 = s.s___192236; - s.tmp_2.arg1 = undefined; - s.tmp_2.arg2 = undefined; - s.callLocIdx = 817; s.pc = 124; return s.tmp_2; - case 124: + if (!r0) { step = 7; continue; } + s.tmp_1 = Sprite_left__P168927_mk(s); + s.tmp_2 = r0 = s.s___193794; + s.tmp_1.arg0 = r0; + s.tmp_4 = Sprite_left__P168926_mk(s); + s.tmp_4.arg0 = s.tmp_2; + s.callLocIdx = 730; s.pc = 26; return s.tmp_4; + case 26: + r0 = s.retval; + s.tmp_3 = r0; + r0 = (s.tmp_3 - s.offset___193809); + s.tmp_1.arg1 = r0; + s.callLocIdx = 731; 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__P168886_mk(s); + s.tmp_0.arg0 = s.s___193794; + s.tmp_2 = Sprite_vx__P168885_mk(s); + s.tmp_2.arg0 = s.s___193794; + s.callLocIdx = 732; s.pc = 28; return s.tmp_2; + case 28: r0 = s.retval; - { step = 78; continue; } - case 61: - r0 = s.s___192236.fields["_vy"]; s.tmp_1 = r0; - r0 = s.arg1.fields["cachedVy"]; + r0 = (0 - s.tmp_1); + s.tmp_0.arg1 = r0; + s.callLocIdx = 733; 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__P168745_mk(s); + r0 = s.s___193794.fields["_hitbox"]; + s.tmp_4.arg0 = r0; + s.callLocIdx = 734; s.pc = 29; return s.tmp_4; + case 29: + r0 = s.retval; + s.tmp_3 = r0; + r0 = (s.tmp_3 / 256); s.tmp_2 = r0; - r0 = (s.tmp_1 === s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 62; continue; } - r0 = s.tmp_0; - { step = 63; continue; } - case 62: - r0 = s.s___192236.fields["flags"]; + r0 = s.arg3.fields["_offsetX"]; s.tmp_5 = r0; - r0 = (s.tmp_5 & 2818); - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - s.tmp_3 = r0; - r0 = pxsim_Boolean__bang(s.tmp_3); - case 63: - // jmp value (already in r0) + r0 = (s.tmp_2 - s.tmp_5); + s.tmp_1 = r0; + r0 = pxsim_ImageMethods.width(globals.screen___168559); s.tmp_6 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_6); - if (!r0) { step = 74; continue; } - r0 = s.s___192236.fields["flags"]; - s.tmp_8 = r0; - r0 = (s.tmp_8 & 32); + r0 = (s.tmp_1 - s.tmp_6); + s.tmp_0 = r0; + s.offset___193809 = (r0); + r0 = (s.tmp_0 > 0); s.tmp_7 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_7); - if (!r0) { step = 72; continue; } - r0 = pxsim_numops_toBoolDecr(s.down___192489); + if (!r0) { step = 10; continue; } + s.tmp_8 = Sprite_right__P168929_mk(s); + s.tmp_9 = r0 = s.s___193794; + s.tmp_8.arg0 = r0; + s.tmp_11 = Sprite_right__P168928_mk(s); + s.tmp_11.arg0 = s.tmp_9; + s.callLocIdx = 737; s.pc = 31; return s.tmp_11; + case 31: + r0 = s.retval; s.tmp_10 = r0; - r0 = pxsim_Boolean__bang(s.tmp_10); - s.tmp_9 = r0; - r0 = pxsim_numops_toBool(s.tmp_9); - if (r0) { step = 64; continue; } - r0 = s.tmp_9; - { step = 65; continue; } - case 64: - s.tmp_12 = Sprite_vy__P168887_mk(s); - s.tmp_12.arg0 = s.s___192236; - s.callLocIdx = 818; s.pc = 125; return s.tmp_12; - case 125: + r0 = (s.tmp_10 - s.offset___193809); + s.tmp_8.arg1 = r0; + s.callLocIdx = 738; s.pc = 30; return s.tmp_8; + case 30: r0 = s.retval; - s.tmp_11 = r0; - r0 = (s.tmp_11 < 0); - case 65: - // jmp value (already in r0) - s.tmp_13 = r0; - r0 = pxsim_numops_toBool(s.tmp_13); - if (!r0) { step = 66; continue; } - r0 = s.tmp_13; - { step = 69; continue; } - case 66: - s.tmp_14 = r0 = s.down___192489; - 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__P168887_mk(s); - s.tmp_16.arg0 = s.s___192236; - s.callLocIdx = 819; s.pc = 126; return s.tmp_16; - case 126: + r0 = pxsim_numops_toBoolDecr(s.arg2); + if (!r0) { step = 8; continue; } + s.tmp_0 = Sprite_vx__P168886_mk(s); + s.tmp_0.arg0 = s.s___193794; + s.tmp_2 = Sprite_vx__P168885_mk(s); + s.tmp_2.arg0 = s.s___193794; + s.callLocIdx = 739; s.pc = 33; return s.tmp_2; + case 33: r0 = s.retval; - s.tmp_15 = r0; - r0 = (s.tmp_15 > 0); - case 68: - // jmp value (already in r0) - s.tmp_17 = r0; - r0 = s.tmp_17; - case 69: - // jmp value (already in r0) - s.tmp_18 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_18); - if (!r0) { step = 70; continue; } - s.tmp_19 = r0 = s.s___192236; - r0 = s.s___192236.fields["_vy"]; - s.tmp_21 = r0; - r0 = (0 - s.tmp_21); - s.tmp_20 = r0; - r0 = (s.tmp_19).fields["_vy"] = (s.tmp_20); - s.tmp_0 = r0 = s.arg1; - r0 = s.arg1.fields["yStep"]; - s.tmp_2 = r0; - r0 = (0 - s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["yStep"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg1; - r0 = s.arg1.fields["dy"]; - s.tmp_2 = r0; - r0 = (0 - s.tmp_2); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["dy"] = (s.tmp_1); - case 70: - case 71: - { step = 73; continue; } - case 72: - r0 = (s.arg1).fields["dy"] = (0); - r0 = (s.s___192236).fields["_vy"] = (0); - case 73: - { step = 77; continue; } - case 74: - s.tmp_2 = Math_sign__P166656_mk(s); - r0 = s.s___192236.fields["_vy"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 + 128); - s.tmp_4 = r0; - r0 = (s.tmp_4 >> 8); - s.tmp_2.arg0 = r0; - s.callLocIdx = 824; s.pc = 127; return s.tmp_2; - case 127: + r0 = (0 - s.tmp_1); + s.tmp_0.arg1 = r0; + s.callLocIdx = 740; s.pc = 32; return s.tmp_0; + case 32: r0 = s.retval; - s.tmp_1 = r0; - s.tmp_6 = Math_sign__P166656_mk(s); - r0 = s.arg1.fields["cachedVy"]; - s.tmp_7 = r0; - r0 = (s.tmp_7 + 128); - s.tmp_8 = r0; - r0 = (s.tmp_8 >> 8); - s.tmp_6.arg0 = r0; - s.callLocIdx = 826; s.pc = 128; return s.tmp_6; - case 128: + case 8: + case 9: + case 10: + case 11: + case 12: + s.tmp_3 = game_Hitbox_top__P168744_mk(s); + r0 = s.s___193794.fields["_hitbox"]; + s.tmp_3.arg0 = r0; + s.callLocIdx = 741; s.pc = 34; return s.tmp_3; + case 34: r0 = s.retval; - s.tmp_5 = r0; - r0 = (s.tmp_1 === s.tmp_5); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 75; continue; } - r0 = (s.arg1).fields["dy"] = (0); - case 75: - case 76: - case 77: - case 78: - case 79: - case 80: - case 81: - case 82: - case 83: - case 84: - r0 = s.s___192236.fields["flags"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 & 1538); s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + r0 = (s.tmp_2 / 256); s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 95; continue; } - r0 = pxsim_Array__mk(); - s.overlappedTiles___192681 = (r0); - s.tmp_0 = game_Hitbox_left__P168743_mk(s); - s.tmp_0.arg0 = s.hbox___192261; - s.callLocIdx = 827; s.pc = 129; return s.tmp_0; - case 129: - r0 = s.retval; - s.x___192683 = (r0); - case 85: - s.tmp_1 = r0 = s.x___192683; - s.tmp_3 = r0 = s.tileSize___192267; - s.tmp_5 = game_Hitbox_right__P168745_mk(s); - s.tmp_5.arg0 = s.hbox___192261; - s.callLocIdx = 828; s.pc = 130; return s.tmp_5; - case 130: - r0 = s.retval; + r0 = s.arg3.fields["_offsetY"]; s.tmp_4 = r0; - r0 = (s.tmp_3 << 8); - s.tmp_6 = r0; - r0 = (s.tmp_6 + s.tmp_4); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); + r0 = (s.tmp_1 - s.tmp_4); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 92; continue; } - s.tmp_9 = Fx_min__P166693_mk(s); - s.tmp_9.arg0 = s.x___192683; - s.tmp_10 = game_Hitbox_right__P168745_mk(s); - s.tmp_10.arg0 = s.hbox___192261; - s.callLocIdx = 830; s.pc = 132; return s.tmp_10; - case 132: - r0 = s.retval; - s.tmp_9.arg1 = r0; - s.callLocIdx = 831; s.pc = 131; return s.tmp_9; - case 131: + s.offset___193809 = (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__P168931_mk(s); + s.tmp_7 = r0 = s.s___193794; + s.tmp_6.arg0 = r0; + s.tmp_9 = Sprite_top__P168930_mk(s); + s.tmp_9.arg0 = s.tmp_7; + s.callLocIdx = 744; s.pc = 36; return s.tmp_9; + case 36: r0 = s.retval; s.tmp_8 = r0; - r0 = (s.tmp_8 + 128); - s.tmp_7 = r0; - r0 = (s.tileScale___192264 + 8); - s.tmp_11 = r0; - r0 = (s.tmp_7 >> s.tmp_11); - s.x0___192693 = (r0); - s.tmp_0 = game_Hitbox_top__P168744_mk(s); - s.tmp_0.arg0 = s.hbox___192261; - s.callLocIdx = 834; s.pc = 133; return s.tmp_0; - case 133: - r0 = s.retval; - s.y___192703 = (r0); - case 86: - s.tmp_1 = r0 = s.y___192703; - s.tmp_3 = r0 = s.tileSize___192267; - s.tmp_5 = game_Hitbox_bottom__P168746_mk(s); - s.tmp_5.arg0 = s.hbox___192261; - s.callLocIdx = 835; s.pc = 134; return s.tmp_5; - case 134: + r0 = (s.tmp_8 - s.offset___193809); + s.tmp_6.arg1 = r0; + s.callLocIdx = 745; s.pc = 35; return s.tmp_6; + case 35: r0 = s.retval; - s.tmp_4 = r0; - r0 = (s.tmp_3 << 8); - s.tmp_6 = r0; - r0 = (s.tmp_6 + s.tmp_4); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 91; continue; } - s.tmp_9 = Fx_min__P166693_mk(s); - s.tmp_9.arg0 = s.y___192703; - s.tmp_10 = game_Hitbox_bottom__P168746_mk(s); - s.tmp_10.arg0 = s.hbox___192261; - s.callLocIdx = 837; s.pc = 136; return s.tmp_10; - case 136: + r0 = pxsim_numops_toBoolDecr(s.arg2); + if (!r0) { step = 13; continue; } + s.tmp_0 = Sprite_vy__P168888_mk(s); + s.tmp_0.arg0 = s.s___193794; + s.tmp_2 = Sprite_vy__P168887_mk(s); + s.tmp_2.arg0 = s.s___193794; + s.callLocIdx = 746; s.pc = 38; return s.tmp_2; + case 38: r0 = s.retval; - s.tmp_9.arg1 = r0; - s.callLocIdx = 838; s.pc = 135; return s.tmp_9; - case 135: + s.tmp_1 = r0; + r0 = (0 - s.tmp_1); + s.tmp_0.arg1 = r0; + s.callLocIdx = 747; s.pc = 37; return s.tmp_0; + case 37: r0 = s.retval; - s.tmp_8 = r0; - r0 = (s.tmp_8 + 128); - s.tmp_7 = r0; - r0 = (s.tileScale___192264 + 8); - s.tmp_11 = r0; - r0 = (s.tmp_7 >> s.tmp_11); - s.y0___192713 = (r0); - s.tmp_3 = tiles_TileMap_isObstacle__P169283_mk(s); - s.tmp_3.arg0 = s.arg2; - s.tmp_3.arg1 = s.x0___192693; - s.tmp_3.arg2 = s.y0___192713; - s.callLocIdx = 841; s.pc = 137; return s.tmp_3; - case 137: + case 13: + case 14: + { step = 20; continue; } + case 15: + s.tmp_4 = game_Hitbox_bottom__P168746_mk(s); + r0 = s.s___193794.fields["_hitbox"]; + s.tmp_4.arg0 = r0; + s.callLocIdx = 748; 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 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 87; continue; } - r0 = s.tmp_0; - { step = 88; continue; } - case 87: - r0 = s.s___192236.fields["flags"]; - s.tmp_8 = r0; - r0 = (s.tmp_8 & 2048); + 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___168559); + s.tmp_6 = r0; + r0 = (s.tmp_1 - s.tmp_6); + s.tmp_0 = r0; + s.offset___193809 = (r0); + r0 = (s.tmp_0 > 0); s.tmp_7 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_7); - s.tmp_6 = r0; - r0 = pxsim_Boolean__bang(s.tmp_6); - s.tmp_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); - s.tmp_4 = r0; - r0 = pxsim_Boolean__bang(s.tmp_4); - case 88: - // jmp value (already in r0) - s.tmp_9 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_9); - if (!r0) { step = 89; continue; } - s.tmp_10 = r0 = s.overlappedTiles___192681; - s.tmp_12 = tiles_TileMap_getTile__P169276_mk(s); - s.tmp_12.arg0 = s.arg2; - s.tmp_12.arg1 = s.x0___192693; - s.tmp_12.arg2 = s.y0___192713; - s.callLocIdx = 842; s.pc = 138; return s.tmp_12; - case 138: + if (!r0) { step = 18; continue; } + s.tmp_8 = Sprite_bottom__P168933_mk(s); + s.tmp_9 = r0 = s.s___193794; + s.tmp_8.arg0 = r0; + s.tmp_11 = Sprite_bottom__P168932_mk(s); + s.tmp_11.arg0 = s.tmp_9; + s.callLocIdx = 751; s.pc = 41; return s.tmp_11; + case 41: r0 = s.retval; - s.tmp_11 = r0; - r0 = pxsim_Array__push(s.tmp_10, s.tmp_11); - case 89: - case 90: - r0 = (s.tileSize___192267 << 8); - s.tmp_0 = r0; - r0 = (s.tmp_0 + s.y___192703); - s.y___192703 = (r0); - { step = 86; continue; } - case 91: - r0 = (s.tileSize___192267 << 8); - s.tmp_0 = r0; - r0 = (s.tmp_0 + s.x___192683); - s.x___192683 = (r0); - { step = 85; continue; } - case 92: - r0 = pxsim_Array__length(s.overlappedTiles___192681); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 93; continue; } - s.tmp_1 = ArcadePhysicsEngine_tilemapOverlaps__P172314_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_1.arg1 = s.s___192236; - s.tmp_1.arg2 = s.overlappedTiles___192681; - s.callLocIdx = 845; s.pc = 139; return s.tmp_1; - case 139: + s.tmp_10 = r0; + r0 = (s.tmp_10 - s.offset___193809); + s.tmp_8.arg1 = r0; + s.callLocIdx = 752; s.pc = 40; return s.tmp_8; + case 40: r0 = s.retval; - case 93: - case 94: - case 95: - case 96: + r0 = pxsim_numops_toBoolDecr(s.arg2); + if (!r0) { step = 16; continue; } + s.tmp_0 = Sprite_vy__P168888_mk(s); + s.tmp_0.arg0 = s.s___193794; + s.tmp_2 = Sprite_vy__P168887_mk(s); + s.tmp_2.arg0 = s.s___193794; + s.callLocIdx = 753; 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 = 754; s.pc = 42; return s.tmp_0; + case 42: + r0 = s.retval; + case 16: + case 17: + case 18: + case 19: + case 20: r0 = undefined; return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_tilemapCollisions__P172313.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_screenEdgeCollisions__P172312.info = {"start":12018,"length":905,"line":355,"column":4,"endLine":377,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"screenEdgeCollisions","argumentNames":["this","movingSprite","bounce","camera"]} -function ArcadePhysicsEngine_tilemapCollisions__P172313_mk(s) { +function ArcadePhysicsEngine_screenEdgeCollisions__P172312_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_tilemapCollisions__P172313, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_screenEdgeCollisions__P172312, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -58436,57 +64289,19 @@ function ArcadePhysicsEngine_tilemapCollisions__P172313_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, - s___192236: undefined, - hbox___192261: undefined, - tileScale___192264: undefined, - tileSize___192267: undefined, - xDiff___192271: undefined, - yDiff___192278: undefined, - right___192294: undefined, - x0___192298: undefined, - collidedTiles___192313: undefined, - y___192315: undefined, - y0___192329: undefined, - obstacle___192345: undefined, - collisionDirection___192372: undefined, - tile___192398: undefined, - unnamed818___U14: undefined, - unnamed819___U15: undefined, - down___192489: undefined, - y0___192493: undefined, - collidedTiles___192508: undefined, - x___192510: undefined, - x0___192520: undefined, - obstacle___192534: undefined, - collisionDirection___192561: undefined, - tile___192587: undefined, - unnamed820___U24: undefined, - unnamed821___U25: undefined, - overlappedTiles___192681: undefined, - x___192683: undefined, - x0___192693: undefined, - y___192703: undefined, - y0___192713: undefined, + s___193794: undefined, + offset___193809: undefined, arg0: undefined, arg1: undefined, arg2: undefined, + arg3: undefined, } } -function ArcadePhysicsEngine_tilemapCollisions_inline__P192353(s) { +function scene_Camera_isUpdated__P169324(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -58500,23 +64315,75 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0.fields["tileIndex"]; - s.tmp_0 = r0; - r0 = s.caps[0].fields["tileIndex"]; + r0 = s.arg0; + if (!checkSubtype(r0, scene_Camera__C169308_VT)) failedCast(r0); + r0 = s.arg0.fields["sprite"]; + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); 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_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 4; continue; } + case 1: + s.tmp_5 = Sprite_x__P168881_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_5.arg0 = r0; + s.callLocIdx = 1119; 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); + s.tmp_3 = r0; + r0 = pxsim_numops_toBool(s.tmp_3); + if (r0) { step = 2; continue; } + r0 = s.tmp_3; + { step = 3; continue; } + case 2: + s.tmp_8 = Sprite_y__P168883_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_8.arg0 = r0; + s.callLocIdx = 1120; s.pc = 6; return s.tmp_8; + case 6: + r0 = s.retval; + s.tmp_7 = r0; + r0 = s.arg0.fields["_lastUpdatedSpriteY"]; + s.tmp_9 = r0; + r0 = (s.tmp_7 === s.tmp_9); + case 3: + // jmp value (already in r0) + s.tmp_10 = r0; + r0 = s.tmp_10; + case 4: + // jmp value (already in r0) + s.tmp_11 = r0; + r0 = s.tmp_11; return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_tilemapCollisions_inline__P192353.info = {"start":15147,"length":39,"line":441,"column":48,"endLine":441,"endColumn":87,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["o"]} +scene_Camera_isUpdated__P169324.info = {"start":2403,"length":150,"line":79,"column":8,"endLine":81,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"isUpdated","argumentNames":["this"]} -function ArcadePhysicsEngine_tilemapCollisions_inline__P192353_mk(s) { +function scene_Camera_isUpdated__P169324_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_tilemapCollisions_inline__P192353, depth: s.depth + 1, + parent: s, fn: scene_Camera_isUpdated__P169324, depth: s.depth + 1, pc: 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, } } @@ -58524,7 +64391,7 @@ function ArcadePhysicsEngine_tilemapCollisions_inline__P192353_mk(s) { -function ArcadePhysicsEngine_tilemapCollisions_inline__P192542(s) { +function Sprite_bottom__P168933(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -58536,33 +64403,49 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0.fields["tileIndex"]; - s.tmp_0 = r0; - r0 = s.caps[0].fields["tileIndex"]; - s.tmp_1 = r0; - r0 = (s.tmp_0 === s.tmp_1); + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + s.tmp_0 = Sprite_top__P168931_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = r0 = s.arg1; + s.tmp_3 = Sprite_height__P168925_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 463; 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 = 464; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_tilemapCollisions_inline__P192542.info = {"start":18668,"length":39,"line":522,"column":48,"endLine":522,"endColumn":87,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["o"]} +Sprite_bottom__P168933.info = {"start":12204,"length":73,"line":440,"column":4,"endLine":442,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"bottom","argumentNames":["this","value"]} -function ArcadePhysicsEngine_tilemapCollisions_inline__P192542_mk(s) { +function Sprite_bottom__P168933_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_tilemapCollisions_inline__P192542, depth: s.depth + 1, + parent: s, fn: Sprite_bottom__P168933, depth: s.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_tilemapOverlaps__P172314(s) { +function Sprite_right__P168929(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -58572,115 +64455,51 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.alreadyHandled___192760 = undefined; - s.tile___192763 = undefined; - s.unnamed822___U2 = undefined; - s.unnamed823___U3 = undefined; - s.tileOverlapHandlers___192784 = 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__C169054_VT)) failedCast(r0); - r0 = pxsim_Array__mk(); - s.alreadyHandled___192760 = (r0); - s.tile___192763 = (undefined); - s.unnamed822___U2 = (s.arg2); - s.unnamed823___U3 = (0); - case 1: - s.tmp_0 = r0 = s.unnamed823___U3; - r0 = pxsim_Array__length(s.unnamed822___U2); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 7; continue; } - r0 = pxsim_Array__getAt(s.unnamed822___U2, s.unnamed823___U3); - s.tile___192763 = (r0); - r0 = pxsim_pxtcore_mkAction(1, ArcadePhysicsEngine_tilemapOverlaps_inline__P192767); - s.tmp_2 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_2, 0, s.tile___192763); - s.tmp_4 = helpers_arraySome__P166634_mk(s); - s.tmp_4.arg0 = s.alreadyHandled___192760; - s.tmp_4.arg1 = s.tmp_2; - s.callLocIdx = 850; s.pc = 8; return s.tmp_4; - case 8: - r0 = s.retval; - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 2; continue; } - { step = 6; continue; } + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + s.tmp_0 = Sprite_left__P168927_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = r0 = s.arg1; + s.tmp_3 = Sprite_width__P168924_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 455; s.pc = 2; return s.tmp_3; case 2: - case 3: - r0 = pxsim_Array__push(s.alreadyHandled___192760, s.tile___192763); - s.tmp_0 = game_currentScene__P169526_mk(s); - s.callLocIdx = 851; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; - r0 = r0.fields["tileOverlapHandlers"]; - s.tileOverlapHandlers___192784 = (r0); - r0 = pxsim_numops_toBoolDecr(s.tileOverlapHandlers___192784); - if (!r0) { step = 4; continue; } - r0 = pxsim_pxtcore_mkAction(2, forEach_inline__P192792); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.tile___192763); - r0 = pxsim_pxtcore_mkAction(2, ArcadePhysicsEngine_tilemapOverlaps_inline__P192808); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.arg1); - r0 = pxsim_pxtrt_stclo(s.tmp_1, 1, s.tile___192763); - s.tmp_2 = helpers_arrayForEach__P166636_mk(s); - s.tmp_3 = helpers_arrayFilter__P166637_mk(s); - s.tmp_3.arg0 = s.tileOverlapHandlers___192784; - s.tmp_3.arg1 = s.tmp_0; - s.callLocIdx = 854; s.pc = 11; return s.tmp_3; - case 11: r0 = s.retval; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = s.tmp_1; - s.callLocIdx = 856; s.pc = 10; return s.tmp_2; - case 10: + s.tmp_2 = r0; + r0 = (s.tmp_1 - s.tmp_2); + s.tmp_0.arg1 = r0; + s.callLocIdx = 456; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - case 4: - case 5: - case 6: - r0 = (s.unnamed823___U3 + 1); - s.unnamed823___U3 = (r0); - { step = 1; continue; } - case 7: - s.unnamed822___U2 = (undefined); r0 = undefined; return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_tilemapOverlaps__P172314.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"]} +Sprite_right__P168929.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 ArcadePhysicsEngine_tilemapOverlaps__P172314_mk(s) { +function Sprite_right__P168929_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_tilemapOverlaps__P172314, depth: s.depth + 1, + parent: s, fn: Sprite_right__P168929, depth: s.depth + 1, pc: 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___192760: undefined, - tile___192763: undefined, - unnamed822___U2: undefined, - unnamed823___U3: undefined, - tileOverlapHandlers___192784: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function ArcadePhysicsEngine_tilemapOverlaps_inline__P192767(s) { +function ArcadePhysicsEngine_spriteCollisions__P172311(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -58690,39 +64509,189 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.ms___193338 = undefined; + s.unnamed814___U1 = undefined; + s.unnamed815___U2 = undefined; + s.sprite___193340 = undefined; + s.overSprites___193347 = undefined; + s.overlapper___193355 = undefined; + s.unnamed816___U6 = undefined; + s.unnamed817___U7 = undefined; + s.thisKind___193361 = undefined; + s.otherKind___193365 = undefined; + s.higher___193378 = undefined; + s.lower___193387 = 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["_col"]; - s.tmp_1 = r0; - r0 = s.caps[0].fields["_col"]; + r0 = s.arg0; + if (!checkSubtype(r0, ArcadePhysicsEngine__C169054_VT)) failedCast(r0); + r0 = pxsim_Array__length(s.arg2); 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); - if (r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + { step = 21; continue; } case 1: - r0 = s.arg0.fields["_row"]; + case 2: + s.ms___193338 = (undefined); + s.unnamed814___U1 = (s.arg1); + s.unnamed815___U2 = (0); + case 3: + s.tmp_0 = r0 = s.unnamed815___U2; + r0 = pxsim_Array__length(s.unnamed814___U1); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 20; continue; } + r0 = pxsim_Array__getAt(s.unnamed814___U1, s.unnamed815___U2); + s.ms___193338 = (r0); + r0 = s.ms___193338.fields["sprite"]; + s.sprite___193340 = (r0); + r0 = s.sprite___193340.fields["flags"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 & 4610); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + { step = 19; continue; } + case 4: + case 5: + s.tmp_2 = sprites_SpriteMap_overlaps__P168976_mk(s); + r0 = s.arg0.fields["map"]; + s.tmp_2.arg0 = r0; + r0 = s.ms___193338.fields["sprite"]; + s.tmp_2.arg1 = r0; + s.callLocIdx = 718; s.pc = 22; return s.tmp_2; + case 22: + r0 = s.retval; + s.overSprites___193347 = (r0); + s.overlapper___193355 = (undefined); + s.unnamed816___U6 = (s.overSprites___193347); + s.unnamed817___U7 = (0); + case 6: + s.tmp_0 = r0 = s.unnamed817___U7; + r0 = pxsim_Array__length(s.unnamed816___U6); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 18; continue; } + r0 = pxsim_Array__getAt(s.unnamed816___U6, s.unnamed817___U7); + s.overlapper___193355 = (r0); + r0 = s.overlapper___193355.fields["flags"]; s.tmp_3 = r0; - r0 = s.caps[0].fields["_row"]; + r0 = (s.tmp_3 & 4610); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 7; continue; } + { step = 17; continue; } + case 7: + case 8: + r0 = s.sprite___193340.fields["_kind"]; + s.thisKind___193361 = (r0); + r0 = s.overlapper___193355.fields["_kind"]; + s.otherKind___193365 = (r0); + r0 = s.sprite___193340.fields["_kindsOverlappedWith"]; + s.tmp_2 = r0; + r0 = pxsim_Array_.indexOf(s.tmp_2, s.otherKind___193365, 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___193340.fields["id"]; s.tmp_4 = r0; - r0 = (s.tmp_3 === s.tmp_4); - case 2: + r0 = s.overlapper___193355.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___193340; + { step = 12; continue; } + case 11: + r0 = s.overlapper___193355; + case 12: + // jmp value (already in r0) + s.tmp_6 = r0; + s.higher___193378 = (s.tmp_6); + r0 = (s.higher___193378 === s.sprite___193340); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 13; continue; } + r0 = s.overlapper___193355; + { step = 14; continue; } + case 13: + r0 = s.sprite___193340; + case 14: // jmp value (already in r0) + s.tmp_1 = r0; + s.lower___193387 = (s.tmp_1); + r0 = s.higher___193378.fields["_overlappers"]; + s.tmp_2 = r0; + r0 = s.lower___193387.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__P193407); + s.tmp_4 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_4, 0, s.thisKind___193361); + r0 = pxsim_pxtrt_stclo(s.tmp_4, 1, s.otherKind___193365); + r0 = pxsim_pxtcore_mkAction(5, ArcadePhysicsEngine_spriteCollisions_inline__P193429); s.tmp_5 = r0; - r0 = s.tmp_5; + r0 = pxsim_pxtrt_stclo(s.tmp_5, 0, s.higher___193378); + r0 = pxsim_pxtrt_stclo(s.tmp_5, 1, s.lower___193387); + r0 = pxsim_pxtrt_stclo(s.tmp_5, 2, s.sprite___193340); + r0 = pxsim_pxtrt_stclo(s.tmp_5, 3, s.overlapper___193355); + r0 = pxsim_pxtrt_stclo(s.tmp_5, 4, s.thisKind___193361); + s.tmp_6 = helpers_arrayForEach__P166636_mk(s); + s.tmp_7 = helpers_arrayFilter__P166637_mk(s); + s.tmp_7.arg0 = s.arg2; + s.tmp_7.arg1 = s.tmp_4; + s.callLocIdx = 721; 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 = 723; s.pc = 23; return s.tmp_6; + case 23: + r0 = s.retval; + case 15: + case 16: + case 17: + r0 = (s.unnamed817___U7 + 1); + s.unnamed817___U7 = (r0); + { step = 6; continue; } + case 18: + s.unnamed816___U6 = (undefined); + case 19: + r0 = (s.unnamed815___U2 + 1); + s.unnamed815___U2 = (r0); + { step = 3; continue; } + case 20: + s.unnamed814___U1 = (undefined); + case 21: + r0 = undefined; return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_tilemapOverlaps_inline__P192767.info = {"start":23075,"length":51,"line":630,"column":36,"endLine":630,"endColumn":87,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["l"]} +ArcadePhysicsEngine_spriteCollisions__P172311.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_tilemapOverlaps_inline__P192767_mk(s) { +function ArcadePhysicsEngine_spriteCollisions__P172311_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_tilemapOverlaps_inline__P192767, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_spriteCollisions__P172311, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -58730,14 +64699,30 @@ function ArcadePhysicsEngine_tilemapOverlaps_inline__P192767_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + ms___193338: undefined, + unnamed814___U1: undefined, + unnamed815___U2: undefined, + sprite___193340: undefined, + overSprites___193347: undefined, + overlapper___193355: undefined, + unnamed816___U6: undefined, + unnamed817___U7: undefined, + thisKind___193361: undefined, + otherKind___193365: undefined, + higher___193378: undefined, + lower___193387: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function forEach_inline__P192792(s) { +function forEach_inline__P193407(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -58751,39 +64736,55 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0.fields["spriteKind"]; + r0 = s.arg0.fields["kind"]; s.tmp_1 = r0; - r0 = s.caps[0].fields["_kind"]; - s.tmp_2 = r0; - r0 = (s.tmp_1 == s.tmp_2); + 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; } case 1: - r0 = s.arg0.fields["tileKind"]; + 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; - s.tmp_5 = tiles_getTileImage__P169295_mk(s); - s.tmp_5.arg0 = s.caps[1]; - s.callLocIdx = 853; s.pc = 3; return s.tmp_5; + r0 = pxsim_numops_toBool(s.tmp_3); + if (!r0) { step = 3; continue; } + r0 = s.tmp_3; + { step = 6; continue; } case 3: - r0 = s.retval; + r0 = s.arg0.fields["kind"]; + s.tmp_5 = r0; + r0 = (s.tmp_5 === s.caps[1]); s.tmp_4 = r0; - r0 = pxsim_ImageMethods.equals(s.tmp_3, s.tmp_4); - case 2: - // jmp value (already in 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; + r0 = (s.tmp_6 === s.caps[0]); + case 5: + // jmp value (already in r0) + s.tmp_7 = r0; + r0 = s.tmp_7; + case 6: + // jmp value (already in r0) + s.tmp_8 = r0; + r0 = s.tmp_8; return leave(s, r0) default: oops() } } } -forEach_inline__P192792.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__P193407.info = {"start":11113,"length":137,"line":335,"column":32,"endLine":336,"endColumn":81,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["h"]} -function forEach_inline__P192792_mk(s) { +function forEach_inline__P193407_mk(s) { checkStack(s.depth); return { - parent: s, fn: forEach_inline__P192792, depth: s.depth + 1, + parent: s, fn: forEach_inline__P193407, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -58792,6 +64793,8 @@ function forEach_inline__P192792_mk(s) { tmp_4: undefined, tmp_5: undefined, tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, arg0: undefined, } } @@ -58799,7 +64802,7 @@ function forEach_inline__P192792_mk(s) { -function ArcadePhysicsEngine_tilemapOverlaps_inline__P192808(s) { +function ArcadePhysicsEngine_spriteCollisions_inline__P193429(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -58813,33 +64816,33 @@ switch (step) { 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 = 855; 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 = 855; s.pc = 1; return s.tmp_0; } - else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 855; s.pc = 1; return s.tmp_0;; } - else { s.callLocIdx = 855; s.pc = 1; return s.tmp_0; } - } - case 1: - 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__P193439); + 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_tilemapOverlaps_inline__P192808.info = {"start":23507,"length":28,"line":639,"column":29,"endLine":639,"endColumn":57,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["h"]} +ArcadePhysicsEngine_spriteCollisions_inline__P193429.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_tilemapOverlaps_inline__P192808_mk(s) { +function ArcadePhysicsEngine_spriteCollisions_inline__P193429_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_tilemapOverlaps_inline__P192808, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_spriteCollisions_inline__P193429, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, arg0: undefined, } } @@ -58847,7 +64850,7 @@ function ArcadePhysicsEngine_tilemapOverlaps_inline__P192808_mk(s) { -function tiles_getTileImage__P169295(s) { +function ArcadePhysicsEngine_spriteCollisions_inline__P193439(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -58857,61 +64860,78 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___192816 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - s.tmp_0 = game_currentScene__P169526_mk(s); - s.callLocIdx = 1104; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.scene___192816 = (r0); - r0 = pxsim_numops_toBoolDecr(s.arg0); + r0 = s.caps[0].fields["flags"]; + s.tmp_4 = r0; + r0 = s.caps[1].fields["flags"]; + s.tmp_5 = r0; + r0 = (s.tmp_4 | s.tmp_5); + s.tmp_3 = r0; + r0 = (s.tmp_3 & 4610); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); + 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.tmp_0; + r0 = s.caps[0]; { step = 2; continue; } case 1: - r0 = s.scene___192816.fields["tileMap"]; - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); + r0 = s.caps[1]; case 2: // jmp value (already in r0) - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); + 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 = pxsim.image.ofBuffer(_hex192826); - { step = 5; continue; } + r0 = s.caps[1]; + { step = 4; continue; } case 3: + r0 = s.caps[0]; case 4: - s.tmp_5 = tiles_TileMap_getTileImage__P169286_mk(s); - r0 = s.scene___192816.fields["tileMap"]; - s.tmp_5.arg0 = r0; - s.tmp_6 = tiles_Location_tileSet__P169231_mk(s); - s.tmp_6.arg0 = s.arg0; - s.callLocIdx = 1105; s.pc = 8; return s.tmp_6; - case 8: - r0 = s.retval; - s.tmp_5.arg1 = r0; - s.callLocIdx = 1106; s.pc = 7; return s.tmp_5; + // 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 = 722; 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 = 722; s.pc = 7; return s.tmp_12; } + else if (s.tmp_12.fn.isGetter) { s.tmp_12.stage2Call = true; s.callLocIdx = 722; s.pc = 7; return s.tmp_12;; } + else { s.callLocIdx = 722; 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() } } } -tiles_getTileImage__P169295.info = {"start":21871,"length":207,"line":673,"column":4,"endLine":677,"endColumn":5,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTileImage","argumentNames":["loc"]} +ArcadePhysicsEngine_spriteCollisions_inline__P193439.info = {"start":11431,"length":503,"line":340,"column":50,"endLine":348,"endColumn":29,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":[]} -function tiles_getTileImage__P169295_mk(s) { +function ArcadePhysicsEngine_spriteCollisions_inline__P193439_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_getTileImage__P169295, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_spriteCollisions_inline__P193439, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -58920,16 +64940,19 @@ function tiles_getTileImage__P169295_mk(s) { tmp_4: undefined, tmp_5: undefined, tmp_6: undefined, - scene___192816: undefined, - arg0: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, + tmp_11: undefined, + tmp_12: undefined, } } -const _hex192826 = pxsim.BufferMethods.createBufferFromHex("8704000000000000") -function tiles_TileMap_getTileImage__P169286(s) { +function sprites_SpriteMap_overlaps__P168976(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -58939,90 +64962,56 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.n___193472 = undefined; + s.o___193476 = 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__C169262_VT)) failedCast(r0); - s.tmp_0 = tiles_TileMapData_getTileImage__P169253_mk(s); - r0 = s.arg0.fields["_map"]; - s.tmp_0.arg0 = r0; + if (!checkSubtype(r0, sprites_SpriteMap__C168973_VT)) failedCast(r0); + s.tmp_0 = sprites_SpriteMap_neighbors__P168975_mk(s); + s.tmp_0.arg0 = s.arg0; s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 1098; s.pc = 1; return s.tmp_0; + s.callLocIdx = 591; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - return leave(s, r0) - default: oops() -} } } -tiles_TileMap_getTileImage__P169286.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__P169286_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_TileMap_getTileImage__P169286, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function tiles_Location_tileSet__P169231(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_Location__C169220_VT)) failedCast(r0); - s.tmp_0 = tiles_TileMap_getTileIndex__P169277_mk(s); - s.tmp_1 = tiles_Location_tileMap__P169222_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 1023; s.pc = 2; return s.tmp_1; + s.n___193472 = (r0); + r0 = pxsim_pxtcore_mkAction(1, o_inline__P193478); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); + s.tmp_1 = helpers_arrayFilter__P166637_mk(s); + s.tmp_1.arg0 = s.n___193472; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 593; s.pc = 2; return s.tmp_1; case 2: r0 = s.retval; - s.tmp_0.arg0 = r0; - r0 = s.arg0.fields["_col"]; - s.tmp_0.arg1 = r0; - r0 = s.arg0.fields["_row"]; - s.tmp_0.arg2 = r0; - s.callLocIdx = 1024; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - return leaveAccessor(s, r0) + s.o___193476 = (r0); + r0 = s.o___193476; + return leave(s, r0) default: oops() } } } -tiles_Location_tileSet__P169231.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__P169231.isGetter = true; +sprites_SpriteMap_overlaps__P168976.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 tiles_Location_tileSet__P169231_mk(s) { +function sprites_SpriteMap_overlaps__P168976_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_Location_tileSet__P169231, depth: s.depth + 1, + parent: s, fn: sprites_SpriteMap_overlaps__P168976, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + n___193472: undefined, + o___193476: undefined, arg0: undefined, + arg1: undefined, } } -function tiles_TileMap_getTileIndex__P169277(s) { +function o_inline__P193478(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -59034,111 +65023,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, tiles_TileMap__C169262_VT)) failedCast(r0); - s.tmp_0 = tiles_TileMapData_getTile__P169250_mk(s); - r0 = s.arg0.fields["_map"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.arg1; - s.tmp_0.arg2 = s.arg2; - s.callLocIdx = 1053; s.pc = 1; return s.tmp_0; + s.tmp_0 = Sprite_overlapsWith__P168947_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 592; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; return leave(s, r0) default: oops() } } } -tiles_TileMap_getTileIndex__P169277.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"]} +o_inline__P193478.info = {"start":1037,"length":41,"line":32,"column":31,"endLine":32,"endColumn":72,"fileName":"pxt_modules/game/spritemap.ts","functionName":"inline","argumentNames":["neighbor"]} -function tiles_TileMap_getTileIndex__P169277_mk(s) { +function o_inline__P193478_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_getTileIndex__P169277, depth: s.depth + 1, + parent: s, fn: o_inline__P193478, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, -} } - - - - - -function tiles_Location_row__P169224(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_Location__C169220_VT)) failedCast(r0); - r0 = s.arg0.fields["_row"]; - return leaveAccessor(s, r0) - default: oops() -} } } -tiles_Location_row__P169224.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__P169224.isGetter = true; - -function tiles_Location_row__P169224_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_Location_row__P169224, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function tiles_Location_column__P169223(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_Location__C169220_VT)) failedCast(r0); - r0 = s.arg0.fields["_col"]; - return leaveAccessor(s, r0) - default: oops() -} } } -tiles_Location_column__P169223.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__P169223.isGetter = true; - -function tiles_Location_column__P169223_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_Location_column__P169223, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, } } -function tiles_TileMap_getObstacle__P169284(s) { +function sprites_SpriteMap_neighbors__P168975(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -59148,135 +65059,121 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.index___192960 = undefined; - s.tile___192972 = undefined; + s.n___193684 = undefined; + s.layer___193686 = 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__C169262_VT)) failedCast(r0); - s.tmp_1 = tiles_TileMapData_isOutsideMap__P169256_mk(s); - r0 = s.arg0.fields["_map"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.arg1; - s.tmp_1.arg2 = s.arg2; - s.callLocIdx = 1077; s.pc = 3; return s.tmp_1; + if (!checkSubtype(r0, sprites_SpriteMap__C168973_VT)) failedCast(r0); + r0 = pxsim_Array__mk(); + s.n___193684 = (r0); + r0 = s.arg1.fields["layer"]; + s.layer___193686 = (r0); + s.tmp_0 = sprites_SpriteMap_mergeAtKey__P172275_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = Sprite_left__P168926_mk(s); + s.tmp_1.arg0 = s.arg1; + s.callLocIdx = 579; s.pc = 2; return s.tmp_1; + case 2: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.tmp_2 = Sprite_top__P168930_mk(s); + s.tmp_2.arg0 = s.arg1; + s.callLocIdx = 580; s.pc = 3; return s.tmp_2; case 3: r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = 0; - { step = 2; continue; } + s.tmp_0.arg2 = r0; + s.tmp_0.arg3 = s.layer___193686; + s.tmp_0.arg4 = s.n___193684; + s.callLocIdx = 581; s.pc = 1; return s.tmp_0; case 1: - s.tmp_2 = tiles_TileMapData_getTile__P169250_mk(s); - r0 = s.arg0.fields["_map"]; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = s.arg1; - s.tmp_2.arg2 = s.arg2; - s.callLocIdx = 1078; s.pc = 4; return s.tmp_2; - case 4: r0 = s.retval; - case 2: - // jmp value (already in r0) - s.tmp_3 = r0; - s.index___192960 = (s.tmp_3); - s.tmp_0 = tiles_TileMapData_getTileImage__P169253_mk(s); - r0 = s.arg0.fields["_map"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.index___192960; - s.callLocIdx = 1079; s.pc = 5; return s.tmp_0; + s.tmp_0 = sprites_SpriteMap_mergeAtKey__P172275_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = Sprite_left__P168926_mk(s); + s.tmp_1.arg0 = s.arg1; + s.callLocIdx = 582; s.pc = 5; return s.tmp_1; case 5: r0 = s.retval; - s.tile___192972 = (r0); - r0 = pxsim_pxtcore_mkClassInstance(sprites_StaticObstacle__C169025_VT); - s.tmp_0 = r0; - s.tmp_1 = sprites_StaticObstacle_constructor__P169031_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = s.tile___192972; - s.tmp_2 = r0 = s.arg2; - r0 = s.arg0.fields["_scale"]; - s.tmp_3 = r0; - r0 = (s.tmp_2 << s.tmp_3); - s.tmp_1.arg2 = r0; - s.tmp_4 = r0 = s.arg1; - r0 = s.arg0.fields["_scale"]; - s.tmp_5 = r0; - r0 = (s.tmp_4 << s.tmp_5); - s.tmp_1.arg3 = r0; - r0 = s.arg0.fields["_layer"]; - s.tmp_1.arg4 = r0; - s.tmp_1.arg5 = s.index___192960; - s.callLocIdx = 1083; s.pc = 6; return s.tmp_1; + s.tmp_0.arg1 = r0; + s.tmp_2 = Sprite_bottom__P168932_mk(s); + s.tmp_2.arg0 = s.arg1; + s.callLocIdx = 583; s.pc = 6; return s.tmp_2; case 6: r0 = s.retval; - r0 = s.tmp_0; + s.tmp_0.arg2 = r0; + s.tmp_0.arg3 = s.layer___193686; + s.tmp_0.arg4 = s.n___193684; + s.callLocIdx = 584; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + s.tmp_0 = sprites_SpriteMap_mergeAtKey__P172275_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = Sprite_right__P168928_mk(s); + s.tmp_1.arg0 = s.arg1; + s.callLocIdx = 585; s.pc = 8; return s.tmp_1; + case 8: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.tmp_2 = Sprite_top__P168930_mk(s); + s.tmp_2.arg0 = s.arg1; + s.callLocIdx = 586; s.pc = 9; return s.tmp_2; + case 9: + r0 = s.retval; + s.tmp_0.arg2 = r0; + s.tmp_0.arg3 = s.layer___193686; + s.tmp_0.arg4 = s.n___193684; + s.callLocIdx = 587; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + s.tmp_0 = sprites_SpriteMap_mergeAtKey__P172275_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = Sprite_right__P168928_mk(s); + s.tmp_1.arg0 = s.arg1; + s.callLocIdx = 588; s.pc = 11; return s.tmp_1; + case 11: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.tmp_2 = Sprite_bottom__P168932_mk(s); + s.tmp_2.arg0 = s.arg1; + s.callLocIdx = 589; s.pc = 12; return s.tmp_2; + case 12: + r0 = s.retval; + s.tmp_0.arg2 = r0; + s.tmp_0.arg3 = s.layer___193686; + s.tmp_0.arg4 = s.n___193684; + s.callLocIdx = 590; s.pc = 10; return s.tmp_0; + case 10: + r0 = s.retval; + r0 = pxsim_Array_.removeElement(s.n___193684, s.arg1); + r0 = s.n___193684; return leave(s, r0) default: oops() } } } -tiles_TileMap_getObstacle__P169284.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"]} +sprites_SpriteMap_neighbors__P168975.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 tiles_TileMap_getObstacle__P169284_mk(s) { +function sprites_SpriteMap_neighbors__P168975_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_getObstacle__P169284, depth: s.depth + 1, + parent: s, fn: sprites_SpriteMap_neighbors__P168975, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - index___192960: undefined, - tile___192972: undefined, + n___193684: undefined, + layer___193686: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, -} } - - - - - -function tiles_TileMap_layer__P169272(s) { -let r0 = s.r0, 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__C169262_VT)) failedCast(r0); - r0 = s.arg0.fields["_layer"]; - return leaveAccessor(s, r0) - default: oops() -} } } -tiles_TileMap_layer__P169272.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__P169272.isGetter = true; - -function tiles_TileMap_layer__P169272_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_TileMap_layer__P169272, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, } } -function sprites_StaticObstacle_constructor__P169031(s) { +function sprites_SpriteMap_mergeAtKey__P172275(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -59286,46 +65183,107 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.k___193727 = undefined; + s.bucket___193732 = undefined; + s.sprite___193739 = undefined; + s.unnamed810___U3 = undefined; + s.unnamed811___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.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_StaticObstacle__C169025_VT)) failedCast(r0); - r0 = (s.arg0).fields["image"] = (s.arg1); - r0 = (s.arg0).fields["layer"] = (s.arg4); - r0 = (s.arg0).fields["top"] = (s.arg2); - r0 = (s.arg0).fields["left"] = (s.arg3); - r0 = (s.arg0).fields["tileIndex"] = (s.arg5); + if (!checkSubtype(r0, sprites_SpriteMap__C168973_VT)) failedCast(r0); + s.tmp_0 = sprites_SpriteMap_key__P172273_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.tmp_0.arg2 = s.arg2; + s.callLocIdx = 617; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; + s.k___193727 = (r0); + r0 = s.arg0.fields["buckets"]; + s.tmp_0 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.k___193727); + s.bucket___193732 = (r0); + r0 = pxsim_numops_toBoolDecr(s.bucket___193732); + if (!r0) { step = 7; continue; } + s.sprite___193739 = (undefined); + s.unnamed810___U3 = (s.bucket___193732); + s.unnamed811___U4 = (0); + case 1: + s.tmp_0 = r0 = s.unnamed811___U4; + r0 = pxsim_Array__length(s.unnamed810___U3); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 6; continue; } + r0 = pxsim_Array__getAt(s.unnamed810___U3, s.unnamed811___U4); + s.sprite___193739 = (r0); + r0 = s.sprite___193739.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___193739, undefined); + s.tmp_4 = r0; + r0 = (s.tmp_4 < 0); + case 3: + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + if (!r0) { step = 4; continue; } + r0 = pxsim_Array__push(s.arg4, s.sprite___193739); + case 4: + case 5: + r0 = (s.unnamed811___U4 + 1); + s.unnamed811___U4 = (r0); + { step = 1; continue; } + case 6: + s.unnamed810___U3 = (undefined); + case 7: + case 8: r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_StaticObstacle_constructor__P169031.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_SpriteMap_mergeAtKey__P172275.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 sprites_StaticObstacle_constructor__P169031_mk(s) { +function sprites_SpriteMap_mergeAtKey__P172275_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_StaticObstacle_constructor__P169031, depth: s.depth + 1, + parent: s, fn: sprites_SpriteMap_mergeAtKey__P172275, depth: s.depth + 1, pc: 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___193727: undefined, + bucket___193732: undefined, + sprite___193739: undefined, + unnamed810___U3: undefined, + unnamed811___U4: undefined, arg0: undefined, arg1: undefined, arg2: undefined, arg3: undefined, arg4: undefined, - arg5: undefined, } } -function tiles_TileMap_isObstacle__P169283(s) { +function sprites_SpriteMap_key__P172273(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -59335,6 +65293,8 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.xi___193760 = undefined; + s.yi___193772 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); @@ -59342,72 +65302,52 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C169262_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); + if (!checkSubtype(r0, sprites_SpriteMap__C168973_VT)) failedCast(r0); + s.tmp_0 = Math_clamp__P166654_mk(s); + s.tmp_0.arg0 = 0; + r0 = s.arg0.fields["columnCount"]; + s.tmp_0.arg1 = r0; + r0 = s.arg0.fields["cellWidth"]; s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = false; - { step = 5; continue; } + r0 = pxsim.Math_.idiv(s.arg1, s.tmp_1); + s.tmp_0.arg2 = r0; + s.callLocIdx = 605; s.pc = 1; return s.tmp_0; case 1: + r0 = s.retval; + s.xi___193760 = (r0); + s.tmp_0 = Math_clamp__P166654_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 = 606; s.pc = 2; return s.tmp_0; case 2: - s.tmp_8 = tiles_TileMapData_isOutsideMap__P169256_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 = 1075; 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: + s.yi___193772 = (r0); + s.tmp_0 = r0 = s.xi___193760; + r0 = s.arg0.fields["columnCount"]; + s.tmp_2 = r0; + r0 = (s.yi___193772 * s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); return leave(s, r0) default: oops() } } } -tiles_TileMap_isObstacle__P169283.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"]} +sprites_SpriteMap_key__P172273.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 tiles_TileMap_isObstacle__P169283_mk(s) { +function sprites_SpriteMap_key__P172273_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_isObstacle__P169283, depth: s.depth + 1, + parent: s, fn: sprites_SpriteMap_key__P172273, depth: s.depth + 1, pc: 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, + xi___193760: undefined, + yi___193772: undefined, arg0: undefined, arg1: undefined, arg2: undefined, @@ -59417,7 +65357,7 @@ function tiles_TileMap_isObstacle__P169283_mk(s) { -function Sprite_registerObstacle__P168953(s) { +function Sprite_overlapsWith__P168947(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -59427,166 +65367,358 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.collisionHandlers___192873 = undefined; - s.wallCollisionHandlers___192880 = undefined; - s.wallHandlersToRun___192905 = undefined; - s.asTileLocation___192918 = undefined; + s.A___193556 = undefined; + s.B___193557 = 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__C168868_VT)) failedCast(r0); - r0 = s.arg0.fields["_obstacles"]; + r0 = (s.arg1 == s.arg0); s.tmp_0 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, s.arg1, s.arg2); - s.tmp_1 = game_currentScene__P169526_mk(s); - s.callLocIdx = 518; s.pc = 9; return s.tmp_1; - case 9: + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = false; + { step = 27; continue; } + case 1: + case 2: + 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 = false; + { step = 27; continue; } + case 3: + case 4: + r0 = s.arg1.fields["flags"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 & 4610); + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 5; continue; } + r0 = false; + { step = 27; continue; } + case 5: + case 6: + r0 = s.arg0.fields["flags"]; + s.tmp_6 = r0; + r0 = (s.tmp_6 & 8192); + s.tmp_5 = r0; + r0 = pxsim_numops_toBool(s.tmp_5); + if (!r0) { step = 7; continue; } + r0 = s.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__P168750_mk(s); + r0 = s.arg1.fields["_hitbox"]; + s.tmp_9.arg0 = r0; + r0 = s.arg0.fields["_hitbox"]; + s.tmp_9.arg1 = r0; + s.callLocIdx = 487; s.pc = 28; return s.tmp_9; + case 28: 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 = 519; s.pc = 10; return s.tmp_3; } - } + { step = 27; continue; } + case 9: case 10: + s.tmp_13 = game_Hitbox_overlapsWith__P168750_mk(s); + r0 = s.arg1.fields["_hitbox"]; + s.tmp_13.arg0 = r0; + r0 = s.arg0.fields["_hitbox"]; + s.tmp_13.arg1 = r0; + s.callLocIdx = 488; s.pc = 29; return s.tmp_13; + case 29: r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_2); - s.collisionHandlers___192873 = (r0); - s.tmp_0 = game_currentScene__P169526_mk(s); - s.callLocIdx = 520; s.pc = 11; return s.tmp_0; + s.tmp_12 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_12); + s.tmp_11 = r0; + r0 = pxsim_Boolean__bang(s.tmp_11); + s.tmp_10 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_10); + if (!r0) { step = 11; continue; } + r0 = false; + { step = 27; continue; } case 11: + case 12: + s.tmp_17 = Sprite_isScaled__P172266_mk(s); + s.tmp_17.arg0 = s.arg0; + s.callLocIdx = 489; s.pc = 30; return s.tmp_17; + case 30: r0 = s.retval; - r0 = r0.fields["wallCollisionHandlers"]; - s.wallCollisionHandlers___192880 = (r0); - r0 = pxsim_numops_toBoolDecr(s.collisionHandlers___192873); - if (!r0) { step = 1; continue; } - r0 = pxsim_pxtcore_mkAction(1, forEach_inline__P192888); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - r0 = pxsim_pxtcore_mkAction(1, Sprite_registerObstacle_inline__P192894); + 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__P172266_mk(s); + s.tmp_20.arg0 = s.arg1; + s.callLocIdx = 490; 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__P168926_mk(s); + s.tmp_26.arg0 = s.arg0; + s.callLocIdx = 491; s.pc = 32; return s.tmp_26; + case 32: + r0 = s.retval; + s.tmp_25 = r0; + s.tmp_28 = Sprite_left__P168926_mk(s); + s.tmp_28.arg0 = s.arg1; + s.callLocIdx = 492; 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__P168930_mk(s); + s.tmp_31.arg0 = s.arg0; + s.callLocIdx = 493; s.pc = 34; return s.tmp_31; + case 34: + r0 = s.retval; + s.tmp_30 = r0; + s.tmp_33 = Sprite_top__P168930_mk(s); + s.tmp_33.arg0 = s.arg1; + s.callLocIdx = 494; 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__P168897_mk(s); + s.tmp_36.arg0 = s.arg0; + s.callLocIdx = 495; 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__P168899_mk(s); + s.tmp_38.arg0 = s.arg0; + s.callLocIdx = 496; 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__P168897_mk(s); + s.tmp_41.arg0 = s.arg1; + s.callLocIdx = 497; 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__P168899_mk(s); + s.tmp_44.arg0 = s.arg1; + s.callLocIdx = 498; 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__P168897_mk(s); + s.tmp_49.arg0 = s.arg0; + s.callLocIdx = 499; s.pc = 40; return s.tmp_49; + case 40: + r0 = s.retval; + s.tmp_48 = r0; + s.tmp_51 = Sprite_sy__P168899_mk(s); + s.tmp_51.arg0 = s.arg0; + s.callLocIdx = 500; 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__P168897_mk(s); + s.tmp_54.arg0 = s.arg1; + s.callLocIdx = 501; s.pc = 42; return s.tmp_54; + case 42: + r0 = s.retval; + s.tmp_53 = r0; + s.tmp_56 = Sprite_sy__P168899_mk(s); + s.tmp_56.arg0 = s.arg1; + s.callLocIdx = 502; 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___193556 = (s.arg0); + s.B___193557 = (s.arg1); + { step = 25; continue; } + case 24: + s.A___193556 = (s.arg1); + s.B___193557 = (s.arg0); + case 25: + s.tmp_0 = helpers_imageBlit__P168480_mk(s); + r0 = s.A___193556.fields["_image"]; + s.tmp_0.arg0 = r0; + s.tmp_3 = Sprite_left__P168926_mk(s); + s.tmp_3.arg0 = s.B___193557; + s.callLocIdx = 504; s.pc = 45; return s.tmp_3; + case 45: + r0 = s.retval; + s.tmp_2 = r0; + s.tmp_5 = Sprite_left__P168926_mk(s); + s.tmp_5.arg0 = s.A___193556; + s.callLocIdx = 505; 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_pxtrt_stclo(s.tmp_1, 0, s.arg0); - s.tmp_2 = helpers_arrayForEach__P166636_mk(s); - s.tmp_3 = helpers_arrayFilter__P166637_mk(s); - s.tmp_3.arg0 = s.collisionHandlers___192873; - s.tmp_3.arg1 = s.tmp_0; - s.callLocIdx = 522; s.pc = 13; return s.tmp_3; - case 13: + s.tmp_7 = Sprite_sx__P168897_mk(s); + s.tmp_7.arg0 = s.A___193556; + s.callLocIdx = 506; s.pc = 47; return s.tmp_7; + case 47: r0 = s.retval; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = s.tmp_1; - s.callLocIdx = 524; s.pc = 12; return s.tmp_2; - case 12: + s.tmp_6 = r0; + r0 = (s.tmp_1 / s.tmp_6); + s.tmp_0.arg1 = r0; + s.tmp_10 = Sprite_top__P168930_mk(s); + s.tmp_10.arg0 = s.B___193557; + s.callLocIdx = 507; s.pc = 48; return s.tmp_10; + case 48: r0 = s.retval; - case 1: - case 2: - r0 = pxsim_numops_toBoolDecr(s.wallCollisionHandlers___192880); - 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__P169526_mk(s); - s.callLocIdx = 525; s.pc = 14; return s.tmp_1; - case 14: + s.tmp_9 = r0; + s.tmp_12 = Sprite_top__P168930_mk(s); + s.tmp_12.arg0 = s.A___193556; + s.callLocIdx = 508; s.pc = 49; return s.tmp_12; + case 49: 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__P192907); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = helpers_arrayFilter__P166637_mk(s); - s.tmp_1.arg0 = s.wallCollisionHandlers___192880; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 527; s.pc = 15; return s.tmp_1; - case 15: + s.tmp_11 = r0; + r0 = (s.tmp_9 - s.tmp_11); + s.tmp_8 = r0; + s.tmp_14 = Sprite_sy__P168899_mk(s); + s.tmp_14.arg0 = s.A___193556; + s.callLocIdx = 509; s.pc = 50; return s.tmp_14; + case 50: r0 = s.retval; - s.wallHandlersToRun___192905 = (r0); - r0 = pxsim_Array__length(s.wallHandlersToRun___192905); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - s.tmp_1 = tiles_TileMap_getTile__P169276_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 = 528; s.pc = 17; return s.tmp_3; } - } - case 17: + s.tmp_13 = r0; + r0 = (s.tmp_8 / s.tmp_13); + s.tmp_0.arg2 = r0; + s.tmp_16 = Sprite_width__P168924_mk(s); + s.tmp_16.arg0 = s.B___193557; + s.callLocIdx = 510; s.pc = 51; return s.tmp_16; + case 51: 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 = 530; s.pc = 18; return s.tmp_6; } - } - case 18: + s.tmp_15 = r0; + s.tmp_18 = Sprite_sx__P168897_mk(s); + s.tmp_18.arg0 = s.A___193556; + s.callLocIdx = 511; s.pc = 52; return s.tmp_18; + case 52: 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 = 532; s.pc = 16; return s.tmp_1; - case 16: + s.tmp_17 = r0; + r0 = (s.tmp_15 / s.tmp_17); + s.tmp_0.arg3 = r0; + s.tmp_20 = Sprite_height__P168925_mk(s); + s.tmp_20.arg0 = s.B___193557; + s.callLocIdx = 512; s.pc = 53; return s.tmp_20; + case 53: r0 = s.retval; - s.asTileLocation___192918 = (r0); - r0 = pxsim_pxtcore_mkAction(2, Sprite_registerObstacle_inline__P192934); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.asTileLocation___192918); - s.tmp_1 = helpers_arrayForEach__P166636_mk(s); - s.tmp_1.arg0 = s.wallHandlersToRun___192905; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 534; s.pc = 19; return s.tmp_1; - case 19: + s.tmp_19 = r0; + s.tmp_22 = Sprite_sy__P168899_mk(s); + s.tmp_22.arg0 = s.A___193556; + s.callLocIdx = 513; s.pc = 54; return s.tmp_22; + case 54: r0 = s.retval; - case 5: - case 6: - case 7: - case 8: + s.tmp_21 = r0; + r0 = (s.tmp_19 / s.tmp_21); + s.tmp_0.arg4 = r0; + r0 = s.B___193557.fields["_image"]; + s.tmp_0.arg5 = r0; + s.tmp_0.arg6 = 0; + s.tmp_0.arg7 = 0; + r0 = s.B___193557.fields["_image"]; + s.tmp_23 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_23); + s.tmp_0.arg8 = r0; + r0 = s.B___193557.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 = 517; 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() } } } -Sprite_registerObstacle__P168953.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"]} +Sprite_overlapsWith__P168947.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 Sprite_registerObstacle__P168953_mk(s) { +function Sprite_overlapsWith__P168947_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_registerObstacle__P168953, depth: s.depth + 1, + parent: s, fn: Sprite_overlapsWith__P168947, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -59596,21 +65728,66 @@ function Sprite_registerObstacle__P168953_mk(s) { tmp_5: undefined, tmp_6: undefined, tmp_7: undefined, - collisionHandlers___192873: undefined, - wallCollisionHandlers___192880: undefined, - wallHandlersToRun___192905: undefined, - asTileLocation___192918: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, + tmp_11: undefined, + tmp_12: undefined, + tmp_13: undefined, + tmp_14: undefined, + tmp_15: undefined, + tmp_16: undefined, + tmp_17: undefined, + tmp_18: undefined, + tmp_19: undefined, + tmp_20: undefined, + tmp_21: undefined, + tmp_22: undefined, + tmp_23: undefined, + tmp_24: undefined, + tmp_25: undefined, + tmp_26: undefined, + tmp_27: undefined, + tmp_28: undefined, + tmp_29: undefined, + tmp_30: undefined, + tmp_31: undefined, + tmp_32: undefined, + tmp_33: undefined, + tmp_34: undefined, + tmp_35: undefined, + tmp_36: undefined, + tmp_37: undefined, + tmp_38: undefined, + tmp_39: undefined, + tmp_40: undefined, + tmp_41: undefined, + tmp_42: undefined, + tmp_43: undefined, + tmp_44: undefined, + tmp_45: undefined, + tmp_46: undefined, + tmp_47: undefined, + tmp_48: undefined, + tmp_49: undefined, + tmp_50: undefined, + tmp_51: undefined, + tmp_52: undefined, + tmp_53: undefined, + tmp_54: undefined, + tmp_55: undefined, + tmp_56: undefined, + A___193556: undefined, + B___193557: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function forEach_inline__P192888(s) { +function Sprite_isScaled__P172266(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -59624,108 +65801,38 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0.fields["kind"]; - s.tmp_0 = r0; - r0 = s.caps[0].fields["_kind"]; + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + r0 = s.arg0.fields["_sx"]; s.tmp_1 = r0; - r0 = (s.tmp_0 == s.tmp_1); - return leave(s, r0) - default: oops() -} } } -forEach_inline__P192888.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__P192888_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: forEach_inline__P192888, 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__P192894(s) { -let r0 = s.r0, 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 = 523; 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 = 523; s.pc = 1; return s.tmp_0; } - else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 523; s.pc = 1; return s.tmp_0;; } - else { s.callLocIdx = 523; s.pc = 1; return s.tmp_0; } - } - case 1: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -Sprite_registerObstacle_inline__P192894.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__P192894_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Sprite_registerObstacle_inline__P192894, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, -} } - - - - - -function wallHandlersToRun_inline__P192907(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0.fields["spriteKind"]; + r0 = (s.tmp_1 !== 256); s.tmp_0 = r0; - r0 = s.caps[0].fields["_kind"]; - s.tmp_1 = r0; - r0 = (s.tmp_0 == 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: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = s.tmp_3; return leave(s, r0) default: oops() } } } -wallHandlersToRun_inline__P192907.info = {"start":25649,"length":32,"line":830,"column":24,"endLine":830,"endColumn":56,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["h"]} +Sprite_isScaled__P172266.info = {"start":10166,"length":100,"line":369,"column":4,"endLine":371,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"isScaled","argumentNames":["this"]} -function wallHandlersToRun_inline__P192907_mk(s) { +function Sprite_isScaled__P172266_mk(s) { checkStack(s.depth); return { - parent: s, fn: wallHandlersToRun_inline__P192907, depth: s.depth + 1, + parent: s, fn: Sprite_isScaled__P172266, depth: s.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, } } @@ -59733,7 +65840,7 @@ function wallHandlersToRun_inline__P192907_mk(s) { -function Sprite_registerObstacle_inline__P192934(s) { +function game_Hitbox_overlapsWith__P168750(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -59745,155 +65852,257 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = if_handler_3_mk(s); + r0 = s.arg0; + if (!checkSubtype(r0, game_Hitbox__C168735_VT)) failedCast(r0); + s.tmp_0 = game_Hitbox_updateIfInvalid__P168749_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 = 533; 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 = 533; s.pc = 1; return s.tmp_0; } - else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 533; s.pc = 1; return s.tmp_0;; } - else { s.callLocIdx = 533; s.pc = 1; return s.tmp_0; } - } - case 1: + s.callLocIdx = 347; s.pc = 18; return s.tmp_0; + case 18: + r0 = s.retval; + s.tmp_0 = game_Hitbox_updateIfInvalid__P168749_mk(s); + s.tmp_0.arg0 = s.arg1; + s.callLocIdx = 348; s.pc = 19; return s.tmp_0; + case 19: + r0 = s.retval; + s.tmp_1 = game_Hitbox_contains__P168748_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_2 = game_Hitbox_left__P168743_mk(s); + s.tmp_2.arg0 = s.arg1; + s.callLocIdx = 349; s.pc = 21; return s.tmp_2; + case 21: + r0 = s.retval; + s.tmp_1.arg1 = r0; + s.tmp_3 = game_Hitbox_top__P168744_mk(s); + s.tmp_3.arg0 = s.arg1; + s.callLocIdx = 350; s.pc = 22; return s.tmp_3; + case 22: + r0 = s.retval; + s.tmp_1.arg2 = r0; + s.callLocIdx = 351; s.pc = 20; return s.tmp_1; + case 20: r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -Sprite_registerObstacle_inline__P192934.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__P192934_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Sprite_registerObstacle_inline__P192934, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, -} } - - - - - -function Math_sign__P166656(s) { -let r0 = s.r0, 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; } + r0 = true; + { step = 17; continue; } case 1: case 2: - r0 = (s.arg0 > 0); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); + s.tmp_5 = game_Hitbox_contains__P168748_mk(s); + s.tmp_5.arg0 = s.arg0; + s.tmp_6 = game_Hitbox_left__P168743_mk(s); + s.tmp_6.arg0 = s.arg1; + s.callLocIdx = 352; s.pc = 24; return s.tmp_6; + case 24: + r0 = s.retval; + s.tmp_5.arg1 = r0; + s.tmp_7 = game_Hitbox_bottom__P168746_mk(s); + s.tmp_7.arg0 = s.arg1; + s.callLocIdx = 353; s.pc = 25; return s.tmp_7; + case 25: + r0 = s.retval; + s.tmp_5.arg2 = r0; + s.callLocIdx = 354; 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 = 1; - { step = 5; continue; } + r0 = true; + { step = 17; continue; } case 3: case 4: - r0 = -1; - case 5: - return leave(s, r0) - default: oops() -} } } -Math_sign__P166656.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__P166656_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Math_sign__P166656, 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__P166634(s) { -let r0 = s.r0, 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___192942 = undefined; - s.i___192945 = 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___192942 = (r0); - s.i___192945 = (0); - case 1: - r0 = (s.i___192945 < s.len___192942); - 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___192945); - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = s.i___192945; - setupLambda(s.tmp_2, s.tmp_2.argL); - s.callLocIdx = 5; s.pc = 6; return s.tmp_2; + s.tmp_9 = game_Hitbox_contains__P168748_mk(s); + s.tmp_9.arg0 = s.arg0; + s.tmp_10 = game_Hitbox_right__P168745_mk(s); + s.tmp_10.arg0 = s.arg1; + s.callLocIdx = 355; s.pc = 27; return s.tmp_10; + case 27: + r0 = s.retval; + s.tmp_9.arg1 = r0; + s.tmp_11 = game_Hitbox_top__P168744_mk(s); + s.tmp_11.arg0 = s.arg1; + s.callLocIdx = 356; s.pc = 28; return s.tmp_11; + case 28: + r0 = s.retval; + s.tmp_9.arg2 = r0; + s.callLocIdx = 357; 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__P168748_mk(s); + s.tmp_13.arg0 = s.arg0; + s.tmp_14 = game_Hitbox_right__P168745_mk(s); + s.tmp_14.arg0 = s.arg1; + s.callLocIdx = 358; s.pc = 30; return s.tmp_14; + case 30: r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 2; continue; } + s.tmp_13.arg1 = r0; + s.tmp_15 = game_Hitbox_bottom__P168746_mk(s); + s.tmp_15.arg0 = s.arg1; + s.callLocIdx = 359; s.pc = 31; return s.tmp_15; + case 31: + r0 = s.retval; + s.tmp_13.arg2 = r0; + s.callLocIdx = 360; 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 = 5; continue; } - case 2: - case 3: - r0 = (s.i___192945 + 1); - s.i___192945 = (r0); - { step = 1; continue; } - case 4: + { step = 17; continue; } + case 7: + case 8: + s.tmp_17 = game_Hitbox_contains__P168748_mk(s); + s.tmp_17.arg0 = s.arg1; + s.tmp_18 = game_Hitbox_left__P168743_mk(s); + s.tmp_18.arg0 = s.arg0; + s.callLocIdx = 361; s.pc = 33; return s.tmp_18; + case 33: + r0 = s.retval; + s.tmp_17.arg1 = r0; + s.tmp_19 = game_Hitbox_top__P168744_mk(s); + s.tmp_19.arg0 = s.arg0; + s.callLocIdx = 362; s.pc = 34; return s.tmp_19; + case 34: + r0 = s.retval; + s.tmp_17.arg2 = r0; + s.callLocIdx = 363; 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__P168748_mk(s); + s.tmp_21.arg0 = s.arg1; + s.tmp_22 = game_Hitbox_left__P168743_mk(s); + s.tmp_22.arg0 = s.arg0; + s.callLocIdx = 364; s.pc = 36; return s.tmp_22; + case 36: + r0 = s.retval; + s.tmp_21.arg1 = r0; + s.tmp_23 = game_Hitbox_bottom__P168746_mk(s); + s.tmp_23.arg0 = s.arg0; + s.callLocIdx = 365; s.pc = 37; return s.tmp_23; + case 37: + r0 = s.retval; + s.tmp_21.arg2 = r0; + s.callLocIdx = 366; 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__P168748_mk(s); + s.tmp_25.arg0 = s.arg1; + s.tmp_26 = game_Hitbox_right__P168745_mk(s); + s.tmp_26.arg0 = s.arg0; + s.callLocIdx = 367; s.pc = 39; return s.tmp_26; + case 39: + r0 = s.retval; + s.tmp_25.arg1 = r0; + s.tmp_27 = game_Hitbox_top__P168744_mk(s); + s.tmp_27.arg0 = s.arg0; + s.callLocIdx = 368; s.pc = 40; return s.tmp_27; + case 40: + r0 = s.retval; + s.tmp_25.arg2 = r0; + s.callLocIdx = 369; 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__P168748_mk(s); + s.tmp_29.arg0 = s.arg1; + s.tmp_30 = game_Hitbox_right__P168745_mk(s); + s.tmp_30.arg0 = s.arg0; + s.callLocIdx = 370; s.pc = 42; return s.tmp_30; + case 42: + r0 = s.retval; + s.tmp_29.arg1 = r0; + s.tmp_31 = game_Hitbox_bottom__P168746_mk(s); + s.tmp_31.arg0 = s.arg0; + s.callLocIdx = 371; s.pc = 43; return s.tmp_31; + case 43: + r0 = s.retval; + s.tmp_29.arg2 = r0; + s.callLocIdx = 372; 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 5: + case 17: return leave(s, r0) default: oops() } } } -helpers_arraySome__P166634.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"]} +game_Hitbox_overlapsWith__P168750.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 helpers_arraySome__P166634_mk(s) { +function game_Hitbox_overlapsWith__P168750_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arraySome__P166634, depth: s.depth + 1, + parent: s, fn: game_Hitbox_overlapsWith__P168750, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - len___192942: undefined, - i___192945: 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, } } @@ -59902,7 +66111,7 @@ function helpers_arraySome__P166634_mk(s) { -function tiles_TileMap_isOnWall__P169285(s) { +function game_Hitbox_contains__P168748(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -59912,136 +66121,108 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.hbox___192170 = undefined; - s.left___192173 = undefined; - s.right___192179 = undefined; - s.top___192185 = undefined; - s.bottom___192191 = undefined; - s.col___192197 = undefined; - s.row___192203 = 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__C169262_VT)) failedCast(r0); - r0 = s.arg1.fields["_hitbox"]; - s.hbox___192170 = (r0); - s.tmp_1 = game_Hitbox_left__P168743_mk(s); - s.tmp_1.arg0 = s.hbox___192170; - s.callLocIdx = 1084; 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___192173 = (r0); - s.tmp_1 = game_Hitbox_right__P168745_mk(s); - s.tmp_1.arg0 = s.hbox___192170; - s.callLocIdx = 1087; 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___192179 = (r0); - s.tmp_1 = game_Hitbox_top__P168744_mk(s); - s.tmp_1.arg0 = s.hbox___192170; - s.callLocIdx = 1090; s.pc = 10; return s.tmp_1; - case 10: + if (!checkSubtype(r0, game_Hitbox__C168735_VT)) failedCast(r0); + s.tmp_1 = r0 = s.arg1; + s.tmp_3 = game_Hitbox_left__P168743_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 327; s.pc = 7; return s.tmp_3; + case 7: 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___192185 = (r0); - s.tmp_1 = game_Hitbox_bottom__P168746_mk(s); - s.tmp_1.arg0 = s.hbox___192170; - s.callLocIdx = 1093; s.pc = 11; return s.tmp_1; - case 11: - r0 = s.retval; + r0 = (s.tmp_1 >= s.tmp_2); 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___192191 = (r0); - s.col___192197 = (s.left___192173); + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: - r0 = (s.col___192197 <= s.right___192179); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 6; continue; } - s.row___192203 = (s.top___192185); - case 2: - r0 = (s.row___192203 <= s.bottom___192191); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - s.tmp_2 = tiles_TileMap_isObstacle__P169283_mk(s); - s.tmp_2.arg0 = s.arg0; - s.tmp_2.arg1 = s.col___192197; - s.tmp_2.arg2 = s.row___192203; - s.callLocIdx = 1096; s.pc = 12; return s.tmp_2; - case 12: + s.tmp_4 = r0 = s.arg1; + s.tmp_6 = game_Hitbox_right__P168745_mk(s); + s.tmp_6.arg0 = s.arg0; + s.callLocIdx = 328; s.pc = 8; return s.tmp_6; + case 8: 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_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__P168744_mk(s); + s.tmp_10.arg0 = s.arg0; + s.callLocIdx = 329; 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: - r0 = (s.row___192203 + 1); - s.row___192203 = (r0); - { step = 2; continue; } + // 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: - r0 = (s.col___192197 + 1); - s.col___192197 = (r0); - { step = 1; continue; } + s.tmp_12 = r0 = s.arg2; + s.tmp_14 = game_Hitbox_bottom__P168746_mk(s); + s.tmp_14.arg0 = s.arg0; + s.callLocIdx = 330; 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: - r0 = false; - case 7: + // jmp value (already in r0) + s.tmp_15 = r0; + r0 = s.tmp_15; return leave(s, r0) default: oops() } } } -tiles_TileMap_isOnWall__P169285.info = {"start":16873,"length":627,"line":534,"column":8,"endLine":551,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"isOnWall","argumentNames":["this","s"]} +game_Hitbox_contains__P168748.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 tiles_TileMap_isOnWall__P169285_mk(s) { +function game_Hitbox_contains__P168748_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_isOnWall__P169285, depth: s.depth + 1, + parent: s, fn: game_Hitbox_contains__P168748, depth: s.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___192170: undefined, - left___192173: undefined, - right___192179: undefined, - top___192185: undefined, - bottom___192191: undefined, - col___192197: undefined, - row___192203: 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 MovingSprite_constructor__P169053(s) { +function ArcadePhysicsEngine_createMovingSprite__P172310(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -60051,601 +66232,335 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.ovx___194115 = undefined; + s.ovy___194120 = undefined; + s.fx___194147 = undefined; + s.c___194154 = undefined; + s.fy___194197 = undefined; + s.c___194204 = undefined; + s.dx___194243 = undefined; + s.dy___194256 = undefined; + s.xStep___194269 = undefined; + s.yStep___194271 = 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.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, MovingSprite__C169052_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() -} } } -MovingSprite_constructor__P169053.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 MovingSprite_constructor__P169053_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: MovingSprite_constructor__P169053, 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 ArcadePhysicsEngine_move__P169066(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.dtMs___193016 = undefined; - s.dt2___193022 = undefined; - s.scene___193026 = undefined; - s.tileMap___193029 = undefined; - s.movingSprites___193032 = undefined; - s.MAX_STEP_COUNT___193063 = undefined; - s.overlapHandlers___193075 = undefined; - s.selected___193082 = undefined; - s.buffers___193083 = undefined; - s.count___193087 = undefined; - s.currMovers___193097 = undefined; - s.remainingMovers___193104 = undefined; - s.ms___193109 = undefined; - s.unnamed812___U13 = undefined; - s.unnamed813___U14 = undefined; - s.s___193111 = undefined; - s.stepX___193204 = undefined; - s.stepY___193218 = undefined; - s.bounce___193281 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; if (!checkSubtype(r0, ArcadePhysicsEngine__C169054_VT)) failedCast(r0); - s.tmp_0 = Math_min__P166658_mk(s); - s.tmp_0.arg0 = 100; - r0 = (s.arg1 * 1000); + s.tmp_0 = ArcadePhysicsEngine_constrain__P172316_mk(s); + s.tmp_0.arg0 = s.arg0; + r0 = s.arg1.fields["_vx"]; s.tmp_0.arg1 = r0; - s.callLocIdx = 647; s.pc = 53; return s.tmp_0; - case 53: - r0 = s.retval; - s.dtMs___193016 = (r0); - r0 = pxsim.Math_.idiv(s.dtMs___193016, 2); - s.dt2___193022 = (r0); - s.tmp_0 = game_currentScene__P169526_mk(s); - s.callLocIdx = 648; s.pc = 54; return s.tmp_0; - case 54: - r0 = s.retval; - s.scene___193026 = (r0); - r0 = s.scene___193026.fields["tileMap"]; - s.tileMap___193029 = (r0); - r0 = pxsim_pxtcore_mkAction(3, movingSprites_inline__P193034); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.dtMs___193016); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.dt2___193022); - s.tmp_1 = helpers_arrayMap__P166633_mk(s); - r0 = s.arg0.fields["sprites"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 650; s.pc = 55; return s.tmp_1; - case 55: - r0 = s.retval; - s.movingSprites___193032 = (r0); - s.tmp_0 = helpers_arrayForEach__P166636_mk(s); - r0 = s.arg0.fields["sprites"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = ArcadePhysicsEngine_move_inline__P193046; - s.callLocIdx = 654; s.pc = 56; return s.tmp_0; - case 56: - r0 = s.retval; - s.tmp_0 = sprites_SpriteMap_clear__P168979_mk(s); - r0 = s.arg0.fields["map"]; - s.tmp_0.arg0 = r0; - s.callLocIdx = 655; s.pc = 57; return s.tmp_0; - case 57: + s.callLocIdx = 681; s.pc = 25; return s.tmp_0; + case 25: r0 = s.retval; - s.tmp_0 = sprites_SpriteMap_resizeBuckets__P168978_mk(s); - r0 = s.arg0.fields["map"]; - s.tmp_0.arg0 = r0; - r0 = s.arg0.fields["sprites"]; + s.ovx___194115 = (r0); + s.tmp_0 = ArcadePhysicsEngine_constrain__P172316_mk(s); + s.tmp_0.arg0 = s.arg0; + r0 = s.arg1.fields["_vy"]; s.tmp_0.arg1 = r0; - s.callLocIdx = 656; 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___193016); - 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___193063 = (r0); - s.tmp_0 = helpers_arraySlice__P166642_mk(s); - r0 = s.scene___193026.fields["overlapHandlers"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = undefined; - s.tmp_0.arg2 = undefined; - s.callLocIdx = 661; s.pc = 59; return s.tmp_0; - case 59: + s.callLocIdx = 682; s.pc = 26; return s.tmp_0; + case 26: r0 = s.retval; - s.overlapHandlers___193075 = (r0); - s.selected___193082 = (0); - r0 = pxsim_Array__mk(); + s.ovy___194120 = (r0); + r0 = s.arg1.fields["_x"]; s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.movingSprites___193032); - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); - s.buffers___193083 = (s.tmp_0); - s.count___193087 = (0); - case 1: - r0 = (s.count___193087 < s.MAX_STEP_COUNT___193063); + r0 = (s.arg1).fields["_lastX"] = (s.tmp_0); + r0 = s.arg1.fields["_y"]; 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___193083, s.selected___193082); - 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___193083, s.selected___193082); - s.currMovers___193097 = (r0); - r0 = (s.selected___193082 ^ 1); - s.selected___193082 = (r0); - r0 = pxsim_Array__getAt(s.buffers___193083, s.selected___193082); - s.remainingMovers___193104 = (r0); - s.ms___193109 = (undefined); - s.unnamed812___U13 = (s.currMovers___193097); - s.unnamed813___U14 = (0); - case 4: - s.tmp_0 = r0 = s.unnamed813___U14; - r0 = pxsim_Array__length(s.unnamed812___U13); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 49; continue; } - r0 = pxsim_Array__getAt(s.unnamed812___U13, s.unnamed813___U14); - s.ms___193109 = (r0); - r0 = s.ms___193109.fields["sprite"]; - s.s___193111 = (r0); - r0 = s.ms___193109.fields["cachedVx"]; - s.tmp_1 = r0; - r0 = s.s___193111.fields["_vx"]; - s.tmp_2 = r0; - r0 = (s.tmp_1 !== s.tmp_2); + 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 = 15; continue; } - r0 = s.s___193111.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___193109).fields["dx"] = (0); - { step = 14; continue; } - case 5: - r0 = s.s___193111.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___193109.fields["cachedVx"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 > 0); - case 7: - // jmp value (already in r0) + if (!r0) { step = 1; continue; } + s.tmp_1 = r0 = s.arg1; + r0 = s.arg1.fields["_vx"]; 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___193111.fields["_vx"]; + r0 = s.arg1.fields["_ax"]; + s.tmp_6 = r0; + r0 = pxsim.Math_.imul(s.tmp_6, s.arg2); s.tmp_5 = r0; - r0 = (s.tmp_5 > 0); + r0 = pxsim.Math_.idiv(s.tmp_5, 1000); 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___193109.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___193109; - r0 = s.ms___193109.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___193109; - r0 = s.ms___193109.fields["xStep"]; + r0 = (s.tmp_3 + s.tmp_4); 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___193111.fields["_vx"]; + r0 = (s.tmp_1).fields["_vx"] = (s.tmp_2); + { step = 8; continue; } + case 1: + r0 = s.arg1.fields["_fx"]; s.tmp_0 = r0; - r0 = (s.ms___193109).fields["cachedVx"] = (s.tmp_0); - case 15: - case 16: - r0 = s.ms___193109.fields["cachedVy"]; - s.tmp_1 = r0; - r0 = s.s___193111.fields["_vy"]; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 6; continue; } + r0 = s.arg1.fields["_fx"]; s.tmp_2 = r0; - r0 = (s.tmp_1 !== s.tmp_2); + r0 = pxsim.Math_.imul(s.tmp_2, s.arg2); + s.tmp_1 = r0; + r0 = pxsim.Math_.idiv(s.tmp_1, 1000); + s.fx___194147 = (r0); + r0 = s.arg1.fields["_vx"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 - s.fx___194147); + s.c___194154 = (r0); + r0 = (s.c___194154 < 0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 27; continue; } - r0 = s.s___193111.fields["_vy"]; + if (!r0) { step = 2; continue; } + s.tmp_1 = r0 = s.arg1; + s.tmp_3 = Fx_min__P166693_mk(s); + s.tmp_3.arg0 = 0; + r0 = s.arg1.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 = 17; continue; } - r0 = (s.ms___193109).fields["dy"] = (0); - { step = 26; continue; } - case 17: - r0 = s.s___193111.fields["_vy"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 < 0); + r0 = (s.tmp_4 + s.fx___194147); + s.tmp_3.arg1 = r0; + s.callLocIdx = 690; 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___194154 > 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___193109.fields["cachedVy"]; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + s.tmp_1 = r0 = s.arg1; + s.tmp_3 = Fx_max__P166694_mk(s); + s.tmp_3.arg0 = 0; + r0 = s.arg1.fields["_vx"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 - s.fx___194147); + s.tmp_3.arg1 = r0; + s.callLocIdx = 692; s.pc = 28; return s.tmp_3; + case 28: + r0 = s.retval; s.tmp_2 = r0; - r0 = (s.tmp_2 > 0); - case 19: - // jmp value (already in r0) + r0 = (s.tmp_1).fields["_vx"] = (s.tmp_2); + { step = 4; continue; } + case 3: + r0 = (s.arg1).fields["_vx"] = (0); + case 4: + case 5: + case 6: + case 7: + case 8: + r0 = s.arg1.fields["_ay"]; + s.tmp_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 = pxsim_numops_toBool(s.tmp_3); - if (!r0) { step = 20; continue; } - r0 = s.tmp_3; - { step = 23; continue; } - case 20: - r0 = s.s___193111.fields["_vy"]; + r0 = s.arg1.fields["_ay"]; + s.tmp_6 = r0; + r0 = pxsim.Math_.imul(s.tmp_6, s.arg2); s.tmp_5 = r0; - r0 = (s.tmp_5 > 0); + r0 = pxsim.Math_.idiv(s.tmp_5, 1000); 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___193109.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___193109; - r0 = s.ms___193109.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___193109; - r0 = s.ms___193109.fields["yStep"]; + r0 = (s.tmp_3 + s.tmp_4); 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___193111.fields["_vy"]; + r0 = (s.tmp_1).fields["_vy"] = (s.tmp_2); + { step = 16; continue; } + case 9: + r0 = s.arg1.fields["_fy"]; s.tmp_0 = r0; - r0 = (s.ms___193109).fields["cachedVy"] = (s.tmp_0); - case 27: - case 28: - s.tmp_2 = Fx_abs__P166692_mk(s); - r0 = s.ms___193109.fields["xStep"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 666; s.pc = 60; return s.tmp_2; - case 60: - r0 = s.retval; + 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; - s.tmp_4 = Fx_abs__P166692_mk(s); - r0 = s.ms___193109.fields["dx"]; - s.tmp_4.arg0 = r0; - s.callLocIdx = 667; s.pc = 61; return s.tmp_4; - case 61: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_1 > s.tmp_3); + r0 = pxsim.Math_.idiv(s.tmp_1, 1000); + s.fy___194197 = (r0); + r0 = s.arg1.fields["_vy"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 - s.fy___194197); + s.c___194204 = (r0); + r0 = (s.c___194204 < 0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 29; continue; } - r0 = s.ms___193109.fields["dx"]; - { step = 30; continue; } + if (!r0) { step = 10; continue; } + s.tmp_1 = r0 = s.arg1; + s.tmp_3 = Fx_min__P166693_mk(s); + s.tmp_3.arg0 = 0; + r0 = s.arg1.fields["_vy"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 + s.fy___194197); + s.tmp_3.arg1 = r0; + s.callLocIdx = 700; s.pc = 29; return s.tmp_3; case 29: - r0 = s.ms___193109.fields["xStep"]; - case 30: - // jmp value (already in r0) - s.tmp_5 = r0; - s.stepX___193204 = (s.tmp_5); - s.tmp_2 = Fx_abs__P166692_mk(s); - r0 = s.ms___193109.fields["yStep"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 668; s.pc = 62; return s.tmp_2; - case 62: r0 = s.retval; - s.tmp_1 = r0; - s.tmp_4 = Fx_abs__P166692_mk(s); - r0 = s.ms___193109.fields["dy"]; - s.tmp_4.arg0 = r0; - s.callLocIdx = 669; 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___193109.fields["dy"]; - { step = 32; continue; } - case 31: - r0 = s.ms___193109.fields["yStep"]; - case 32: - // jmp value (already in r0) - s.tmp_5 = r0; - s.stepY___193218 = (s.tmp_5); - s.tmp_0 = r0 = s.ms___193109; - r0 = s.ms___193109.fields["dx"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 - s.stepX___193204); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["dx"] = (s.tmp_1); - s.tmp_0 = r0 = s.ms___193109; - r0 = s.ms___193109.fields["dy"]; s.tmp_2 = r0; - r0 = (s.tmp_2 - s.stepY___193218); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["dy"] = (s.tmp_1); - r0 = s.s___193111.fields["_x"]; - s.tmp_0 = r0; - r0 = (s.s___193111).fields["_lastX"] = (s.tmp_0); - r0 = s.s___193111.fields["_y"]; + r0 = (s.tmp_1).fields["_vy"] = (s.tmp_2); + { step = 13; continue; } + case 10: + r0 = (s.c___194204 > 0); s.tmp_0 = r0; - r0 = (s.s___193111).fields["_lastY"] = (s.tmp_0); - s.tmp_0 = r0 = s.s___193111; - r0 = s.s___193111.fields["_x"]; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 11; continue; } + s.tmp_1 = r0 = s.arg1; + s.tmp_3 = Fx_max__P166694_mk(s); + s.tmp_3.arg0 = 0; + r0 = s.arg1.fields["_vy"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 - s.fy___194197); + s.tmp_3.arg1 = r0; + s.callLocIdx = 702; s.pc = 30; return s.tmp_3; + case 30: + r0 = s.retval; s.tmp_2 = r0; - r0 = (s.tmp_2 + s.stepX___193204); + 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__P172316_mk(s); + s.tmp_2.arg0 = s.arg0; + r0 = s.arg1.fields["_vx"]; + s.tmp_2.arg1 = r0; + s.callLocIdx = 703; s.pc = 31; return s.tmp_2; + case 31: + r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_x"] = (s.tmp_1); - s.tmp_0 = r0 = s.s___193111; - r0 = s.s___193111.fields["_y"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 + s.stepY___193218); + r0 = (s.tmp_0).fields["_vx"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg1; + s.tmp_2 = ArcadePhysicsEngine_constrain__P172316_mk(s); + s.tmp_2.arg0 = s.arg0; + r0 = s.arg1.fields["_vy"]; + s.tmp_2.arg1 = r0; + s.callLocIdx = 704; s.pc = 32; return s.tmp_2; + case 32: + r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_y"] = (s.tmp_1); - r0 = s.s___193111.fields["flags"]; + r0 = (s.tmp_0).fields["_vy"] = (s.tmp_1); + r0 = s.arg1.fields["_vx"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 + s.ovx___194115); s.tmp_3 = r0; - r0 = (s.tmp_3 & 4610); + r0 = (s.tmp_3 / 256); s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + r0 = (s.tmp_2 * s.arg3); s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = (s.tmp_1 / 1000); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 33; continue; } - s.tmp_4 = sprites_SpriteMap_insertAABB__P168980_mk(s); - r0 = s.arg0.fields["map"]; - s.tmp_4.arg0 = r0; - s.tmp_4.arg1 = s.s___193111; - s.callLocIdx = 674; s.pc = 64; return s.tmp_4; - case 64: - r0 = s.retval; - case 33: - case 34: - s.tmp_0 = r0 = s.tileMap___193029; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 35; continue; } - r0 = s.tmp_0; - { step = 36; continue; } - case 35: - r0 = s.tileMap___193029.fields["_map"]; + r0 = (s.tmp_0 * 256); + s.tmp_5 = r0; + r0 = (s.tmp_5 | 0); + s.dx___194243 = (r0); + r0 = s.arg1.fields["_vy"]; s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); + r0 = (s.tmp_4 + s.ovy___194120); s.tmp_3 = r0; - r0 = pxsim_Boolean__bang(s.tmp_3); + r0 = (s.tmp_3 / 256); s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + r0 = (s.tmp_2 * s.arg3); s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - case 36: - // jmp value (already in r0) + r0 = (s.tmp_1 / 1000); + s.tmp_0 = r0; + r0 = (s.tmp_0 * 256); s.tmp_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); - if (!r0) { step = 37; continue; } - s.tmp_6 = ArcadePhysicsEngine_tilemapCollisions__P172313_mk(s); - s.tmp_6.arg0 = s.arg0; - s.tmp_6.arg1 = s.ms___193109; - s.tmp_6.arg2 = s.tileMap___193029; - s.callLocIdx = 676; s.pc = 65; return s.tmp_6; - case 65: + r0 = (s.tmp_5 | 0); + s.dy___194256 = (r0); + s.xStep___194269 = (s.dx___194243); + s.yStep___194271 = (s.dy___194256); + case 17: + s.tmp_2 = Fx_abs__P166692_mk(s); + s.tmp_2.arg0 = s.xStep___194269; + s.callLocIdx = 711; s.pc = 33; return s.tmp_2; + case 33: r0 = s.retval; - case 37: - case 38: - r0 = s.s___193111.fields["flags"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 & 32); - s.bounce___193281 = (r0); - r0 = s.s___193111.fields["flags"]; s.tmp_1 = r0; - r0 = (s.tmp_1 & 8); + 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 = 39; continue; } + if (!r0) { step = 18; continue; } r0 = s.tmp_0; - { step = 42; continue; } - case 39: - s.tmp_2 = r0 = s.bounce___193281; - 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___193029); - s.tmp_3 = r0; - r0 = pxsim_Boolean__bang(s.tmp_3); - case 41: - // jmp value (already in r0) + { step = 19; continue; } + case 18: + s.tmp_5 = Fx_abs__P166692_mk(s); + s.tmp_5.arg0 = s.yStep___194271; + s.callLocIdx = 712; s.pc = 34; return s.tmp_5; + case 34: + r0 = s.retval; s.tmp_4 = r0; - r0 = s.tmp_4; - case 42: + 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_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); - if (!r0) { step = 43; continue; } - s.tmp_6 = ArcadePhysicsEngine_screenEdgeCollisions__P172312_mk(s); - s.tmp_6.arg0 = s.arg0; - s.tmp_6.arg1 = s.ms___193109; - s.tmp_6.arg2 = s.bounce___193281; - r0 = s.scene___193026.fields["camera"]; - s.tmp_6.arg3 = r0; - s.callLocIdx = 677; s.pc = 66; return s.tmp_6; - case 66: + s.tmp_7 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_7); + if (!r0) { step = 24; continue; } + s.tmp_10 = Fx_abs__P166692_mk(s); + s.tmp_10.arg0 = s.xStep___194269; + s.callLocIdx = 713; s.pc = 35; return s.tmp_10; + case 35: r0 = s.retval; - case 43: - case 44: + 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___194269, 2); + s.xStep___194269 = (r0); + case 20: + case 21: s.tmp_2 = Fx_abs__P166692_mk(s); - r0 = s.ms___193109.fields["dx"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 678; s.pc = 67; return s.tmp_2; - case 67: + s.tmp_2.arg0 = s.yStep___194271; + s.callLocIdx = 715; s.pc = 36; return s.tmp_2; + case 36: r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_1 > globals.MIN_MOVE_GAP___169048); - 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__P166692_mk(s); - r0 = s.ms___193109.fields["dy"]; - s.tmp_4.arg0 = r0; - s.callLocIdx = 679; s.pc = 68; return s.tmp_4; - case 68: - r0 = s.retval; + r0 = s.arg0.fields["minSingleStep"]; s.tmp_3 = r0; - r0 = (s.tmp_3 > globals.MIN_MOVE_GAP___169048); - 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___193104, s.ms___193109); - case 47: - case 48: - r0 = (s.unnamed813___U14 + 1); - s.unnamed813___U14 = (r0); - { step = 4; continue; } - case 49: - s.unnamed812___U13 = (undefined); - s.tmp_0 = ArcadePhysicsEngine_spriteCollisions__P172311_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.currMovers___193097; - s.tmp_0.arg2 = s.overlapHandlers___193075; - s.callLocIdx = 680; s.pc = 69; return s.tmp_0; - case 69: - r0 = s.retval; - case 50: - r0 = pxsim_Array__length(s.currMovers___193097); + r0 = (s.tmp_1 > s.tmp_3); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 51; continue; } - r0 = pxsim_Array_.pop(s.currMovers___193097); - { step = 50; continue; } - case 51: - r0 = (s.count___193087 + 1); - s.count___193087 = (r0); - { step = 1; continue; } - case 52: - r0 = undefined; + if (!r0) { step = 22; continue; } + r0 = pxsim.Math_.idiv(s.yStep___194271, 2); + s.yStep___194271 = (r0); + case 22: + case 23: + { step = 17; continue; } + case 24: + r0 = pxsim_pxtcore_mkClassInstance(MovingSprite__C169052_VT); + s.tmp_0 = r0; + s.tmp_1 = MovingSprite_constructor__P169053_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___194243; + s.tmp_1.arg5 = s.dy___194256; + s.tmp_1.arg6 = s.xStep___194269; + s.tmp_1.arg7 = s.yStep___194271; + s.callLocIdx = 717; s.pc = 37; return s.tmp_1; + case 37: + r0 = s.retval; + r0 = s.tmp_0; return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_move__P169066.info = {"start":2822,"length":4105,"line":112,"column":4,"endLine":215,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"move","argumentNames":["this","dt"]} +ArcadePhysicsEngine_createMovingSprite__P172310.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_move__P169066_mk(s) { +function ArcadePhysicsEngine_createMovingSprite__P172310_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_move__P169066, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_createMovingSprite__P172310, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -60659,74 +66574,27 @@ function ArcadePhysicsEngine_move__P169066_mk(s) { tmp_9: undefined, tmp_10: undefined, tmp_11: undefined, - dtMs___193016: undefined, - dt2___193022: undefined, - scene___193026: undefined, - tileMap___193029: undefined, - movingSprites___193032: undefined, - MAX_STEP_COUNT___193063: undefined, - overlapHandlers___193075: undefined, - selected___193082: undefined, - buffers___193083: undefined, - count___193087: undefined, - currMovers___193097: undefined, - remainingMovers___193104: undefined, - ms___193109: undefined, - unnamed812___U13: undefined, - unnamed813___U14: undefined, - s___193111: undefined, - stepX___193204: undefined, - stepY___193218: undefined, - bounce___193281: undefined, + ovx___194115: undefined, + ovy___194120: undefined, + fx___194147: undefined, + c___194154: undefined, + fy___194197: undefined, + c___194204: undefined, + dx___194243: undefined, + dy___194256: undefined, + xStep___194269: undefined, + yStep___194271: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function movingSprites_inline__P193034(s) { -let r0 = s.r0, 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 = ArcadePhysicsEngine_createMovingSprite__P172310_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 = 649; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - return leave(s, r0) - default: oops() -} } } -movingSprites_inline__P193034.info = {"start":3181,"length":52,"line":121,"column":17,"endLine":121,"endColumn":69,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["sprite"]} - -function movingSprites_inline__P193034_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: movingSprites_inline__P193034, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, -} } - - - - - -function ArcadePhysicsEngine_move_inline__P193046(s) { +function ArcadePhysicsEngine_constrain__P172316(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -60738,60 +66606,46 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_1 = Sprite_vx__P168885_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 651; s.pc = 5; return s.tmp_1; - case 5: + r0 = s.arg0; + if (!checkSubtype(r0, ArcadePhysicsEngine__C169054_VT)) failedCast(r0); + s.tmp_0 = Fx_max__P166694_mk(s); + s.tmp_1 = Fx_min__P166693_mk(s); + r0 = s.arg0.fields["maxVelocity"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.arg1; + s.callLocIdx = 893; s.pc = 2; return s.tmp_1; + case 2: 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.tmp_0.arg0 = r0; + r0 = s.arg0.fields["maxNegativeVelocity"]; + s.tmp_0.arg1 = r0; + s.callLocIdx = 894; s.pc = 1; return s.tmp_0; case 1: - s.tmp_2 = Sprite_vy__P168887_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 652; 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__P168952_mk(s); - s.tmp_4.arg0 = s.arg0; - s.callLocIdx = 653; s.pc = 7; return s.tmp_4; - case 7: r0 = s.retval; - case 3: - case 4: - r0 = undefined; return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_move_inline__P193046.info = {"start":3316,"length":66,"line":124,"column":29,"endLine":126,"endColumn":9,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["s"]} +ArcadePhysicsEngine_constrain__P172316.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_move_inline__P193046_mk(s) { +function ArcadePhysicsEngine_constrain__P172316_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_move_inline__P193046, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_constrain__P172316, depth: s.depth + 1, pc: 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 ArcadePhysicsEngine_screenEdgeCollisions__P172312(s) { +function Fx_compare__P166691(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -60801,306 +66655,31 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.s___193794 = undefined; - s.offset___193809 = 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__C169054_VT)) failedCast(r0); - r0 = s.arg1.fields["sprite"]; - s.s___193794 = (r0); - r0 = s.s___193794.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__C168868_v4_1_mk(s); - s.tmp_4.arg0 = s.s___193794; - if (!checkSubtype(s.tmp_4.arg0, Sprite__C168868_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: - s.tmp_3 = scene_Camera_isUpdated__P169324_mk(s); - s.tmp_3.arg0 = s.arg3; - s.callLocIdx = 725; s.pc = 22; return s.tmp_3; - case 22: - r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_4 = scene_Camera_update__P169325_mk(s); - s.tmp_4.arg0 = s.arg3; - s.callLocIdx = 726; s.pc = 23; return s.tmp_4; - case 23: - r0 = s.retval; - case 3: - case 4: - s.tmp_2 = game_Hitbox_left__P168743_mk(s); - r0 = s.s___193794.fields["_hitbox"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 727; 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___193809 = (r0); - r0 = (s.offset___193809 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - s.tmp_1 = Sprite_left__P168927_mk(s); - s.tmp_2 = r0 = s.s___193794; - s.tmp_1.arg0 = r0; - s.tmp_4 = Sprite_left__P168926_mk(s); - s.tmp_4.arg0 = s.tmp_2; - s.callLocIdx = 730; s.pc = 26; return s.tmp_4; - case 26: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_3 - s.offset___193809); - s.tmp_1.arg1 = r0; - s.callLocIdx = 731; 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__P168886_mk(s); - s.tmp_0.arg0 = s.s___193794; - s.tmp_2 = Sprite_vx__P168885_mk(s); - s.tmp_2.arg0 = s.s___193794; - s.callLocIdx = 732; 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 = 733; 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__P168745_mk(s); - r0 = s.s___193794.fields["_hitbox"]; - s.tmp_4.arg0 = r0; - s.callLocIdx = 734; 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___168559); - s.tmp_6 = r0; - r0 = (s.tmp_1 - s.tmp_6); - s.tmp_0 = r0; - s.offset___193809 = (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__P168929_mk(s); - s.tmp_9 = r0 = s.s___193794; - s.tmp_8.arg0 = r0; - s.tmp_11 = Sprite_right__P168928_mk(s); - s.tmp_11.arg0 = s.tmp_9; - s.callLocIdx = 737; s.pc = 31; return s.tmp_11; - case 31: - r0 = s.retval; - s.tmp_10 = r0; - r0 = (s.tmp_10 - s.offset___193809); - s.tmp_8.arg1 = r0; - s.callLocIdx = 738; 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__P168886_mk(s); - s.tmp_0.arg0 = s.s___193794; - s.tmp_2 = Sprite_vx__P168885_mk(s); - s.tmp_2.arg0 = s.s___193794; - s.callLocIdx = 739; 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 = 740; 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__P168744_mk(s); - r0 = s.s___193794.fields["_hitbox"]; - s.tmp_3.arg0 = r0; - s.callLocIdx = 741; 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___193809 = (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__P168931_mk(s); - s.tmp_7 = r0 = s.s___193794; - s.tmp_6.arg0 = r0; - s.tmp_9 = Sprite_top__P168930_mk(s); - s.tmp_9.arg0 = s.tmp_7; - s.callLocIdx = 744; s.pc = 36; return s.tmp_9; - case 36: - r0 = s.retval; - s.tmp_8 = r0; - r0 = (s.tmp_8 - s.offset___193809); - s.tmp_6.arg1 = r0; - s.callLocIdx = 745; 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__P168888_mk(s); - s.tmp_0.arg0 = s.s___193794; - s.tmp_2 = Sprite_vy__P168887_mk(s); - s.tmp_2.arg0 = s.s___193794; - s.callLocIdx = 746; 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 = 747; 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__P168746_mk(s); - r0 = s.s___193794.fields["_hitbox"]; - s.tmp_4.arg0 = r0; - s.callLocIdx = 748; 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___168559); - s.tmp_6 = r0; - r0 = (s.tmp_1 - s.tmp_6); - s.tmp_0 = r0; - s.offset___193809 = (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__P168933_mk(s); - s.tmp_9 = r0 = s.s___193794; - s.tmp_8.arg0 = r0; - s.tmp_11 = Sprite_bottom__P168932_mk(s); - s.tmp_11.arg0 = s.tmp_9; - s.callLocIdx = 751; s.pc = 41; return s.tmp_11; - case 41: - r0 = s.retval; - s.tmp_10 = r0; - r0 = (s.tmp_10 - s.offset___193809); - s.tmp_8.arg1 = r0; - s.callLocIdx = 752; 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__P168888_mk(s); - s.tmp_0.arg0 = s.s___193794; - s.tmp_2 = Sprite_vy__P168887_mk(s); - s.tmp_2.arg0 = s.s___193794; - s.callLocIdx = 753; 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 = 754; s.pc = 42; return s.tmp_0; - case 42: - r0 = s.retval; - case 16: - case 17: - case 18: - case 19: - case 20: - r0 = undefined; + r0 = (s.arg0 - s.arg1); return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_screenEdgeCollisions__P172312.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"]} +Fx_compare__P166691.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 ArcadePhysicsEngine_screenEdgeCollisions__P172312_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: ArcadePhysicsEngine_screenEdgeCollisions__P172312, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - tmp_11: undefined, - s___193794: undefined, - offset___193809: undefined, +function Fx_compare__P166691_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Fx_compare__P166691, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function scene_Camera_isUpdated__P169324(s) { +function sprites_SpriteMap_insertAABB__P168980(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -61110,66 +66689,135 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.left___193935 = undefined; + s.top___193938 = undefined; + s.xn___193941 = undefined; + s.yn___193952 = undefined; + s.x___193963 = undefined; + s.y___193968 = 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__C169308_VT)) failedCast(r0); - r0 = s.arg0.fields["sprite"]; + if (!checkSubtype(r0, sprites_SpriteMap__C168973_VT)) failedCast(r0); + s.tmp_0 = Sprite_left__P168926_mk(s); + s.tmp_0.arg0 = s.arg1; + s.callLocIdx = 608; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.left___193935 = (r0); + s.tmp_0 = Sprite_top__P168930_mk(s); + s.tmp_0.arg0 = s.arg1; + s.callLocIdx = 609; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + s.top___193938 = (r0); + s.tmp_3 = Sprite_width__P168924_mk(s); + s.tmp_3.arg0 = s.arg1; + s.callLocIdx = 610; s.pc = 7; return s.tmp_3; + case 7: + r0 = s.retval; s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + r0 = s.arg0.fields["cellWidth"]; + s.tmp_4 = r0; + r0 = (s.tmp_2 + s.tmp_4); s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = (s.tmp_1 - 1); s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 4; continue; } - case 1: - s.tmp_5 = Sprite_x__P168881_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_5.arg0 = r0; - s.callLocIdx = 1119; s.pc = 5; return s.tmp_5; - case 5: + r0 = s.arg0.fields["cellWidth"]; + s.tmp_5 = r0; + r0 = pxsim.Math_.idiv(s.tmp_0, s.tmp_5); + s.xn___193941 = (r0); + s.tmp_3 = Sprite_height__P168925_mk(s); + s.tmp_3.arg0 = s.arg1; + s.callLocIdx = 611; 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.arg0.fields["_lastUpdatedSpriteX"]; + 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___193952 = (r0); + s.x___193963 = (0); + case 1: + r0 = (s.x___193963 <= s.xn___193941); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + s.y___193968 = (0); + case 2: + r0 = (s.y___193968 <= s.yn___193952); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + s.tmp_1 = sprites_SpriteMap_insertAtKey__P172274_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_2 = r0 = s.left___193935; + s.tmp_4 = Math_min__P166658_mk(s); + s.tmp_5 = Sprite_width__P168924_mk(s); + s.tmp_5.arg0 = s.arg1; + s.callLocIdx = 612; 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_4 === s.tmp_6); + r0 = (s.x___193963 * s.tmp_6); + s.tmp_4.arg1 = r0; + s.callLocIdx = 613; s.pc = 10; return s.tmp_4; + case 10: + r0 = s.retval; s.tmp_3 = r0; - r0 = pxsim_numops_toBool(s.tmp_3); - if (r0) { step = 2; continue; } - r0 = s.tmp_3; - { step = 3; continue; } - case 2: - s.tmp_8 = Sprite_y__P168883_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_8.arg0 = r0; - s.callLocIdx = 1120; s.pc = 6; return s.tmp_8; - case 6: + r0 = (s.tmp_2 + s.tmp_3); + s.tmp_1.arg1 = r0; + s.tmp_7 = r0 = s.top___193938; + s.tmp_9 = Math_min__P166658_mk(s); + s.tmp_10 = Sprite_height__P168925_mk(s); + s.tmp_10.arg0 = s.arg1; + s.callLocIdx = 614; s.pc = 13; return s.tmp_10; + case 13: r0 = s.retval; - s.tmp_7 = r0; - r0 = s.arg0.fields["_lastUpdatedSpriteY"]; - s.tmp_9 = r0; - r0 = (s.tmp_7 === s.tmp_9); + s.tmp_9.arg0 = r0; + r0 = s.arg0.fields["cellHeight"]; + s.tmp_11 = r0; + r0 = (s.y___193968 * s.tmp_11); + s.tmp_9.arg1 = r0; + s.callLocIdx = 615; 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 = 616; s.pc = 9; return s.tmp_1; + case 9: + r0 = s.retval; + r0 = (s.y___193968 + 1); + s.y___193968 = (r0); + { step = 2; continue; } case 3: - // jmp value (already in r0) - s.tmp_10 = r0; - r0 = s.tmp_10; + r0 = (s.x___193963 + 1); + s.x___193963 = (r0); + { step = 1; continue; } case 4: - // jmp value (already in r0) - s.tmp_11 = r0; - r0 = s.tmp_11; + r0 = undefined; return leave(s, r0) default: oops() } } } -scene_Camera_isUpdated__P169324.info = {"start":2403,"length":150,"line":79,"column":8,"endLine":81,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"isUpdated","argumentNames":["this"]} +sprites_SpriteMap_insertAABB__P168980.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 scene_Camera_isUpdated__P169324_mk(s) { +function sprites_SpriteMap_insertAABB__P168980_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Camera_isUpdated__P169324, depth: s.depth + 1, + parent: s, fn: sprites_SpriteMap_insertAABB__P168980, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -61183,14 +66831,21 @@ function scene_Camera_isUpdated__P169324_mk(s) { tmp_9: undefined, tmp_10: undefined, tmp_11: undefined, + left___193935: undefined, + top___193938: undefined, + xn___193941: undefined, + yn___193952: undefined, + x___193963: undefined, + y___193968: undefined, arg0: undefined, + arg1: undefined, } } -function Sprite_bottom__P168933(s) { +function sprites_SpriteMap_insertAtKey__P172274(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -61200,51 +66855,82 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.k___194003 = undefined; + s.bucket___194008 = 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__C168868_VT)) failedCast(r0); - s.tmp_0 = Sprite_top__P168931_mk(s); + if (!checkSubtype(r0, sprites_SpriteMap__C168973_VT)) failedCast(r0); + s.tmp_0 = sprites_SpriteMap_key__P172273_mk(s); s.tmp_0.arg0 = s.arg0; - s.tmp_1 = r0 = s.arg1; - s.tmp_3 = Sprite_height__P168925_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 463; s.pc = 2; return s.tmp_3; - case 2: + s.tmp_0.arg1 = s.arg1; + s.tmp_0.arg2 = s.arg2; + s.callLocIdx = 607; s.pc = 5; return s.tmp_0; + case 5: r0 = s.retval; + s.k___194003 = (r0); + r0 = s.arg0.fields["buckets"]; + s.tmp_0 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.k___194003); + s.bucket___194008 = (r0); + r0 = pxsim_numops_toBoolDecr(s.bucket___194008); + 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; - r0 = (s.tmp_1 - s.tmp_2); - s.tmp_0.arg1 = r0; - s.callLocIdx = 464; s.pc = 1; return s.tmp_0; + s.tmp_3 = r0 = s.k___194003; + r0 = pxsim_Array__mk(); + s.tmp_4 = r0; + r0 = pxsim_Array_.setAt(s.tmp_2, s.tmp_3, s.tmp_4); + s.bucket___194008 = (s.tmp_4); case 1: - r0 = s.retval; + case 2: + r0 = pxsim_Array_.indexOf(s.bucket___194008, 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___194008, s.arg3); + case 3: + case 4: r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_bottom__P168933.info = {"start":12204,"length":73,"line":440,"column":4,"endLine":442,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"bottom","argumentNames":["this","value"]} +sprites_SpriteMap_insertAtKey__P172274.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_bottom__P168933_mk(s) { +function sprites_SpriteMap_insertAtKey__P172274_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_bottom__P168933, depth: s.depth + 1, + parent: s, fn: sprites_SpriteMap_insertAtKey__P172274, depth: s.depth + 1, pc: 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___194003: undefined, + bucket___194008: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function Sprite_right__P168929(s) { +function sprites_SpriteMap_clear__P168979(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -61256,49 +66942,35 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - s.tmp_0 = Sprite_left__P168927_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_1 = r0 = s.arg1; - s.tmp_3 = Sprite_width__P168924_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 455; 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 = 456; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; + if (!checkSubtype(r0, sprites_SpriteMap__C168973_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() } } } -Sprite_right__P168929.info = {"start":11367,"length":71,"line":410,"column":4,"endLine":412,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"right","argumentNames":["this","value"]} +sprites_SpriteMap_clear__P168979.info = {"start":2532,"length":50,"line":72,"column":8,"endLine":74,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"clear","argumentNames":["this"]} -function Sprite_right__P168929_mk(s) { +function sprites_SpriteMap_clear__P168979_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_right__P168929, depth: s.depth + 1, + parent: s, fn: sprites_SpriteMap_clear__P168979, depth: s.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_spriteCollisions__P172311(s) { +function sprites_SpriteMap_resizeBuckets__P168978(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -61308,189 +66980,155 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ms___193338 = undefined; - s.unnamed814___U1 = undefined; - s.unnamed815___U2 = undefined; - s.sprite___193340 = undefined; - s.overSprites___193347 = undefined; - s.overlapper___193355 = undefined; - s.unnamed816___U6 = undefined; - s.unnamed817___U7 = undefined; - s.thisKind___193361 = undefined; - s.otherKind___193365 = undefined; - s.higher___193378 = undefined; - s.lower___193387 = undefined; + s.maxWidth___194038 = undefined; + s.maxHeight___194039 = undefined; + s.sprite___194041 = undefined; + s.unnamed808___U3 = undefined; + s.unnamed809___U4 = undefined; + s.tMap___194057 = undefined; + s.areaWidth___194061 = undefined; + s.areaHeight___194068 = 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__C169054_VT)) failedCast(r0); - r0 = pxsim_Array__length(s.arg2); + if (!checkSubtype(r0, sprites_SpriteMap__C168973_VT)) failedCast(r0); + s.maxWidth___194038 = (0); + s.maxHeight___194039 = (0); + s.sprite___194041 = (undefined); + s.unnamed808___U3 = (s.arg1); + s.unnamed809___U4 = (0); + case 1: + s.tmp_0 = r0 = s.unnamed809___U4; + r0 = pxsim_Array__length(s.unnamed808___U3); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 6; continue; } + r0 = pxsim_Array__getAt(s.unnamed808___U3, s.unnamed809___U4); + s.sprite___194041 = (r0); + s.tmp_4 = Sprite_width__P168924_mk(s); + s.tmp_4.arg0 = s.sprite___194041; + s.callLocIdx = 596; s.pc = 11; return s.tmp_4; + case 11: + r0 = s.retval; + s.tmp_3 = r0; + r0 = (s.tmp_3 > s.maxWidth___194038); s.tmp_2 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 21; continue; } - case 1: + if (!r0) { step = 2; continue; } + s.tmp_5 = Sprite_width__P168924_mk(s); + s.tmp_5.arg0 = s.sprite___194041; + s.callLocIdx = 597; s.pc = 12; return s.tmp_5; + case 12: + r0 = s.retval; + s.maxWidth___194038 = (r0); case 2: - s.ms___193338 = (undefined); - s.unnamed814___U1 = (s.arg1); - s.unnamed815___U2 = (0); case 3: - s.tmp_0 = r0 = s.unnamed815___U2; - r0 = pxsim_Array__length(s.unnamed814___U1); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 20; continue; } - r0 = pxsim_Array__getAt(s.unnamed814___U1, s.unnamed815___U2); - s.ms___193338 = (r0); - r0 = s.ms___193338.fields["sprite"]; - s.sprite___193340 = (r0); - r0 = s.sprite___193340.fields["flags"]; + s.tmp_2 = Sprite_height__P168925_mk(s); + s.tmp_2.arg0 = s.sprite___194041; + s.callLocIdx = 598; s.pc = 13; return s.tmp_2; + case 13: + r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_1 & 4610); + r0 = (s.tmp_1 > s.maxHeight___194039); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 4; continue; } - { step = 19; continue; } + s.tmp_3 = Sprite_height__P168925_mk(s); + s.tmp_3.arg0 = s.sprite___194041; + s.callLocIdx = 599; s.pc = 14; return s.tmp_3; + case 14: + r0 = s.retval; + s.maxHeight___194039 = (r0); case 4: case 5: - s.tmp_2 = sprites_SpriteMap_overlaps__P168976_mk(s); - r0 = s.arg0.fields["map"]; - s.tmp_2.arg0 = r0; - r0 = s.ms___193338.fields["sprite"]; - s.tmp_2.arg1 = r0; - s.callLocIdx = 718; s.pc = 22; return s.tmp_2; - case 22: - r0 = s.retval; - s.overSprites___193347 = (r0); - s.overlapper___193355 = (undefined); - s.unnamed816___U6 = (s.overSprites___193347); - s.unnamed817___U7 = (0); + r0 = (s.unnamed809___U4 + 1); + s.unnamed809___U4 = (r0); + { step = 1; continue; } case 6: - s.tmp_0 = r0 = s.unnamed817___U7; - r0 = pxsim_Array__length(s.unnamed816___U6); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 18; continue; } - r0 = pxsim_Array__getAt(s.unnamed816___U6, s.unnamed817___U7); - s.overlapper___193355 = (r0); - r0 = s.overlapper___193355.fields["flags"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 & 4610); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.unnamed808___U3 = (undefined); + s.tmp_0 = game_currentScene__P169526_mk(s); + s.callLocIdx = 600; s.pc = 15; return s.tmp_0; + case 15: + r0 = s.retval; + r0 = r0.fields["tileMap"]; + s.tMap___194057 = (r0); + r0 = pxsim_numops_toBoolDecr(s.tMap___194057); if (!r0) { step = 7; continue; } - { step = 17; continue; } + s.tmp_0 = tiles_TileMap_areaWidth__P169270_mk(s); + s.tmp_0.arg0 = s.tMap___194057; + s.callLocIdx = 601; s.pc = 16; return s.tmp_0; + case 16: + r0 = s.retval; + { step = 8; continue; } case 7: + r0 = pxsim_ImageMethods.width(globals.screen___168559); case 8: - r0 = s.sprite___193340.fields["_kind"]; - s.thisKind___193361 = (r0); - r0 = s.overlapper___193355.fields["_kind"]; - s.otherKind___193365 = (r0); - r0 = s.sprite___193340.fields["_kindsOverlappedWith"]; - s.tmp_2 = r0; - r0 = pxsim_Array_.indexOf(s.tmp_2, s.otherKind___193365, undefined); + // jmp value (already in r0) s.tmp_1 = r0; - r0 = (s.tmp_1 === -1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + s.areaWidth___194061 = (s.tmp_1); + r0 = pxsim_numops_toBoolDecr(s.tMap___194057); if (!r0) { step = 9; continue; } - { step = 17; continue; } + s.tmp_0 = tiles_TileMap_areaHeight__P169271_mk(s); + s.tmp_0.arg0 = s.tMap___194057; + s.callLocIdx = 602; s.pc = 17; return s.tmp_0; + case 17: + r0 = s.retval; + { step = 10; continue; } case 9: + r0 = pxsim_ImageMethods.height(globals.screen___168559); case 10: - r0 = s.sprite___193340.fields["id"]; - s.tmp_4 = r0; - r0 = s.overlapper___193355.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___193340; - { step = 12; continue; } - case 11: - r0 = s.overlapper___193355; - case 12: - // jmp value (already in r0) - s.tmp_6 = r0; - s.higher___193378 = (s.tmp_6); - r0 = (s.higher___193378 === s.sprite___193340); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 13; continue; } - r0 = s.overlapper___193355; - { step = 14; continue; } - case 13: - r0 = s.sprite___193340; - case 14: // jmp value (already in r0) s.tmp_1 = r0; - s.lower___193387 = (s.tmp_1); - r0 = s.higher___193378.fields["_overlappers"]; - s.tmp_2 = r0; - r0 = s.lower___193387.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__P193407); - s.tmp_4 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_4, 0, s.thisKind___193361); - r0 = pxsim_pxtrt_stclo(s.tmp_4, 1, s.otherKind___193365); - r0 = pxsim_pxtcore_mkAction(5, ArcadePhysicsEngine_spriteCollisions_inline__P193429); - s.tmp_5 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_5, 0, s.higher___193378); - r0 = pxsim_pxtrt_stclo(s.tmp_5, 1, s.lower___193387); - r0 = pxsim_pxtrt_stclo(s.tmp_5, 2, s.sprite___193340); - r0 = pxsim_pxtrt_stclo(s.tmp_5, 3, s.overlapper___193355); - r0 = pxsim_pxtrt_stclo(s.tmp_5, 4, s.thisKind___193361); - s.tmp_6 = helpers_arrayForEach__P166636_mk(s); - s.tmp_7 = helpers_arrayFilter__P166637_mk(s); - s.tmp_7.arg0 = s.arg2; - s.tmp_7.arg1 = s.tmp_4; - s.callLocIdx = 721; 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 = 723; s.pc = 23; return s.tmp_6; - case 23: - r0 = s.retval; - case 15: - case 16: - case 17: - r0 = (s.unnamed817___U7 + 1); - s.unnamed817___U7 = (r0); - { step = 6; continue; } + s.areaHeight___194068 = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = Math_clamp__P166654_mk(s); + s.tmp_2.arg0 = 8; + r0 = (s.areaWidth___194061 >> 2); + s.tmp_2.arg1 = r0; + r0 = (s.maxWidth___194038 * 2); + s.tmp_2.arg2 = r0; + s.callLocIdx = 603; s.pc = 18; return s.tmp_2; case 18: - s.unnamed816___U6 = (undefined); + 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__P166654_mk(s); + s.tmp_2.arg0 = 8; + r0 = (s.areaHeight___194068 >> 2); + s.tmp_2.arg1 = r0; + r0 = (s.maxHeight___194039 * 2); + s.tmp_2.arg2 = r0; + s.callLocIdx = 604; s.pc = 19; return s.tmp_2; case 19: - r0 = (s.unnamed815___U2 + 1); - s.unnamed815___U2 = (r0); - { step = 3; continue; } - case 20: - s.unnamed814___U1 = (undefined); - case 21: + 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___194068, 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___194061, s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["columnCount"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_spriteCollisions__P172311.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_resizeBuckets__P168978.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 ArcadePhysicsEngine_spriteCollisions__P172311_mk(s) { +function sprites_SpriteMap_resizeBuckets__P168978_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_spriteCollisions__P172311, depth: s.depth + 1, + parent: s, fn: sprites_SpriteMap_resizeBuckets__P168978, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -61498,30 +67136,23 @@ function ArcadePhysicsEngine_spriteCollisions__P172311_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - ms___193338: undefined, - unnamed814___U1: undefined, - unnamed815___U2: undefined, - sprite___193340: undefined, - overSprites___193347: undefined, - overlapper___193355: undefined, - unnamed816___U6: undefined, - unnamed817___U7: undefined, - thisKind___193361: undefined, - otherKind___193365: undefined, - higher___193378: undefined, - lower___193387: undefined, + maxWidth___194038: undefined, + maxHeight___194039: undefined, + sprite___194041: undefined, + unnamed808___U3: undefined, + unnamed809___U4: undefined, + tMap___194057: undefined, + areaWidth___194061: undefined, + areaHeight___194068: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function forEach_inline__P193407(s) { +function Sprite_clearObstacles__P168952(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -61535,65 +67166,25 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0.fields["kind"]; + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); 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; } - case 1: - r0 = s.arg0.fields["otherKind"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 === s.caps[1]); - case 2: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBool(s.tmp_3); - if (!r0) { step = 3; continue; } - r0 = s.tmp_3; - { step = 6; continue; } - case 3: - r0 = s.arg0.fields["kind"]; - s.tmp_5 = r0; - r0 = (s.tmp_5 === s.caps[1]); - s.tmp_4 = r0; - r0 = pxsim_numops_toBool(s.tmp_4); - if (r0) { step = 4; continue; } - r0 = s.tmp_4; - { step = 5; continue; } - case 4: - r0 = s.arg0.fields["otherKind"]; - s.tmp_6 = r0; - r0 = (s.tmp_6 === s.caps[0]); - case 5: - // jmp value (already in r0) - s.tmp_7 = r0; - r0 = s.tmp_7; - case 6: - // jmp value (already in r0) - s.tmp_8 = r0; - r0 = s.tmp_8; + r0 = (s.tmp_0).fields["_obstacles"] = (s.tmp_1); + r0 = undefined; return leave(s, r0) default: oops() } } } -forEach_inline__P193407.info = {"start":11113,"length":137,"line":335,"column":32,"endLine":336,"endColumn":81,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["h"]} +Sprite_clearObstacles__P168952.info = {"start":24932,"length":54,"line":813,"column":4,"endLine":815,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"clearObstacles","argumentNames":["this"]} -function forEach_inline__P193407_mk(s) { +function Sprite_clearObstacles__P168952_mk(s) { checkStack(s.depth); return { - parent: s, fn: forEach_inline__P193407, depth: s.depth + 1, + parent: s, fn: Sprite_clearObstacles__P168952, depth: s.depth + 1, pc: 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, } } @@ -61601,7 +67192,7 @@ function forEach_inline__P193407_mk(s) { -function ArcadePhysicsEngine_spriteCollisions_inline__P193429(s) { +function Fx_idiv__P166690(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -61613,145 +67204,29 @@ switch (step) { 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__P193439); - 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; + r0 = pxsim.Math_.idiv(s.arg0, s.arg1); return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_spriteCollisions_inline__P193429.info = {"start":11310,"length":652,"line":338,"column":33,"endLine":349,"endColumn":25,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["h"]} +Fx_idiv__P166690.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 ArcadePhysicsEngine_spriteCollisions_inline__P193429_mk(s) { +function Fx_idiv__P166690_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_spriteCollisions_inline__P193429, depth: s.depth + 1, + parent: s, fn: Fx_idiv__P166690, 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 ArcadePhysicsEngine_spriteCollisions_inline__P193439(s) { -let r0 = s.r0, 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); - 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 = 722; 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 = 722; s.pc = 7; return s.tmp_12; } - else if (s.tmp_12.fn.isGetter) { s.tmp_12.stage2Call = true; s.callLocIdx = 722; s.pc = 7; return s.tmp_12;; } - else { s.callLocIdx = 722; 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() -} } } -ArcadePhysicsEngine_spriteCollisions_inline__P193439.info = {"start":11431,"length":503,"line":340,"column":50,"endLine":348,"endColumn":29,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":[]} - -function ArcadePhysicsEngine_spriteCollisions_inline__P193439_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: ArcadePhysicsEngine_spriteCollisions_inline__P193439, depth: s.depth + 1, - pc: 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, -} } - - - - - -function sprites_SpriteMap_overlaps__P168976(s) { +function ArcadePhysicsEngine_draw__P169065(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -61761,56 +67236,38 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.n___193472 = undefined; - s.o___193476 = 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__C168973_VT)) failedCast(r0); - s.tmp_0 = sprites_SpriteMap_neighbors__P168975_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 591; s.pc = 1; return s.tmp_0; + if (!checkSubtype(r0, ArcadePhysicsEngine__C169054_VT)) failedCast(r0); + s.tmp_0 = sprites_SpriteMap_draw__P168977_mk(s); + r0 = s.arg0.fields["map"]; + s.tmp_0.arg0 = r0; + s.callLocIdx = 646; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - s.n___193472 = (r0); - r0 = pxsim_pxtcore_mkAction(1, o_inline__P193478); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); - s.tmp_1 = helpers_arrayFilter__P166637_mk(s); - s.tmp_1.arg0 = s.n___193472; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 593; s.pc = 2; return s.tmp_1; - case 2: - r0 = s.retval; - s.o___193476 = (r0); - r0 = s.o___193476; + r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_SpriteMap_overlaps__P168976.info = {"start":923,"length":189,"line":30,"column":8,"endLine":34,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"overlaps","argumentNames":["this","sprite"]} +ArcadePhysicsEngine_draw__P169065.info = {"start":2777,"length":39,"line":108,"column":4,"endLine":110,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"draw","argumentNames":["this"]} -function sprites_SpriteMap_overlaps__P168976_mk(s) { +function ArcadePhysicsEngine_draw__P169065_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_overlaps__P168976, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_draw__P169065, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - n___193472: undefined, - o___193476: undefined, arg0: undefined, - arg1: undefined, } } -function o_inline__P193478(s) { +function sprites_SpriteMap_draw__P168977(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -61820,27 +67277,108 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.x___194336 = undefined; + s.y___194342 = undefined; + s.left___194348 = undefined; + s.top___194353 = undefined; + s.k___194358 = undefined; + s.b___194363 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = Sprite_overlapsWith__P168947_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_0.arg1 = s.arg0; - s.callLocIdx = 592; s.pc = 1; return s.tmp_0; + r0 = s.arg0; + if (!checkSubtype(r0, sprites_SpriteMap__C168973_VT)) failedCast(r0); + s.x___194336 = (0); case 1: + r0 = s.arg0.fields["columnCount"]; + s.tmp_1 = r0; + r0 = (s.x___194336 < s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 8; continue; } + s.y___194342 = (0); + case 2: + r0 = s.arg0.fields["rowCount"]; + s.tmp_1 = r0; + r0 = (s.y___194342 < s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; continue; } + r0 = s.arg0.fields["cellWidth"]; + s.tmp_2 = r0; + r0 = (s.x___194336 * s.tmp_2); + s.left___194348 = (r0); + r0 = s.arg0.fields["cellHeight"]; + s.tmp_0 = r0; + r0 = (s.y___194342 * s.tmp_0); + s.top___194353 = (r0); + s.tmp_0 = sprites_SpriteMap_key__P172273_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.left___194348; + s.tmp_0.arg2 = s.top___194353; + s.callLocIdx = 594; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; + s.k___194358 = (r0); + r0 = s.arg0.fields["buckets"]; + s.tmp_0 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.k___194358); + s.b___194363 = (r0); + s.tmp_0 = r0 = s.b___194363; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 3; continue; } + r0 = s.tmp_0; + { step = 4; continue; } + case 3: + r0 = pxsim_Array__length(s.b___194363); + 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__P168486_mk(s); + s.tmp_2.arg0 = globals.screen___168559; + s.tmp_2.arg1 = s.left___194348; + s.tmp_2.arg2 = s.top___194353; + 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 = 595; s.pc = 10; return s.tmp_2; + case 10: r0 = s.retval; + case 5: + case 6: + r0 = (s.y___194342 + 1); + s.y___194342 = (r0); + { step = 2; continue; } + case 7: + r0 = (s.x___194336 + 1); + s.x___194336 = (r0); + { step = 1; continue; } + case 8: + r0 = undefined; return leave(s, r0) default: oops() } } } -o_inline__P193478.info = {"start":1037,"length":41,"line":32,"column":31,"endLine":32,"endColumn":72,"fileName":"pxt_modules/game/spritemap.ts","functionName":"inline","argumentNames":["neighbor"]} +sprites_SpriteMap_draw__P168977.info = {"start":1122,"length":496,"line":36,"column":8,"endLine":47,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"draw","argumentNames":["this"]} -function o_inline__P193478_mk(s) { +function sprites_SpriteMap_draw__P168977_mk(s) { checkStack(s.depth); return { - parent: s, fn: o_inline__P193478, depth: s.depth + 1, + parent: s, fn: sprites_SpriteMap_draw__P168977, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + x___194336: undefined, + y___194342: undefined, + left___194348: undefined, + top___194353: undefined, + k___194358: undefined, + b___194363: undefined, arg0: undefined, } } @@ -61848,7 +67386,7 @@ function o_inline__P193478_mk(s) { -function sprites_SpriteMap_neighbors__P168975(s) { +function ArcadePhysicsEngine_removeSprite__P169064(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -61858,112 +67396,28 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.n___193684 = undefined; - s.layer___193686 = 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__C168973_VT)) failedCast(r0); - r0 = pxsim_Array__mk(); - s.n___193684 = (r0); - r0 = s.arg1.fields["layer"]; - s.layer___193686 = (r0); - s.tmp_0 = sprites_SpriteMap_mergeAtKey__P172275_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_1 = Sprite_left__P168926_mk(s); - s.tmp_1.arg0 = s.arg1; - s.callLocIdx = 579; s.pc = 2; return s.tmp_1; - case 2: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.tmp_2 = Sprite_top__P168930_mk(s); - s.tmp_2.arg0 = s.arg1; - s.callLocIdx = 580; s.pc = 3; return s.tmp_2; - case 3: - r0 = s.retval; - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = s.layer___193686; - s.tmp_0.arg4 = s.n___193684; - s.callLocIdx = 581; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.tmp_0 = sprites_SpriteMap_mergeAtKey__P172275_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_1 = Sprite_left__P168926_mk(s); - s.tmp_1.arg0 = s.arg1; - s.callLocIdx = 582; s.pc = 5; return s.tmp_1; - case 5: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.tmp_2 = Sprite_bottom__P168932_mk(s); - s.tmp_2.arg0 = s.arg1; - s.callLocIdx = 583; s.pc = 6; return s.tmp_2; - case 6: - r0 = s.retval; - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = s.layer___193686; - s.tmp_0.arg4 = s.n___193684; - s.callLocIdx = 584; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - s.tmp_0 = sprites_SpriteMap_mergeAtKey__P172275_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_1 = Sprite_right__P168928_mk(s); - s.tmp_1.arg0 = s.arg1; - s.callLocIdx = 585; s.pc = 8; return s.tmp_1; - case 8: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.tmp_2 = Sprite_top__P168930_mk(s); - s.tmp_2.arg0 = s.arg1; - s.callLocIdx = 586; s.pc = 9; return s.tmp_2; - case 9: - r0 = s.retval; - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = s.layer___193686; - s.tmp_0.arg4 = s.n___193684; - s.callLocIdx = 587; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - s.tmp_0 = sprites_SpriteMap_mergeAtKey__P172275_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_1 = Sprite_right__P168928_mk(s); - s.tmp_1.arg0 = s.arg1; - s.callLocIdx = 588; s.pc = 11; return s.tmp_1; - case 11: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.tmp_2 = Sprite_bottom__P168932_mk(s); - s.tmp_2.arg0 = s.arg1; - s.callLocIdx = 589; s.pc = 12; return s.tmp_2; - case 12: - r0 = s.retval; - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = s.layer___193686; - s.tmp_0.arg4 = s.n___193684; - s.callLocIdx = 590; s.pc = 10; return s.tmp_0; - case 10: - r0 = s.retval; - r0 = pxsim_Array_.removeElement(s.n___193684, s.arg1); - r0 = s.n___193684; + if (!checkSubtype(r0, ArcadePhysicsEngine__C169054_VT)) failedCast(r0); + r0 = s.arg0.fields["sprites"]; + s.tmp_0 = r0; + r0 = pxsim_Array_.removeElement(s.tmp_0, s.arg1); + r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_SpriteMap_neighbors__P168975.info = {"start":376,"length":442,"line":15,"column":8,"endLine":24,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"neighbors","argumentNames":["this","sprite"]} +ArcadePhysicsEngine_removeSprite__P169064.info = {"start":2691,"length":80,"line":104,"column":4,"endLine":106,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"removeSprite","argumentNames":["this","sprite"]} -function sprites_SpriteMap_neighbors__P168975_mk(s) { +function ArcadePhysicsEngine_removeSprite__P169064_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_neighbors__P168975, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_removeSprite__P169064, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - n___193684: undefined, - layer___193686: undefined, arg0: undefined, arg1: undefined, } } @@ -61972,7 +67426,7 @@ function sprites_SpriteMap_neighbors__P168975_mk(s) { -function sprites_SpriteMap_mergeAtKey__P172275(s) { +function ArcadePhysicsEngine_addSprite__P169063(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -61982,83 +67436,58 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.k___193727 = undefined; - s.bucket___193732 = undefined; - s.sprite___193739 = undefined; - s.unnamed810___U3 = undefined; - s.unnamed811___U4 = undefined; + s.tm___194400 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_SpriteMap__C168973_VT)) failedCast(r0); - s.tmp_0 = sprites_SpriteMap_key__P172273_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.tmp_0.arg2 = s.arg2; - s.callLocIdx = 617; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; - s.k___193727 = (r0); - r0 = s.arg0.fields["buckets"]; + if (!checkSubtype(r0, ArcadePhysicsEngine__C169054_VT)) failedCast(r0); + r0 = s.arg0.fields["sprites"]; s.tmp_0 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.k___193727); - s.bucket___193732 = (r0); - r0 = pxsim_numops_toBoolDecr(s.bucket___193732); - if (!r0) { step = 7; continue; } - s.sprite___193739 = (undefined); - s.unnamed810___U3 = (s.bucket___193732); - s.unnamed811___U4 = (0); - case 1: - s.tmp_0 = r0 = s.unnamed811___U4; - r0 = pxsim_Array__length(s.unnamed810___U3); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 6; continue; } - r0 = pxsim_Array__getAt(s.unnamed810___U3, s.unnamed811___U4); - s.sprite___193739 = (r0); - r0 = s.sprite___193739.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__push(s.tmp_0, s.arg1); + s.tmp_0 = game_currentScene__P169526_mk(s); + s.callLocIdx = 644; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + r0 = r0.fields["tileMap"]; + s.tm___194400 = (r0); + s.tmp_0 = r0 = s.tm___194400; + 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__P169285_mk(s); + s.tmp_1.arg0 = s.tm___194400; + s.tmp_1.arg1 = s.arg1; + s.callLocIdx = 645; s.pc = 6; return s.tmp_1; + case 6: + r0 = s.retval; case 2: - r0 = pxsim_Array_.indexOf(s.arg4, s.sprite___193739, undefined); - s.tmp_4 = r0; - r0 = (s.tmp_4 < 0); - case 3: // 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 = pxsim_numops_toBoolDecr(s.tmp_5); - if (!r0) { step = 4; continue; } - r0 = pxsim_Array__push(s.arg4, s.sprite___193739); + r0 = (s.tmp_5 | 256); + s.tmp_4 = r0; + r0 = (s.tmp_3).fields["flags"] = (s.tmp_4); + case 3: case 4: - case 5: - r0 = (s.unnamed811___U4 + 1); - s.unnamed811___U4 = (r0); - { step = 1; continue; } - case 6: - s.unnamed810___U3 = (undefined); - case 7: - case 8: r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_SpriteMap_mergeAtKey__P172275.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"]} +ArcadePhysicsEngine_addSprite__P169063.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 sprites_SpriteMap_mergeAtKey__P172275_mk(s) { +function ArcadePhysicsEngine_addSprite__P169063_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_mergeAtKey__P172275, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_addSprite__P169063, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -62066,23 +67495,16 @@ function sprites_SpriteMap_mergeAtKey__P172275_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - k___193727: undefined, - bucket___193732: undefined, - sprite___193739: undefined, - unnamed810___U3: undefined, - unnamed811___U4: undefined, + tm___194400: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, } } -function sprites_SpriteMap_key__P172273(s) { +function scene_Camera_y__P169318(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -62092,71 +67514,41 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.xi___193760 = undefined; - s.yi___193772 = 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__C168973_VT)) failedCast(r0); - s.tmp_0 = Math_clamp__P166654_mk(s); - s.tmp_0.arg0 = 0; - r0 = s.arg0.fields["columnCount"]; - s.tmp_0.arg1 = r0; - r0 = s.arg0.fields["cellWidth"]; - s.tmp_1 = r0; - r0 = pxsim.Math_.idiv(s.arg1, s.tmp_1); - s.tmp_0.arg2 = r0; - s.callLocIdx = 605; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.xi___193760 = (r0); - s.tmp_0 = Math_clamp__P166654_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 = 606; s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; - s.yi___193772 = (r0); - s.tmp_0 = r0 = s.xi___193760; - r0 = s.arg0.fields["columnCount"]; + if (!checkSubtype(r0, scene_Camera__C169308_VT)) failedCast(r0); + r0 = s.arg0.fields["_offsetY"]; + s.tmp_0 = r0; + r0 = pxsim_ImageMethods.height(globals.screen___168559); s.tmp_2 = r0; - r0 = (s.yi___193772 * s.tmp_2); + r0 = (s.tmp_2 >> 1); s.tmp_1 = r0; r0 = (s.tmp_0 + s.tmp_1); - return leave(s, r0) + return leaveAccessor(s, r0) default: oops() } } } -sprites_SpriteMap_key__P172273.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"]} +scene_Camera_y__P169318.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__P169318.isGetter = true; -function sprites_SpriteMap_key__P172273_mk(s) { +function scene_Camera_y__P169318_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_key__P172273, depth: s.depth + 1, + parent: s, fn: scene_Camera_y__P169318, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - xi___193760: undefined, - yi___193772: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function Sprite_overlapsWith__P168947(s) { +function scene_Camera_x__P169317(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -62166,427 +67558,41 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.A___193556 = undefined; - s.B___193557 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - r0 = (s.arg1 == s.arg0); + if (!checkSubtype(r0, scene_Camera__C169308_VT)) failedCast(r0); + r0 = s.arg0.fields["_offsetX"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = false; - { step = 27; continue; } - case 1: - case 2: - 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 = false; - { step = 27; continue; } - case 3: - case 4: - r0 = s.arg1.fields["flags"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 & 4610); - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 5; continue; } - r0 = false; - { step = 27; continue; } - case 5: - case 6: - r0 = s.arg0.fields["flags"]; - s.tmp_6 = r0; - r0 = (s.tmp_6 & 8192); - s.tmp_5 = r0; - r0 = pxsim_numops_toBool(s.tmp_5); - if (!r0) { step = 7; continue; } - r0 = s.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__P168750_mk(s); - r0 = s.arg1.fields["_hitbox"]; - s.tmp_9.arg0 = r0; - r0 = s.arg0.fields["_hitbox"]; - s.tmp_9.arg1 = r0; - s.callLocIdx = 487; 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__P168750_mk(s); - r0 = s.arg1.fields["_hitbox"]; - s.tmp_13.arg0 = r0; - r0 = s.arg0.fields["_hitbox"]; - s.tmp_13.arg1 = r0; - s.callLocIdx = 488; s.pc = 29; return s.tmp_13; - case 29: - r0 = s.retval; - s.tmp_12 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_12); - s.tmp_11 = r0; - r0 = pxsim_Boolean__bang(s.tmp_11); - s.tmp_10 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_10); - if (!r0) { step = 11; continue; } - r0 = false; - { step = 27; continue; } - case 11: - case 12: - s.tmp_17 = Sprite_isScaled__P172266_mk(s); - s.tmp_17.arg0 = s.arg0; - s.callLocIdx = 489; s.pc = 30; return s.tmp_17; - case 30: - r0 = s.retval; - s.tmp_16 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_16); - s.tmp_15 = r0; - r0 = pxsim_Boolean__bang(s.tmp_15); - s.tmp_14 = r0; - r0 = pxsim_numops_toBool(s.tmp_14); - if (r0) { step = 13; continue; } - r0 = s.tmp_14; - { step = 14; continue; } - case 13: - s.tmp_20 = Sprite_isScaled__P172266_mk(s); - s.tmp_20.arg0 = s.arg1; - s.callLocIdx = 490; 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__P168926_mk(s); - s.tmp_26.arg0 = s.arg0; - s.callLocIdx = 491; s.pc = 32; return s.tmp_26; - case 32: - r0 = s.retval; - s.tmp_25 = r0; - s.tmp_28 = Sprite_left__P168926_mk(s); - s.tmp_28.arg0 = s.arg1; - s.callLocIdx = 492; 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__P168930_mk(s); - s.tmp_31.arg0 = s.arg0; - s.callLocIdx = 493; s.pc = 34; return s.tmp_31; - case 34: - r0 = s.retval; - s.tmp_30 = r0; - s.tmp_33 = Sprite_top__P168930_mk(s); - s.tmp_33.arg0 = s.arg1; - s.callLocIdx = 494; 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__P168897_mk(s); - s.tmp_36.arg0 = s.arg0; - s.callLocIdx = 495; 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__P168899_mk(s); - s.tmp_38.arg0 = s.arg0; - s.callLocIdx = 496; 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__P168897_mk(s); - s.tmp_41.arg0 = s.arg1; - s.callLocIdx = 497; 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__P168899_mk(s); - s.tmp_44.arg0 = s.arg1; - s.callLocIdx = 498; 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__P168897_mk(s); - s.tmp_49.arg0 = s.arg0; - s.callLocIdx = 499; s.pc = 40; return s.tmp_49; - case 40: - r0 = s.retval; - s.tmp_48 = r0; - s.tmp_51 = Sprite_sy__P168899_mk(s); - s.tmp_51.arg0 = s.arg0; - s.callLocIdx = 500; 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__P168897_mk(s); - s.tmp_54.arg0 = s.arg1; - s.callLocIdx = 501; s.pc = 42; return s.tmp_54; - case 42: - r0 = s.retval; - s.tmp_53 = r0; - s.tmp_56 = Sprite_sy__P168899_mk(s); - s.tmp_56.arg0 = s.arg1; - s.callLocIdx = 502; 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___193556 = (s.arg0); - s.B___193557 = (s.arg1); - { step = 25; continue; } - case 24: - s.A___193556 = (s.arg1); - s.B___193557 = (s.arg0); - case 25: - s.tmp_0 = helpers_imageBlit__P168480_mk(s); - r0 = s.A___193556.fields["_image"]; - s.tmp_0.arg0 = r0; - s.tmp_3 = Sprite_left__P168926_mk(s); - s.tmp_3.arg0 = s.B___193557; - s.callLocIdx = 504; s.pc = 45; return s.tmp_3; - case 45: - r0 = s.retval; + r0 = pxsim_ImageMethods.width(globals.screen___168559); s.tmp_2 = r0; - s.tmp_5 = Sprite_left__P168926_mk(s); - s.tmp_5.arg0 = s.A___193556; - s.callLocIdx = 505; s.pc = 46; return s.tmp_5; - case 46: - r0 = s.retval; - s.tmp_4 = r0; - r0 = (s.tmp_2 - s.tmp_4); + r0 = (s.tmp_2 >> 1); s.tmp_1 = r0; - s.tmp_7 = Sprite_sx__P168897_mk(s); - s.tmp_7.arg0 = s.A___193556; - s.callLocIdx = 506; 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__P168930_mk(s); - s.tmp_10.arg0 = s.B___193557; - s.callLocIdx = 507; s.pc = 48; return s.tmp_10; - case 48: - r0 = s.retval; - s.tmp_9 = r0; - s.tmp_12 = Sprite_top__P168930_mk(s); - s.tmp_12.arg0 = s.A___193556; - s.callLocIdx = 508; 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__P168899_mk(s); - s.tmp_14.arg0 = s.A___193556; - s.callLocIdx = 509; 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__P168924_mk(s); - s.tmp_16.arg0 = s.B___193557; - s.callLocIdx = 510; s.pc = 51; return s.tmp_16; - case 51: - r0 = s.retval; - s.tmp_15 = r0; - s.tmp_18 = Sprite_sx__P168897_mk(s); - s.tmp_18.arg0 = s.A___193556; - s.callLocIdx = 511; 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__P168925_mk(s); - s.tmp_20.arg0 = s.B___193557; - s.callLocIdx = 512; s.pc = 53; return s.tmp_20; - case 53: - r0 = s.retval; - s.tmp_19 = r0; - s.tmp_22 = Sprite_sy__P168899_mk(s); - s.tmp_22.arg0 = s.A___193556; - s.callLocIdx = 513; 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___193557.fields["_image"]; - s.tmp_0.arg5 = r0; - s.tmp_0.arg6 = 0; - s.tmp_0.arg7 = 0; - r0 = s.B___193557.fields["_image"]; - s.tmp_23 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_23); - s.tmp_0.arg8 = r0; - r0 = s.B___193557.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 = 517; 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) + r0 = (s.tmp_0 + s.tmp_1); + return leaveAccessor(s, r0) default: oops() } } } -Sprite_overlapsWith__P168947.info = {"start":20623,"length":1735,"line":689,"column":4,"endLine":738,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"overlapsWith","argumentNames":["this","other"]} +scene_Camera_x__P169317.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__P169317.isGetter = true; -function Sprite_overlapsWith__P168947_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Sprite_overlapsWith__P168947, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - tmp_11: undefined, - tmp_12: undefined, - tmp_13: undefined, - tmp_14: undefined, - tmp_15: undefined, - tmp_16: undefined, - tmp_17: undefined, - tmp_18: undefined, - tmp_19: undefined, - tmp_20: undefined, - tmp_21: undefined, - tmp_22: undefined, - tmp_23: undefined, - tmp_24: undefined, - tmp_25: undefined, - tmp_26: undefined, - tmp_27: undefined, - tmp_28: undefined, - tmp_29: undefined, - tmp_30: undefined, - tmp_31: undefined, - tmp_32: undefined, - tmp_33: undefined, - tmp_34: undefined, - tmp_35: undefined, - tmp_36: undefined, - tmp_37: undefined, - tmp_38: undefined, - tmp_39: undefined, - tmp_40: undefined, - tmp_41: undefined, - tmp_42: undefined, - tmp_43: undefined, - tmp_44: undefined, - tmp_45: undefined, - tmp_46: undefined, - tmp_47: undefined, - tmp_48: undefined, - tmp_49: undefined, - tmp_50: undefined, - tmp_51: undefined, - tmp_52: undefined, - tmp_53: undefined, - tmp_54: undefined, - tmp_55: undefined, - tmp_56: undefined, - A___193556: undefined, - B___193557: undefined, +function scene_Camera_x__P169317_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: scene_Camera_x__P169317, 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_isScaled__P172266(s) { +function particles_ParticleSource_factory__P169696(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -62601,37 +67607,19 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - r0 = s.arg0.fields["_sx"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 !== 256); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } - case 1: - r0 = s.arg0.fields["_sy"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 !== 256); - case 2: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = s.tmp_3; - return leave(s, r0) + if (!checkSubtype(r0, particles_ParticleSource__C169678_VT)) failedCast(r0); + r0 = s.arg0.fields["_factory"]; + return leaveAccessor(s, r0) default: oops() } } } -Sprite_isScaled__P172266.info = {"start":10166,"length":100,"line":369,"column":4,"endLine":371,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"isScaled","argumentNames":["this"]} +particles_ParticleSource_factory__P169696.info = {"start":7951,"length":76,"line":264,"column":8,"endLine":266,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"factory","argumentNames":["this"]} +particles_ParticleSource_factory__P169696.isGetter = true; -function Sprite_isScaled__P172266_mk(s) { +function particles_ParticleSource_factory__P169696_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_isScaled__P172266, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_factory__P169696, depth: s.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, } } @@ -62639,7 +67627,7 @@ function Sprite_isScaled__P172266_mk(s) { -function game_Hitbox_overlapsWith__P168750(s) { +function game_Dialog_drawTextCore__P169458(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -62649,226 +67637,215 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.lines___194440 = undefined; + s.availableWidth___194446 = undefined; + s.availableHeight___194449 = undefined; + s.charactersPerRow___194452 = undefined; + s.rowsOfCharacters___194460 = undefined; + s.textLeft___194471 = undefined; + s.textTop___194493 = undefined; + s.row___194508 = 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__C168735_VT)) failedCast(r0); - s.tmp_0 = game_Hitbox_updateIfInvalid__P168749_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 347; s.pc = 18; return s.tmp_0; - case 18: - r0 = s.retval; - s.tmp_0 = game_Hitbox_updateIfInvalid__P168749_mk(s); - s.tmp_0.arg0 = s.arg1; - s.callLocIdx = 348; s.pc = 19; return s.tmp_0; - case 19: - r0 = s.retval; - s.tmp_1 = game_Hitbox_contains__P168748_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_2 = game_Hitbox_left__P168743_mk(s); - s.tmp_2.arg0 = s.arg1; - s.callLocIdx = 349; s.pc = 21; return s.tmp_2; - case 21: - r0 = s.retval; - s.tmp_1.arg1 = r0; - s.tmp_3 = game_Hitbox_top__P168744_mk(s); - s.tmp_3.arg0 = s.arg1; - s.callLocIdx = 350; s.pc = 22; return s.tmp_3; - case 22: - r0 = s.retval; - s.tmp_1.arg2 = r0; - s.callLocIdx = 351; s.pc = 20; return s.tmp_1; - case 20: - r0 = s.retval; + if (!checkSubtype(r0, game_Dialog__C169448_VT)) failedCast(r0); + r0 = s.arg0.fields["chunks"]; + 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 = true; - { step = 17; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: - case 2: - s.tmp_5 = game_Hitbox_contains__P168748_mk(s); - s.tmp_5.arg0 = s.arg0; - s.tmp_6 = game_Hitbox_left__P168743_mk(s); - s.tmp_6.arg0 = s.arg1; - s.callLocIdx = 352; s.pc = 24; return s.tmp_6; - case 24: - r0 = s.retval; - s.tmp_5.arg1 = r0; - s.tmp_7 = game_Hitbox_bottom__P168746_mk(s); - s.tmp_7.arg0 = s.arg1; - s.callLocIdx = 353; s.pc = 25; return s.tmp_7; - case 25: - r0 = s.retval; - s.tmp_5.arg2 = r0; - s.callLocIdx = 354; s.pc = 23; return s.tmp_5; - case 23: - r0 = s.retval; + r0 = s.arg0.fields["chunks"]; s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); + r0 = pxsim_Array__length(s.tmp_4); + s.tmp_3 = r0; + r0 = (s.tmp_3 === 0); + case 2: + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); if (!r0) { step = 3; continue; } - r0 = true; - { step = 17; continue; } + { step = 9; continue; } case 3: case 4: - s.tmp_9 = game_Hitbox_contains__P168748_mk(s); - s.tmp_9.arg0 = s.arg0; - s.tmp_10 = game_Hitbox_right__P168745_mk(s); - s.tmp_10.arg0 = s.arg1; - s.callLocIdx = 355; s.pc = 27; return s.tmp_10; - case 27: + r0 = s.arg0.fields["chunks"]; + s.tmp_6 = r0; + r0 = s.arg0.fields["chunkIndex"]; + s.tmp_7 = r0; + r0 = pxsim_Array__getAt(s.tmp_6, s.tmp_7); + s.lines___194440 = (r0); + s.tmp_0 = game_BaseDialog_textAreaWidth__P172425_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1225; s.pc = 10; return s.tmp_0; + case 10: r0 = s.retval; - s.tmp_9.arg1 = r0; - s.tmp_11 = game_Hitbox_top__P168744_mk(s); - s.tmp_11.arg0 = s.arg1; - s.callLocIdx = 356; s.pc = 28; return s.tmp_11; - case 28: + s.availableWidth___194446 = (r0); + s.tmp_0 = game_BaseDialog_textAreaHeight__P172426_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1226; s.pc = 11; return s.tmp_0; + case 11: r0 = s.retval; - s.tmp_9.arg2 = r0; - s.callLocIdx = 357; s.pc = 26; return s.tmp_9; - case 26: + s.availableHeight___194449 = (r0); + s.tmp_1 = r0 = s.availableWidth___194446; + s.tmp_3 = if_charWidth_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, "charWidth"); + } else { + s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["charWidth"]; + if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["charWidth"]; } + else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } + else { s.callLocIdx = 1227; s.pc = 12; return s.tmp_3; } + } + case 12: r0 = s.retval; - s.tmp_8 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_8); + s.tmp_2 = r0; + r0 = (s.tmp_1 / s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim.Math_.floor(s.tmp_0); + s.charactersPerRow___194452 = (r0); + s.tmp_1 = r0 = s.availableHeight___194449; + s.tmp_3 = game_BaseDialog_rowHeight__P172424_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 1228; s.pc = 13; return s.tmp_3; + case 13: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_1 / s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim.Math_.floor(s.tmp_0); + s.rowsOfCharacters___194460 = (r0); + r0 = s.arg0.fields["unit"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 > 12); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 5; continue; } - r0 = true; - { step = 17; continue; } + s.tmp_2 = game_BaseDialog_drawBorder__P172419_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 1229; s.pc = 14; return s.tmp_2; + case 14: + r0 = s.retval; case 5: case 6: - s.tmp_13 = game_Hitbox_contains__P168748_mk(s); - s.tmp_13.arg0 = s.arg0; - s.tmp_14 = game_Hitbox_right__P168745_mk(s); - s.tmp_14.arg0 = s.arg1; - s.callLocIdx = 358; s.pc = 30; return s.tmp_14; - case 30: + r0 = s.arg0.fields["innerLeft"]; + s.tmp_2 = r0; + r0 = (1 + s.tmp_2); + s.tmp_1 = r0; + s.tmp_4 = Math_min__P166658_mk(s); + r0 = s.arg0.fields["unit"]; + s.tmp_4.arg0 = r0; + s.tmp_4.arg1 = 12; + s.callLocIdx = 1230; s.pc = 15; return s.tmp_4; + case 15: r0 = s.retval; - s.tmp_13.arg1 = r0; - s.tmp_15 = game_Hitbox_bottom__P168746_mk(s); - s.tmp_15.arg0 = s.arg1; - s.callLocIdx = 359; s.pc = 31; return s.tmp_15; - case 31: + s.tmp_3 = r0; + r0 = (s.tmp_1 + s.tmp_3); + s.tmp_0 = r0; + s.tmp_7 = r0 = s.availableWidth___194446; + s.tmp_9 = r0 = s.charactersPerRow___194452; + s.tmp_11 = if_charWidth_1_mk(s); + r0 = s.arg0.fields["font"]; + s.tmp_11.arg0 = r0; + if (!s.tmp_11.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_11.arg0, "charWidth"); + } else { + s.tmp_11.fn = s.tmp_11.arg0.vtable.iface["charWidth"]; + if (s.tmp_11.fn == null) { s.retval = s.tmp_11.arg0.fields["charWidth"]; } + else if (!s.tmp_11.fn.isGetter) { s.retval = bind(s.tmp_11); } + else { s.callLocIdx = 1231; s.pc = 16; return s.tmp_11; } + } + case 16: r0 = s.retval; - s.tmp_13.arg2 = r0; - s.callLocIdx = 360; s.pc = 29; return s.tmp_13; - case 29: + s.tmp_10 = r0; + r0 = (s.tmp_9 * s.tmp_10); + s.tmp_8 = r0; + r0 = (s.tmp_7 - s.tmp_8); + s.tmp_6 = r0; + r0 = (s.tmp_6 >> 1); + s.tmp_5 = r0; + r0 = (s.tmp_0 + s.tmp_5); + s.textLeft___194471 = (r0); + r0 = s.arg0.fields["image"]; + s.tmp_3 = r0; + r0 = pxsim_ImageMethods.height(s.tmp_3); + s.tmp_2 = r0; + r0 = (s.tmp_2 >> 1); + s.tmp_1 = r0; + r0 = (1 + s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_Array__length(s.lines___194440); + s.tmp_6 = r0; + s.tmp_8 = game_BaseDialog_rowHeight__P172424_mk(s); + s.tmp_8.arg0 = s.arg0; + s.callLocIdx = 1232; s.pc = 17; return s.tmp_8; + case 17: r0 = s.retval; - s.tmp_12 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_12); - if (!r0) { step = 7; continue; } - r0 = true; - { step = 17; continue; } + s.tmp_7 = r0; + r0 = (s.tmp_6 * s.tmp_7); + s.tmp_5 = r0; + r0 = (s.tmp_5 >> 1); + s.tmp_4 = r0; + r0 = (s.tmp_0 - s.tmp_4); + s.textTop___194493 = (r0); + s.row___194508 = (0); case 7: - case 8: - s.tmp_17 = game_Hitbox_contains__P168748_mk(s); - s.tmp_17.arg0 = s.arg1; - s.tmp_18 = game_Hitbox_left__P168743_mk(s); - s.tmp_18.arg0 = s.arg0; - s.callLocIdx = 361; s.pc = 33; return s.tmp_18; - case 33: - r0 = s.retval; - s.tmp_17.arg1 = r0; - s.tmp_19 = game_Hitbox_top__P168744_mk(s); - s.tmp_19.arg0 = s.arg0; - s.callLocIdx = 362; s.pc = 34; return s.tmp_19; - case 34: + s.tmp_1 = r0 = s.row___194508; + r0 = pxsim_Array__length(s.lines___194440); + 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 = 8; continue; } + s.tmp_3 = helpers_imagePrint__P168517_mk(s); + r0 = s.arg0.fields["image"]; + s.tmp_3.arg0 = r0; + r0 = pxsim_Array__getAt(s.lines___194440, s.row___194508); + s.tmp_3.arg1 = r0; + s.tmp_3.arg2 = s.textLeft___194471; + s.tmp_4 = r0 = s.textTop___194493; + s.tmp_6 = r0 = s.row___194508; + s.tmp_8 = game_BaseDialog_rowHeight__P172424_mk(s); + s.tmp_8.arg0 = s.arg0; + s.callLocIdx = 1233; s.pc = 19; return s.tmp_8; + case 19: r0 = s.retval; - s.tmp_17.arg2 = r0; - s.callLocIdx = 363; s.pc = 32; return s.tmp_17; - case 32: + s.tmp_7 = r0; + r0 = (s.tmp_6 * s.tmp_7); + s.tmp_5 = r0; + r0 = (s.tmp_4 + s.tmp_5); + s.tmp_3.arg3 = r0; + r0 = s.arg0.fields["textColor"]; + s.tmp_3.arg4 = r0; + r0 = s.arg0.fields["font"]; + s.tmp_3.arg5 = r0; + s.tmp_3.arg6 = undefined; + s.callLocIdx = 1234; s.pc = 18; return s.tmp_3; + case 18: r0 = s.retval; - s.tmp_16 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_16); - if (!r0) { step = 9; continue; } - r0 = true; - { step = 17; continue; } + r0 = (s.row___194508 + 1); + s.row___194508 = (r0); + { step = 7; continue; } + case 8: case 9: - case 10: - s.tmp_21 = game_Hitbox_contains__P168748_mk(s); - s.tmp_21.arg0 = s.arg1; - s.tmp_22 = game_Hitbox_left__P168743_mk(s); - s.tmp_22.arg0 = s.arg0; - s.callLocIdx = 364; s.pc = 36; return s.tmp_22; - case 36: - r0 = s.retval; - s.tmp_21.arg1 = r0; - s.tmp_23 = game_Hitbox_bottom__P168746_mk(s); - s.tmp_23.arg0 = s.arg0; - s.callLocIdx = 365; s.pc = 37; return s.tmp_23; - case 37: - r0 = s.retval; - s.tmp_21.arg2 = r0; - s.callLocIdx = 366; 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__P168748_mk(s); - s.tmp_25.arg0 = s.arg1; - s.tmp_26 = game_Hitbox_right__P168745_mk(s); - s.tmp_26.arg0 = s.arg0; - s.callLocIdx = 367; s.pc = 39; return s.tmp_26; - case 39: - r0 = s.retval; - s.tmp_25.arg1 = r0; - s.tmp_27 = game_Hitbox_top__P168744_mk(s); - s.tmp_27.arg0 = s.arg0; - s.callLocIdx = 368; s.pc = 40; return s.tmp_27; - case 40: - r0 = s.retval; - s.tmp_25.arg2 = r0; - s.callLocIdx = 369; 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__P168748_mk(s); - s.tmp_29.arg0 = s.arg1; - s.tmp_30 = game_Hitbox_right__P168745_mk(s); - s.tmp_30.arg0 = s.arg0; - s.callLocIdx = 370; s.pc = 42; return s.tmp_30; - case 42: - r0 = s.retval; - s.tmp_29.arg1 = r0; - s.tmp_31 = game_Hitbox_bottom__P168746_mk(s); - s.tmp_31.arg0 = s.arg0; - s.callLocIdx = 371; s.pc = 43; return s.tmp_31; - case 43: - r0 = s.retval; - s.tmp_29.arg2 = r0; - s.callLocIdx = 372; 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: + r0 = undefined; return leave(s, r0) default: oops() } } } -game_Hitbox_overlapsWith__P168750.info = {"start":2515,"length":695,"line":87,"column":8,"endLine":99,"endColumn":9,"fileName":"pxt_modules/game/hitbox.ts","functionName":"overlapsWith","argumentNames":["this","other"]} +game_Dialog_drawTextCore__P169458.info = {"start":7867,"length":1045,"line":247,"column":8,"endLine":269,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"drawTextCore","argumentNames":["this"]} -function game_Hitbox_overlapsWith__P168750_mk(s) { +function game_Dialog_drawTextCore__P169458_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_Hitbox_overlapsWith__P168750, depth: s.depth + 1, + parent: s, fn: game_Dialog_drawTextCore__P169458, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -62882,146 +67859,58 @@ function game_Hitbox_overlapsWith__P168750_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, + lines___194440: undefined, + availableWidth___194446: undefined, + availableHeight___194449: undefined, + charactersPerRow___194452: undefined, + rowsOfCharacters___194460: undefined, + textLeft___194471: undefined, + textTop___194493: undefined, + row___194508: undefined, arg0: undefined, - arg1: undefined, } } -function game_Hitbox_contains__P168748(s) { +function game_BaseDialog_setText__P169445(s) { let r0 = s.r0, 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, game_Hitbox__C168735_VT)) failedCast(r0); - s.tmp_1 = r0 = s.arg1; - s.tmp_3 = game_Hitbox_left__P168743_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 327; 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__P168745_mk(s); - s.tmp_6.arg0 = s.arg0; - s.callLocIdx = 328; 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__P168744_mk(s); - s.tmp_10.arg0 = s.arg0; - s.callLocIdx = 329; 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__P168746_mk(s); - s.tmp_14.arg0 = s.arg0; - s.callLocIdx = 330; 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; +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, game_BaseDialog__C169430_VT)) failedCast(r0); + r0 = undefined; return leave(s, r0) default: oops() } } } -game_Hitbox_contains__P168748.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"]} +game_BaseDialog_setText__P169445.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 game_Hitbox_contains__P168748_mk(s) { +function game_BaseDialog_setText__P169445_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_Hitbox_contains__P168748, depth: s.depth + 1, + parent: s, fn: game_BaseDialog_setText__P169445, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - tmp_11: undefined, - tmp_12: undefined, - tmp_13: undefined, - tmp_14: undefined, - tmp_15: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function ArcadePhysicsEngine_createMovingSprite__P172310(s) { +function Sprite_toString__P168961(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -63031,335 +67920,113 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ovx___194115 = undefined; - s.ovy___194120 = undefined; - s.fx___194147 = undefined; - s.c___194154 = undefined; - s.fy___194197 = undefined; - s.c___194204 = undefined; - s.dx___194243 = undefined; - s.dy___194256 = undefined; - s.xStep___194269 = undefined; - s.yStep___194271 = 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__C169054_VT)) failedCast(r0); - s.tmp_0 = ArcadePhysicsEngine_constrain__P172316_mk(s); - s.tmp_0.arg0 = s.arg0; - r0 = s.arg1.fields["_vx"]; - s.tmp_0.arg1 = r0; - s.callLocIdx = 681; s.pc = 25; return s.tmp_0; - case 25: - r0 = s.retval; - s.ovx___194115 = (r0); - s.tmp_0 = ArcadePhysicsEngine_constrain__P172316_mk(s); - s.tmp_0.arg0 = s.arg0; - r0 = s.arg1.fields["_vy"]; - s.tmp_0.arg1 = r0; - s.callLocIdx = 682; s.pc = 26; return s.tmp_0; - case 26: - r0 = s.retval; - s.ovy___194120 = (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; } + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + r0 = pxsim_String_.mkEmpty(); + s.tmp_9 = r0; + r0 = s.arg0.fields["id"]; + s.tmp_11 = r0; + if ((s.tmp_11) && (s.tmp_11).vtable) { + setupResume(s, 1); + pxsim_String__stringConv(s.tmp_11); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_11) + ""; } case 1: - r0 = s.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 = pxsim.Math_.imul(s.tmp_2, s.arg2); - s.tmp_1 = r0; - r0 = pxsim.Math_.idiv(s.tmp_1, 1000); - s.fx___194147 = (r0); - r0 = s.arg1.fields["_vx"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 - s.fx___194147); - s.c___194154 = (r0); - r0 = (s.c___194154 < 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__P166693_mk(s); - s.tmp_3.arg0 = 0; - r0 = s.arg1.fields["_vx"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 + s.fx___194147); - s.tmp_3.arg1 = r0; - s.callLocIdx = 690; 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; } + s.tmp_10 = r0; + r0 = pxsim_String__concat(s.tmp_9, s.tmp_10); + s.tmp_8 = r0; + r0 = pxsim_String__concat(s.tmp_8, "("); + s.tmp_7 = r0; + s.tmp_14 = Sprite_x__P168881_mk(s); + s.tmp_14.arg0 = s.arg0; + s.callLocIdx = 547; s.pc = 2; return s.tmp_14; case 2: - r0 = (s.c___194154 > 0); - 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__P166694_mk(s); - s.tmp_3.arg0 = 0; - r0 = s.arg1.fields["_vx"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 - s.fx___194147); - s.tmp_3.arg1 = r0; - s.callLocIdx = 692; 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; } + s.tmp_13 = r0; + if ((s.tmp_13) && (s.tmp_13).vtable) { + setupResume(s, 3); + pxsim_String__stringConv(s.tmp_13); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_13) + ""; } case 3: - r0 = (s.arg1).fields["_vx"] = (0); - case 4: - case 5: - case 6: - case 7: - case 8: - r0 = s.arg1.fields["_ay"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 9; continue; } - s.tmp_1 = r0 = s.arg1; - r0 = s.arg1.fields["_vy"]; - s.tmp_3 = r0; - r0 = s.arg1.fields["_ay"]; + r0 = s.retval; + s.tmp_12 = r0; + r0 = pxsim_String__concat(s.tmp_7, s.tmp_12); s.tmp_6 = r0; - r0 = pxsim.Math_.imul(s.tmp_6, s.arg2); + r0 = pxsim_String__concat(s.tmp_6, ","); 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___194197 = (r0); - r0 = s.arg1.fields["_vy"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 - s.fy___194197); - s.c___194204 = (r0); - r0 = (s.c___194204 < 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__P166693_mk(s); - s.tmp_3.arg0 = 0; - r0 = s.arg1.fields["_vy"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 + s.fy___194197); - s.tmp_3.arg1 = r0; - s.callLocIdx = 700; 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___194204 > 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__P166694_mk(s); - s.tmp_3.arg0 = 0; - r0 = s.arg1.fields["_vy"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 - s.fy___194197); - s.tmp_3.arg1 = r0; - s.callLocIdx = 702; 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__P172316_mk(s); - s.tmp_2.arg0 = s.arg0; - r0 = s.arg1.fields["_vx"]; - s.tmp_2.arg1 = r0; - s.callLocIdx = 703; s.pc = 31; return s.tmp_2; - case 31: + s.tmp_17 = Sprite_y__P168883_mk(s); + s.tmp_17.arg0 = s.arg0; + s.callLocIdx = 548; s.pc = 4; return s.tmp_17; + case 4: 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__P172316_mk(s); - s.tmp_2.arg0 = s.arg0; - r0 = s.arg1.fields["_vy"]; - s.tmp_2.arg1 = r0; - s.callLocIdx = 704; s.pc = 32; return s.tmp_2; - case 32: + s.tmp_16 = r0; + if ((s.tmp_16) && (s.tmp_16).vtable) { + setupResume(s, 5); + pxsim_String__stringConv(s.tmp_16); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_16) + ""; } + case 5: r0 = s.retval; - s.tmp_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___194115); - 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___194243 = (r0); - r0 = s.arg1.fields["_vy"]; + s.tmp_15 = r0; + r0 = pxsim_String__concat(s.tmp_5, s.tmp_15); s.tmp_4 = r0; - r0 = (s.tmp_4 + s.ovy___194120); + r0 = pxsim_String__concat(s.tmp_4, ")->("); 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___194256 = (r0); - s.xStep___194269 = (s.dx___194243); - s.yStep___194271 = (s.dy___194256); - case 17: - s.tmp_2 = Fx_abs__P166692_mk(s); - s.tmp_2.arg0 = s.xStep___194269; - s.callLocIdx = 711; s.pc = 33; return s.tmp_2; - case 33: + s.tmp_20 = Sprite_vx__P168885_mk(s); + s.tmp_20.arg0 = s.arg0; + s.callLocIdx = 549; s.pc = 6; return s.tmp_20; + case 6: r0 = s.retval; - s.tmp_1 = r0; - r0 = s.arg0.fields["maxSingleStep"]; - s.tmp_3 = r0; - r0 = (s.tmp_1 > s.tmp_3); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 18; continue; } - r0 = s.tmp_0; - { step = 19; continue; } - case 18: - s.tmp_5 = Fx_abs__P166692_mk(s); - s.tmp_5.arg0 = s.yStep___194271; - s.callLocIdx = 712; s.pc = 34; return s.tmp_5; - case 34: + s.tmp_19 = r0; + if ((s.tmp_19) && (s.tmp_19).vtable) { + setupResume(s, 7); + pxsim_String__stringConv(s.tmp_19); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_19) + ""; } + case 7: r0 = s.retval; - s.tmp_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__P166692_mk(s); - s.tmp_10.arg0 = s.xStep___194269; - s.callLocIdx = 713; s.pc = 35; return s.tmp_10; - case 35: + s.tmp_18 = r0; + r0 = pxsim_String__concat(s.tmp_3, s.tmp_18); + s.tmp_2 = r0; + r0 = pxsim_String__concat(s.tmp_2, ","); + s.tmp_1 = r0; + s.tmp_23 = Sprite_vy__P168887_mk(s); + s.tmp_23.arg0 = s.arg0; + s.callLocIdx = 550; s.pc = 8; return s.tmp_23; + case 8: 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___194269, 2); - s.xStep___194269 = (r0); - case 20: - case 21: - s.tmp_2 = Fx_abs__P166692_mk(s); - s.tmp_2.arg0 = s.yStep___194271; - s.callLocIdx = 715; s.pc = 36; return s.tmp_2; - case 36: + s.tmp_22 = r0; + if ((s.tmp_22) && (s.tmp_22).vtable) { + setupResume(s, 9); + pxsim_String__stringConv(s.tmp_22); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_22) + ""; } + case 9: r0 = s.retval; - s.tmp_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___194271, 2); - s.yStep___194271 = (r0); - case 22: - case 23: - { step = 17; continue; } - case 24: - r0 = pxsim_pxtcore_mkClassInstance(MovingSprite__C169052_VT); + s.tmp_21 = r0; + r0 = pxsim_String__concat(s.tmp_1, s.tmp_21); s.tmp_0 = r0; - s.tmp_1 = MovingSprite_constructor__P169053_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___194243; - s.tmp_1.arg5 = s.dy___194256; - s.tmp_1.arg6 = s.xStep___194269; - s.tmp_1.arg7 = s.yStep___194271; - s.callLocIdx = 717; s.pc = 37; return s.tmp_1; - case 37: - r0 = s.retval; - r0 = s.tmp_0; + r0 = pxsim_String__concat(s.tmp_0, ")"); return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_createMovingSprite__P172310.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"]} +Sprite_toString__P168961.info = {"start":34111,"length":93,"line":1066,"column":4,"endLine":1068,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"toString","argumentNames":["this"]} -function ArcadePhysicsEngine_createMovingSprite__P172310_mk(s) { +function Sprite_toString__P168961_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_createMovingSprite__P172310, depth: s.depth + 1, + parent: s, fn: Sprite_toString__P168961, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -63373,27 +68040,26 @@ function ArcadePhysicsEngine_createMovingSprite__P172310_mk(s) { tmp_9: undefined, tmp_10: undefined, tmp_11: undefined, - ovx___194115: undefined, - ovy___194120: undefined, - fx___194147: undefined, - c___194154: undefined, - fy___194197: undefined, - c___194204: undefined, - dx___194243: undefined, - dy___194256: undefined, - xStep___194269: undefined, - yStep___194271: undefined, + tmp_12: undefined, + tmp_13: undefined, + tmp_14: undefined, + tmp_15: undefined, + tmp_16: undefined, + tmp_17: undefined, + tmp_18: undefined, + tmp_19: undefined, + tmp_20: undefined, + tmp_21: undefined, + tmp_22: undefined, + tmp_23: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function ArcadePhysicsEngine_constrain__P172316(s) { +function Sprite___drawCore__P168942(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -63403,39 +68069,122 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.ox___194568 = undefined; + s.oy___194576 = undefined; + s.l___194584 = undefined; + s.t___194590 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C169054_VT)) failedCast(r0); - s.tmp_0 = Fx_max__P166694_mk(s); - s.tmp_1 = Fx_min__P166693_mk(s); - r0 = s.arg0.fields["maxVelocity"]; - s.tmp_1.arg0 = r0; + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + s.tmp_0 = Sprite_drawSay__P172267_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 479; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + s.tmp_1 = Sprite_isOutOfScreen__P168941_mk(s); + s.tmp_1.arg0 = s.arg0; s.tmp_1.arg1 = s.arg1; - s.callLocIdx = 893; s.pc = 2; return s.tmp_1; + s.callLocIdx = 480; s.pc = 9; return s.tmp_1; + case 9: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + { step = 7; continue; } + case 1: case 2: + r0 = s.arg0.fields["flags"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 & 512); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 3; continue; } + r0 = 0; + { step = 4; continue; } + case 3: + r0 = s.arg1.fields["drawOffsetX"]; + case 4: + // jmp value (already in r0) + s.tmp_4 = r0; + s.ox___194568 = (s.tmp_4); + r0 = s.arg0.fields["flags"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 & 512); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + r0 = 0; + { step = 6; continue; } + case 5: + r0 = s.arg1.fields["drawOffsetY"]; + case 6: + // jmp value (already in r0) + s.tmp_2 = r0; + s.oy___194576 = (s.tmp_2); + s.tmp_2 = Sprite_left__P168926_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 481; s.pc = 10; return s.tmp_2; + case 10: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_1 - s.ox___194568); + s.tmp_0 = r0; + r0 = pxsim.Math_.floor(s.tmp_0); + s.l___194584 = (r0); + s.tmp_2 = Sprite_top__P168930_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 482; s.pc = 11; return s.tmp_2; + case 11: r0 = s.retval; - s.tmp_0.arg0 = r0; - r0 = s.arg0.fields["maxNegativeVelocity"]; - s.tmp_0.arg1 = r0; - s.callLocIdx = 894; s.pc = 1; return s.tmp_0; - case 1: + s.tmp_1 = r0; + r0 = (s.tmp_1 - s.oy___194576); + s.tmp_0 = r0; + r0 = pxsim.Math_.floor(s.tmp_0); + s.t___194590 = (r0); + s.tmp_0 = Sprite__C168868_v6_3_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.l___194584; + s.tmp_0.arg2 = s.t___194590; + if (!checkSubtype(s.tmp_0.arg0, Sprite__C168868_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__P172268_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.l___194584; + s.tmp_0.arg2 = s.t___194590; + s.tmp_0.arg3 = s.ox___194568; + s.tmp_0.arg4 = s.oy___194576; + s.callLocIdx = 483; s.pc = 13; return s.tmp_0; + case 13: r0 = s.retval; + case 7: + r0 = undefined; return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_constrain__P172316.info = {"start":27343,"length":193,"line":761,"column":4,"endLine":769,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"constrain","argumentNames":["this","v"]} +Sprite___drawCore__P168942.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 ArcadePhysicsEngine_constrain__P172316_mk(s) { +function Sprite___drawCore__P168942_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_constrain__P172316, depth: s.depth + 1, + parent: s, fn: Sprite___drawCore__P168942, depth: s.depth + 1, pc: 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___194568: undefined, + oy___194576: undefined, + l___194584: undefined, + t___194590: undefined, arg0: undefined, arg1: undefined, } } @@ -63444,7 +68193,7 @@ function ArcadePhysicsEngine_constrain__P172316_mk(s) { -function Fx_compare__P166691(s) { +function Sprite_drawSprite__P172269(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -63457,28 +68206,88 @@ 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 - s.arg1); + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + s.tmp_3 = Sprite_isScaled__P172266_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 575; s.pc = 3; return s.tmp_3; + case 3: + 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 = s.arg0.fields["_image"]; + s.tmp_4 = r0; + r0 = pxsim_ImageMethods.drawTransparentImage(globals.screen___168559, s.tmp_4, s.arg1, s.arg2); + { step = 2; continue; } + case 1: + s.tmp_0 = helpers_imageBlit__P168480_mk(s); + s.tmp_0.arg0 = globals.screen___168559; + s.tmp_0.arg1 = s.arg1; + s.tmp_0.arg2 = s.arg2; + s.tmp_1 = Sprite_width__P168924_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 576; s.pc = 5; return s.tmp_1; + case 5: + r0 = s.retval; + s.tmp_0.arg3 = r0; + s.tmp_2 = Sprite_height__P168925_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 577; s.pc = 6; return s.tmp_2; + case 6: + r0 = s.retval; + s.tmp_0.arg4 = r0; + r0 = s.arg0.fields["_image"]; + s.tmp_0.arg5 = r0; + s.tmp_0.arg6 = 0; + s.tmp_0.arg7 = 0; + r0 = s.arg0.fields["_image"]; + s.tmp_3 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_3); + s.tmp_0.arg8 = r0; + r0 = s.arg0.fields["_image"]; + s.tmp_4 = r0; + r0 = pxsim_ImageMethods.height(s.tmp_4); + s.tmp_0.arg9 = r0; + s.tmp_0.arg10 = true; + s.tmp_0.arg11 = false; + s.callLocIdx = 578; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -Fx_compare__P166691.info = {"start":1395,"length":106,"line":41,"column":4,"endLine":43,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"compare","argumentNames":["a","b"]} +Sprite_drawSprite__P172269.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 Fx_compare__P166691_mk(s) { +function Sprite_drawSprite__P172269_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_compare__P166691, depth: s.depth + 1, + parent: s, fn: Sprite_drawSprite__P172269, depth: s.depth + 1, pc: 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_SpriteMap_insertAABB__P168980(s) { +function Sprite_drawDebug__P172268(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -63488,135 +68297,350 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.left___193935 = undefined; - s.top___193938 = undefined; - s.xn___193941 = undefined; - s.yn___193952 = undefined; - s.x___193963 = undefined; - s.y___193968 = undefined; + s.font___194614 = undefined; + s.tx___194618 = undefined; + s.ty___194620 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_SpriteMap__C168973_VT)) failedCast(r0); - s.tmp_0 = Sprite_left__P168926_mk(s); - s.tmp_0.arg0 = s.arg1; - s.callLocIdx = 608; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - s.left___193935 = (r0); - s.tmp_0 = Sprite_top__P168930_mk(s); - s.tmp_0.arg0 = s.arg1; - s.callLocIdx = 609; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.top___193938 = (r0); - s.tmp_3 = Sprite_width__P168924_mk(s); - s.tmp_3.arg0 = s.arg1; - s.callLocIdx = 610; 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); + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + r0 = s.arg0.fields["flags"]; s.tmp_1 = r0; - r0 = (s.tmp_1 - 1); + r0 = (s.tmp_1 & 64); 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___193941 = (r0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 9; continue; } + s.font___194614 = (globals.font5___168507); + s.tx___194618 = (s.arg1); + s.tmp_1 = r0 = s.arg2; s.tmp_3 = Sprite_height__P168925_mk(s); - s.tmp_3.arg0 = s.arg1; - s.callLocIdx = 611; s.pc = 8; return s.tmp_3; - case 8: + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 551; s.pc = 13; return s.tmp_3; + case 13: r0 = s.retval; s.tmp_2 = r0; - r0 = s.arg0.fields["cellHeight"]; + r0 = (s.tmp_1 + s.tmp_2); + s.tmp_0 = r0; + r0 = (s.tmp_0 + 2); + s.ty___194620 = (r0); + s.tmp_0 = helpers_imagePrint__P168517_mk(s); + s.tmp_0.arg0 = globals.screen___168559; + r0 = pxsim_String_.mkEmpty(); + s.tmp_3 = r0; + s.tmp_7 = Sprite_x__P168881_mk(s); + s.tmp_7.arg0 = s.arg0; + s.callLocIdx = 552; s.pc = 15; return s.tmp_7; + case 15: + r0 = s.retval; + s.tmp_6 = r0; + r0 = (s.tmp_6 >> 0); + s.tmp_5 = r0; + if ((s.tmp_5) && (s.tmp_5).vtable) { + setupResume(s, 16); + pxsim_String__stringConv(s.tmp_5); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_5) + ""; } + case 16: + r0 = s.retval; s.tmp_4 = r0; - r0 = (s.tmp_2 + s.tmp_4); + r0 = pxsim_String__concat(s.tmp_3, s.tmp_4); + s.tmp_2 = r0; + r0 = pxsim_String__concat(s.tmp_2, ","); s.tmp_1 = r0; - r0 = (s.tmp_1 - 1); + s.tmp_11 = Sprite_y__P168883_mk(s); + s.tmp_11.arg0 = s.arg0; + s.callLocIdx = 553; s.pc = 17; return s.tmp_11; + case 17: + r0 = s.retval; + s.tmp_10 = r0; + r0 = (s.tmp_10 >> 0); + s.tmp_9 = r0; + if ((s.tmp_9) && (s.tmp_9).vtable) { + setupResume(s, 18); + pxsim_String__stringConv(s.tmp_9); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_9) + ""; } + case 18: + r0 = s.retval; + 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___194618; + s.tmp_0.arg3 = s.ty___194620; + s.tmp_0.arg4 = 1; + s.tmp_0.arg5 = s.font___194614; + s.tmp_0.arg6 = undefined; + s.callLocIdx = 554; s.pc = 14; return s.tmp_0; + case 14: + r0 = s.retval; + s.tmp_0 = r0 = s.tx___194618; + s.tmp_2 = if_charWidth_1_mk(s); + s.tmp_2.arg0 = s.font___194614; + 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 = 555; s.pc = 19; return s.tmp_2; } + } + case 19: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0 - s.tmp_1); + s.tx___194618 = (r0); + s.tmp_1 = Sprite_vx__P168885_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 556; s.pc = 20; return s.tmp_1; + case 20: + r0 = s.retval; 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___193952 = (r0); - s.x___193963 = (0); + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: - r0 = (s.x___193963 <= s.xn___193941); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - s.y___193968 = (0); + s.tmp_2 = Sprite_vy__P168887_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 557; s.pc = 21; return s.tmp_2; + case 21: + r0 = s.retval; case 2: - r0 = (s.y___193968 <= s.yn___193952); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); if (!r0) { step = 3; continue; } - s.tmp_1 = sprites_SpriteMap_insertAtKey__P172274_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_2 = r0 = s.left___193935; - s.tmp_4 = Math_min__P166658_mk(s); - s.tmp_5 = Sprite_width__P168924_mk(s); - s.tmp_5.arg0 = s.arg1; - s.callLocIdx = 612; s.pc = 11; return s.tmp_5; - case 11: + s.tmp_4 = r0 = s.ty___194620; + s.tmp_7 = if_charHeight_1_mk(s); + s.tmp_7.arg0 = s.font___194614; + 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 = 558; s.pc = 22; return s.tmp_7; } + } + case 22: r0 = s.retval; - s.tmp_4.arg0 = r0; - r0 = s.arg0.fields["cellWidth"]; s.tmp_6 = r0; - r0 = (s.x___193963 * s.tmp_6); - s.tmp_4.arg1 = r0; - s.callLocIdx = 613; s.pc = 10; return s.tmp_4; - case 10: + r0 = (s.tmp_6 + 2); + s.tmp_5 = r0; + r0 = (s.tmp_4 + s.tmp_5); + s.ty___194620 = (r0); + s.tmp_0 = helpers_imagePrint__P168517_mk(s); + s.tmp_0.arg0 = globals.screen___168559; + s.tmp_6 = Sprite_vx__P168885_mk(s); + s.tmp_6.arg0 = s.arg0; + s.callLocIdx = 559; s.pc = 24; return s.tmp_6; + case 24: 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___193938; - s.tmp_9 = Math_min__P166658_mk(s); - s.tmp_10 = Sprite_height__P168925_mk(s); - s.tmp_10.arg0 = s.arg1; - s.callLocIdx = 614; s.pc = 13; return s.tmp_10; - case 13: + s.tmp_5 = r0; + r0 = (s.tmp_5 >> 0); + s.tmp_4 = r0; + if ((s.tmp_4) && (s.tmp_4).vtable) { + setupResume(s, 25); + pxsim_String__stringConv(s.tmp_4); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_4) + ""; } + case 25: r0 = s.retval; - s.tmp_9.arg0 = r0; - r0 = s.arg0.fields["cellHeight"]; - s.tmp_11 = r0; - r0 = (s.y___193968 * s.tmp_11); - s.tmp_9.arg1 = r0; - s.callLocIdx = 615; s.pc = 12; return s.tmp_9; - case 12: + s.tmp_3 = r0; + r0 = pxsim_String__concat("v", s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_String__concat(s.tmp_2, ","); + s.tmp_1 = r0; + s.tmp_10 = Sprite_vy__P168887_mk(s); + s.tmp_10.arg0 = s.arg0; + s.callLocIdx = 560; s.pc = 26; return s.tmp_10; + case 26: r0 = s.retval; + s.tmp_9 = r0; + r0 = (s.tmp_9 >> 0); s.tmp_8 = r0; - r0 = (s.tmp_7 + s.tmp_8); - s.tmp_1.arg2 = r0; - s.tmp_1.arg3 = s.arg1; - s.callLocIdx = 616; s.pc = 9; return s.tmp_1; - case 9: + if ((s.tmp_8) && (s.tmp_8).vtable) { + setupResume(s, 27); + pxsim_String__stringConv(s.tmp_8); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_8) + ""; } + case 27: + r0 = s.retval; + 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___194618; + s.tmp_0.arg3 = s.ty___194620; + s.tmp_0.arg4 = 1; + s.tmp_0.arg5 = s.font___194614; + s.tmp_0.arg6 = undefined; + s.callLocIdx = 561; s.pc = 23; return s.tmp_0; + case 23: r0 = s.retval; - r0 = (s.y___193968 + 1); - s.y___193968 = (r0); - { step = 2; continue; } case 3: - r0 = (s.x___193963 + 1); - s.x___193963 = (r0); - { step = 1; continue; } case 4: + s.tmp_1 = Sprite_ax__P168889_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 562; s.pc = 28; return s.tmp_1; + case 28: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 5; continue; } + r0 = s.tmp_0; + { step = 6; continue; } + case 5: + s.tmp_2 = Sprite_ay__P168891_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 563; s.pc = 29; return s.tmp_2; + case 29: + r0 = s.retval; + case 6: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 7; continue; } + s.tmp_4 = r0 = s.ty___194620; + s.tmp_7 = if_charHeight_1_mk(s); + s.tmp_7.arg0 = s.font___194614; + 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 = 564; s.pc = 30; return s.tmp_7; } + } + case 30: + r0 = s.retval; + s.tmp_6 = r0; + r0 = (s.tmp_6 + 2); + s.tmp_5 = r0; + r0 = (s.tmp_4 + s.tmp_5); + s.ty___194620 = (r0); + s.tmp_0 = helpers_imagePrint__P168517_mk(s); + s.tmp_0.arg0 = globals.screen___168559; + s.tmp_6 = Sprite_ax__P168889_mk(s); + s.tmp_6.arg0 = s.arg0; + s.callLocIdx = 565; s.pc = 32; return s.tmp_6; + case 32: + r0 = s.retval; + s.tmp_5 = r0; + r0 = (s.tmp_5 >> 0); + s.tmp_4 = r0; + if ((s.tmp_4) && (s.tmp_4).vtable) { + setupResume(s, 33); + pxsim_String__stringConv(s.tmp_4); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_4) + ""; } + case 33: + r0 = s.retval; + s.tmp_3 = r0; + r0 = pxsim_String__concat("a", s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_String__concat(s.tmp_2, ","); + s.tmp_1 = r0; + s.tmp_10 = Sprite_ay__P168891_mk(s); + s.tmp_10.arg0 = s.arg0; + s.callLocIdx = 566; s.pc = 34; return s.tmp_10; + case 34: + r0 = s.retval; + s.tmp_9 = r0; + r0 = (s.tmp_9 >> 0); + s.tmp_8 = r0; + if ((s.tmp_8) && (s.tmp_8).vtable) { + setupResume(s, 35); + pxsim_String__stringConv(s.tmp_8); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_8) + ""; } + case 35: + r0 = s.retval; + 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___194618; + s.tmp_0.arg3 = s.ty___194620; + s.tmp_0.arg4 = 1; + s.tmp_0.arg5 = s.font___194614; + s.tmp_0.arg6 = undefined; + s.callLocIdx = 567; s.pc = 31; return s.tmp_0; + case 31: + r0 = s.retval; + case 7: + case 8: + case 9: + case 10: + r0 = pxsim_numops_toBoolDecr(globals.debug___169494); + if (!r0) { step = 11; continue; } + s.tmp_0 = helpers_imageDrawRect__P168486_mk(s); + s.tmp_0.arg0 = globals.screen___168559; + s.tmp_3 = game_Hitbox_left__P168743_mk(s); + r0 = s.arg0.fields["_hitbox"]; + s.tmp_3.arg0 = r0; + s.callLocIdx = 568; s.pc = 37; return s.tmp_3; + case 37: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_2 + 128); + s.tmp_4 = r0; + r0 = (s.tmp_4 >> 8); + s.tmp_1 = r0; + r0 = (s.tmp_1 - s.arg3); + s.tmp_0.arg1 = r0; + s.tmp_7 = game_Hitbox_top__P168744_mk(s); + r0 = s.arg0.fields["_hitbox"]; + s.tmp_7.arg0 = r0; + s.callLocIdx = 570; s.pc = 38; return s.tmp_7; + case 38: + r0 = s.retval; + s.tmp_6 = r0; + r0 = (s.tmp_6 + 128); + s.tmp_8 = r0; + r0 = (s.tmp_8 >> 8); + s.tmp_5 = r0; + r0 = (s.tmp_5 - s.arg4); + s.tmp_0.arg2 = r0; + r0 = s.arg0.fields["_hitbox"]; + r0 = r0.fields["width"]; + s.tmp_9 = r0; + r0 = (s.tmp_9 + 128); + s.tmp_10 = r0; + r0 = (s.tmp_10 >> 8); + s.tmp_0.arg3 = r0; + r0 = s.arg0.fields["_hitbox"]; + r0 = r0.fields["height"]; + s.tmp_11 = r0; + r0 = (s.tmp_11 + 128); + s.tmp_12 = r0; + r0 = (s.tmp_12 >> 8); + s.tmp_0.arg4 = r0; + s.tmp_0.arg5 = 1; + s.callLocIdx = 574; s.pc = 36; return s.tmp_0; + case 36: + r0 = s.retval; + case 11: + case 12: r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_SpriteMap_insertAABB__P168980.info = {"start":3184,"length":521,"line":91,"column":8,"endLine":99,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"insertAABB","argumentNames":["this","sprite"]} +Sprite_drawDebug__P172268.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 sprites_SpriteMap_insertAABB__P168980_mk(s) { +function Sprite_drawDebug__P172268_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_insertAABB__P168980, depth: s.depth + 1, + parent: s, fn: Sprite_drawDebug__P172268, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -63630,21 +68654,22 @@ function sprites_SpriteMap_insertAABB__P168980_mk(s) { tmp_9: undefined, tmp_10: undefined, tmp_11: undefined, - left___193935: undefined, - top___193938: undefined, - xn___193941: undefined, - yn___193952: undefined, - x___193963: undefined, - y___193968: undefined, + tmp_12: undefined, + font___194614: undefined, + tx___194618: undefined, + ty___194620: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, } } -function sprites_SpriteMap_insertAtKey__P172274(s) { +function Sprite_drawSay__P172267(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -63654,82 +68679,98 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.k___194003 = undefined; - s.bucket___194008 = 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__C168973_VT)) failedCast(r0); - s.tmp_0 = sprites_SpriteMap_key__P172273_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.tmp_0.arg2 = s.arg2; - s.callLocIdx = 607; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - s.k___194003 = (r0); - r0 = s.arg0.fields["buckets"]; - s.tmp_0 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.k___194003); - s.bucket___194008 = (r0); - r0 = pxsim_numops_toBoolDecr(s.bucket___194008); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + r0 = s.arg0.fields["sayRenderer"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.arg0.fields["buckets"]; + if (!r0) { step = 5; continue; } + r0 = s.arg0.fields["sayEndTime"]; s.tmp_2 = r0; - s.tmp_3 = r0 = s.k___194003; - r0 = pxsim_Array__mk(); + r0 = (s.tmp_2 !== undefined); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 3; continue; } + r0 = pxsim.control.millis(); s.tmp_4 = r0; - r0 = pxsim_Array_.setAt(s.tmp_2, s.tmp_3, s.tmp_4); - s.bucket___194008 = (s.tmp_4); + r0 = s.arg0.fields["sayEndTime"]; + 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 = 1; continue; } + s.tmp_6 = sprites_BaseSpriteSayRenderer__C168786_v0_4_mk(s); + r0 = s.arg0.fields["sayRenderer"]; + s.tmp_6.arg0 = r0; + s.tmp_6.arg1 = globals.screen___168559; + s.tmp_6.arg2 = s.arg1; + s.tmp_6.arg3 = s.arg0; + if (!checkSubtype(s.tmp_6.arg0, sprites_BaseSpriteSayRenderer__C168786_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__C168786_v2_1_mk(s); + r0 = s.arg0.fields["sayRenderer"]; + s.tmp_0.arg0 = r0; + if (!checkSubtype(s.tmp_0.arg0, sprites_BaseSpriteSayRenderer__C168786_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: + r0 = s.retval; + r0 = (s.arg0).fields["sayRenderer"] = (undefined); + r0 = (s.arg0).fields["sayEndTime"] = (undefined); case 2: - r0 = pxsim_Array_.indexOf(s.bucket___194008, 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___194008, s.arg3); + { step = 4; continue; } case 3: + s.tmp_0 = sprites_BaseSpriteSayRenderer__C168786_v0_4_mk(s); + r0 = s.arg0.fields["sayRenderer"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = globals.screen___168559; + s.tmp_0.arg2 = s.arg1; + s.tmp_0.arg3 = s.arg0; + if (!checkSubtype(s.tmp_0.arg0, sprites_BaseSpriteSayRenderer__C168786_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: + r0 = s.retval; case 4: + case 5: + case 6: r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_SpriteMap_insertAtKey__P172274.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"]} +Sprite_drawSay__P172267.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 sprites_SpriteMap_insertAtKey__P172274_mk(s) { +function Sprite_drawSay__P172267_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_insertAtKey__P172274, depth: s.depth + 1, + parent: s, fn: Sprite_drawSay__P172267, depth: s.depth + 1, pc: 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___194003: undefined, - bucket___194008: undefined, + tmp_5: undefined, + tmp_6: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function sprites_SpriteMap_clear__P168979(s) { +function Sprite___visible__P168923(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -63744,24 +68785,27 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_SpriteMap__C168973_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + r0 = s.arg0.fields["flags"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 & 128); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["buckets"] = (s.tmp_1); - 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() } } } -sprites_SpriteMap_clear__P168979.info = {"start":2532,"length":50,"line":72,"column":8,"endLine":74,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"clear","argumentNames":["this"]} +Sprite___visible__P168923.info = {"start":9904,"length":72,"line":359,"column":4,"endLine":361,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"__visible","argumentNames":["this"]} -function sprites_SpriteMap_clear__P168979_mk(s) { +function Sprite___visible__P168923_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_clear__P168979, depth: s.depth + 1, + parent: s, fn: Sprite___visible__P168923, 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, } } @@ -63769,7 +68813,7 @@ function sprites_SpriteMap_clear__P168979_mk(s) { -function sprites_SpriteMap_resizeBuckets__P168978(s) { +function Sprite_data__P168904(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -63779,170 +68823,25 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.maxWidth___194038 = undefined; - s.maxHeight___194039 = undefined; - s.sprite___194041 = undefined; - s.unnamed808___U3 = undefined; - s.unnamed809___U4 = undefined; - s.tMap___194057 = undefined; - s.areaWidth___194061 = undefined; - s.areaHeight___194068 = 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__C168973_VT)) failedCast(r0); - s.maxWidth___194038 = (0); - s.maxHeight___194039 = (0); - s.sprite___194041 = (undefined); - s.unnamed808___U3 = (s.arg1); - s.unnamed809___U4 = (0); - case 1: - s.tmp_0 = r0 = s.unnamed809___U4; - r0 = pxsim_Array__length(s.unnamed808___U3); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 6; continue; } - r0 = pxsim_Array__getAt(s.unnamed808___U3, s.unnamed809___U4); - s.sprite___194041 = (r0); - s.tmp_4 = Sprite_width__P168924_mk(s); - s.tmp_4.arg0 = s.sprite___194041; - s.callLocIdx = 596; s.pc = 11; return s.tmp_4; - case 11: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_3 > s.maxWidth___194038); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 2; continue; } - s.tmp_5 = Sprite_width__P168924_mk(s); - s.tmp_5.arg0 = s.sprite___194041; - s.callLocIdx = 597; s.pc = 12; return s.tmp_5; - case 12: - r0 = s.retval; - s.maxWidth___194038 = (r0); - case 2: - case 3: - s.tmp_2 = Sprite_height__P168925_mk(s); - s.tmp_2.arg0 = s.sprite___194041; - s.callLocIdx = 598; s.pc = 13; return s.tmp_2; - case 13: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_1 > s.maxHeight___194039); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - s.tmp_3 = Sprite_height__P168925_mk(s); - s.tmp_3.arg0 = s.sprite___194041; - s.callLocIdx = 599; s.pc = 14; return s.tmp_3; - case 14: - r0 = s.retval; - s.maxHeight___194039 = (r0); - case 4: - case 5: - r0 = (s.unnamed809___U4 + 1); - s.unnamed809___U4 = (r0); - { step = 1; continue; } - case 6: - s.unnamed808___U3 = (undefined); - s.tmp_0 = game_currentScene__P169526_mk(s); - s.callLocIdx = 600; s.pc = 15; return s.tmp_0; - case 15: - r0 = s.retval; - r0 = r0.fields["tileMap"]; - s.tMap___194057 = (r0); - r0 = pxsim_numops_toBoolDecr(s.tMap___194057); - if (!r0) { step = 7; continue; } - s.tmp_0 = tiles_TileMap_areaWidth__P169270_mk(s); - s.tmp_0.arg0 = s.tMap___194057; - s.callLocIdx = 601; s.pc = 16; return s.tmp_0; - case 16: - r0 = s.retval; - { step = 8; continue; } - case 7: - r0 = pxsim_ImageMethods.width(globals.screen___168559); - case 8: - // jmp value (already in r0) - s.tmp_1 = r0; - s.areaWidth___194061 = (s.tmp_1); - r0 = pxsim_numops_toBoolDecr(s.tMap___194057); - if (!r0) { step = 9; continue; } - s.tmp_0 = tiles_TileMap_areaHeight__P169271_mk(s); - s.tmp_0.arg0 = s.tMap___194057; - s.callLocIdx = 602; s.pc = 17; return s.tmp_0; - case 17: - r0 = s.retval; - { step = 10; continue; } - case 9: - r0 = pxsim_ImageMethods.height(globals.screen___168559); - case 10: - // jmp value (already in r0) - s.tmp_1 = r0; - s.areaHeight___194068 = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = Math_clamp__P166654_mk(s); - s.tmp_2.arg0 = 8; - r0 = (s.areaWidth___194061 >> 2); - s.tmp_2.arg1 = r0; - r0 = (s.maxWidth___194038 * 2); - s.tmp_2.arg2 = r0; - s.callLocIdx = 603; 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__P166654_mk(s); - s.tmp_2.arg0 = 8; - r0 = (s.areaHeight___194068 >> 2); - s.tmp_2.arg1 = r0; - r0 = (s.maxHeight___194039 * 2); - s.tmp_2.arg2 = r0; - s.callLocIdx = 604; s.pc = 19; return s.tmp_2; - case 19: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["cellHeight"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["cellHeight"]; - s.tmp_2 = r0; - r0 = pxsim.Math_.idiv(s.areaHeight___194068, 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___194061, s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["columnCount"] = (s.tmp_1); + if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); + r0 = (s.arg0).fields["_data"] = (s.arg1); r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_SpriteMap_resizeBuckets__P168978.info = {"start":1696,"length":826,"line":52,"column":8,"endLine":70,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"resizeBuckets","argumentNames":["this","sprites"]} +Sprite_data__P168904.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_SpriteMap_resizeBuckets__P168978_mk(s) { +function Sprite_data__P168904_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_resizeBuckets__P168978, depth: s.depth + 1, + parent: s, fn: Sprite_data__P168904, depth: s.depth + 1, pc: 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___194038: undefined, - maxHeight___194039: undefined, - sprite___194041: undefined, - unnamed808___U3: undefined, - unnamed809___U4: undefined, - tMap___194057: undefined, - areaWidth___194061: undefined, - areaHeight___194068: undefined, arg0: undefined, arg1: undefined, } } @@ -63951,7 +68850,7 @@ function sprites_SpriteMap_resizeBuckets__P168978_mk(s) { -function Sprite_clearObstacles__P168952(s) { +function sprites_BaseSprite___update__P168629(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -63963,35 +68862,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, Sprite__C168868_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); + if (!checkSubtype(r0, sprites_BaseSprite__C168621_VT)) failedCast(r0); r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_clearObstacles__P168952.info = {"start":24932,"length":54,"line":813,"column":4,"endLine":815,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"clearObstacles","argumentNames":["this"]} +sprites_BaseSprite___update__P168629.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 Sprite_clearObstacles__P168952_mk(s) { +function sprites_BaseSprite___update__P168629_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_clearObstacles__P168952, depth: s.depth + 1, + parent: s, fn: sprites_BaseSprite___update__P168629, 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 Fx_idiv__P166690(s) { +function animation_MovementAnimation_constructor__P169887(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -64004,28 +68901,65 @@ 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 = pxsim.Math_.idiv(s.arg0, s.arg1); + r0 = s.arg0; + if (!checkSubtype(r0, animation_MovementAnimation__C169886_VT)) failedCast(r0); + r0 = (s.arg0).fields["path"] = (s.arg2); + r0 = (s.arg0).fields["nodeInterval"] = (s.arg3); + s.tmp_0 = animation_SpriteAnimation_constructor__P169880_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.tmp_0.arg2 = s.arg4; + s.callLocIdx = 1775; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = Sprite_x__P168881_mk(s); + s.tmp_2.arg0 = s.arg1; + s.callLocIdx = 1776; s.pc = 2; return s.tmp_2; + case 2: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["startX"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = Sprite_y__P168883_mk(s); + s.tmp_2.arg0 = s.arg1; + s.callLocIdx = 1777; s.pc = 3; return s.tmp_2; + case 3: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["startY"] = (s.tmp_1); + r0 = (s.arg0).fields["elapsedTime"] = (0); + r0 = undefined; return leave(s, r0) default: oops() } } } -Fx_idiv__P166690.info = {"start":1279,"length":111,"line":38,"column":4,"endLine":40,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"idiv","argumentNames":["a","b"]} +animation_MovementAnimation_constructor__P169887.info = {"start":20275,"length":244,"line":555,"column":8,"endLine":560,"endColumn":9,"fileName":"pxt_modules/game/animation.ts","functionName":"inline","argumentNames":["this","sprite","path","nodeInterval","loop"]} -function Fx_idiv__P166690_mk(s) { +function animation_MovementAnimation_constructor__P169887_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_idiv__P166690, depth: s.depth + 1, + parent: s, fn: animation_MovementAnimation_constructor__P169887, 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_draw__P169065(s) { +function animation_MovementAnimation_update__P169888(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -64035,30 +68969,95 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.result___194831 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C169054_VT)) failedCast(r0); - s.tmp_0 = sprites_SpriteMap_draw__P168977_mk(s); - r0 = s.arg0.fields["map"]; + if (!checkSubtype(r0, animation_MovementAnimation__C169886_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = s.tmp_0.fields["elapsedTime"]; + s.tmp_2 = r0; + s.tmp_4 = game_eventContext__P169529_mk(s); + s.callLocIdx = 1778; s.pc = 6; return s.tmp_4; + case 6: + r0 = s.retval; + r0 = r0.fields["deltaTimeMillis"]; + s.tmp_3 = r0; + r0 = (s.tmp_2 + s.tmp_3); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["elapsedTime"] = (s.tmp_1); + s.tmp_0 = animation_Path_run__P169878_mk(s); + r0 = s.arg0.fields["path"]; s.tmp_0.arg0 = r0; - s.callLocIdx = 646; s.pc = 1; return s.tmp_0; + r0 = s.arg0.fields["nodeInterval"]; + s.tmp_0.arg1 = r0; + r0 = s.arg0.fields["sprite"]; + s.tmp_0.arg2 = r0; + r0 = s.arg0.fields["elapsedTime"]; + s.tmp_0.arg3 = r0; + s.callLocIdx = 1779; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + s.result___194831 = (r0); + r0 = pxsim_numops_toBoolDecr(s.result___194831); + if (!r0) { step = 3; continue; } + r0 = s.arg0.fields["loop"]; + 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 = true; + { step = 5; continue; } case 1: + case 2: + r0 = (s.arg0).fields["elapsedTime"] = (0); + s.tmp_0 = animation_Path_reset__P169877_mk(s); + r0 = s.arg0.fields["path"]; + s.tmp_0.arg0 = r0; + s.callLocIdx = 1780; s.pc = 8; return s.tmp_0; + case 8: r0 = s.retval; - r0 = undefined; + s.tmp_0 = Sprite_x__P168882_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_0.arg0 = r0; + r0 = s.arg0.fields["startX"]; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1781; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; + s.tmp_0 = Sprite_y__P168884_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_0.arg0 = r0; + r0 = s.arg0.fields["startY"]; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1782; s.pc = 10; return s.tmp_0; + case 10: + r0 = s.retval; + case 3: + case 4: + r0 = false; + case 5: return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_draw__P169065.info = {"start":2777,"length":39,"line":108,"column":4,"endLine":110,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"draw","argumentNames":["this"]} +animation_MovementAnimation_update__P169888.info = {"start":20529,"length":470,"line":562,"column":8,"endLine":574,"endColumn":9,"fileName":"pxt_modules/game/animation.ts","functionName":"update","argumentNames":["this"]} -function ArcadePhysicsEngine_draw__P169065_mk(s) { +function animation_MovementAnimation_update__P169888_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_draw__P169065, depth: s.depth + 1, + parent: s, fn: animation_MovementAnimation_update__P169888, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + result___194831: undefined, arg0: undefined, } } @@ -64066,7 +69065,7 @@ function ArcadePhysicsEngine_draw__P169065_mk(s) { -function sprites_SpriteMap_draw__P168977(s) { +function animation_Path_run__P169878(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -64076,156 +69075,167 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.x___194336 = undefined; - s.y___194342 = undefined; - s.left___194348 = undefined; - s.top___194353 = undefined; - s.k___194358 = undefined; - s.b___194363 = undefined; + s.nodeIndex___194903 = undefined; + s.nodeTime___194909 = 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__C168973_VT)) failedCast(r0); - s.x___194336 = (0); - case 1: - r0 = s.arg0.fields["columnCount"]; + if (!checkSubtype(r0, animation_Path__C169874_VT)) failedCast(r0); + r0 = (s.arg3 / s.arg1); + s.tmp_0 = r0; + r0 = pxsim.Math_.floor(s.tmp_0); + s.nodeIndex___194903 = (r0); + r0 = (s.arg3 % s.arg1); + s.nodeTime___194909 = (r0); + r0 = s.arg0.fields["startX"]; s.tmp_1 = r0; - r0 = (s.x___194336 < s.tmp_1); + r0 = (s.tmp_1 === undefined); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 8; continue; } - s.y___194342 = (0); + if (!r0) { step = 1; continue; } + s.tmp_2 = r0 = s.arg0; + s.tmp_4 = Sprite_x__P168881_mk(s); + s.tmp_4.arg0 = s.arg2; + s.callLocIdx = 1723; s.pc = 10; return s.tmp_4; + case 10: + r0 = s.retval; + s.tmp_3 = r0; + r0 = (s.tmp_2).fields["startX"] = (s.tmp_3); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = Sprite_y__P168883_mk(s); + s.tmp_2.arg0 = s.arg2; + s.callLocIdx = 1724; s.pc = 11; return s.tmp_2; + case 11: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["startY"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = Sprite_x__P168881_mk(s); + s.tmp_2.arg0 = s.arg2; + s.callLocIdx = 1725; s.pc = 12; return s.tmp_2; + case 12: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["lastX"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = Sprite_y__P168883_mk(s); + s.tmp_2.arg0 = s.arg2; + s.callLocIdx = 1726; s.pc = 13; return s.tmp_2; + case 13: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["lastY"] = (s.tmp_1); + r0 = (s.arg0).fields["commandIndex"] = (0); + s.tmp_0 = animation_Path_readNextCommand__P172879_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1727; s.pc = 14; return s.tmp_0; + case 14: + r0 = s.retval; + case 1: case 2: - r0 = s.arg0.fields["rowCount"]; + case 3: + r0 = s.arg0.fields["commandIndex"]; s.tmp_1 = r0; - r0 = (s.y___194342 < s.tmp_1); + r0 = (s.tmp_1 < s.nodeIndex___194903); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - r0 = s.arg0.fields["cellWidth"]; + if (!r0) { step = 6; continue; } + r0 = s.arg0.fields["currentCommand"]; s.tmp_2 = r0; - r0 = (s.x___194336 * s.tmp_2); - s.left___194348 = (r0); - r0 = s.arg0.fields["cellHeight"]; - s.tmp_0 = r0; - r0 = (s.y___194342 * s.tmp_0); - s.top___194353 = (r0); - s.tmp_0 = sprites_SpriteMap_key__P172273_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.left___194348; - s.tmp_0.arg2 = s.top___194353; - s.callLocIdx = 594; s.pc = 9; return s.tmp_0; - case 9: + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 4; continue; } + s.tmp_3 = animation_Path_runCurrentCommand__P172882_mk(s); + s.tmp_3.arg0 = s.arg0; + s.tmp_3.arg1 = s.arg2; + s.tmp_3.arg2 = s.arg1; + s.tmp_3.arg3 = s.arg1; + s.callLocIdx = 1728; s.pc = 15; return s.tmp_3; + case 15: + r0 = s.retval; + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = Sprite_x__P168881_mk(s); + s.tmp_2.arg0 = s.arg2; + s.callLocIdx = 1729; s.pc = 16; return s.tmp_2; + case 16: r0 = s.retval; - s.k___194358 = (r0); - r0 = s.arg0.fields["buckets"]; - s.tmp_0 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.k___194358); - s.b___194363 = (r0); - s.tmp_0 = r0 = s.b___194363; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 3; continue; } - r0 = s.tmp_0; - { step = 4; continue; } - case 3: - r0 = pxsim_Array__length(s.b___194363); - 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__P168486_mk(s); - s.tmp_2.arg0 = globals.screen___168559; - s.tmp_2.arg1 = s.left___194348; - s.tmp_2.arg2 = s.top___194353; - 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 = 595; s.pc = 10; return s.tmp_2; - case 10: + r0 = (s.tmp_0).fields["lastX"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = Sprite_y__P168883_mk(s); + s.tmp_2.arg0 = s.arg2; + s.callLocIdx = 1730; s.pc = 17; return s.tmp_2; + case 17: r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["lastY"] = (s.tmp_1); + case 4: case 5: + s.tmp_0 = r0 = s.arg0; + r0 = s.tmp_0.fields["commandIndex"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + 1); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["commandIndex"] = (s.tmp_1); + s.tmp_0 = animation_Path_readNextCommand__P172879_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1731; s.pc = 18; return s.tmp_0; + case 18: + r0 = s.retval; + { step = 3; continue; } case 6: - r0 = (s.y___194342 + 1); - s.y___194342 = (r0); - { step = 2; continue; } + r0 = s.arg0.fields["length"]; + s.tmp_1 = r0; + r0 = (s.nodeIndex___194903 >= s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; continue; } + r0 = true; + { step = 9; continue; } case 7: - r0 = (s.x___194336 + 1); - s.x___194336 = (r0); - { step = 1; continue; } case 8: - r0 = undefined; + s.tmp_2 = animation_Path_runCurrentCommand__P172882_mk(s); + s.tmp_2.arg0 = s.arg0; + s.tmp_2.arg1 = s.arg2; + s.tmp_2.arg2 = s.nodeTime___194909; + s.tmp_2.arg3 = s.arg1; + s.callLocIdx = 1732; s.pc = 19; return s.tmp_2; + case 19: + r0 = s.retval; + r0 = false; + case 9: return leave(s, r0) default: oops() } } } -sprites_SpriteMap_draw__P168977.info = {"start":1122,"length":496,"line":36,"column":8,"endLine":47,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"draw","argumentNames":["this"]} +animation_Path_run__P169878.info = {"start":4368,"length":1111,"line":150,"column":8,"endLine":179,"endColumn":9,"fileName":"pxt_modules/game/animation.ts","functionName":"run","argumentNames":["this","interval","target","runningTime"]} -function sprites_SpriteMap_draw__P168977_mk(s) { +function animation_Path_run__P169878_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_draw__P168977, depth: s.depth + 1, + parent: s, fn: animation_Path_run__P169878, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - x___194336: undefined, - y___194342: undefined, - left___194348: undefined, - top___194353: undefined, - k___194358: undefined, - b___194363: undefined, - arg0: undefined, -} } - - - - - -function ArcadePhysicsEngine_removeSprite__P169064(s) { -let r0 = s.r0, 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__C169054_VT)) failedCast(r0); - r0 = s.arg0.fields["sprites"]; - s.tmp_0 = r0; - r0 = pxsim_Array_.removeElement(s.tmp_0, s.arg1); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -ArcadePhysicsEngine_removeSprite__P169064.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__P169064_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: ArcadePhysicsEngine_removeSprite__P169064, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, + tmp_3: undefined, + tmp_4: undefined, + nodeIndex___194903: undefined, + nodeTime___194909: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function ArcadePhysicsEngine_addSprite__P169063(s) { +function animation_Path_runCurrentCommand__P172882(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -64235,58 +69245,841 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tm___194400 = 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__C169054_VT)) failedCast(r0); - r0 = s.arg0.fields["sprites"]; + if (!checkSubtype(r0, animation_Path__C169874_VT)) failedCast(r0); + r0 = s.arg0.fields["currentCommand"]; s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.arg1); - s.tmp_0 = game_currentScene__P169526_mk(s); - s.callLocIdx = 644; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - r0 = r0.fields["tileMap"]; - s.tm___194400 = (r0); - s.tmp_0 = r0 = s.tm___194400; - r0 = pxsim_numops_toBool(s.tmp_0); + r0 = pxsim_pxtcore.switch_eq("M", s.tmp_0); if (r0) { step = 1; continue; } + r0 = pxsim_pxtcore.switch_eq("m", s.tmp_0); + if (r0) { step = 2; continue; } + r0 = pxsim_pxtcore.switch_eq("L", s.tmp_0); + if (r0) { step = 3; continue; } + r0 = pxsim_pxtcore.switch_eq("l", s.tmp_0); + if (r0) { step = 4; continue; } + r0 = pxsim_pxtcore.switch_eq("H", s.tmp_0); + if (r0) { step = 5; continue; } + r0 = pxsim_pxtcore.switch_eq("h", s.tmp_0); + if (r0) { step = 6; continue; } + r0 = pxsim_pxtcore.switch_eq("V", s.tmp_0); + if (r0) { step = 7; continue; } + r0 = pxsim_pxtcore.switch_eq("v", s.tmp_0); + if (r0) { step = 8; continue; } + r0 = pxsim_pxtcore.switch_eq("Q", s.tmp_0); + if (r0) { step = 9; continue; } + r0 = pxsim_pxtcore.switch_eq("q", s.tmp_0); + if (r0) { step = 10; continue; } + r0 = pxsim_pxtcore.switch_eq("T", s.tmp_0); + if (r0) { step = 11; continue; } + r0 = pxsim_pxtcore.switch_eq("t", s.tmp_0); + if (r0) { step = 14; continue; } + r0 = pxsim_pxtcore.switch_eq("C", s.tmp_0); + if (r0) { step = 17; continue; } + r0 = pxsim_pxtcore.switch_eq("c", s.tmp_0); + if (r0) { step = 18; continue; } + r0 = pxsim_pxtcore.switch_eq("S", s.tmp_0); + if (r0) { step = 19; continue; } + r0 = pxsim_pxtcore.switch_eq("s", s.tmp_0); + if (r0) { step = 22; continue; } + r0 = pxsim_pxtcore.switch_eq("Z", s.tmp_0); + if (r0) { step = 25; continue; } + r0 = pxsim_pxtcore.switch_eq("z", s.tmp_0); + if (r0) { step = 26; continue; } r0 = s.tmp_0; - { step = 2; continue; } + { step = 27; continue; } case 1: - s.tmp_1 = tiles_TileMap_isOnWall__P169285_mk(s); - s.tmp_1.arg0 = s.tm___194400; - s.tmp_1.arg1 = s.arg1; - s.callLocIdx = 645; s.pc = 6; return s.tmp_1; + r0 = (s.arg0).fields["lastControlX"] = (undefined); + r0 = (s.arg0).fields["lastControlY"] = (undefined); + s.tmp_0 = animation_moveTo__P172884_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = s.arg2; + s.tmp_0.arg2 = s.arg3; + r0 = s.arg0.fields["args"]; + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_1, 0); + s.tmp_0.arg3 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_2, 1); + s.tmp_0.arg4 = r0; + s.callLocIdx = 1733; s.pc = 28; return s.tmp_0; + case 28: + r0 = s.retval; + { step = 27; continue; } + case 2: + r0 = (s.arg0).fields["lastControlX"] = (undefined); + r0 = (s.arg0).fields["lastControlY"] = (undefined); + s.tmp_0 = animation_moveTo__P172884_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = s.arg2; + s.tmp_0.arg2 = s.arg3; + r0 = s.arg0.fields["args"]; + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_2, 0); + s.tmp_1 = r0; + r0 = s.arg0.fields["lastX"]; + s.tmp_3 = r0; + r0 = (s.tmp_1 + s.tmp_3); + s.tmp_0.arg3 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_5 = r0; + r0 = pxsim_Array__getAt(s.tmp_5, 1); + s.tmp_4 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_6 = r0; + r0 = (s.tmp_4 + s.tmp_6); + s.tmp_0.arg4 = r0; + s.callLocIdx = 1734; s.pc = 29; return s.tmp_0; + case 29: + r0 = s.retval; + { step = 27; continue; } + case 3: + r0 = (s.arg0).fields["lastControlX"] = (undefined); + r0 = (s.arg0).fields["lastControlY"] = (undefined); + s.tmp_0 = animation_lineTo__P172885_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = s.arg2; + s.tmp_0.arg2 = s.arg3; + r0 = s.arg0.fields["lastX"]; + s.tmp_0.arg3 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_0.arg4 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_1, 0); + s.tmp_0.arg5 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_2, 1); + s.tmp_0.arg6 = r0; + s.callLocIdx = 1735; s.pc = 30; return s.tmp_0; + case 30: + r0 = s.retval; + { step = 27; continue; } + case 4: + r0 = (s.arg0).fields["lastControlX"] = (undefined); + r0 = (s.arg0).fields["lastControlY"] = (undefined); + s.tmp_0 = animation_lineTo__P172885_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = s.arg2; + s.tmp_0.arg2 = s.arg3; + r0 = s.arg0.fields["lastX"]; + s.tmp_0.arg3 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_0.arg4 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_2, 0); + s.tmp_1 = r0; + r0 = s.arg0.fields["lastX"]; + s.tmp_3 = r0; + r0 = (s.tmp_1 + s.tmp_3); + s.tmp_0.arg5 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_5 = r0; + r0 = pxsim_Array__getAt(s.tmp_5, 1); + s.tmp_4 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_6 = r0; + r0 = (s.tmp_4 + s.tmp_6); + s.tmp_0.arg6 = r0; + s.callLocIdx = 1736; s.pc = 31; return s.tmp_0; + case 31: + r0 = s.retval; + { step = 27; continue; } + case 5: + r0 = (s.arg0).fields["lastControlX"] = (undefined); + r0 = (s.arg0).fields["lastControlY"] = (undefined); + s.tmp_0 = animation_lineTo__P172885_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = s.arg2; + s.tmp_0.arg2 = s.arg3; + r0 = s.arg0.fields["lastX"]; + s.tmp_0.arg3 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_0.arg4 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_1, 0); + s.tmp_0.arg5 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_0.arg6 = r0; + s.callLocIdx = 1737; s.pc = 32; return s.tmp_0; + case 32: + r0 = s.retval; + { step = 27; continue; } case 6: + r0 = (s.arg0).fields["lastControlX"] = (undefined); + r0 = (s.arg0).fields["lastControlY"] = (undefined); + s.tmp_0 = animation_lineTo__P172885_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = s.arg2; + s.tmp_0.arg2 = s.arg3; + r0 = s.arg0.fields["lastX"]; + s.tmp_0.arg3 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_0.arg4 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_2, 0); + s.tmp_1 = r0; + r0 = s.arg0.fields["lastX"]; + s.tmp_3 = r0; + r0 = (s.tmp_1 + s.tmp_3); + s.tmp_0.arg5 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_0.arg6 = r0; + s.callLocIdx = 1738; s.pc = 33; return s.tmp_0; + case 33: + r0 = s.retval; + { step = 27; continue; } + case 7: + r0 = (s.arg0).fields["lastControlX"] = (undefined); + r0 = (s.arg0).fields["lastControlY"] = (undefined); + s.tmp_0 = animation_lineTo__P172885_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = s.arg2; + s.tmp_0.arg2 = s.arg3; + r0 = s.arg0.fields["lastX"]; + s.tmp_0.arg3 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_0.arg4 = r0; + r0 = s.arg0.fields["lastX"]; + s.tmp_0.arg5 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_1, 0); + s.tmp_0.arg6 = r0; + s.callLocIdx = 1739; s.pc = 34; return s.tmp_0; + case 34: + r0 = s.retval; + { step = 27; continue; } + case 8: + r0 = (s.arg0).fields["lastControlX"] = (undefined); + r0 = (s.arg0).fields["lastControlY"] = (undefined); + s.tmp_0 = animation_lineTo__P172885_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = s.arg2; + s.tmp_0.arg2 = s.arg3; + r0 = s.arg0.fields["lastX"]; + s.tmp_0.arg3 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_0.arg4 = r0; + r0 = s.arg0.fields["lastX"]; + s.tmp_0.arg5 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_2, 0); + s.tmp_1 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_3 = r0; + r0 = (s.tmp_1 + s.tmp_3); + s.tmp_0.arg6 = r0; + s.callLocIdx = 1740; s.pc = 35; return s.tmp_0; + case 35: + r0 = s.retval; + { step = 27; continue; } + case 9: + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["args"]; + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_2, 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["lastControlX"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["args"]; + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_2, 1); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["lastControlY"] = (s.tmp_1); + s.tmp_0 = animation_quadraticCurveTo__P172886_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = s.arg2; + s.tmp_0.arg2 = s.arg3; + r0 = s.arg0.fields["lastX"]; + s.tmp_0.arg3 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_0.arg4 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_1, 0); + s.tmp_0.arg5 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_2, 1); + s.tmp_0.arg6 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_3 = r0; + r0 = pxsim_Array__getAt(s.tmp_3, 2); + s.tmp_0.arg7 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_4 = r0; + r0 = pxsim_Array__getAt(s.tmp_4, 3); + s.tmp_0.arg8 = r0; + s.callLocIdx = 1741; s.pc = 36; return s.tmp_0; + case 36: + r0 = s.retval; + { step = 27; continue; } + case 10: + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["args"]; + s.tmp_3 = r0; + r0 = pxsim_Array__getAt(s.tmp_3, 0); + s.tmp_2 = r0; + r0 = s.arg0.fields["lastX"]; + s.tmp_4 = r0; + r0 = (s.tmp_2 + s.tmp_4); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["lastControlX"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["args"]; + s.tmp_3 = r0; + r0 = pxsim_Array__getAt(s.tmp_3, 1); + s.tmp_2 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_4 = r0; + r0 = (s.tmp_2 + s.tmp_4); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["lastControlY"] = (s.tmp_1); + s.tmp_0 = animation_quadraticCurveTo__P172886_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = s.arg2; + s.tmp_0.arg2 = s.arg3; + r0 = s.arg0.fields["lastX"]; + s.tmp_0.arg3 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_0.arg4 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_2, 0); + s.tmp_1 = r0; + r0 = s.arg0.fields["lastX"]; + s.tmp_3 = r0; + r0 = (s.tmp_1 + s.tmp_3); + s.tmp_0.arg5 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_5 = r0; + r0 = pxsim_Array__getAt(s.tmp_5, 1); + s.tmp_4 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_6 = r0; + r0 = (s.tmp_4 + s.tmp_6); + s.tmp_0.arg6 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_8 = r0; + r0 = pxsim_Array__getAt(s.tmp_8, 2); + s.tmp_7 = r0; + r0 = s.arg0.fields["lastX"]; + s.tmp_9 = r0; + r0 = (s.tmp_7 + s.tmp_9); + s.tmp_0.arg7 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_11 = r0; + r0 = pxsim_Array__getAt(s.tmp_11, 3); + s.tmp_10 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_12 = r0; + r0 = (s.tmp_10 + s.tmp_12); + s.tmp_0.arg8 = r0; + s.callLocIdx = 1742; s.pc = 37; return s.tmp_0; + case 37: + r0 = s.retval; + { step = 27; continue; } + case 11: + s.tmp_0 = animation_Path_ensureControlPoint__P172883_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1743; s.pc = 38; return s.tmp_0; + case 38: + r0 = s.retval; + s.tmp_0 = animation_quadraticCurveTo__P172886_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = s.arg2; + s.tmp_0.arg2 = s.arg3; + r0 = s.arg0.fields["lastX"]; + s.tmp_0.arg3 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_0.arg4 = r0; + r0 = s.arg0.fields["lastX"]; + s.tmp_2 = r0; + r0 = s.arg0.fields["lastX"]; + s.tmp_3 = r0; + r0 = (s.tmp_2 + s.tmp_3); + s.tmp_1 = r0; + r0 = s.arg0.fields["lastControlX"]; + s.tmp_4 = r0; + r0 = (s.tmp_1 - s.tmp_4); + s.tmp_0.arg5 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_6 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_7 = r0; + r0 = (s.tmp_6 + s.tmp_7); + s.tmp_5 = r0; + r0 = s.arg0.fields["lastControlY"]; + s.tmp_8 = r0; + r0 = (s.tmp_5 - s.tmp_8); + s.tmp_0.arg6 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_9 = r0; + r0 = pxsim_Array__getAt(s.tmp_9, 0); + s.tmp_0.arg7 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_10 = r0; + r0 = pxsim_Array__getAt(s.tmp_10, 1); + s.tmp_0.arg8 = r0; + s.callLocIdx = 1744; s.pc = 39; return s.tmp_0; + case 39: + r0 = s.retval; + r0 = (s.arg2 === s.arg3); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 12; continue; } + s.tmp_1 = r0 = s.arg0; + r0 = s.arg0.fields["lastX"]; + s.tmp_4 = r0; + r0 = s.arg0.fields["lastX"]; + s.tmp_5 = r0; + r0 = (s.tmp_4 + s.tmp_5); + s.tmp_3 = r0; + r0 = s.arg0.fields["lastControlX"]; + s.tmp_6 = r0; + r0 = (s.tmp_3 - s.tmp_6); + s.tmp_2 = r0; + r0 = (s.tmp_1).fields["lastControlX"] = (s.tmp_2); + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["lastY"]; + s.tmp_3 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_4 = r0; + r0 = (s.tmp_3 + s.tmp_4); + s.tmp_2 = r0; + r0 = s.arg0.fields["lastControlY"]; + s.tmp_5 = r0; + r0 = (s.tmp_2 - s.tmp_5); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["lastControlY"] = (s.tmp_1); + case 12: + case 13: + { step = 27; continue; } + case 14: + s.tmp_0 = animation_Path_ensureControlPoint__P172883_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1745; s.pc = 40; return s.tmp_0; + case 40: + r0 = s.retval; + s.tmp_0 = animation_quadraticCurveTo__P172886_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = s.arg2; + s.tmp_0.arg2 = s.arg3; + r0 = s.arg0.fields["lastX"]; + s.tmp_0.arg3 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_0.arg4 = r0; + r0 = s.arg0.fields["lastX"]; + s.tmp_2 = r0; + r0 = s.arg0.fields["lastX"]; + s.tmp_3 = r0; + r0 = (s.tmp_2 + s.tmp_3); + s.tmp_1 = r0; + r0 = s.arg0.fields["lastControlX"]; + s.tmp_4 = r0; + r0 = (s.tmp_1 - s.tmp_4); + s.tmp_0.arg5 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_6 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_7 = r0; + r0 = (s.tmp_6 + s.tmp_7); + s.tmp_5 = r0; + r0 = s.arg0.fields["lastControlY"]; + s.tmp_8 = r0; + r0 = (s.tmp_5 - s.tmp_8); + s.tmp_0.arg6 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_10 = r0; + r0 = pxsim_Array__getAt(s.tmp_10, 0); + s.tmp_9 = r0; + r0 = s.arg0.fields["lastX"]; + s.tmp_11 = r0; + r0 = (s.tmp_9 + s.tmp_11); + s.tmp_0.arg7 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_13 = r0; + r0 = pxsim_Array__getAt(s.tmp_13, 1); + s.tmp_12 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_14 = r0; + r0 = (s.tmp_12 + s.tmp_14); + s.tmp_0.arg8 = r0; + s.callLocIdx = 1746; s.pc = 41; return s.tmp_0; + case 41: + r0 = s.retval; + r0 = (s.arg2 === s.arg3); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 15; continue; } + s.tmp_1 = r0 = s.arg0; + r0 = s.arg0.fields["lastX"]; + s.tmp_4 = r0; + r0 = s.arg0.fields["lastX"]; + s.tmp_5 = r0; + r0 = (s.tmp_4 + s.tmp_5); + s.tmp_3 = r0; + r0 = s.arg0.fields["lastControlX"]; + s.tmp_6 = r0; + r0 = (s.tmp_3 - s.tmp_6); + s.tmp_2 = r0; + r0 = (s.tmp_1).fields["lastControlX"] = (s.tmp_2); + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["lastY"]; + s.tmp_3 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_4 = r0; + r0 = (s.tmp_3 + s.tmp_4); + s.tmp_2 = r0; + r0 = s.arg0.fields["lastControlY"]; + s.tmp_5 = r0; + r0 = (s.tmp_2 - s.tmp_5); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["lastControlY"] = (s.tmp_1); + case 15: + case 16: + { step = 27; continue; } + case 17: + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["args"]; + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_2, 2); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["lastControlX"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["args"]; + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_2, 3); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["lastControlY"] = (s.tmp_1); + s.tmp_0 = animation_cubicCurveTo__P172887_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = s.arg2; + s.tmp_0.arg2 = s.arg3; + r0 = s.arg0.fields["lastX"]; + s.tmp_0.arg3 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_0.arg4 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_1, 0); + s.tmp_0.arg5 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_2, 1); + s.tmp_0.arg6 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_3 = r0; + r0 = pxsim_Array__getAt(s.tmp_3, 2); + s.tmp_0.arg7 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_4 = r0; + r0 = pxsim_Array__getAt(s.tmp_4, 3); + s.tmp_0.arg8 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_5 = r0; + r0 = pxsim_Array__getAt(s.tmp_5, 4); + s.tmp_0.arg9 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_6 = r0; + r0 = pxsim_Array__getAt(s.tmp_6, 5); + s.tmp_0.arg10 = r0; + s.callLocIdx = 1747; s.pc = 42; return s.tmp_0; + case 42: + r0 = s.retval; + { step = 27; continue; } + case 18: + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["args"]; + s.tmp_3 = r0; + r0 = pxsim_Array__getAt(s.tmp_3, 2); + s.tmp_2 = r0; + r0 = s.arg0.fields["lastX"]; + s.tmp_4 = r0; + r0 = (s.tmp_2 + s.tmp_4); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["lastControlX"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["args"]; + s.tmp_3 = r0; + r0 = pxsim_Array__getAt(s.tmp_3, 3); + s.tmp_2 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_4 = r0; + r0 = (s.tmp_2 + s.tmp_4); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["lastControlY"] = (s.tmp_1); + s.tmp_0 = animation_cubicCurveTo__P172887_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = s.arg2; + s.tmp_0.arg2 = s.arg3; + r0 = s.arg0.fields["lastX"]; + s.tmp_0.arg3 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_0.arg4 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_2, 0); + s.tmp_1 = r0; + r0 = s.arg0.fields["lastX"]; + s.tmp_3 = r0; + r0 = (s.tmp_1 + s.tmp_3); + s.tmp_0.arg5 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_5 = r0; + r0 = pxsim_Array__getAt(s.tmp_5, 1); + s.tmp_4 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_6 = r0; + r0 = (s.tmp_4 + s.tmp_6); + s.tmp_0.arg6 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_8 = r0; + r0 = pxsim_Array__getAt(s.tmp_8, 2); + s.tmp_7 = r0; + r0 = s.arg0.fields["lastX"]; + s.tmp_9 = r0; + r0 = (s.tmp_7 + s.tmp_9); + s.tmp_0.arg7 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_11 = r0; + r0 = pxsim_Array__getAt(s.tmp_11, 3); + s.tmp_10 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_12 = r0; + r0 = (s.tmp_10 + s.tmp_12); + s.tmp_0.arg8 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_14 = r0; + r0 = pxsim_Array__getAt(s.tmp_14, 4); + s.tmp_13 = r0; + r0 = s.arg0.fields["lastX"]; + s.tmp_15 = r0; + r0 = (s.tmp_13 + s.tmp_15); + s.tmp_0.arg9 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_17 = r0; + r0 = pxsim_Array__getAt(s.tmp_17, 5); + s.tmp_16 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_18 = r0; + r0 = (s.tmp_16 + s.tmp_18); + s.tmp_0.arg10 = r0; + s.callLocIdx = 1748; s.pc = 43; return s.tmp_0; + case 43: + r0 = s.retval; + { step = 27; continue; } + case 19: + s.tmp_0 = animation_Path_ensureControlPoint__P172883_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1749; s.pc = 44; return s.tmp_0; + case 44: + r0 = s.retval; + s.tmp_0 = animation_cubicCurveTo__P172887_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = s.arg2; + s.tmp_0.arg2 = s.arg3; + r0 = s.arg0.fields["lastX"]; + s.tmp_0.arg3 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_0.arg4 = r0; + r0 = s.arg0.fields["lastX"]; + s.tmp_2 = r0; + r0 = s.arg0.fields["lastX"]; + s.tmp_3 = r0; + r0 = (s.tmp_2 + s.tmp_3); + s.tmp_1 = r0; + r0 = s.arg0.fields["lastControlX"]; + s.tmp_4 = r0; + r0 = (s.tmp_1 - s.tmp_4); + s.tmp_0.arg5 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_6 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_7 = r0; + r0 = (s.tmp_6 + s.tmp_7); + s.tmp_5 = r0; + r0 = s.arg0.fields["lastControlY"]; + s.tmp_8 = r0; + r0 = (s.tmp_5 - s.tmp_8); + s.tmp_0.arg6 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_9 = r0; + r0 = pxsim_Array__getAt(s.tmp_9, 0); + s.tmp_0.arg7 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_10 = r0; + r0 = pxsim_Array__getAt(s.tmp_10, 1); + s.tmp_0.arg8 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_11 = r0; + r0 = pxsim_Array__getAt(s.tmp_11, 2); + s.tmp_0.arg9 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_12 = r0; + r0 = pxsim_Array__getAt(s.tmp_12, 3); + s.tmp_0.arg10 = r0; + s.callLocIdx = 1750; s.pc = 45; return s.tmp_0; + case 45: + r0 = s.retval; + r0 = (s.arg2 === s.arg3); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 20; continue; } + s.tmp_1 = r0 = s.arg0; + r0 = s.arg0.fields["args"]; + s.tmp_3 = r0; + r0 = pxsim_Array__getAt(s.tmp_3, 0); + s.tmp_2 = r0; + r0 = (s.tmp_1).fields["lastControlX"] = (s.tmp_2); + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["args"]; + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_2, 1); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["lastControlY"] = (s.tmp_1); + case 20: + case 21: + { step = 27; continue; } + case 22: + s.tmp_0 = animation_Path_ensureControlPoint__P172883_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1751; s.pc = 46; return s.tmp_0; + case 46: r0 = s.retval; - case 2: - // jmp value (already in r0) + s.tmp_0 = animation_cubicCurveTo__P172887_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = s.arg2; + s.tmp_0.arg2 = s.arg3; + r0 = s.arg0.fields["lastX"]; + s.tmp_0.arg3 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_0.arg4 = r0; + r0 = s.arg0.fields["lastX"]; 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"]; + r0 = s.arg0.fields["lastX"]; + s.tmp_3 = r0; + r0 = (s.tmp_2 + s.tmp_3); + s.tmp_1 = r0; + r0 = s.arg0.fields["lastControlX"]; + s.tmp_4 = r0; + r0 = (s.tmp_1 - s.tmp_4); + s.tmp_0.arg5 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_6 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_7 = r0; + r0 = (s.tmp_6 + s.tmp_7); s.tmp_5 = r0; - r0 = (s.tmp_5 | 256); + r0 = s.arg0.fields["lastControlY"]; + s.tmp_8 = r0; + r0 = (s.tmp_5 - s.tmp_8); + s.tmp_0.arg6 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_10 = r0; + r0 = pxsim_Array__getAt(s.tmp_10, 0); + s.tmp_9 = r0; + r0 = s.arg0.fields["lastX"]; + s.tmp_11 = r0; + r0 = (s.tmp_9 + s.tmp_11); + s.tmp_0.arg7 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_13 = r0; + r0 = pxsim_Array__getAt(s.tmp_13, 1); + s.tmp_12 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_14 = r0; + r0 = (s.tmp_12 + s.tmp_14); + s.tmp_0.arg8 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_16 = r0; + r0 = pxsim_Array__getAt(s.tmp_16, 2); + s.tmp_15 = r0; + r0 = s.arg0.fields["lastX"]; + s.tmp_17 = r0; + r0 = (s.tmp_15 + s.tmp_17); + s.tmp_0.arg9 = r0; + r0 = s.arg0.fields["args"]; + s.tmp_19 = r0; + r0 = pxsim_Array__getAt(s.tmp_19, 3); + s.tmp_18 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_20 = r0; + r0 = (s.tmp_18 + s.tmp_20); + s.tmp_0.arg10 = r0; + s.callLocIdx = 1752; s.pc = 47; return s.tmp_0; + case 47: + r0 = s.retval; + r0 = (s.arg2 === s.arg3); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 23; continue; } + s.tmp_1 = r0 = s.arg0; + r0 = s.arg0.fields["args"]; s.tmp_4 = r0; - r0 = (s.tmp_3).fields["flags"] = (s.tmp_4); - case 3: - case 4: + r0 = pxsim_Array__getAt(s.tmp_4, 0); + s.tmp_3 = r0; + r0 = s.arg0.fields["lastX"]; + s.tmp_5 = r0; + r0 = (s.tmp_3 + s.tmp_5); + s.tmp_2 = r0; + r0 = (s.tmp_1).fields["lastControlX"] = (s.tmp_2); + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["args"]; + s.tmp_3 = r0; + r0 = pxsim_Array__getAt(s.tmp_3, 1); + s.tmp_2 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_4 = r0; + r0 = (s.tmp_2 + s.tmp_4); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["lastControlY"] = (s.tmp_1); + case 23: + case 24: + { step = 27; continue; } + case 25: + case 26: + r0 = (s.arg0).fields["lastControlX"] = (undefined); + r0 = (s.arg0).fields["lastControlY"] = (undefined); + s.tmp_0 = animation_lineTo__P172885_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = s.arg2; + s.tmp_0.arg2 = s.arg3; + r0 = s.arg0.fields["lastX"]; + s.tmp_0.arg3 = r0; + r0 = s.arg0.fields["lastY"]; + s.tmp_0.arg4 = r0; + r0 = s.arg0.fields["startX"]; + s.tmp_0.arg5 = r0; + r0 = s.arg0.fields["startY"]; + s.tmp_0.arg6 = r0; + s.callLocIdx = 1753; s.pc = 48; return s.tmp_0; + case 48: + r0 = s.retval; + case 27: r0 = undefined; return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_addSprite__P169063.info = {"start":2465,"length":220,"line":96,"column":4,"endLine":102,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"addSprite","argumentNames":["this","sprite"]} +animation_Path_runCurrentCommand__P172882.info = {"start":5489,"length":10309,"line":181,"column":8,"endLine":438,"endColumn":9,"fileName":"pxt_modules/game/animation.ts","functionName":"runCurrentCommand","argumentNames":["this","target","nodeTime","intervalTime"]} -function ArcadePhysicsEngine_addSprite__P169063_mk(s) { +function animation_Path_runCurrentCommand__P172882_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_addSprite__P169063, depth: s.depth + 1, + parent: s, fn: animation_Path_runCurrentCommand__P172882, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -64294,16 +70087,32 @@ function ArcadePhysicsEngine_addSprite__P169063_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - tm___194400: 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, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function scene_Camera_y__P169318(s) { +function animation_cubicCurveTo__P172887(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -64313,338 +70122,97 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.progress___195547 = undefined; + s.diff___195551 = undefined; + s.a___195555 = undefined; + s.b___195561 = undefined; + s.c___195569 = undefined; + s.d___195577 = 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.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, scene_Camera__C169308_VT)) failedCast(r0); - r0 = s.arg0.fields["_offsetY"]; + r0 = (s.arg1 / s.arg2); + s.progress___195547 = (r0); + r0 = (1 - s.progress___195547); + s.diff___195551 = (r0); + r0 = (s.diff___195551 * s.diff___195551); s.tmp_0 = r0; - r0 = pxsim_ImageMethods.height(globals.screen___168559); - s.tmp_2 = r0; - r0 = (s.tmp_2 >> 1); + r0 = (s.tmp_0 * s.diff___195551); + s.a___195555 = (r0); + r0 = (3 * s.diff___195551); s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - return leaveAccessor(s, r0) - default: oops() -} } } -scene_Camera_y__P169318.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__P169318.isGetter = true; - -function scene_Camera_y__P169318_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: scene_Camera_y__P169318, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - arg0: undefined, -} } - - - - - -function scene_Camera_x__P169317(s) { -let r0 = s.r0, 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__C169308_VT)) failedCast(r0); - r0 = s.arg0.fields["_offsetX"]; + r0 = (s.tmp_1 * s.diff___195551); s.tmp_0 = r0; - r0 = pxsim_ImageMethods.width(globals.screen___168559); - s.tmp_2 = r0; - r0 = (s.tmp_2 >> 1); - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - return leaveAccessor(s, r0) - default: oops() -} } } -scene_Camera_x__P169317.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__P169317.isGetter = true; - -function scene_Camera_x__P169317_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: scene_Camera_x__P169317, 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_ParticleSource_factory__P169696(s) { -let r0 = s.r0, 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__C169678_VT)) failedCast(r0); - r0 = s.arg0.fields["_factory"]; - return leaveAccessor(s, r0) - default: oops() -} } } -particles_ParticleSource_factory__P169696.info = {"start":7951,"length":76,"line":264,"column":8,"endLine":266,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"factory","argumentNames":["this"]} -particles_ParticleSource_factory__P169696.isGetter = true; - -function particles_ParticleSource_factory__P169696_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: particles_ParticleSource_factory__P169696, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function game_Dialog_drawTextCore__P169458(s) { -let r0 = s.r0, 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.lines___194440 = undefined; - s.availableWidth___194446 = undefined; - s.availableHeight___194449 = undefined; - s.charactersPerRow___194452 = undefined; - s.rowsOfCharacters___194460 = undefined; - s.textLeft___194471 = undefined; - s.textTop___194493 = undefined; - s.row___194508 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, game_Dialog__C169448_VT)) failedCast(r0); - r0 = s.arg0.fields["chunks"]; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + r0 = (s.tmp_0 * s.progress___195547); + s.b___195561 = (r0); + r0 = (3 * s.diff___195551); s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = (s.tmp_1 * s.progress___195547); 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["chunks"]; + r0 = (s.tmp_0 * s.progress___195547); + s.c___195569 = (r0); + r0 = (s.progress___195547 * s.progress___195547); + s.tmp_0 = r0; + r0 = (s.tmp_0 * s.progress___195547); + s.d___195577 = (r0); + s.tmp_0 = Sprite_setPosition__P168936_mk(s); + s.tmp_0.arg0 = s.arg0; + r0 = (s.a___195555 * s.arg3); s.tmp_4 = r0; - r0 = pxsim_Array__length(s.tmp_4); - s.tmp_3 = r0; - r0 = (s.tmp_3 === 0); - case 2: - // jmp value (already in r0) + r0 = (s.b___195561 * s.arg5); s.tmp_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); - if (!r0) { step = 3; continue; } - { step = 9; continue; } - case 3: - case 4: - r0 = s.arg0.fields["chunks"]; + r0 = (s.tmp_4 + s.tmp_5); + s.tmp_3 = r0; + r0 = (s.c___195569 * s.arg7); s.tmp_6 = r0; - r0 = s.arg0.fields["chunkIndex"]; - s.tmp_7 = r0; - r0 = pxsim_Array__getAt(s.tmp_6, s.tmp_7); - s.lines___194440 = (r0); - s.tmp_0 = game_BaseDialog_textAreaWidth__P172425_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1225; s.pc = 10; return s.tmp_0; - case 10: - r0 = s.retval; - s.availableWidth___194446 = (r0); - s.tmp_0 = game_BaseDialog_textAreaHeight__P172426_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1226; s.pc = 11; return s.tmp_0; - case 11: - r0 = s.retval; - s.availableHeight___194449 = (r0); - s.tmp_1 = r0 = s.availableWidth___194446; - s.tmp_3 = if_charWidth_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, "charWidth"); - } else { - s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["charWidth"]; - if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["charWidth"]; } - else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } - else { s.callLocIdx = 1227; s.pc = 12; return s.tmp_3; } - } - case 12: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_1 / s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim.Math_.floor(s.tmp_0); - s.charactersPerRow___194452 = (r0); - s.tmp_1 = r0 = s.availableHeight___194449; - s.tmp_3 = game_BaseDialog_rowHeight__P172424_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 1228; s.pc = 13; return s.tmp_3; - case 13: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_1 / s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim.Math_.floor(s.tmp_0); - s.rowsOfCharacters___194460 = (r0); - r0 = s.arg0.fields["unit"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 > 12); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - s.tmp_2 = game_BaseDialog_drawBorder__P172419_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 1229; s.pc = 14; return s.tmp_2; - case 14: - r0 = s.retval; - case 5: - case 6: - r0 = s.arg0.fields["innerLeft"]; + r0 = (s.tmp_3 + s.tmp_6); s.tmp_2 = r0; - r0 = (1 + s.tmp_2); + r0 = (s.d___195577 * s.arg9); + s.tmp_7 = r0; + r0 = (s.tmp_2 + s.tmp_7); s.tmp_1 = r0; - s.tmp_4 = Math_min__P166658_mk(s); - r0 = s.arg0.fields["unit"]; - s.tmp_4.arg0 = r0; - s.tmp_4.arg1 = 12; - s.callLocIdx = 1230; s.pc = 15; return s.tmp_4; - case 15: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_1 + s.tmp_3); - s.tmp_0 = r0; - s.tmp_7 = r0 = s.availableWidth___194446; - s.tmp_9 = r0 = s.charactersPerRow___194452; - s.tmp_11 = if_charWidth_1_mk(s); - r0 = s.arg0.fields["font"]; - s.tmp_11.arg0 = r0; - if (!s.tmp_11.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_11.arg0, "charWidth"); - } else { - s.tmp_11.fn = s.tmp_11.arg0.vtable.iface["charWidth"]; - if (s.tmp_11.fn == null) { s.retval = s.tmp_11.arg0.fields["charWidth"]; } - else if (!s.tmp_11.fn.isGetter) { s.retval = bind(s.tmp_11); } - else { s.callLocIdx = 1231; s.pc = 16; return s.tmp_11; } - } - case 16: - r0 = s.retval; + r0 = pxsim.Math_.round(s.tmp_1); + s.tmp_0.arg1 = r0; + r0 = (s.a___195555 * s.arg4); + s.tmp_11 = r0; + r0 = (s.b___195561 * s.arg6); + s.tmp_12 = r0; + r0 = (s.tmp_11 + s.tmp_12); s.tmp_10 = r0; - r0 = (s.tmp_9 * s.tmp_10); + r0 = (s.c___195569 * s.arg8); + s.tmp_13 = r0; + r0 = (s.tmp_10 + s.tmp_13); + s.tmp_9 = r0; + r0 = (s.d___195577 * s.arg10); + s.tmp_14 = r0; + r0 = (s.tmp_9 + s.tmp_14); s.tmp_8 = r0; - r0 = (s.tmp_7 - s.tmp_8); - s.tmp_6 = r0; - r0 = (s.tmp_6 >> 1); - s.tmp_5 = r0; - r0 = (s.tmp_0 + s.tmp_5); - s.textLeft___194471 = (r0); - r0 = s.arg0.fields["image"]; - s.tmp_3 = r0; - r0 = pxsim_ImageMethods.height(s.tmp_3); - s.tmp_2 = r0; - r0 = (s.tmp_2 >> 1); - s.tmp_1 = r0; - r0 = (1 + s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_Array__length(s.lines___194440); - s.tmp_6 = r0; - s.tmp_8 = game_BaseDialog_rowHeight__P172424_mk(s); - s.tmp_8.arg0 = s.arg0; - s.callLocIdx = 1232; s.pc = 17; return s.tmp_8; - case 17: - r0 = s.retval; - s.tmp_7 = r0; - r0 = (s.tmp_6 * s.tmp_7); - s.tmp_5 = r0; - r0 = (s.tmp_5 >> 1); - s.tmp_4 = r0; - r0 = (s.tmp_0 - s.tmp_4); - s.textTop___194493 = (r0); - s.row___194508 = (0); - case 7: - s.tmp_1 = r0 = s.row___194508; - r0 = pxsim_Array__length(s.lines___194440); - 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 = 8; continue; } - s.tmp_3 = helpers_imagePrint__P168517_mk(s); - r0 = s.arg0.fields["image"]; - s.tmp_3.arg0 = r0; - r0 = pxsim_Array__getAt(s.lines___194440, s.row___194508); - s.tmp_3.arg1 = r0; - s.tmp_3.arg2 = s.textLeft___194471; - s.tmp_4 = r0 = s.textTop___194493; - s.tmp_6 = r0 = s.row___194508; - s.tmp_8 = game_BaseDialog_rowHeight__P172424_mk(s); - s.tmp_8.arg0 = s.arg0; - s.callLocIdx = 1233; s.pc = 19; return s.tmp_8; - case 19: - r0 = s.retval; - s.tmp_7 = r0; - r0 = (s.tmp_6 * s.tmp_7); - s.tmp_5 = r0; - r0 = (s.tmp_4 + s.tmp_5); - s.tmp_3.arg3 = r0; - r0 = s.arg0.fields["textColor"]; - s.tmp_3.arg4 = r0; - r0 = s.arg0.fields["font"]; - s.tmp_3.arg5 = r0; - s.tmp_3.arg6 = undefined; - s.callLocIdx = 1234; s.pc = 18; return s.tmp_3; - case 18: + r0 = pxsim.Math_.round(s.tmp_8); + s.tmp_0.arg2 = r0; + s.callLocIdx = 1757; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - r0 = (s.row___194508 + 1); - s.row___194508 = (r0); - { step = 7; continue; } - case 8: - case 9: r0 = undefined; return leave(s, r0) default: oops() } } } -game_Dialog_drawTextCore__P169458.info = {"start":7867,"length":1045,"line":247,"column":8,"endLine":269,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"drawTextCore","argumentNames":["this"]} +animation_cubicCurveTo__P172887.info = {"start":16933,"length":599,"line":469,"column":4,"endLine":481,"endColumn":5,"fileName":"pxt_modules/game/animation.ts","functionName":"cubicCurveTo","argumentNames":["target","nodeTime","interval","x0","y0","x1","y1","x2","y2","x3","y3"]} -function game_Dialog_drawTextCore__P169458_mk(s) { +function animation_cubicCurveTo__P172887_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_Dialog_drawTextCore__P169458, depth: s.depth + 1, + parent: s, fn: animation_cubicCurveTo__P172887, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -64658,22 +70226,33 @@ function game_Dialog_drawTextCore__P169458_mk(s) { tmp_9: undefined, tmp_10: undefined, tmp_11: undefined, - lines___194440: undefined, - availableWidth___194446: undefined, - availableHeight___194449: undefined, - charactersPerRow___194452: undefined, - rowsOfCharacters___194460: undefined, - textLeft___194471: undefined, - textTop___194493: undefined, - row___194508: undefined, + tmp_12: undefined, + tmp_13: undefined, + tmp_14: undefined, + progress___195547: undefined, + diff___195551: undefined, + a___195555: undefined, + b___195561: undefined, + c___195569: undefined, + d___195577: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, + arg5: undefined, + arg6: undefined, + arg7: undefined, + arg8: undefined, + arg9: undefined, + arg10: undefined, } } -function game_BaseDialog_setText__P169445(s) { +function animation_quadraticCurveTo__P172886(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -64683,33 +70262,107 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.progress___195633 = undefined; + s.diff___195637 = undefined; + s.a___195641 = undefined; + s.b___195645 = undefined; + s.c___195651 = 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.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, game_BaseDialog__C169430_VT)) failedCast(r0); + r0 = (s.arg1 / s.arg2); + s.progress___195633 = (r0); + r0 = (1 - s.progress___195633); + s.diff___195637 = (r0); + r0 = (s.diff___195637 * s.diff___195637); + s.a___195641 = (r0); + r0 = (2 * s.diff___195637); + s.tmp_0 = r0; + r0 = (s.tmp_0 * s.progress___195633); + s.b___195645 = (r0); + r0 = (s.progress___195633 * s.progress___195633); + s.c___195651 = (r0); + s.tmp_0 = Sprite_setPosition__P168936_mk(s); + s.tmp_0.arg0 = s.arg0; + r0 = (s.a___195641 * s.arg3); + s.tmp_3 = r0; + r0 = (s.b___195645 * s.arg5); + s.tmp_4 = r0; + r0 = (s.tmp_3 + s.tmp_4); + s.tmp_2 = r0; + r0 = (s.c___195651 * s.arg7); + s.tmp_5 = r0; + r0 = (s.tmp_2 + s.tmp_5); + s.tmp_1 = r0; + r0 = pxsim.Math_.round(s.tmp_1); + s.tmp_0.arg1 = r0; + r0 = (s.a___195641 * s.arg4); + s.tmp_8 = r0; + r0 = (s.b___195645 * s.arg6); + s.tmp_9 = r0; + r0 = (s.tmp_8 + s.tmp_9); + s.tmp_7 = r0; + r0 = (s.c___195651 * s.arg8); + s.tmp_10 = r0; + r0 = (s.tmp_7 + s.tmp_10); + s.tmp_6 = r0; + r0 = pxsim.Math_.round(s.tmp_6); + s.tmp_0.arg2 = r0; + s.callLocIdx = 1756; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -game_BaseDialog_setText__P169445.info = {"start":2302,"length":77,"line":80,"column":8,"endLine":82,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"setText","argumentNames":["this","rawString"]} +animation_quadraticCurveTo__P172886.info = {"start":16441,"length":486,"line":456,"column":4,"endLine":467,"endColumn":5,"fileName":"pxt_modules/game/animation.ts","functionName":"quadraticCurveTo","argumentNames":["target","nodeTime","interval","x0","y0","x1","y1","x2","y2"]} -function game_BaseDialog_setText__P169445_mk(s) { +function animation_quadraticCurveTo__P172886_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_BaseDialog_setText__P169445, depth: s.depth + 1, + parent: s, fn: animation_quadraticCurveTo__P172886, depth: s.depth + 1, pc: 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, + progress___195633: undefined, + diff___195637: undefined, + a___195641: undefined, + b___195645: undefined, + c___195651: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, + arg5: undefined, + arg6: undefined, + arg7: undefined, + arg8: undefined, } } -function Sprite_toString__P168961(s) { +function animation_lineTo__P172885(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -64721,111 +70374,49 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); + s.arg5 = (s.lambdaArgs[5]); + s.arg6 = (s.lambdaArgs[6]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - r0 = pxsim_String_.mkEmpty(); - s.tmp_9 = r0; - r0 = s.arg0.fields["id"]; - s.tmp_11 = r0; - if ((s.tmp_11) && (s.tmp_11).vtable) { - setupResume(s, 1); - pxsim_String__stringConv(s.tmp_11); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_11) + ""; } - case 1: - r0 = s.retval; - s.tmp_10 = r0; - r0 = pxsim_String__concat(s.tmp_9, s.tmp_10); - s.tmp_8 = r0; - r0 = pxsim_String__concat(s.tmp_8, "("); - s.tmp_7 = r0; - s.tmp_14 = Sprite_x__P168881_mk(s); - s.tmp_14.arg0 = s.arg0; - s.callLocIdx = 547; s.pc = 2; return s.tmp_14; - case 2: - r0 = s.retval; - s.tmp_13 = r0; - if ((s.tmp_13) && (s.tmp_13).vtable) { - setupResume(s, 3); - pxsim_String__stringConv(s.tmp_13); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_13) + ""; } - case 3: - r0 = s.retval; - s.tmp_12 = r0; - r0 = pxsim_String__concat(s.tmp_7, s.tmp_12); - s.tmp_6 = r0; - r0 = pxsim_String__concat(s.tmp_6, ","); - s.tmp_5 = r0; - s.tmp_17 = Sprite_y__P168883_mk(s); - s.tmp_17.arg0 = s.arg0; - s.callLocIdx = 548; s.pc = 4; return s.tmp_17; - case 4: - r0 = s.retval; - s.tmp_16 = r0; - if ((s.tmp_16) && (s.tmp_16).vtable) { - setupResume(s, 5); - pxsim_String__stringConv(s.tmp_16); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_16) + ""; } - case 5: - r0 = s.retval; - s.tmp_15 = r0; - r0 = pxsim_String__concat(s.tmp_5, s.tmp_15); + s.tmp_0 = Sprite_setPosition__P168936_mk(s); + s.tmp_0.arg0 = s.arg0; + r0 = (s.arg5 - s.arg3); s.tmp_4 = r0; - r0 = pxsim_String__concat(s.tmp_4, ")->("); + r0 = (s.tmp_4 / s.arg2); s.tmp_3 = r0; - s.tmp_20 = Sprite_vx__P168885_mk(s); - s.tmp_20.arg0 = s.arg0; - s.callLocIdx = 549; s.pc = 6; return s.tmp_20; - case 6: - r0 = s.retval; - s.tmp_19 = r0; - if ((s.tmp_19) && (s.tmp_19).vtable) { - setupResume(s, 7); - pxsim_String__stringConv(s.tmp_19); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_19) + ""; } - case 7: - r0 = s.retval; - s.tmp_18 = r0; - r0 = pxsim_String__concat(s.tmp_3, s.tmp_18); + r0 = (s.tmp_3 * s.arg1); s.tmp_2 = r0; - r0 = pxsim_String__concat(s.tmp_2, ","); + r0 = pxsim.Math_.round(s.tmp_2); s.tmp_1 = r0; - s.tmp_23 = Sprite_vy__P168887_mk(s); - s.tmp_23.arg0 = s.arg0; - s.callLocIdx = 550; s.pc = 8; return s.tmp_23; - case 8: - r0 = s.retval; - s.tmp_22 = r0; - if ((s.tmp_22) && (s.tmp_22).vtable) { - setupResume(s, 9); - pxsim_String__stringConv(s.tmp_22); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_22) + ""; } - case 9: + r0 = (s.tmp_1 + s.arg3); + s.tmp_0.arg1 = r0; + r0 = (s.arg6 - s.arg4); + s.tmp_8 = r0; + r0 = (s.tmp_8 / s.arg2); + s.tmp_7 = r0; + r0 = (s.tmp_7 * s.arg1); + s.tmp_6 = r0; + r0 = pxsim.Math_.round(s.tmp_6); + s.tmp_5 = r0; + r0 = (s.tmp_5 + s.arg4); + s.tmp_0.arg2 = r0; + s.callLocIdx = 1755; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - s.tmp_21 = r0; - r0 = pxsim_String__concat(s.tmp_1, s.tmp_21); - s.tmp_0 = r0; - r0 = pxsim_String__concat(s.tmp_0, ")"); + r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_toString__P168961.info = {"start":34111,"length":93,"line":1066,"column":4,"endLine":1068,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"toString","argumentNames":["this"]} +animation_lineTo__P172885.info = {"start":16146,"length":289,"line":449,"column":4,"endLine":454,"endColumn":5,"fileName":"pxt_modules/game/animation.ts","functionName":"lineTo","argumentNames":["target","nodeTime","interval","x0","y0","x1","y1"]} -function Sprite_toString__P168961_mk(s) { +function animation_lineTo__P172885_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_toString__P168961, depth: s.depth + 1, + parent: s, fn: animation_lineTo__P172885, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -64836,29 +70427,20 @@ function Sprite_toString__P168961_mk(s) { tmp_6: undefined, tmp_7: undefined, tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - tmp_11: undefined, - tmp_12: undefined, - tmp_13: undefined, - tmp_14: undefined, - tmp_15: undefined, - tmp_16: undefined, - tmp_17: undefined, - tmp_18: undefined, - tmp_19: undefined, - tmp_20: undefined, - tmp_21: undefined, - tmp_22: undefined, - tmp_23: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, + arg5: undefined, + arg6: undefined, } } -function Sprite___drawCore__P168942(s) { +function animation_moveTo__P172884(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -64868,131 +70450,52 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ox___194568 = undefined; - s.oy___194576 = undefined; - s.l___194584 = undefined; - s.t___194590 = 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__C168868_VT)) failedCast(r0); - s.tmp_0 = Sprite_drawSay__P172267_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 479; s.pc = 8; return s.tmp_0; - case 8: - r0 = s.retval; - s.tmp_1 = Sprite_isOutOfScreen__P168941_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_1.arg1 = s.arg1; - s.callLocIdx = 480; s.pc = 9; return s.tmp_1; - case 9: - r0 = s.retval; + r0 = (s.arg1 >= s.arg2); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - { step = 7; continue; } - case 1: - case 2: - r0 = s.arg0.fields["flags"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 & 512); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 3; continue; } - r0 = 0; - { step = 4; continue; } + s.tmp_1 = Sprite_setPosition__P168936_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_1.arg1 = s.arg3; + s.tmp_1.arg2 = s.arg4; + s.callLocIdx = 1754; s.pc = 3; return s.tmp_1; case 3: - r0 = s.arg1.fields["drawOffsetX"]; - case 4: - // jmp value (already in r0) - s.tmp_4 = r0; - s.ox___194568 = (s.tmp_4); - r0 = s.arg0.fields["flags"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 512); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - r0 = 0; - { step = 6; continue; } - case 5: - r0 = s.arg1.fields["drawOffsetY"]; - case 6: - // jmp value (already in r0) - s.tmp_2 = r0; - s.oy___194576 = (s.tmp_2); - s.tmp_2 = Sprite_left__P168926_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 481; s.pc = 10; return s.tmp_2; - case 10: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_1 - s.ox___194568); - s.tmp_0 = r0; - r0 = pxsim.Math_.floor(s.tmp_0); - s.l___194584 = (r0); - s.tmp_2 = Sprite_top__P168930_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 482; s.pc = 11; return s.tmp_2; - case 11: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_1 - s.oy___194576); - s.tmp_0 = r0; - r0 = pxsim.Math_.floor(s.tmp_0); - s.t___194590 = (r0); - s.tmp_0 = Sprite__C168868_v6_3_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.l___194584; - s.tmp_0.arg2 = s.t___194590; - if (!checkSubtype(s.tmp_0.arg0, Sprite__C168868_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__P172268_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.l___194584; - s.tmp_0.arg2 = s.t___194590; - s.tmp_0.arg3 = s.ox___194568; - s.tmp_0.arg4 = s.oy___194576; - s.callLocIdx = 483; s.pc = 13; return s.tmp_0; - case 13: r0 = s.retval; - case 7: + case 1: + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite___drawCore__P168942.info = {"start":18194,"length":462,"line":613,"column":4,"endLine":626,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"__drawCore","argumentNames":["this","camera"]} +animation_moveTo__P172884.info = {"start":15983,"length":157,"line":445,"column":4,"endLine":447,"endColumn":5,"fileName":"pxt_modules/game/animation.ts","functionName":"moveTo","argumentNames":["target","nodeTime","interval","x","y"]} -function Sprite___drawCore__P168942_mk(s) { +function animation_moveTo__P172884_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite___drawCore__P168942, depth: s.depth + 1, + parent: s, fn: animation_moveTo__P172884, depth: s.depth + 1, pc: 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___194568: undefined, - oy___194576: undefined, - l___194584: undefined, - t___194590: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, } } -function Sprite_drawSprite__P172269(s) { +function animation_Path_ensureControlPoint__P172883(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -65004,89 +70507,40 @@ 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__C168868_VT)) failedCast(r0); - s.tmp_3 = Sprite_isScaled__P172266_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 575; s.pc = 3; return s.tmp_3; - case 3: - r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!checkSubtype(r0, animation_Path__C169874_VT)) failedCast(r0); + r0 = s.arg0.fields["lastControlX"]; s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = (s.tmp_1 === undefined); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = s.arg0.fields["_image"]; - s.tmp_4 = r0; - r0 = pxsim_ImageMethods.drawTransparentImage(globals.screen___168559, s.tmp_4, s.arg1, s.arg2); - { step = 2; continue; } + r0 = pxsim_pxtcore.throwValue("Invalid path command. S/s and T/t must follow either Q/q or C/c"); case 1: - s.tmp_0 = helpers_imageBlit__P168480_mk(s); - s.tmp_0.arg0 = globals.screen___168559; - s.tmp_0.arg1 = s.arg1; - s.tmp_0.arg2 = s.arg2; - s.tmp_1 = Sprite_width__P168924_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 576; s.pc = 5; return s.tmp_1; - case 5: - r0 = s.retval; - s.tmp_0.arg3 = r0; - s.tmp_2 = Sprite_height__P168925_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 577; s.pc = 6; return s.tmp_2; - case 6: - r0 = s.retval; - s.tmp_0.arg4 = r0; - r0 = s.arg0.fields["_image"]; - s.tmp_0.arg5 = r0; - s.tmp_0.arg6 = 0; - s.tmp_0.arg7 = 0; - r0 = s.arg0.fields["_image"]; - s.tmp_3 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_3); - s.tmp_0.arg8 = r0; - r0 = s.arg0.fields["_image"]; - s.tmp_4 = r0; - r0 = pxsim_ImageMethods.height(s.tmp_4); - s.tmp_0.arg9 = r0; - s.tmp_0.arg10 = true; - s.tmp_0.arg11 = false; - s.callLocIdx = 578; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_drawSprite__P172269.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"]} +animation_Path_ensureControlPoint__P172883.info = {"start":15808,"length":163,"line":440,"column":8,"endLine":442,"endColumn":9,"fileName":"pxt_modules/game/animation.ts","functionName":"ensureControlPoint","argumentNames":["this"]} -function Sprite_drawSprite__P172269_mk(s) { +function animation_Path_ensureControlPoint__P172883_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_drawSprite__P172269, depth: s.depth + 1, + parent: s, fn: animation_Path_ensureControlPoint__P172883, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function Sprite_drawDebug__P172268(s) { +function animation_Path_readNextCommand__P172879(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -65096,350 +70550,176 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.font___194614 = undefined; - s.tx___194618 = undefined; - s.ty___194620 = undefined; + s.numArgs___195750 = undefined; + s.i___195769 = undefined; + s.arg___195784 = undefined; + s.unnamed840___U3 = undefined; + s.unnamed841___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, Sprite__C168868_VT)) failedCast(r0); - r0 = s.arg0.fields["flags"]; + if (!checkSubtype(r0, animation_Path__C169874_VT)) failedCast(r0); + r0 = s.arg0.fields["strIndex"]; 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___194614 = (globals.font5___168507); - s.tx___194618 = (s.arg1); - s.tmp_1 = r0 = s.arg2; - s.tmp_3 = Sprite_height__P168925_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 551; s.pc = 13; return s.tmp_3; - case 13: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_1 + s.tmp_2); - s.tmp_0 = r0; - r0 = (s.tmp_0 + 2); - s.ty___194620 = (r0); - s.tmp_0 = helpers_imagePrint__P168517_mk(s); - s.tmp_0.arg0 = globals.screen___168559; - r0 = pxsim_String_.mkEmpty(); + r0 = s.arg0.fields["path"]; s.tmp_3 = r0; - s.tmp_7 = Sprite_x__P168881_mk(s); - s.tmp_7.arg0 = s.arg0; - s.callLocIdx = 552; s.pc = 15; return s.tmp_7; - case 15: - r0 = s.retval; - s.tmp_6 = r0; - r0 = (s.tmp_6 >> 0); - s.tmp_5 = r0; - if ((s.tmp_5) && (s.tmp_5).vtable) { - setupResume(s, 16); - pxsim_String__stringConv(s.tmp_5); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_5) + ""; } - case 16: - r0 = s.retval; - s.tmp_4 = r0; - r0 = pxsim_String__concat(s.tmp_3, s.tmp_4); + r0 = pxsim_String_.length(s.tmp_3); s.tmp_2 = r0; - r0 = pxsim_String__concat(s.tmp_2, ","); - s.tmp_1 = r0; - s.tmp_11 = Sprite_y__P168883_mk(s); - s.tmp_11.arg0 = s.arg0; - s.callLocIdx = 553; s.pc = 17; return s.tmp_11; - case 17: - r0 = s.retval; - s.tmp_10 = r0; - r0 = (s.tmp_10 >> 0); - s.tmp_9 = r0; - if ((s.tmp_9) && (s.tmp_9).vtable) { - setupResume(s, 18); - pxsim_String__stringConv(s.tmp_9); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_9) + ""; } - case 18: - r0 = s.retval; - 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___194618; - s.tmp_0.arg3 = s.ty___194620; - s.tmp_0.arg4 = 1; - s.tmp_0.arg5 = s.font___194614; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 554; s.pc = 14; return s.tmp_0; - case 14: - r0 = s.retval; - s.tmp_0 = r0 = s.tx___194618; - s.tmp_2 = if_charWidth_1_mk(s); - s.tmp_2.arg0 = s.font___194614; - 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 = 555; s.pc = 19; return s.tmp_2; } - } - case 19: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0 - s.tmp_1); - s.tx___194618 = (r0); - s.tmp_1 = Sprite_vx__P168885_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 556; s.pc = 20; return s.tmp_1; - case 20: - r0 = s.retval; + r0 = (s.tmp_1 >= s.tmp_2); s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + r0 = (s.arg0).fields["currentCommand"] = (undefined); + { step = 13; continue; } case 1: - s.tmp_2 = Sprite_vy__P168887_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 557; s.pc = 21; return s.tmp_2; - case 21: - 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 = r0 = s.ty___194620; - s.tmp_7 = if_charHeight_1_mk(s); - s.tmp_7.arg0 = s.font___194614; - 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 = 558; s.pc = 22; return s.tmp_7; } - } - case 22: - r0 = s.retval; - s.tmp_6 = r0; - r0 = (s.tmp_6 + 2); - s.tmp_5 = r0; - r0 = (s.tmp_4 + s.tmp_5); - s.ty___194620 = (r0); - s.tmp_0 = helpers_imagePrint__P168517_mk(s); - s.tmp_0.arg0 = globals.screen___168559; - s.tmp_6 = Sprite_vx__P168885_mk(s); - s.tmp_6.arg0 = s.arg0; - s.callLocIdx = 559; s.pc = 24; return s.tmp_6; - case 24: - r0 = s.retval; - s.tmp_5 = r0; - r0 = (s.tmp_5 >> 0); - s.tmp_4 = r0; - if ((s.tmp_4) && (s.tmp_4).vtable) { - setupResume(s, 25); - pxsim_String__stringConv(s.tmp_4); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_4) + ""; } - case 25: - r0 = s.retval; - s.tmp_3 = r0; - r0 = pxsim_String__concat("v", s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_String__concat(s.tmp_2, ","); - s.tmp_1 = r0; - s.tmp_10 = Sprite_vy__P168887_mk(s); - s.tmp_10.arg0 = s.arg0; - s.callLocIdx = 560; s.pc = 26; return s.tmp_10; - case 26: - r0 = s.retval; - s.tmp_9 = r0; - r0 = (s.tmp_9 >> 0); - s.tmp_8 = r0; - if ((s.tmp_8) && (s.tmp_8).vtable) { - setupResume(s, 27); - pxsim_String__stringConv(s.tmp_8); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_8) + ""; } - case 27: - r0 = s.retval; - 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___194618; - s.tmp_0.arg3 = s.ty___194620; - s.tmp_0.arg4 = 1; - s.tmp_0.arg5 = s.font___194614; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 561; s.pc = 23; return s.tmp_0; - case 23: - r0 = s.retval; - case 3: - case 4: - s.tmp_1 = Sprite_ax__P168889_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 562; s.pc = 28; return s.tmp_1; - case 28: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 5; continue; } - r0 = s.tmp_0; - { step = 6; continue; } - case 5: - s.tmp_2 = Sprite_ay__P168891_mk(s); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = animation_Path_readNextToken__P172880_mk(s); s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 563; s.pc = 29; return s.tmp_2; - case 29: - r0 = s.retval; - case 6: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 7; continue; } - s.tmp_4 = r0 = s.ty___194620; - s.tmp_7 = if_charHeight_1_mk(s); - s.tmp_7.arg0 = s.font___194614; - 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 = 564; s.pc = 30; return s.tmp_7; } - } - case 30: + s.callLocIdx = 1718; s.pc = 14; return s.tmp_2; + case 14: r0 = s.retval; - s.tmp_6 = r0; - r0 = (s.tmp_6 + 2); - s.tmp_5 = r0; - r0 = (s.tmp_4 + s.tmp_5); - s.ty___194620 = (r0); - s.tmp_0 = helpers_imagePrint__P168517_mk(s); - s.tmp_0.arg0 = globals.screen___168559; - s.tmp_6 = Sprite_ax__P168889_mk(s); - s.tmp_6.arg0 = s.arg0; - s.callLocIdx = 565; s.pc = 32; return s.tmp_6; - case 32: + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["currentCommand"] = (s.tmp_1); + r0 = s.arg0.fields["currentCommand"]; + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + { step = 13; continue; } + case 3: + case 4: + s.tmp_3 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_4 = r0; + r0 = (s.tmp_3).fields["args"] = (s.tmp_4); + s.tmp_0 = animation_Path_commandToArgCount__P172881_mk(s); + r0 = s.arg0.fields["currentCommand"]; + s.tmp_0.arg0 = r0; + s.callLocIdx = 1719; s.pc = 15; return s.tmp_0; + case 15: r0 = s.retval; + s.numArgs___195750 = (r0); + r0 = (s.numArgs___195750 === -1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + r0 = s.arg0.fields["currentCommand"]; s.tmp_5 = r0; - r0 = (s.tmp_5 >> 0); + if ((s.tmp_5) && (s.tmp_5).vtable) { + setupResume(s, 16); + pxsim_String__stringConv(s.tmp_5); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_5) + ""; } + case 16: + r0 = s.retval; s.tmp_4 = r0; - if ((s.tmp_4) && (s.tmp_4).vtable) { - setupResume(s, 33); - pxsim_String__stringConv(s.tmp_4); + r0 = pxsim_String__concat("Unknown path command '", s.tmp_4); + s.tmp_3 = r0; + if ((s.tmp_3) && (s.tmp_3).vtable) { + setupResume(s, 17); + pxsim_String__stringConv(s.tmp_3); checkResumeConsumed(); return; - } else { s.retval = (s.tmp_4) + ""; } - case 33: + } else { s.retval = (s.tmp_3) + ""; } + case 17: + r0 = s.retval; + s.tmp_2 = r0; + r0 = pxsim_String__concat(s.tmp_2, "'"); + s.tmp_1 = r0; + r0 = pxsim_pxtcore.throwValue(s.tmp_1); + case 5: + case 6: + s.i___195769 = (0); + case 7: + r0 = (s.i___195769 < s.numArgs___195750); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 8; continue; } + r0 = s.arg0.fields["args"]; + s.tmp_1 = r0; + s.tmp_4 = animation_Path_readNextToken__P172880_mk(s); + s.tmp_4.arg0 = s.arg0; + s.callLocIdx = 1720; s.pc = 18; return s.tmp_4; + case 18: r0 = s.retval; s.tmp_3 = r0; - r0 = pxsim_String__concat("a", s.tmp_3); + r0 = pxsim_String_.toNumber(s.tmp_3); s.tmp_2 = r0; - r0 = pxsim_String__concat(s.tmp_2, ","); + r0 = pxsim_Array__push(s.tmp_1, s.tmp_2); + r0 = (s.i___195769 + 1); + s.i___195769 = (r0); + { step = 7; continue; } + case 8: + s.arg___195784 = (undefined); + r0 = s.arg0.fields["args"]; + s.unnamed840___U3 = (r0); + s.unnamed841___U4 = (0); + case 9: + s.tmp_0 = r0 = s.unnamed841___U4; + r0 = pxsim_Array__length(s.unnamed840___U3); s.tmp_1 = r0; - s.tmp_10 = Sprite_ay__P168891_mk(s); - s.tmp_10.arg0 = s.arg0; - s.callLocIdx = 566; s.pc = 34; return s.tmp_10; - case 34: + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 12; continue; } + r0 = pxsim_Array__getAt(s.unnamed840___U3, s.unnamed841___U4); + s.arg___195784 = (r0); + s.tmp_3 = Number_isNaN__P166622_mk(s); + s.tmp_3.arg0 = s.arg___195784; + s.callLocIdx = 1721; s.pc = 19; return s.tmp_3; + case 19: r0 = s.retval; - s.tmp_9 = r0; - r0 = (s.tmp_9 >> 0); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 10; continue; } + r0 = s.arg0.fields["currentCommand"]; s.tmp_8 = r0; if ((s.tmp_8) && (s.tmp_8).vtable) { - setupResume(s, 35); + setupResume(s, 20); pxsim_String__stringConv(s.tmp_8); checkResumeConsumed(); return; } else { s.retval = (s.tmp_8) + ""; } - case 35: + case 20: r0 = s.retval; 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___194618; - s.tmp_0.arg3 = s.ty___194620; - s.tmp_0.arg4 = 1; - s.tmp_0.arg5 = s.font___194614; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 567; s.pc = 31; return s.tmp_0; - case 31: - r0 = s.retval; - case 7: - case 8: - case 9: - case 10: - r0 = pxsim_numops_toBoolDecr(globals.debug___169494); - if (!r0) { step = 11; continue; } - s.tmp_0 = helpers_imageDrawRect__P168486_mk(s); - s.tmp_0.arg0 = globals.screen___168559; - s.tmp_3 = game_Hitbox_left__P168743_mk(s); - r0 = s.arg0.fields["_hitbox"]; - s.tmp_3.arg0 = r0; - s.callLocIdx = 568; s.pc = 37; return s.tmp_3; - case 37: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_2 + 128); - s.tmp_4 = r0; - r0 = (s.tmp_4 >> 8); - s.tmp_1 = r0; - r0 = (s.tmp_1 - s.arg3); - s.tmp_0.arg1 = r0; - s.tmp_7 = game_Hitbox_top__P168744_mk(s); - r0 = s.arg0.fields["_hitbox"]; - s.tmp_7.arg0 = r0; - s.callLocIdx = 570; s.pc = 38; return s.tmp_7; - case 38: - r0 = s.retval; + r0 = pxsim_String__concat("Invalid argument for path command '", s.tmp_7); s.tmp_6 = r0; - r0 = (s.tmp_6 + 128); - s.tmp_8 = r0; - r0 = (s.tmp_8 >> 8); - s.tmp_5 = r0; - r0 = (s.tmp_5 - s.arg4); - s.tmp_0.arg2 = r0; - r0 = s.arg0.fields["_hitbox"]; - r0 = r0.fields["width"]; - s.tmp_9 = r0; - r0 = (s.tmp_9 + 128); - s.tmp_10 = r0; - r0 = (s.tmp_10 >> 8); - s.tmp_0.arg3 = r0; - r0 = s.arg0.fields["_hitbox"]; - r0 = r0.fields["height"]; - s.tmp_11 = r0; - r0 = (s.tmp_11 + 128); - s.tmp_12 = r0; - r0 = (s.tmp_12 >> 8); - s.tmp_0.arg4 = r0; - s.tmp_0.arg5 = 1; - s.callLocIdx = 574; s.pc = 36; return s.tmp_0; - case 36: + if ((s.tmp_6) && (s.tmp_6).vtable) { + setupResume(s, 21); + pxsim_String__stringConv(s.tmp_6); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_6) + ""; } + case 21: r0 = s.retval; + s.tmp_5 = r0; + r0 = pxsim_String__concat(s.tmp_5, "'"); + s.tmp_4 = r0; + r0 = pxsim_pxtcore.throwValue(s.tmp_4); + case 10: case 11: + r0 = (s.unnamed841___U4 + 1); + s.unnamed841___U4 = (r0); + { step = 9; continue; } case 12: + s.unnamed840___U3 = (undefined); + case 13: r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_drawDebug__P172268.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"]} +animation_Path_readNextCommand__P172879.info = {"start":1471,"length":776,"line":59,"column":8,"endLine":82,"endColumn":9,"fileName":"pxt_modules/game/animation.ts","functionName":"readNextCommand","argumentNames":["this"]} -function Sprite_drawDebug__P172268_mk(s) { +function animation_Path_readNextCommand__P172879_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_drawDebug__P172268, depth: s.depth + 1, + parent: s, fn: animation_Path_readNextCommand__P172879, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -65450,25 +70730,19 @@ function Sprite_drawDebug__P172268_mk(s) { tmp_6: undefined, tmp_7: undefined, tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - tmp_11: undefined, - tmp_12: undefined, - font___194614: undefined, - tx___194618: undefined, - ty___194620: undefined, + numArgs___195750: undefined, + i___195769: undefined, + arg___195784: undefined, + unnamed840___U3: undefined, + unnamed841___U4: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, } } -function Sprite_drawSay__P172267(s) { +function animation_Path_commandToArgCount__P172881(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -65480,79 +70754,236 @@ switch (step) { 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("M", s.tmp_0); + if (r0) { step = 1; continue; } + r0 = pxsim_pxtcore.switch_eq("m", s.tmp_0); + if (r0) { step = 2; continue; } + r0 = pxsim_pxtcore.switch_eq("L", s.tmp_0); + if (r0) { step = 3; continue; } + r0 = pxsim_pxtcore.switch_eq("l", s.tmp_0); + if (r0) { step = 4; continue; } + r0 = pxsim_pxtcore.switch_eq("H", s.tmp_0); + if (r0) { step = 5; continue; } + r0 = pxsim_pxtcore.switch_eq("h", s.tmp_0); + if (r0) { step = 6; continue; } + r0 = pxsim_pxtcore.switch_eq("V", s.tmp_0); + if (r0) { step = 7; continue; } + r0 = pxsim_pxtcore.switch_eq("v", s.tmp_0); + if (r0) { step = 8; continue; } + r0 = pxsim_pxtcore.switch_eq("Q", s.tmp_0); + if (r0) { step = 9; continue; } + r0 = pxsim_pxtcore.switch_eq("q", s.tmp_0); + if (r0) { step = 10; continue; } + r0 = pxsim_pxtcore.switch_eq("T", s.tmp_0); + if (r0) { step = 11; continue; } + r0 = pxsim_pxtcore.switch_eq("t", s.tmp_0); + if (r0) { step = 12; continue; } + r0 = pxsim_pxtcore.switch_eq("C", s.tmp_0); + if (r0) { step = 13; continue; } + r0 = pxsim_pxtcore.switch_eq("c", s.tmp_0); + if (r0) { step = 14; continue; } + r0 = pxsim_pxtcore.switch_eq("S", s.tmp_0); + if (r0) { step = 15; continue; } + r0 = pxsim_pxtcore.switch_eq("s", s.tmp_0); + if (r0) { step = 16; continue; } + r0 = pxsim_pxtcore.switch_eq("A", s.tmp_0); + if (r0) { step = 17; continue; } + r0 = pxsim_pxtcore.switch_eq("a", s.tmp_0); + if (r0) { step = 18; continue; } + r0 = pxsim_pxtcore.switch_eq("Z", s.tmp_0); + if (r0) { step = 19; continue; } + r0 = pxsim_pxtcore.switch_eq("z", s.tmp_0); + if (r0) { step = 20; continue; } + r0 = s.tmp_0; + { step = 21; continue; } + case 1: + case 2: + r0 = 2; + { step = 22; continue; } + case 3: + case 4: + r0 = 2; + { step = 22; continue; } + case 5: + case 6: + r0 = 1; + { step = 22; continue; } + case 7: + case 8: + r0 = 1; + { step = 22; continue; } + case 9: + case 10: + r0 = 4; + { step = 22; continue; } + case 11: + case 12: + r0 = 2; + { step = 22; continue; } + case 13: + case 14: + r0 = 6; + { step = 22; continue; } + case 15: + case 16: + r0 = 4; + { step = 22; continue; } + case 17: + case 18: + r0 = 7; + { step = 22; continue; } + case 19: + case 20: + r0 = 0; + { step = 22; continue; } + case 21: + r0 = -1; + { step = 22; continue; } + r0 = undefined; + case 22: + return leave(s, r0) + default: oops() +} } } +animation_Path_commandToArgCount__P172881.info = {"start":3204,"length":1154,"line":113,"column":8,"endLine":148,"endColumn":9,"fileName":"pxt_modules/game/animation.ts","functionName":"commandToArgCount","argumentNames":["command"]} + +function animation_Path_commandToArgCount__P172881_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: animation_Path_commandToArgCount__P172881, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function animation_Path_readNextToken__P172880(s) { +let r0 = s.r0, 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.tokenStart___195838 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - r0 = s.arg0.fields["sayRenderer"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - r0 = s.arg0.fields["sayEndTime"]; + if (!checkSubtype(r0, animation_Path__C169874_VT)) failedCast(r0); + case 1: + r0 = s.arg0.fields["path"]; s.tmp_2 = r0; - r0 = (s.tmp_2 !== undefined); + r0 = s.arg0.fields["strIndex"]; + s.tmp_3 = r0; + r0 = pxsim_String_.charCodeAt(s.tmp_2, s.tmp_3); s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 3; continue; } - r0 = pxsim.control.millis(); + r0 = (s.tmp_1 === 32); + 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["strIndex"]; s.tmp_4 = r0; - r0 = s.arg0.fields["sayEndTime"]; + r0 = s.arg0.fields["path"]; + s.tmp_6 = r0; + r0 = pxsim_String_.length(s.tmp_6); s.tmp_5 = r0; r0 = (s.tmp_4 < s.tmp_5); + case 3: + // jmp value (already in r0) + s.tmp_7 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_7); + if (!r0) { step = 4; continue; } + s.tmp_8 = r0 = s.arg0; + r0 = s.tmp_8.fields["strIndex"]; + s.tmp_10 = r0; + r0 = (s.tmp_10 + 1); + s.tmp_9 = r0; + r0 = (s.tmp_8).fields["strIndex"] = (s.tmp_9); + { step = 1; continue; } + case 4: + r0 = s.arg0.fields["strIndex"]; + s.tmp_1 = r0; + r0 = s.arg0.fields["path"]; s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 1; continue; } - s.tmp_6 = sprites_BaseSpriteSayRenderer__C168786_v0_4_mk(s); - r0 = s.arg0.fields["sayRenderer"]; - s.tmp_6.arg0 = r0; - s.tmp_6.arg1 = globals.screen___168559; - s.tmp_6.arg2 = s.arg1; - s.tmp_6.arg3 = s.arg0; - if (!checkSubtype(s.tmp_6.arg0, sprites_BaseSpriteSayRenderer__C168786_VT)) failedCast(s.tmp_6.arg0); - s.tmp_6.fn = s.tmp_6.arg0.vtable.methods.draw; - s.pc = 7; return s.tmp_6; + r0 = pxsim_String_.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 = 5; continue; } + r0 = undefined; + { step = 11; continue; } + case 5: + case 6: + r0 = s.arg0.fields["strIndex"]; + s.tokenStart___195838 = (r0); case 7: - r0 = s.retval; - { step = 2; continue; } - case 1: - s.tmp_0 = sprites_BaseSpriteSayRenderer__C168786_v2_1_mk(s); - r0 = s.arg0.fields["sayRenderer"]; - s.tmp_0.arg0 = r0; - if (!checkSubtype(s.tmp_0.arg0, sprites_BaseSpriteSayRenderer__C168786_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.destroy; - s.pc = 8; return s.tmp_0; + r0 = s.arg0.fields["path"]; + s.tmp_2 = r0; + r0 = s.arg0.fields["strIndex"]; + s.tmp_3 = r0; + r0 = pxsim_String_.charCodeAt(s.tmp_2, s.tmp_3); + s.tmp_1 = r0; + r0 = (s.tmp_1 !== 32); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 8; continue; } + r0 = s.tmp_0; + { step = 9; continue; } case 8: - r0 = s.retval; - r0 = (s.arg0).fields["sayRenderer"] = (undefined); - r0 = (s.arg0).fields["sayEndTime"] = (undefined); - case 2: - { step = 4; continue; } - case 3: - s.tmp_0 = sprites_BaseSpriteSayRenderer__C168786_v0_4_mk(s); - r0 = s.arg0.fields["sayRenderer"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = globals.screen___168559; - s.tmp_0.arg2 = s.arg1; - s.tmp_0.arg3 = s.arg0; - if (!checkSubtype(s.tmp_0.arg0, sprites_BaseSpriteSayRenderer__C168786_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.draw; - s.pc = 9; return s.tmp_0; + r0 = s.arg0.fields["strIndex"]; + s.tmp_4 = r0; + r0 = s.arg0.fields["path"]; + s.tmp_6 = r0; + r0 = pxsim_String_.length(s.tmp_6); + s.tmp_5 = r0; + r0 = (s.tmp_4 < s.tmp_5); case 9: + // jmp value (already in r0) + s.tmp_7 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_7); + if (!r0) { step = 10; continue; } + s.tmp_8 = r0 = s.arg0; + r0 = s.tmp_8.fields["strIndex"]; + s.tmp_10 = r0; + r0 = (s.tmp_10 + 1); + s.tmp_9 = r0; + r0 = (s.tmp_8).fields["strIndex"] = (s.tmp_9); + { step = 7; continue; } + case 10: + s.tmp_0 = helpers_stringSubstr__P166645_mk(s); + r0 = s.arg0.fields["path"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.tokenStart___195838; + r0 = s.arg0.fields["strIndex"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 - s.tokenStart___195838); + s.tmp_0.arg2 = r0; + s.callLocIdx = 1722; s.pc = 12; return s.tmp_0; + case 12: r0 = s.retval; - case 4: - case 5: - case 6: - r0 = undefined; + case 11: return leave(s, r0) default: oops() } } } -Sprite_drawSay__P172267.info = {"start":34210,"length":574,"line":1070,"column":4,"endLine":1086,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"drawSay","argumentNames":["this","camera"]} +animation_Path_readNextToken__P172880.info = {"start":2664,"length":530,"line":97,"column":8,"endLine":111,"endColumn":9,"fileName":"pxt_modules/game/animation.ts","functionName":"readNextToken","argumentNames":["this"]} -function Sprite_drawSay__P172267_mk(s) { +function animation_Path_readNextToken__P172880_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_drawSay__P172267, depth: s.depth + 1, + parent: s, fn: animation_Path_readNextToken__P172880, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -65561,15 +70992,19 @@ function Sprite_drawSay__P172267_mk(s) { tmp_4: undefined, tmp_5: undefined, tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, + tokenStart___195838: undefined, arg0: undefined, - arg1: undefined, } } -function Sprite___visible__P168923(s) { +function Number_isNaN__P166622(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -65583,24 +71018,29 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - r0 = s.arg0.fields["flags"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 & 128); + r0 = pxsim_pxtcore.typeOf(s.arg0); s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); + r0 = (s.tmp_1 == "number"); s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + r0 = (s.arg0 !== s.arg0); + case 2: + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = s.tmp_2; return leave(s, r0) default: oops() } } } -Sprite___visible__P168923.info = {"start":9904,"length":72,"line":359,"column":4,"endLine":361,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"__visible","argumentNames":["this"]} +Number_isNaN__P166622.info = {"start":355,"length":93,"line":21,"column":4,"endLine":23,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"isNaN","argumentNames":["x"]} -function Sprite___visible__P168923_mk(s) { +function Number_isNaN__P166622_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite___visible__P168923, depth: s.depth + 1, + parent: s, fn: Number_isNaN__P166622, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -65612,7 +71052,7 @@ function Sprite___visible__P168923_mk(s) { -function Sprite_data__P168904(s) { +function animation_Path_reset__P169877(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -65624,32 +71064,39 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C168868_VT)) failedCast(r0); - r0 = (s.arg0).fields["_data"] = (s.arg1); + if (!checkSubtype(r0, animation_Path__C169874_VT)) failedCast(r0); + r0 = (s.arg0).fields["args"] = (undefined); + r0 = (s.arg0).fields["currentCommand"] = (undefined); + r0 = (s.arg0).fields["lastControlX"] = (undefined); + r0 = (s.arg0).fields["lastControlY"] = (undefined); + r0 = (s.arg0).fields["startX"] = (undefined); + r0 = (s.arg0).fields["startY"] = (undefined); + r0 = (s.arg0).fields["lastX"] = (undefined); + r0 = (s.arg0).fields["lastY"] = (undefined); + r0 = (s.arg0).fields["strIndex"] = (0); + r0 = (s.arg0).fields["commandIndex"] = (0); r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_data__P168904.info = {"start":6536,"length":56,"line":241,"column":4,"endLine":243,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"data","argumentNames":["this","value"]} +animation_Path_reset__P169877.info = {"start":2257,"length":397,"line":84,"column":8,"endLine":95,"endColumn":9,"fileName":"pxt_modules/game/animation.ts","functionName":"reset","argumentNames":["this"]} -function Sprite_data__P168904_mk(s) { +function animation_Path_reset__P169877_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_data__P168904, depth: s.depth + 1, + parent: s, fn: animation_Path_reset__P169877, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, - arg1: undefined, } } -function sprites_BaseSprite___update__P168629(s) { +function animation_ImageAnimation_update__P169885(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -65659,28 +71106,139 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.frameIndex___195875 = undefined; + s.newImage___195900 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_BaseSprite__C168621_VT)) failedCast(r0); - r0 = undefined; + if (!checkSubtype(r0, animation_ImageAnimation__C169883_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = s.tmp_0.fields["elapsedTime"]; + s.tmp_2 = r0; + s.tmp_4 = game_eventContext__P169529_mk(s); + s.callLocIdx = 1772; s.pc = 12; return s.tmp_4; + case 12: + r0 = s.retval; + r0 = r0.fields["deltaTimeMillis"]; + s.tmp_3 = r0; + r0 = (s.tmp_2 + s.tmp_3); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["elapsedTime"] = (s.tmp_1); + r0 = s.arg0.fields["elapsedTime"]; + s.tmp_1 = r0; + r0 = s.arg0.fields["frameInterval"]; + s.tmp_2 = r0; + r0 = (s.tmp_1 / s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim.Math_.floor(s.tmp_0); + s.frameIndex___195875 = (r0); + r0 = s.arg0.fields["lastFrame"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 != s.frameIndex___195875); + 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["frames"]; + s.tmp_2 = r0; + r0 = pxsim_Array__length(s.tmp_2); + case 2: + // 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["loop"]; + 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_toBool(s.tmp_4); + if (r0) { step = 3; continue; } + r0 = s.tmp_4; + { step = 4; continue; } + case 3: + s.tmp_7 = r0 = s.frameIndex___195875; + r0 = s.arg0.fields["frames"]; + s.tmp_9 = r0; + r0 = pxsim_Array__length(s.tmp_9); + s.tmp_8 = r0; + r0 = (s.tmp_7 >= s.tmp_8); + case 4: + // jmp value (already in r0) + s.tmp_10 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_10); + if (!r0) { step = 5; continue; } + r0 = true; + { step = 11; continue; } + case 5: + case 6: + r0 = s.arg0.fields["frames"]; + s.tmp_11 = r0; + s.tmp_13 = r0 = s.frameIndex___195875; + r0 = s.arg0.fields["frames"]; + s.tmp_15 = r0; + r0 = pxsim_Array__length(s.tmp_15); + s.tmp_14 = r0; + r0 = (s.tmp_13 % s.tmp_14); + s.tmp_12 = r0; + r0 = pxsim_Array__getAt(s.tmp_11, s.tmp_12); + s.newImage___195900 = (r0); + r0 = s.arg0.fields["sprite"]; + s.tmp_2 = r0; + r0 = s.tmp_2.fields["_image"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 !== s.newImage___195900); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; continue; } + s.tmp_3 = Sprite_setImage__P168918_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_3.arg0 = r0; + s.tmp_3.arg1 = s.newImage___195900; + s.callLocIdx = 1774; s.pc = 13; return s.tmp_3; + case 13: + r0 = s.retval; + case 7: + case 8: + case 9: + case 10: + r0 = (s.arg0).fields["lastFrame"] = (s.frameIndex___195875); + r0 = false; + case 11: return leave(s, r0) default: oops() } } } -sprites_BaseSprite___update__P168629.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"]} +animation_ImageAnimation_update__P169885.info = {"start":19465,"length":664,"line":532,"column":8,"endLine":548,"endColumn":9,"fileName":"pxt_modules/game/animation.ts","functionName":"update","argumentNames":["this"]} -function sprites_BaseSprite___update__P168629_mk(s) { +function animation_ImageAnimation_update__P169885_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_BaseSprite___update__P168629, depth: s.depth + 1, + parent: s, fn: animation_ImageAnimation_update__P169885, depth: s.depth + 1, pc: 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, + frameIndex___195875: undefined, + newImage___195900: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } @@ -66738,6 +72296,85 @@ function controller_Button_toString__P168721_mk(s) { +function animation_Path_constructor__P169876(s) { +let r0 = s.r0, 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, animation_Path__C169874_VT)) failedCast(r0); + r0 = (s.arg0).fields["path"] = (s.arg1); + r0 = (s.arg0).fields["strIndex"] = (0); + r0 = (s.arg0).fields["length"] = (0); + case 1: + r0 = s.arg0.fields["strIndex"]; + s.tmp_1 = r0; + r0 = s.arg0.fields["path"]; + s.tmp_3 = r0; + r0 = pxsim_String_.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 = 4; continue; } + s.tmp_4 = animation_Path_readNextCommand__P172879_mk(s); + s.tmp_4.arg0 = s.arg0; + s.callLocIdx = 1716; s.pc = 5; return s.tmp_4; + case 5: + r0 = s.retval; + r0 = s.arg0.fields["currentCommand"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + s.tmp_1 = r0 = s.arg0; + r0 = s.tmp_1.fields["length"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 + 1); + s.tmp_2 = r0; + r0 = (s.tmp_1).fields["length"] = (s.tmp_2); + case 2: + case 3: + { step = 1; continue; } + case 4: + s.tmp_0 = animation_Path_reset__P169877_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1717; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +animation_Path_constructor__P169876.info = {"start":1081,"length":380,"line":46,"column":8,"endLine":57,"endColumn":9,"fileName":"pxt_modules/game/animation.ts","functionName":"inline","argumentNames":["this","path"]} + +function animation_Path_constructor__P169876_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: animation_Path_constructor__P169876, depth: s.depth + 1, + pc: 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 sprites_StaticObstacle_width__P169035(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -67315,6 +72952,49 @@ function scene_Camera_left__P169319_mk(s) { +function if_animations_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_animations_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 animation_SpriteAnimation__C169879_v0_1_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: null, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + arg0: undefined, +} } + + function if_handler_1_mk(s) { checkStack(s.depth); return { @@ -67357,7 +73037,7 @@ function if_condition_1_mk(s) { } } -function game_Dialog__C169448_v1_2_mk(s) { +function lambda_3_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -67369,10 +73049,11 @@ function game_Dialog__C169448_v1_2_mk(s) { tmp_4: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function game_BaseDialog__C169430_v0_1_mk(s) { +function Sprite__C168868_v5_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -67386,7 +73067,7 @@ function game_BaseDialog__C169430_v0_1_mk(s) { } } -function controller_Button__C168716_v0_1_mk(s) { +function Sprite__C168868_v4_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -67400,7 +73081,7 @@ function controller_Button__C168716_v0_1_mk(s) { } } -function lambda_2_mk(s) { +function game_Dialog__C169448_v1_2_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -67415,7 +73096,7 @@ function lambda_2_mk(s) { } } -function PhysicsEngine__C169038_v4_2_mk(s) { +function game_BaseDialog__C169430_v0_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -67426,11 +73107,10 @@ function PhysicsEngine__C169038_v4_2_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, - arg1: undefined, } } -function if___update_3_mk(s) { +function controller_Button__C168716_v0_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -67441,12 +73121,10 @@ function if___update_3_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function PhysicsEngine__C169038_v3_1_mk(s) { +function lambda_2_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -67457,10 +73135,11 @@ function PhysicsEngine__C169038_v3_1_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, + arg1: undefined, } } -function if_charHeight_1_mk(s) { +function PhysicsEngine__C169038_v4_2_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -67471,10 +73150,11 @@ function if_charHeight_1_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, + arg1: undefined, } } -function if_charWidth_1_mk(s) { +function if___update_3_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -67485,10 +73165,12 @@ function if_charWidth_1_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function if_multiplier_1_mk(s) { +function PhysicsEngine__C169038_v3_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -67502,7 +73184,7 @@ function if_multiplier_1_mk(s) { } } -function if_data_1_mk(s) { +function if_charHeight_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -67516,7 +73198,7 @@ function if_data_1_mk(s) { } } -function if_xOffset_1_mk(s) { +function if_charWidth_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -67530,7 +73212,7 @@ function if_xOffset_1_mk(s) { } } -function if_yOffset_1_mk(s) { +function if_multiplier_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -67544,7 +73226,7 @@ function if_yOffset_1_mk(s) { } } -function if___draw_2_mk(s) { +function if_data_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -67555,11 +73237,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_xOffset_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -67573,7 +73254,7 @@ function if_z_1_mk(s) { } } -function if_id_1_mk(s) { +function if_yOffset_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -67587,7 +73268,7 @@ function if_id_1_mk(s) { } } -function lambda_3_mk(s) { +function if___draw_2_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -67599,11 +73280,10 @@ function lambda_3_mk(s) { tmp_4: undefined, arg0: undefined, arg1: undefined, - arg2: 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, @@ -67617,7 +73297,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, @@ -67631,7 +73311,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, @@ -67645,7 +73325,7 @@ function if_vy_1_mk(s) { } } -function game_BaseDialog__C169430_v2_1_mk(s) { +function if_vx_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -67659,7 +73339,7 @@ function game_BaseDialog__C169430_v2_1_mk(s) { } } -function PhysicsEngine__C169038_v2_4_mk(s) { +function if_vy_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -67670,13 +73350,10 @@ function PhysicsEngine__C169038_v2_4_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function lambda_4_mk(s) { +function game_BaseDialog__C169430_v2_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -67687,13 +73364,10 @@ function lambda_4_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function PhysicsEngine__C169038_v0_2_mk(s) { +function PhysicsEngine__C169038_v2_4_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -67705,10 +73379,12 @@ function PhysicsEngine__C169038_v0_2_mk(s) { tmp_4: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function if_handler_2_mk(s) { +function lambda_4_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -67720,10 +73396,12 @@ function if_handler_2_mk(s) { tmp_4: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function Sprite__C168868_v5_1_mk(s) { +function PhysicsEngine__C169038_v0_2_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -67734,10 +73412,11 @@ function Sprite__C168868_v5_1_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, + arg1: undefined, } } -function Sprite__C168868_v4_1_mk(s) { +function if_handler_2_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -67748,6 +73427,7 @@ function Sprite__C168868_v4_1_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, + arg1: undefined, } } @@ -67871,6 +73551,20 @@ function if_destroyHandler_1_mk(s) { } } +function if_func_1_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: null, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + arg0: undefined, +} } + + function if_startScreenEffect_1_mk(s) { checkStack(s.depth); return { @@ -69175,11 +74869,96 @@ const Render_RayCastingRender__C171738_VT = mkVTable({ "drawSprite": Render_RayCastingRender_drawSprite__P171794, }, }); +const animation_SpriteAnimation__C169879_VT = mkVTable({ + name: "SpriteAnimation", + numFields: 3, + classNo: 23, + lastSubtypeNo: 25, + maxBgInstances: null, + methods: { + "update": animation_SpriteAnimation_update__P169882, + }, + iface: { + "elapsedTime": null, + "set/elapsedTime": null, + "sprite": null, + "set/sprite": null, + "loop": null, + "set/loop": null, + "init": animation_SpriteAnimation_init__P169881, + "update": animation_SpriteAnimation_update__P169882, + }, +}); +const animation_ImageAnimation__C169883_VT = mkVTable({ + name: "ImageAnimation", + numFields: 6, + classNo: 24, + lastSubtypeNo: 24, + maxBgInstances: null, + methods: { + "update": animation_ImageAnimation_update__P169885, + }, + iface: { + "elapsedTime": null, + "set/elapsedTime": null, + "sprite": null, + "set/sprite": null, + "loop": null, + "set/loop": null, + "lastFrame": null, + "set/lastFrame": null, + "frames": null, + "set/frames": null, + "frameInterval": null, + "set/frameInterval": null, + "update": animation_ImageAnimation_update__P169885, + "init": animation_SpriteAnimation_init__P169881, + }, +}); +const control_EventContext__C166922_VT = mkVTable({ + name: "EventContext", + numFields: 10, + classNo: 26, + lastSubtypeNo: 26, + maxBgInstances: null, + methods: { + }, + iface: { + "handlers": null, + "set/handlers": null, + "frameCallbacks": null, + "set/frameCallbacks": null, + "frameWorker": null, + "set/frameWorker": null, + "framesInSample": null, + "set/framesInSample": null, + "timeInSample": null, + "set/timeInSample": null, + "lastPerfDump": null, + "set/lastPerfDump": null, + "deltaTimeMillis": null, + "set/deltaTimeMillis": null, + "prevTimeMillis": null, + "set/prevTimeMillis": null, + "idleCallbacks": null, + "set/idleCallbacks": null, + "runningCallbacks": null, + "set/runningCallbacks": null, + "deltaTime": control_EventContext_deltaTime__P166927, + "runCallbacks": control_EventContext_runCallbacks__P171954, + "registerFrameCallbacks": control_EventContext_registerFrameCallbacks__P171955, + "register": control_EventContext_register__P166928, + "unregister": control_EventContext_unregister__P166929, + "registerFrameHandler": control_EventContext_registerFrameHandler__P166930, + "unregisterFrameHandler": control_EventContext_unregisterFrameHandler__P166931, + "registerHandler": control_EventContext_registerHandler__P166932, + }, +}); const scene_Scene__C169370_VT = mkVTable({ name: "Scene", numFields: 25, - classNo: 23, - lastSubtypeNo: 23, + classNo: 27, + lastSubtypeNo: 27, maxBgInstances: null, methods: { }, @@ -69242,50 +75021,39 @@ const scene_Scene__C169370_VT = mkVTable({ "render": scene_Scene_render__P169399, }, }); -const control_EventContext__C166922_VT = mkVTable({ - name: "EventContext", - numFields: 10, - classNo: 24, - lastSubtypeNo: 24, +const animation_MovementAnimation__C169886_VT = mkVTable({ + name: "MovementAnimation", + numFields: 7, + classNo: 25, + lastSubtypeNo: 25, maxBgInstances: null, methods: { + "update": animation_MovementAnimation_update__P169888, }, iface: { - "handlers": null, - "set/handlers": null, - "frameCallbacks": null, - "set/frameCallbacks": null, - "frameWorker": null, - "set/frameWorker": null, - "framesInSample": null, - "set/framesInSample": null, - "timeInSample": null, - "set/timeInSample": null, - "lastPerfDump": null, - "set/lastPerfDump": null, - "deltaTimeMillis": null, - "set/deltaTimeMillis": null, - "prevTimeMillis": null, - "set/prevTimeMillis": null, - "idleCallbacks": null, - "set/idleCallbacks": null, - "runningCallbacks": null, - "set/runningCallbacks": null, - "deltaTime": control_EventContext_deltaTime__P166927, - "runCallbacks": control_EventContext_runCallbacks__P171954, - "registerFrameCallbacks": control_EventContext_registerFrameCallbacks__P171955, - "register": control_EventContext_register__P166928, - "unregister": control_EventContext_unregister__P166929, - "registerFrameHandler": control_EventContext_registerFrameHandler__P166930, - "unregisterFrameHandler": control_EventContext_unregisterFrameHandler__P166931, - "registerHandler": control_EventContext_registerHandler__P166932, + "elapsedTime": null, + "set/elapsedTime": null, + "sprite": null, + "set/sprite": null, + "loop": null, + "set/loop": null, + "startX": null, + "set/startX": null, + "startY": null, + "set/startY": null, + "path": null, + "set/path": null, + "nodeInterval": null, + "set/nodeInterval": null, + "update": animation_MovementAnimation_update__P169888, + "init": animation_SpriteAnimation_init__P169881, }, }); const control_FrameCallback__C166919_VT = mkVTable({ name: "FrameCallback", numFields: 2, - classNo: 25, - lastSubtypeNo: 25, + classNo: 28, + lastSubtypeNo: 28, maxBgInstances: null, methods: { }, @@ -69299,8 +75067,8 @@ const control_FrameCallback__C166919_VT = mkVTable({ const control_PollEvent__C171928_VT = mkVTable({ name: "PollEvent", numFields: 6, - classNo: 26, - lastSubtypeNo: 26, + classNo: 29, + lastSubtypeNo: 29, maxBgInstances: null, methods: { }, @@ -69322,8 +75090,8 @@ const control_PollEvent__C171928_VT = mkVTable({ const control_EventHandler__C171949_VT = mkVTable({ name: "EventHandler", numFields: 4, - classNo: 27, - lastSubtypeNo: 27, + classNo: 30, + lastSubtypeNo: 30, maxBgInstances: null, methods: { }, @@ -69343,8 +75111,8 @@ const control_EventHandler__C171949_VT = mkVTable({ const sprites_BaseSprite__C168621_VT = mkVTable({ name: "BaseSprite", numFields: 2, - classNo: 28, - lastSubtypeNo: 31, + classNo: 31, + lastSubtypeNo: 34, maxBgInstances: null, methods: { "__visible": sprites_BaseSprite___visible__P168624, @@ -69368,8 +75136,8 @@ const sprites_BaseSprite__C168621_VT = mkVTable({ const Sprite__C168868_VT = mkVTable({ name: "Sprite", numFields: 30, - classNo: 29, - lastSubtypeNo: 29, + classNo: 32, + lastSubtypeNo: 32, maxBgInstances: null, methods: { "__visible": Sprite___visible__P168923, @@ -69488,6 +75256,7 @@ const Sprite__C168868_VT = mkVTable({ "__update": Sprite___update__P168943, "setFlag": Sprite_setFlag__P168946, "overlapsWith": Sprite_overlapsWith__P168947, + "isHittingTile": Sprite_isHittingTile__P168948, "clearObstacles": Sprite_clearObstacles__P168952, "registerObstacle": Sprite_registerObstacle__P168953, "onDestroyed": Sprite_onDestroyed__P168954, @@ -69503,11 +75272,94 @@ const Sprite__C168868_VT = mkVTable({ }, toStringMethod: Sprite_toString__P168961, }); +const characterAnimations_CharacterState__C174562_VT = mkVTable({ + name: "CharacterState", + numFields: 12, + classNo: 35, + lastSubtypeNo: 35, + maxBgInstances: null, + methods: { + }, + iface: { + "animations": null, + "set/animations": null, + "lastState": null, + "set/lastState": null, + "current": null, + "set/current": null, + "possibleFacingDirections": null, + "set/possibleFacingDirections": null, + "enabled": null, + "set/enabled": null, + "lastX": null, + "set/lastX": null, + "lastY": null, + "set/lastY": null, + "runningStartFrames": null, + "set/runningStartFrames": null, + "timer": null, + "set/timer": null, + "frame": null, + "set/frame": null, + "manualFlags": null, + "set/manualFlags": null, + "sprite": null, + "set/sprite": null, + "update": characterAnimations_CharacterState_update__P174566, + "matchesRule": characterAnimations_CharacterState_matchesRule__P174567, + "pickRule": characterAnimations_CharacterState_pickRule__P174571, + }, +}); +const characterAnimations_CharacterAnimationSceneState__C174557_VT = mkVTable({ + name: "CharacterAnimationSceneState", + numFields: 1, + classNo: 36, + lastSubtypeNo: 36, + maxBgInstances: null, + methods: { + }, + iface: { + "characters": null, + "set/characters": null, + "update": characterAnimations_CharacterAnimationSceneState_update__P174558, + }, +}); +const game_Hitbox__C168735_VT = mkVTable({ + name: "Hitbox", + numFields: 6, + classNo: 37, + lastSubtypeNo: 37, + 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__P168743, + "top": game_Hitbox_top__P168744, + "right": game_Hitbox_right__P168745, + "bottom": game_Hitbox_bottom__P168746, + "isValid": game_Hitbox_isValid__P168747, + "contains": game_Hitbox_contains__P168748, + "updateIfInvalid": game_Hitbox_updateIfInvalid__P168749, + "overlapsWith": game_Hitbox_overlapsWith__P168750, + }, +}); const game_BaseDialog__C169430_VT = mkVTable({ name: "BaseDialog", numFields: 11, - classNo: 32, - lastSubtypeNo: 34, + classNo: 38, + lastSubtypeNo: 40, maxBgInstances: null, methods: { "update": game_BaseDialog_update__P169444, @@ -69556,8 +75408,8 @@ const game_BaseDialog__C169430_VT = mkVTable({ const game_Dialog__C169448_VT = mkVTable({ name: "Dialog", numFields: 13, - classNo: 33, - lastSubtypeNo: 33, + classNo: 39, + lastSubtypeNo: 39, maxBgInstances: null, methods: { "update": game_BaseDialog_update__P169444, @@ -69615,8 +75467,8 @@ const game_Dialog__C169448_VT = mkVTable({ const particles_ParticleSource__C169678_VT = mkVTable({ name: "ParticleSource", numFields: 13, - classNo: 30, - lastSubtypeNo: 30, + classNo: 33, + lastSubtypeNo: 33, maxBgInstances: null, methods: { "__visible": sprites_BaseSprite___visible__P168624, @@ -69677,8 +75529,8 @@ const particles_ParticleSource__C169678_VT = mkVTable({ const PhysicsEngine__C169038_VT = mkVTable({ name: "PhysicsEngine", numFields: 0, - classNo: 35, - lastSubtypeNo: 36, + classNo: 41, + lastSubtypeNo: 42, maxBgInstances: null, methods: { "addSprite": PhysicsEngine_addSprite__P169040, @@ -69698,8 +75550,8 @@ const PhysicsEngine__C169038_VT = mkVTable({ const scene_Camera__C169308_VT = mkVTable({ name: "Camera", numFields: 10, - classNo: 37, - lastSubtypeNo: 37, + classNo: 43, + lastSubtypeNo: 43, maxBgInstances: null, methods: { }, @@ -69739,8 +75591,8 @@ const scene_Camera__C169308_VT = mkVTable({ const scene_Background__C169196_VT = mkVTable({ name: "Background", numFields: 4, - classNo: 38, - lastSubtypeNo: 38, + classNo: 44, + lastSubtypeNo: 44, maxBgInstances: null, methods: { }, @@ -69763,8 +75615,8 @@ const scene_Background__C169196_VT = mkVTable({ const scene_BackgroundLayer__C169206_VT = mkVTable({ name: "BackgroundLayer", numFields: 6, - classNo: 39, - lastSubtypeNo: 39, + classNo: 45, + lastSubtypeNo: 45, maxBgInstances: null, methods: { }, @@ -69787,8 +75639,8 @@ const scene_BackgroundLayer__C169206_VT = mkVTable({ const tiles_TileMap__C169262_VT = mkVTable({ name: "TileMap", numFields: 5, - classNo: 40, - lastSubtypeNo: 40, + classNo: 46, + lastSubtypeNo: 46, maxBgInstances: null, methods: { }, @@ -69826,8 +75678,8 @@ const tiles_TileMap__C169262_VT = mkVTable({ const tiles_TileMapData__C169244_VT = mkVTable({ name: "TileMapData", numFields: 7, - classNo: 41, - lastSubtypeNo: 41, + classNo: 47, + lastSubtypeNo: 47, maxBgInstances: null, methods: { }, @@ -69860,8 +75712,8 @@ const tiles_TileMapData__C169244_VT = mkVTable({ const ArcadePhysicsEngine__C169054_VT = mkVTable({ name: "ArcadePhysicsEngine", numFields: 6, - classNo: 36, - lastSubtypeNo: 36, + classNo: 42, + lastSubtypeNo: 42, maxBgInstances: null, methods: { "addSprite": ArcadePhysicsEngine_addSprite__P169063, @@ -69906,8 +75758,8 @@ const ArcadePhysicsEngine__C169054_VT = mkVTable({ const sprites_SpriteMap__C168973_VT = mkVTable({ name: "SpriteMap", numFields: 5, - classNo: 42, - lastSubtypeNo: 42, + classNo: 48, + lastSubtypeNo: 48, maxBgInstances: null, methods: { }, @@ -69938,8 +75790,8 @@ const sprites_SpriteMap__C168973_VT = mkVTable({ const tiles_Location__C169220_VT = mkVTable({ name: "Location", numFields: 2, - classNo: 43, - lastSubtypeNo: 43, + classNo: 49, + lastSubtypeNo: 49, maxBgInstances: null, methods: { }, @@ -69962,8 +75814,8 @@ const tiles_Location__C169220_VT = mkVTable({ const sprites_SpriteSet__C168990_VT = mkVTable({ name: "SpriteSet", numFields: 1, - classNo: 44, - lastSubtypeNo: 44, + classNo: 50, + lastSubtypeNo: 50, maxBgInstances: null, methods: { }, @@ -69978,42 +75830,11 @@ const sprites_SpriteSet__C168990_VT = mkVTable({ }, toStringMethod: sprites_SpriteSet_toString__P169001, }); -const game_Hitbox__C168735_VT = mkVTable({ - name: "Hitbox", - numFields: 6, - classNo: 45, - lastSubtypeNo: 45, - 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__P168743, - "top": game_Hitbox_top__P168744, - "right": game_Hitbox_right__P168745, - "bottom": game_Hitbox_bottom__P168746, - "isValid": game_Hitbox_isValid__P168747, - "contains": game_Hitbox_contains__P168748, - "updateIfInvalid": game_Hitbox_updateIfInvalid__P168749, - "overlapsWith": game_Hitbox_overlapsWith__P168750, - }, -}); const scene_Renderable__C169327_VT = mkVTable({ name: "Renderable", numFields: 4, - classNo: 31, - lastSubtypeNo: 31, + classNo: 34, + lastSubtypeNo: 34, maxBgInstances: null, methods: { "__visible": scene_Renderable___visible__P169329, @@ -70041,8 +75862,8 @@ const scene_Renderable__C169327_VT = mkVTable({ const effects_ParticleEffect__C169789_VT = mkVTable({ name: "ParticleEffect", numFields: 3, - classNo: 46, - lastSubtypeNo: 47, + classNo: 51, + lastSubtypeNo: 52, maxBgInstances: null, methods: { }, @@ -70060,8 +75881,8 @@ const effects_ParticleEffect__C169789_VT = mkVTable({ const effects_ImageEffect__C169817_VT = mkVTable({ name: "ImageEffect", numFields: 4, - classNo: 48, - lastSubtypeNo: 48, + classNo: 53, + lastSubtypeNo: 53, maxBgInstances: null, methods: { }, @@ -70082,8 +75903,8 @@ const effects_ImageEffect__C169817_VT = mkVTable({ const Render_MotionSet1D__C174841_VT = mkVTable({ name: "MotionSet1D", numFields: 4, - classNo: 49, - lastSubtypeNo: 49, + classNo: 54, + lastSubtypeNo: 54, maxBgInstances: null, methods: { }, @@ -70098,11 +75919,31 @@ const Render_MotionSet1D__C174841_VT = mkVTable({ "set/offset": null, }, }); +const control_Interval__C171923_VT = mkVTable({ + name: "Interval", + numFields: 4, + classNo: 55, + lastSubtypeNo: 55, + maxBgInstances: null, + methods: { + }, + iface: { + "id": null, + "set/id": null, + "func": null, + "set/func": null, + "delay": null, + "set/delay": null, + "mode": null, + "set/mode": null, + "work": control_Interval_work__P171924, + }, +}); const info_PlayerInfoImpl__C169122_VT = mkVTable({ name: "PlayerInfoImpl", numFields: 8, - classNo: 50, - lastSubtypeNo: 50, + classNo: 56, + lastSubtypeNo: 56, maxBgInstances: null, methods: { }, @@ -70135,8 +75976,8 @@ const info_PlayerInfoImpl__C169122_VT = mkVTable({ const info_PlayerInfo__C169144_VT = mkVTable({ name: "PlayerInfo", numFields: 2, - classNo: 51, - lastSubtypeNo: 51, + classNo: 57, + lastSubtypeNo: 57, maxBgInstances: null, methods: { }, @@ -70163,8 +76004,8 @@ const info_PlayerInfo__C169144_VT = mkVTable({ const game_GameOverPlayerScore__C169470_VT = mkVTable({ name: "GameOverPlayerScore", numFields: 4, - classNo: 52, - lastSubtypeNo: 52, + classNo: 58, + lastSubtypeNo: 58, maxBgInstances: null, methods: { }, @@ -70182,8 +76023,8 @@ const game_GameOverPlayerScore__C169470_VT = mkVTable({ const game_GameOverDialog__C169473_VT = mkVTable({ name: "GameOverDialog", numFields: 19, - classNo: 34, - lastSubtypeNo: 34, + classNo: 40, + lastSubtypeNo: 40, maxBgInstances: null, methods: { "update": game_GameOverDialog_update__P169482, @@ -70258,8 +76099,8 @@ const game_GameOverDialog__C169473_VT = mkVTable({ const info_PlayerState__C169080_VT = mkVTable({ name: "PlayerState", numFields: 8, - classNo: 53, - lastSubtypeNo: 53, + classNo: 59, + lastSubtypeNo: 59, maxBgInstances: null, methods: { }, @@ -70285,8 +76126,8 @@ const info_PlayerState__C169080_VT = mkVTable({ const info_InfoState__C172319_VT = mkVTable({ name: "InfoState", numFields: 10, - classNo: 54, - lastSubtypeNo: 54, + classNo: 60, + lastSubtypeNo: 60, maxBgInstances: null, methods: { }, @@ -70316,8 +76157,8 @@ const info_InfoState__C172319_VT = mkVTable({ const JSON_Stringifier__C171946_VT = mkVTable({ name: "Stringifier", numFields: 3, - classNo: 55, - lastSubtypeNo: 55, + classNo: 61, + lastSubtypeNo: 61, maxBgInstances: null, methods: { }, @@ -70335,8 +76176,8 @@ const JSON_Stringifier__C171946_VT = mkVTable({ const music_Playable__C168438_VT = mkVTable({ name: "Playable", numFields: 1, - classNo: 56, - lastSubtypeNo: 57, + classNo: 62, + lastSubtypeNo: 63, maxBgInstances: null, methods: { "play": music_Playable_play__P168441, @@ -70350,8 +76191,8 @@ const music_Playable__C168438_VT = mkVTable({ const scene_OverlapHandler__C169341_VT = mkVTable({ name: "OverlapHandler", numFields: 3, - classNo: 58, - lastSubtypeNo: 58, + classNo: 64, + lastSubtypeNo: 64, maxBgInstances: null, methods: { }, @@ -70367,8 +76208,8 @@ const scene_OverlapHandler__C169341_VT = mkVTable({ const sprites_BaseSpriteSayRenderer__C168786_VT = mkVTable({ name: "BaseSpriteSayRenderer", numFields: 3, - classNo: 59, - lastSubtypeNo: 59, + classNo: 65, + lastSubtypeNo: 65, maxBgInstances: null, methods: { "draw": sprites_BaseSpriteSayRenderer_draw__P168788, @@ -70390,8 +76231,8 @@ const sprites_BaseSpriteSayRenderer__C168786_VT = mkVTable({ const Render_Animations__C171807_VT = mkVTable({ name: "Animations", numFields: 5, - classNo: 60, - lastSubtypeNo: 60, + classNo: 66, + lastSubtypeNo: 66, maxBgInstances: null, methods: { }, @@ -70412,8 +76253,8 @@ const Render_Animations__C171807_VT = mkVTable({ const particles_ParticleFactory__C169714_VT = mkVTable({ name: "ParticleFactory", numFields: 0, - classNo: 61, - lastSubtypeNo: 65, + classNo: 67, + lastSubtypeNo: 71, maxBgInstances: null, methods: { "createParticle": particles_ParticleFactory_createParticle__P169716, @@ -70427,8 +76268,8 @@ const particles_ParticleFactory__C169714_VT = mkVTable({ const tiles_TileMapEventHandler__C169260_VT = mkVTable({ name: "TileMapEventHandler", numFields: 2, - classNo: 66, - lastSubtypeNo: 66, + classNo: 72, + lastSubtypeNo: 72, maxBgInstances: null, methods: { }, @@ -70442,8 +76283,8 @@ const tiles_TileMapEventHandler__C169260_VT = mkVTable({ const grid_Grid__C170863_VT = mkVTable({ name: "Grid", numFields: 4, - classNo: 67, - lastSubtypeNo: 67, + classNo: 73, + lastSubtypeNo: 73, maxBgInstances: null, methods: { }, @@ -70463,8 +76304,8 @@ const grid_Grid__C170863_VT = mkVTable({ const controller_ButtonHandler__C168710_VT = mkVTable({ name: "ButtonHandler", numFields: 2, - classNo: 68, - lastSubtypeNo: 68, + classNo: 74, + lastSubtypeNo: 74, maxBgInstances: null, methods: { }, @@ -70478,8 +76319,8 @@ const controller_ButtonHandler__C168710_VT = mkVTable({ const controller_ButtonEventHandlerState__C168712_VT = mkVTable({ name: "ButtonEventHandlerState", numFields: 3, - classNo: 69, - lastSubtypeNo: 69, + classNo: 75, + lastSubtypeNo: 75, maxBgInstances: null, methods: { }, @@ -70495,8 +76336,8 @@ const controller_ButtonEventHandlerState__C168712_VT = mkVTable({ const scene_systemMenu_PauseMenu__C169622_VT = mkVTable({ name: "PauseMenu", numFields: 7, - classNo: 70, - lastSubtypeNo: 70, + classNo: 76, + lastSubtypeNo: 76, maxBgInstances: null, methods: { }, @@ -70526,8 +76367,8 @@ const scene_systemMenu_PauseMenu__C169622_VT = mkVTable({ const scene_systemMenu_MenuOption__C169614_VT = mkVTable({ name: "MenuOption", numFields: 8, - classNo: 71, - lastSubtypeNo: 71, + classNo: 77, + lastSubtypeNo: 77, maxBgInstances: null, methods: { }, @@ -70560,8 +76401,8 @@ const scene_systemMenu_MenuOption__C169614_VT = mkVTable({ const effects_ScreenEffect__C169793_VT = mkVTable({ name: "ScreenEffect", numFields: 5, - classNo: 47, - lastSubtypeNo: 47, + classNo: 52, + lastSubtypeNo: 52, maxBgInstances: null, methods: { }, @@ -70585,8 +76426,8 @@ const effects_ScreenEffect__C169793_VT = mkVTable({ const particles_SprayFactory__C169718_VT = mkVTable({ name: "SprayFactory", numFields: 3, - classNo: 62, - lastSubtypeNo: 65, + classNo: 68, + lastSubtypeNo: 71, maxBgInstances: null, methods: { "createParticle": particles_SprayFactory_createParticle__P169720, @@ -70608,8 +76449,8 @@ const particles_SprayFactory__C169718_VT = mkVTable({ const particles_AreaFactory__C169724_VT = mkVTable({ name: "AreaFactory", numFields: 8, - classNo: 63, - lastSubtypeNo: 65, + classNo: 69, + lastSubtypeNo: 71, maxBgInstances: null, methods: { "createParticle": particles_AreaFactory_createParticle__P169730, @@ -70641,8 +76482,8 @@ const particles_AreaFactory__C169724_VT = mkVTable({ const particles_ShapeFactory__C169740_VT = mkVTable({ name: "ShapeFactory", numFields: 11, - classNo: 64, - lastSubtypeNo: 65, + classNo: 70, + lastSubtypeNo: 71, maxBgInstances: null, methods: { "createParticle": particles_ShapeFactory_createParticle__P169744, @@ -70681,8 +76522,8 @@ const particles_ShapeFactory__C169740_VT = mkVTable({ const particles_ConfettiFactory__C169745_VT = mkVTable({ name: "ConfettiFactory", numFields: 11, - classNo: 65, - lastSubtypeNo: 65, + classNo: 71, + lastSubtypeNo: 71, maxBgInstances: null, methods: { "createParticle": particles_ShapeFactory_createParticle__P169744, @@ -70721,8 +76562,8 @@ const particles_ConfettiFactory__C169745_VT = mkVTable({ const particles_Particle__C169659_VT = mkVTable({ name: "Particle", numFields: 8, - classNo: 72, - lastSubtypeNo: 72, + classNo: 78, + lastSubtypeNo: 78, maxBgInstances: 200, methods: { }, @@ -70748,8 +76589,8 @@ const particles_Particle__C169659_VT = mkVTable({ const music_MelodyPlayable__C168443_VT = mkVTable({ name: "MelodyPlayable", numFields: 2, - classNo: 57, - lastSubtypeNo: 57, + classNo: 63, + lastSubtypeNo: 63, maxBgInstances: null, methods: { "play": music_MelodyPlayable_play__P168445, @@ -70765,8 +76606,8 @@ const music_MelodyPlayable__C168443_VT = mkVTable({ const music_MelodyPlayer__C168164_VT = mkVTable({ name: "MelodyPlayer", numFields: 2, - classNo: 73, - lastSubtypeNo: 73, + classNo: 79, + lastSubtypeNo: 79, maxBgInstances: null, methods: { }, @@ -70783,8 +76624,8 @@ const music_MelodyPlayer__C168164_VT = mkVTable({ const effects_SceneAnchor__C172841_VT = mkVTable({ name: "SceneAnchor", numFields: 1, - classNo: 74, - lastSubtypeNo: 74, + classNo: 80, + lastSubtypeNo: 80, maxBgInstances: null, methods: { }, @@ -70800,8 +76641,8 @@ const effects_SceneAnchor__C172841_VT = mkVTable({ const MovingSprite__C169052_VT = mkVTable({ name: "MovingSprite", numFields: 7, - classNo: 75, - lastSubtypeNo: 75, + classNo: 81, + lastSubtypeNo: 81, maxBgInstances: null, methods: { }, @@ -70825,8 +76666,8 @@ const MovingSprite__C169052_VT = mkVTable({ const sprites_StaticObstacle__C169025_VT = mkVTable({ name: "StaticObstacle", numFields: 5, - classNo: 76, - lastSubtypeNo: 76, + classNo: 82, + lastSubtypeNo: 82, maxBgInstances: null, methods: { }, @@ -70847,8 +76688,50 @@ const sprites_StaticObstacle__C169025_VT = mkVTable({ "width": sprites_StaticObstacle_width__P169035, }, }); +const animation_Path__C169874_VT = mkVTable({ + name: "Path", + numFields: 12, + classNo: 83, + lastSubtypeNo: 83, + maxBgInstances: null, + methods: { + }, + iface: { + "length": null, + "set/length": null, + "args": null, + "set/args": null, + "currentCommand": null, + "set/currentCommand": null, + "lastControlX": null, + "set/lastControlX": null, + "lastControlY": null, + "set/lastControlY": null, + "startX": null, + "set/startX": null, + "startY": null, + "set/startY": null, + "lastX": null, + "set/lastX": null, + "lastY": null, + "set/lastY": null, + "strIndex": null, + "set/strIndex": null, + "commandIndex": null, + "set/commandIndex": null, + "path": null, + "set/path": null, + "readNextCommand": animation_Path_readNextCommand__P172879, + "reset": animation_Path_reset__P169877, + "readNextToken": animation_Path_readNextToken__P172880, + "commandToArgCount": animation_Path_commandToArgCount__P172881, + "run": animation_Path_run__P169878, + "runCurrentCommand": animation_Path_runCurrentCommand__P172882, + "ensureControlPoint": animation_Path_ensureControlPoint__P172883, + }, +}); -const breakpoints = setupDebugger(1, ["transparency16___171863","tile2___171864","tile1___171865","tile7___171866","tile4___171869","tile5___171868","tile8___171867","star___197128","star2___197131","ultimate_star_rainbow___197134","star3___197137","star4___197140","sec___197155","mySprite___197167","mySprite6___197181","mySprite4___197187","mySprite3___197206","mySprite5___197212","mySprite2___197231","seconds_calculating___197297"]) +const breakpoints = setupDebugger(1, ["transparency16___171863","tile2___171864","tile1___171865","tile7___171866","tile4___171869","tile5___171868","tile8___171867","star___199588","star2___199591","ultimate_star_rainbow___199594","star3___199597","star4___199600","sec___199615","mySprite___199637","mySprite6___199651","mySprite4___199657","mySprite3___199676","mySprite5___199682","mySprite2___199707","seconds_calculating___199773"]) -return _main___P197394 +return _main___P200025 }) diff --git a/assets/version.txt b/assets/version.txt index 6261a05..e21e727 100644 --- a/assets/version.txt +++ b/assets/version.txt @@ -1 +1 @@ -1.3.1 \ No newline at end of file +1.4.0 \ No newline at end of file diff --git a/pxt.json b/pxt.json index 9ff43df..c502aac 100644 --- a/pxt.json +++ b/pxt.json @@ -1,6 +1,6 @@ { "name": "3d maps", - "version": "1.3.1", + "version": "1.4.0", "description": "", "dependencies": { "device": "*",