From 997e45319de359f5f599af07ca7ecc1c79c720f7 Mon Sep 17 00:00:00 2001 From: Ckyiu <38868705+UnsignedArduino@users.noreply.github.com> Date: Mon, 23 Nov 2020 15:28:37 -0500 Subject: [PATCH] 1.2.5 --- assets/js/binary.js | 36184 +++++++++++++++++++++--------------------- assets/version.txt | 2 +- pxt.json | 2 +- 3 files changed, 18301 insertions(+), 17887 deletions(-) diff --git a/assets/js/binary.js b/assets/js/binary.js index 5e06a40..387c923 100644 --- a/assets/js/binary.js +++ b/assets/js/binary.js @@ -1,5 +1,5 @@ -// meta={"simUrl":"https://trg-arcade.userpxt.io/v1.2.10/---simulator","cdnUrl":"https://pxt.azureedge.net","version":"1.2.4","target":"arcade","targetVersion":"1.2.10","repo":"unsignedarduino/fishy-fishy-cross-my-ocean"} -// total=2264771 new=10.80% cached=84.63% other=4.57% +// meta={"simUrl":"https://trg-arcade.userpxt.io/v1.2.10/---simulator","cdnUrl":"https://pxt.azureedge.net","version":"1.2.5","target":"arcade","targetVersion":"1.2.10","repo":"unsignedarduino/fishy-fishy-cross-my-ocean"} +// total=2276126 new=11.00% cached=84.44% other=4.55% (function (ectx) { 'use strict'; const runtime = ectx.runtime; @@ -135,6 +135,7 @@ pxtrt.mapKeyNames = [ "cellWidth", "change", "changeInputIndex", + "changeScoreBy", "charHeight", "charWidth", "characters", @@ -475,6 +476,7 @@ pxtrt.mapKeyNames = [ "setPressed", "setRate", "setRelativeToCamera", + "setScore", "setScrolling", "setSelectedIndex", "setSelection", @@ -602,7 +604,7 @@ const pxsim_pxtrt = pxsim.pxtrt; const pxsim_numops = pxsim.numops; -function _main___P349886(s) { +function _main___P396133(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -1246,93 +1248,93 @@ switch (step) { s.callLocIdx = 80; s.pc = 73; return s.tmp_0; case 73: r0 = s.retval; - globals.NPC___348070 = (r0); + globals.NPC___394652 = (r0); s.tmp_0 = SpriteKind_create__P187344_mk(s); s.callLocIdx = 81; s.pc = 74; return s.tmp_0; case 74: r0 = s.retval; - globals.Map___348073 = (r0); + globals.Map___394655 = (r0); s.tmp_0 = SpriteKind_create__P187344_mk(s); s.callLocIdx = 82; s.pc = 75; return s.tmp_0; case 75: r0 = s.retval; - globals.SurvivedPlayer___348076 = (r0); + globals.SurvivedPlayer___394658 = (r0); s.tmp_0 = SpriteKind_create__P187344_mk(s); s.callLocIdx = 83; s.pc = 76; return s.tmp_0; case 76: r0 = s.retval; - globals.SurvivedNPC___348079 = (r0); + globals.SurvivedNPC___394661 = (r0); s.tmp_0 = spriteutils_createRenderable__P188855_mk(s); s.tmp_0.arg0 = 200; - s.tmp_0.arg1 = inline__P348083; + s.tmp_0.arg1 = inline__P394778; s.callLocIdx = 115; s.pc = 77; return s.tmp_0; case 77: r0 = s.retval; s.tmp_0 = scene_onOverlapTile__P187325_mk(s); - s.tmp_0.arg0 = globals.NPC___348070; + s.tmp_0.arg0 = globals.NPC___394652; s.tmp_0.arg1 = globals.tile12___189161; - s.tmp_0.arg2 = inline__P348125; - s.callLocIdx = 118; s.pc = 78; return s.tmp_0; + s.tmp_0.arg2 = inline__P394820; + s.callLocIdx = 120; s.pc = 78; return s.tmp_0; case 78: r0 = s.retval; s.tmp_0 = info_onCountdownEnd__P187432_mk(s); - s.tmp_0.arg0 = inline__P348141; - s.callLocIdx = 129; s.pc = 79; return s.tmp_0; + s.tmp_0.arg0 = inline__P394852; + s.callLocIdx = 133; s.pc = 79; return s.tmp_0; case 79: r0 = s.retval; s.tmp_0 = scene_onOverlapTile__P187325_mk(s); s.tmp_0.arg0 = globals.Player___187345; s.tmp_0.arg1 = globals.tile12___189161; - s.tmp_0.arg2 = inline__P348183; - s.callLocIdx = 134; s.pc = 80; return s.tmp_0; + s.tmp_0.arg2 = inline__P394900; + s.callLocIdx = 143; s.pc = 80; return s.tmp_0; case 80: r0 = s.retval; s.tmp_0 = sprites_onOverlap__P187323_mk(s); - s.tmp_0.arg0 = globals.NPC___348070; + s.tmp_0.arg0 = globals.NPC___394652; s.tmp_0.arg1 = globals.Enemy___187348; - s.tmp_0.arg2 = inline__P348198; - s.callLocIdx = 146; s.pc = 81; return s.tmp_0; + s.tmp_0.arg2 = inline__P394928; + s.callLocIdx = 155; s.pc = 81; return s.tmp_0; case 81: r0 = s.retval; s.tmp_0 = blockMenu_onMenuOptionSelected__P188904_mk(s); - s.tmp_0.arg0 = inline__P348239; - s.callLocIdx = 192; s.pc = 82; return s.tmp_0; + s.tmp_0.arg0 = inline__P395244; + s.callLocIdx = 202; s.pc = 82; return s.tmp_0; case 82: r0 = s.retval; s.tmp_0 = sprites_onOverlap__P187323_mk(s); s.tmp_0.arg0 = globals.Player___187345; s.tmp_0.arg1 = globals.Enemy___187348; - s.tmp_0.arg2 = inline__P348248; - s.callLocIdx = 207; s.pc = 83; return s.tmp_0; + s.tmp_0.arg2 = inline__P395251; + s.callLocIdx = 217; s.pc = 83; return s.tmp_0; case 83: r0 = s.retval; - globals.sprite_closest_sprite___348290 = (null); - globals.shortest_distance___348292 = (0); - globals.sprite_map___348294 = (null); - globals.sprite_shark___348296 = (null); - globals.map___348298 = (null); - globals.sprite_player_fish___348300 = (null); - globals.selected_option___348243 = (false); - globals.location___348302 = (null); - globals.sprite_fish___348304 = (null); - globals.local_choice___348306 = (0); + globals.sprite_closest_sprite___395293 = (null); + globals.shortest_distance___395295 = (0); + globals.sprite_map___395223 = (null); + globals.sprite_shark___395177 = (null); + globals.map___395139 = (null); + globals.sprite_player_fish___395118 = (null); + globals.selected_option___394843 = (false); + globals.location___394737 = (null); + globals.sprite_fish___394690 = (null); + globals.local_choice___394685 = (0); r0 = pxsim_Array__mk(); - globals.right_fish_animations___348307 = (r0); + globals.right_fish_animations___394676 = (r0); r0 = pxsim_Array__mk(); - globals.left_fish_animations___348308 = (r0); + globals.left_fish_animations___394667 = (r0); r0 = pxsim_String_.mkEmpty(); - globals.message___348118 = (r0); - globals.loading___348087 = (0); + globals.message___394813 = (r0); + globals.loading___394782 = (0); r0 = pxsim_Array__mk(); - globals.paths___348167 = (r0); - globals.last_15___348134 = (false); - globals.player_made_it___348177 = (false); - globals.in_game___348145 = (false); - globals.user_shark_count___348310 = (0); - globals.user_fish_count___348312 = (0); + globals.paths___394754 = (r0); + globals.last_15___394829 = (false); + globals.player_made_it___394890 = (false); + globals.in_game___394856 = (false); + globals.user_shark_count___395004 = (0); + globals.user_fish_count___395047 = (0); s.tmp_1 = blockSettings_exists__P188973_mk(s); s.tmp_1.arg0 = "fish_count"; - s.callLocIdx = 208; s.pc = 84; return s.tmp_1; + s.callLocIdx = 218; s.pc = 84; return s.tmp_1; case 84: r0 = s.retval; s.tmp_0 = r0; @@ -1340,17 +1342,17 @@ switch (step) { if (!r0) { step = 1; continue; } s.tmp_2 = blockSettings_readNumber__P188967_mk(s); s.tmp_2.arg0 = "fish_count"; - s.callLocIdx = 209; s.pc = 85; return s.tmp_2; + s.callLocIdx = 219; s.pc = 85; return s.tmp_2; case 85: r0 = s.retval; - globals.user_fish_count___348312 = (r0); + globals.user_fish_count___395047 = (r0); { step = 2; continue; } case 1: - globals.user_fish_count___348312 = (31); + globals.user_fish_count___395047 = (31); case 2: s.tmp_1 = blockSettings_exists__P188973_mk(s); s.tmp_1.arg0 = "shark_count"; - s.callLocIdx = 210; s.pc = 86; return s.tmp_1; + s.callLocIdx = 220; s.pc = 86; return s.tmp_1; case 86: r0 = s.retval; s.tmp_0 = r0; @@ -1358,32 +1360,32 @@ switch (step) { if (!r0) { step = 3; continue; } s.tmp_2 = blockSettings_readNumber__P188967_mk(s); s.tmp_2.arg0 = "shark_count"; - s.callLocIdx = 211; s.pc = 87; return s.tmp_2; + s.callLocIdx = 221; s.pc = 87; return s.tmp_2; case 87: r0 = s.retval; - globals.user_shark_count___348310 = (r0); + globals.user_shark_count___395004 = (r0); { step = 4; continue; } case 3: - globals.user_shark_count___348310 = (31); + globals.user_shark_count___395004 = (31); case 4: - globals.in_game___348145 = (false); - globals.player_made_it___348177 = (false); - globals.last_15___348134 = (false); - globals.in_menu___348325 = (true); + globals.in_game___394856 = (false); + globals.player_made_it___394890 = (false); + globals.last_15___394829 = (false); + globals.in_menu___395311 = (true); r0 = pxsim_Array__mk(); - globals.paths___348167 = (r0); - globals.loading___348087 = (-1); + globals.paths___394754 = (r0); + globals.loading___394782 = (-1); r0 = pxsim_String_.mkEmpty(); - globals.message___348118 = (r0); + globals.message___394813 = (r0); s.tmp_0 = scene_setBackgroundColor__P187674_mk(s); s.tmp_0.arg0 = 9; - s.callLocIdx = 212; s.pc = 88; return s.tmp_0; + s.callLocIdx = 222; s.pc = 88; return s.tmp_0; case 88: r0 = s.retval; s.tmp_0 = scene_setBackgroundImage__P187676_mk(s); - r0 = pxsim.image.ofBuffer(_hex348335); + r0 = pxsim.image.ofBuffer(_hex395321); s.tmp_0.arg0 = r0; - s.callLocIdx = 213; s.pc = 89; return s.tmp_0; + s.callLocIdx = 223; s.pc = 89; return s.tmp_0; case 89: r0 = s.retval; r0 = pxsim_Array__mk(); @@ -1401,29 +1403,29 @@ switch (step) { r0 = pxsim_Array__push(s.tmp_0, globals.tile11___189160); s.tmp_1 = tiles_setTilemap__P187558_mk(s); s.tmp_2 = tiles_createTilemap__P187557_mk(s); - s.tmp_2.arg0 = _hex348339; - r0 = pxsim.image.ofBuffer(_hex348341); + s.tmp_2.arg0 = _hex395325; + r0 = pxsim.image.ofBuffer(_hex395327); s.tmp_2.arg1 = r0; s.tmp_2.arg2 = s.tmp_0; s.tmp_2.arg3 = 4; - s.callLocIdx = 214; s.pc = 91; return s.tmp_2; + s.callLocIdx = 224; s.pc = 91; return s.tmp_2; case 91: r0 = s.retval; s.tmp_1.arg0 = r0; - s.callLocIdx = 215; s.pc = 90; return s.tmp_1; + s.callLocIdx = 225; s.pc = 90; return s.tmp_1; case 90: r0 = s.retval; - s.tmp_0 = fade_out__P348138_mk(s); - s.callLocIdx = 216; s.pc = 92; return s.tmp_0; + s.tmp_0 = fade_out__P394836_mk(s); + s.callLocIdx = 226; s.pc = 92; return s.tmp_0; case 92: r0 = s.retval; case 5: - r0 = pxsim_numops_toBoolDecr(globals.in_menu___348325); + r0 = pxsim_numops_toBoolDecr(globals.in_menu___395311); if (!r0) { step = 24; continue; } s.tmp_0 = blockMenu_setColors__P188900_mk(s); s.tmp_0.arg0 = 9; s.tmp_0.arg1 = 8; - s.callLocIdx = 217; s.pc = 93; return s.tmp_0; + s.callLocIdx = 227; s.pc = 93; return s.tmp_0; case 93: r0 = s.retval; r0 = pxsim_Array__mk(); @@ -1437,15 +1439,15 @@ switch (step) { s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = 1; s.tmp_1.arg2 = 4; - s.callLocIdx = 218; s.pc = 94; return s.tmp_1; + s.callLocIdx = 228; s.pc = 94; return s.tmp_1; case 94: r0 = s.retval; - s.tmp_0 = wait_for_select_and_close__P348139_mk(s); - s.callLocIdx = 219; s.pc = 95; return s.tmp_0; + s.tmp_0 = wait_for_select_and_close__P394841_mk(s); + s.callLocIdx = 229; s.pc = 95; return s.tmp_0; case 95: r0 = s.retval; s.tmp_2 = blockMenu_selectedMenuIndex__P188902_mk(s); - s.callLocIdx = 220; s.pc = 96; return s.tmp_2; + s.callLocIdx = 230; s.pc = 96; return s.tmp_2; case 96: r0 = s.retval; s.tmp_1 = r0; @@ -1454,12 +1456,12 @@ switch (step) { r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 8; continue; } s.tmp_3 = game_showLongText__P187738_mk(s); - if ((globals.user_fish_count___348312) && (globals.user_fish_count___348312).vtable) { + if ((globals.user_fish_count___395047) && (globals.user_fish_count___395047).vtable) { setupResume(s, 98); - pxsim_String__stringConv(globals.user_fish_count___348312); + pxsim_String__stringConv(globals.user_fish_count___395047); checkResumeConsumed(); return; - } else { s.retval = (globals.user_fish_count___348312) + ""; } + } else { s.retval = (globals.user_fish_count___395047) + ""; } case 98: r0 = s.retval; s.tmp_10 = r0; @@ -1485,12 +1487,12 @@ switch (step) { case 100: r0 = s.retval; s.tmp_6 = r0; - if ((globals.user_shark_count___348310) && (globals.user_shark_count___348310).vtable) { + if ((globals.user_shark_count___395004) && (globals.user_shark_count___395004).vtable) { setupResume(s, 101); - pxsim_String__stringConv(globals.user_shark_count___348310); + pxsim_String__stringConv(globals.user_shark_count___395004); checkResumeConsumed(); return; - } else { s.retval = (globals.user_shark_count___348310) + ""; } + } else { s.retval = (globals.user_shark_count___395004) + ""; } case 101: r0 = s.retval; s.tmp_11 = r0; @@ -1508,25 +1510,25 @@ switch (step) { r0 = pxsim_String__concat(s.tmp_4, " sharks\\n"); s.tmp_3.arg0 = r0; s.tmp_3.arg1 = 0; - s.callLocIdx = 221; s.pc = 97; return s.tmp_3; + s.callLocIdx = 231; s.pc = 97; return s.tmp_3; case 97: r0 = s.retval; s.tmp_1 = game_ask__P187799_mk(s); s.tmp_1.arg0 = "Continue with these"; s.tmp_1.arg1 = "options?"; - s.callLocIdx = 222; s.pc = 103; return s.tmp_1; + s.callLocIdx = 232; s.pc = 103; return s.tmp_1; case 103: r0 = s.retval; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 6; continue; } - globals.in_menu___348325 = (false); + globals.in_menu___395311 = (false); case 6: case 7: { step = 23; continue; } case 8: s.tmp_2 = blockMenu_selectedMenuIndex__P188902_mk(s); - s.callLocIdx = 223; s.pc = 104; return s.tmp_2; + s.callLocIdx = 233; s.pc = 104; return s.tmp_2; case 104: r0 = s.retval; s.tmp_1 = r0; @@ -1537,7 +1539,7 @@ switch (step) { s.tmp_3 = game_showLongText__P187738_mk(s); s.tmp_3.arg0 = "Hello there! Welcome to Fishy Fishy Cross My Ocean!"; s.tmp_3.arg1 = 0; - s.callLocIdx = 224; s.pc = 105; return s.tmp_3; + s.callLocIdx = 234; s.pc = 105; return s.tmp_3; case 105: r0 = s.retval; s.tmp_0 = game_showLongText__P187738_mk(s); @@ -1579,7 +1581,7 @@ switch (step) { r0 = pxsim_String__concat(s.tmp_1, s.tmp_7); s.tmp_0.arg0 = r0; s.tmp_0.arg1 = 0; - s.callLocIdx = 225; s.pc = 106; return s.tmp_0; + s.callLocIdx = 235; s.pc = 106; return s.tmp_0; case 106: r0 = s.retval; s.tmp_0 = game_showLongText__P187738_mk(s); @@ -1623,7 +1625,7 @@ switch (step) { r0 = pxsim_String__concat(s.tmp_1, s.tmp_8); s.tmp_0.arg0 = r0; s.tmp_0.arg1 = 0; - s.callLocIdx = 226; s.pc = 110; return s.tmp_0; + s.callLocIdx = 236; s.pc = 110; return s.tmp_0; case 110: r0 = s.retval; s.tmp_0 = game_showLongText__P187738_mk(s); @@ -1663,19 +1665,19 @@ switch (step) { r0 = pxsim_String__concat(s.tmp_1, "this in real life, and you'll be fine."); s.tmp_0.arg0 = r0; s.tmp_0.arg1 = 0; - s.callLocIdx = 227; s.pc = 114; return s.tmp_0; + s.callLocIdx = 237; s.pc = 114; return s.tmp_0; case 114: r0 = s.retval; s.tmp_0 = game_showLongText__P187738_mk(s); s.tmp_0.arg0 = "Good luck, and hope you don't become a shark's breakfast!"; s.tmp_0.arg1 = 0; - s.callLocIdx = 228; s.pc = 118; return s.tmp_0; + s.callLocIdx = 238; s.pc = 118; return s.tmp_0; case 118: r0 = s.retval; { step = 22; continue; } case 9: s.tmp_2 = blockMenu_selectedMenuIndex__P188902_mk(s); - s.callLocIdx = 229; s.pc = 119; return s.tmp_2; + s.callLocIdx = 239; s.pc = 119; return s.tmp_2; case 119: r0 = s.retval; s.tmp_1 = r0; @@ -1686,43 +1688,43 @@ switch (step) { s.tmp_3 = game_askForNumber__P187790_mk(s); s.tmp_3.arg0 = "Please input the amount of fish you want:"; s.tmp_3.arg1 = 2; - s.callLocIdx = 230; s.pc = 120; return s.tmp_3; + s.callLocIdx = 240; s.pc = 120; return s.tmp_3; case 120: r0 = s.retval; - globals.user_fish_count___348312 = (r0); - r0 = (globals.user_fish_count___348312 > 31); + globals.user_fish_count___395047 = (r0); + r0 = (globals.user_fish_count___395047 > 31); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 10; continue; } s.tmp_1 = game_showLongText__P187738_mk(s); s.tmp_1.arg0 = "31 is the maximum amount of fish! (Fish count is now 31)"; s.tmp_1.arg1 = 0; - s.callLocIdx = 231; s.pc = 121; return s.tmp_1; + s.callLocIdx = 241; s.pc = 121; return s.tmp_1; case 121: r0 = s.retval; - globals.user_fish_count___348312 = (31); + globals.user_fish_count___395047 = (31); { step = 13; continue; } case 10: - r0 = (globals.user_fish_count___348312 < 1); + r0 = (globals.user_fish_count___395047 < 1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 11; continue; } s.tmp_1 = game_showLongText__P187738_mk(s); s.tmp_1.arg0 = "1 is the minimum amount of fish! (Fish count is now 1)"; s.tmp_1.arg1 = 0; - s.callLocIdx = 232; s.pc = 122; return s.tmp_1; + s.callLocIdx = 242; s.pc = 122; return s.tmp_1; case 122: r0 = s.retval; - globals.user_fish_count___348312 = (1); + globals.user_fish_count___395047 = (1); { step = 12; continue; } case 11: s.tmp_0 = game_showLongText__P187738_mk(s); - if ((globals.user_fish_count___348312) && (globals.user_fish_count___348312).vtable) { + if ((globals.user_fish_count___395047) && (globals.user_fish_count___395047).vtable) { setupResume(s, 124); - pxsim_String__stringConv(globals.user_fish_count___348312); + pxsim_String__stringConv(globals.user_fish_count___395047); checkResumeConsumed(); return; - } else { s.retval = (globals.user_fish_count___348312) + ""; } + } else { s.retval = (globals.user_fish_count___395047) + ""; } case 124: r0 = s.retval; s.tmp_3 = r0; @@ -1740,7 +1742,7 @@ switch (step) { r0 = pxsim_String__concat(s.tmp_1, "!"); s.tmp_0.arg0 = r0; s.tmp_0.arg1 = 0; - s.callLocIdx = 233; s.pc = 123; return s.tmp_0; + s.callLocIdx = 243; s.pc = 123; return s.tmp_0; case 123: r0 = s.retval; case 12: @@ -1748,7 +1750,7 @@ switch (step) { { step = 21; continue; } case 14: s.tmp_2 = blockMenu_selectedMenuIndex__P188902_mk(s); - s.callLocIdx = 234; s.pc = 126; return s.tmp_2; + s.callLocIdx = 244; s.pc = 126; return s.tmp_2; case 126: r0 = s.retval; s.tmp_1 = r0; @@ -1759,30 +1761,30 @@ switch (step) { s.tmp_3 = game_askForNumber__P187790_mk(s); s.tmp_3.arg0 = "Please input the amount of sharks you want:"; s.tmp_3.arg1 = 2; - s.callLocIdx = 235; s.pc = 127; return s.tmp_3; + s.callLocIdx = 245; s.pc = 127; return s.tmp_3; case 127: r0 = s.retval; - globals.user_shark_count___348310 = (r0); - r0 = (globals.user_shark_count___348310 < 1); + globals.user_shark_count___395004 = (r0); + r0 = (globals.user_shark_count___395004 < 1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 15; continue; } s.tmp_1 = game_showLongText__P187738_mk(s); s.tmp_1.arg0 = "1 is the minimum amount of sharks! (Shark count is now 1)"; s.tmp_1.arg1 = 0; - s.callLocIdx = 236; s.pc = 128; return s.tmp_1; + s.callLocIdx = 246; s.pc = 128; return s.tmp_1; case 128: r0 = s.retval; - globals.user_shark_count___348310 = (1); + globals.user_shark_count___395004 = (1); { step = 16; continue; } case 15: s.tmp_0 = game_showLongText__P187738_mk(s); - if ((globals.user_shark_count___348310) && (globals.user_shark_count___348310).vtable) { + if ((globals.user_shark_count___395004) && (globals.user_shark_count___395004).vtable) { setupResume(s, 130); - pxsim_String__stringConv(globals.user_shark_count___348310); + pxsim_String__stringConv(globals.user_shark_count___395004); checkResumeConsumed(); return; - } else { s.retval = (globals.user_shark_count___348310) + ""; } + } else { s.retval = (globals.user_shark_count___395004) + ""; } case 130: r0 = s.retval; s.tmp_3 = r0; @@ -1800,14 +1802,14 @@ switch (step) { r0 = pxsim_String__concat(s.tmp_1, "!"); s.tmp_0.arg0 = r0; s.tmp_0.arg1 = 0; - s.callLocIdx = 237; s.pc = 129; return s.tmp_0; + s.callLocIdx = 247; s.pc = 129; return s.tmp_0; case 129: r0 = s.retval; case 16: { step = 20; continue; } case 17: s.tmp_2 = blockMenu_selectedMenuIndex__P188902_mk(s); - s.callLocIdx = 238; s.pc = 132; return s.tmp_2; + s.callLocIdx = 248; s.pc = 132; return s.tmp_2; case 132: r0 = s.retval; s.tmp_1 = r0; @@ -1818,11 +1820,11 @@ switch (step) { s.tmp_3 = game_showLongText__P187738_mk(s); s.tmp_3.arg0 = "Default options set!"; s.tmp_3.arg1 = 0; - s.callLocIdx = 239; s.pc = 133; return s.tmp_3; + s.callLocIdx = 249; s.pc = 133; return s.tmp_3; case 133: r0 = s.retval; - globals.user_fish_count___348312 = (31); - globals.user_shark_count___348310 = (2); + globals.user_fish_count___395047 = (31); + globals.user_shark_count___395004 = (2); case 18: case 19: case 20: @@ -1831,48 +1833,48 @@ switch (step) { case 23: { step = 5; continue; } case 24: - s.tmp_0 = fade_in__P348179_mk(s); - s.callLocIdx = 240; s.pc = 134; return s.tmp_0; + s.tmp_0 = fade_in__P394892_mk(s); + s.callLocIdx = 250; s.pc = 134; return s.tmp_0; case 134: r0 = s.retval; s.tmp_0 = scene_setBackgroundImage__P187676_mk(s); - r0 = pxsim.image.ofBuffer(_hex348509); + r0 = pxsim.image.ofBuffer(_hex395495); s.tmp_0.arg0 = r0; - s.callLocIdx = 241; s.pc = 135; return s.tmp_0; + s.callLocIdx = 251; s.pc = 135; return s.tmp_0; case 135: r0 = s.retval; - globals.loading___348087 = (0); + globals.loading___394782 = (0); s.tmp_0 = blockSettings_writeNumber__P188966_mk(s); s.tmp_0.arg0 = "fish_count"; - s.tmp_0.arg1 = globals.user_fish_count___348312; - s.callLocIdx = 242; s.pc = 136; return s.tmp_0; + s.tmp_0.arg1 = globals.user_fish_count___395047; + s.callLocIdx = 252; s.pc = 136; return s.tmp_0; case 136: r0 = s.retval; s.tmp_0 = blockSettings_writeNumber__P188966_mk(s); s.tmp_0.arg0 = "shark_count"; - s.tmp_0.arg1 = globals.user_shark_count___348310; - s.callLocIdx = 243; s.pc = 137; return s.tmp_0; + s.tmp_0.arg1 = globals.user_shark_count___395004; + s.callLocIdx = 253; s.pc = 137; return s.tmp_0; case 137: r0 = s.retval; - s.tmp_0 = fade_out__P348138_mk(s); - s.callLocIdx = 244; s.pc = 138; return s.tmp_0; + s.tmp_0 = fade_out__P394836_mk(s); + s.callLocIdx = 254; s.pc = 138; return s.tmp_0; case 138: r0 = s.retval; s.tmp_0 = game_runtime__P187765_mk(s); - s.callLocIdx = 245; s.pc = 139; return s.tmp_0; + s.callLocIdx = 255; s.pc = 139; return s.tmp_0; case 139: r0 = s.retval; - globals.loading_start_time___348517 = (r0); - s.tmp_0 = initilize_map__P348234_mk(s); - s.callLocIdx = 246; s.pc = 140; return s.tmp_0; + globals.loading_start_time___395503 = (r0); + s.tmp_0 = initilize_map__P394965_mk(s); + s.callLocIdx = 256; s.pc = 140; return s.tmp_0; case 140: r0 = s.retval; s.tmp_6 = game_runtime__P187765_mk(s); - s.callLocIdx = 247; s.pc = 141; return s.tmp_6; + s.callLocIdx = 257; s.pc = 141; return s.tmp_6; case 141: r0 = s.retval; s.tmp_5 = r0; - r0 = (s.tmp_5 - globals.loading_start_time___348517); + r0 = (s.tmp_5 - globals.loading_start_time___395503); s.tmp_4 = r0; r0 = (s.tmp_4 / 1000); s.tmp_3 = r0; @@ -1897,55 +1899,61 @@ switch (step) { r0 = s.retval; s.tmp_0 = r0; r0 = pxsim_String__concat(s.tmp_0, " seconds"); - globals.message___348118 = (r0); - s.tmp_0 = fade_in__P348179_mk(s); - s.callLocIdx = 248; s.pc = 144; return s.tmp_0; + globals.message___394813 = (r0); + s.tmp_0 = fade_in__P394892_mk(s); + s.callLocIdx = 258; s.pc = 144; return s.tmp_0; case 144: r0 = s.retval; - globals.loading___348087 = (-1); - s.tmp_0 = create_minimap__P348237_mk(s); - s.callLocIdx = 249; s.pc = 145; return s.tmp_0; + globals.loading___394782 = (-1); + s.tmp_0 = create_minimap__P395221_mk(s); + s.callLocIdx = 259; s.pc = 145; return s.tmp_0; case 145: r0 = s.retval; - s.tmp_0 = start_game__P348233_mk(s); - s.callLocIdx = 250; s.pc = 146; return s.tmp_0; + s.tmp_0 = start_game__P394963_mk(s); + s.callLocIdx = 260; s.pc = 146; return s.tmp_0; case 146: r0 = s.retval; - s.tmp_0 = fade_out__P348138_mk(s); - s.callLocIdx = 251; s.pc = 147; return s.tmp_0; + s.tmp_0 = fade_out__P394836_mk(s); + s.callLocIdx = 261; s.pc = 147; return s.tmp_0; case 147: r0 = s.retval; s.tmp_0 = forever__P187064_mk(s); - s.tmp_0.arg0 = inline__P348543; - s.callLocIdx = 257; s.pc = 148; return s.tmp_0; + s.tmp_0.arg0 = inline__P395529; + s.callLocIdx = 267; s.pc = 148; return s.tmp_0; case 148: r0 = s.retval; s.tmp_0 = forever__P187064_mk(s); - s.tmp_0.arg0 = inline__P348555; - s.callLocIdx = 260; s.pc = 149; return s.tmp_0; + s.tmp_0.arg0 = inline__P395541; + s.callLocIdx = 270; s.pc = 149; return s.tmp_0; case 149: r0 = s.retval; s.tmp_0 = forever__P187064_mk(s); - s.tmp_0.arg0 = inline__P348560; - s.callLocIdx = 273; s.pc = 150; return s.tmp_0; + s.tmp_0.arg0 = inline__P395546; + s.callLocIdx = 283; s.pc = 150; return s.tmp_0; case 150: r0 = s.retval; s.tmp_0 = forever__P187064_mk(s); - s.tmp_0.arg0 = inline__P348625; - s.callLocIdx = 292; s.pc = 151; return s.tmp_0; + s.tmp_0.arg0 = inline__P395611; + s.callLocIdx = 302; s.pc = 151; return s.tmp_0; case 151: + r0 = s.retval; + s.tmp_0 = game_onUpdateInterval__P187761_mk(s); + s.tmp_0.arg0 = 100; + s.tmp_0.arg1 = inline__P395664; + s.callLocIdx = 304; s.pc = 152; return s.tmp_0; + case 152: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -_main___P349886.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"pxt_modules/Timers/main.ts","functionName":"
","argumentNames":[]} -_main___P349886.continuations = [ 98,99,100,101,102,107,108,109,111,112,113,115,116,117,124,125,130,131,142,143 ] +_main___P396133.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"pxt_modules/Timers/main.ts","functionName":"
","argumentNames":[]} +_main___P396133.continuations = [ 98,99,100,101,102,107,108,109,111,112,113,115,116,117,124,125,130,131,142,143 ] -function _main___P349886_mk(s) { +function _main___P396133_mk(s) { checkStack(s.depth); return { - parent: s, fn: _main___P349886, depth: s.depth + 1, + parent: s, fn: _main___P396133, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -2003,10 +2011,10 @@ const _hex191546 = pxsim.BufferMethods.createBufferFromHex("87041000100000008c68 const _hex191550 = pxsim.BufferMethods.createBufferFromHex("87041000100000009999999999999999999889898888999989898989899999998999989998889999999999999999999989999989999999998988888988889999899999899999999999999999999999999988889999999999898999999999999999888899999999999999999999999999999999999999999999999999999999999999999999999999") const _hex191554 = pxsim.BufferMethods.createBufferFromHex("87041000100000009999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999") const _hex191558 = pxsim.BufferMethods.createBufferFromHex("87041000100000001111ffff1111ffff818888ff1111ffff81818fff1111ffff81818fff1111ffffffff1111ffff11118f888811ffff1111fff81111ffff1111ff8f1111ffff1111818888ff1111ffff1111ffff1111ffff818888ff1111ffff81118fff1111ffffff881811ffff1111ffff1111ffff1111ffff1111ffff1111ffff1111ffff1111") -const _hex348335 = pxsim.BufferMethods.createBufferFromHex("8704a00078000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000666666666666660600666666666666660600666666666666660600000000000000000000000000000000000000000000000000000000000000000000868888888888888800868888888888888800868888888888888800000000000000000000000000000000000000000000000000000000000000000000868888888888888800868888888888888800868888888888888800000000000000000000000000000000000000000000000000000000000000000000868888888888888800868888888888888800868888888888888800000000000000000000000000000000000000000000000000000000000000000000868800868800000000868800000000868800868800000000868800000000000000000000000000000000000000000000000000000000000000000000868800868800000000868800000000868800868800000000868800000000000000000000000000000000000000000000000000000000000000000000868800868800000000868800000000868800868866666666868800000000000000000000000000000000000000000000000000000000000000000000868800868800000000868800000000868800868888888888888800000000000000000000000000000000000000000000000000000000000000000000868800868800000000868800000000868800868888888888888800000000000000000000000000000000000000000000000000000000000000000000808800808800000000808800000000808800808888888888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000660600000000660600666666666666660600666666666666660600000000000000000000000000000000000000000000000000000000000000000000868800000000868800868888888888888800868888888888888800000000000000000000000000000000000000000000000000000000000000000000868800000000868800868888888888888800868888888888888800000000000000000000000000000000000000000000000000000000000000000000868866666666868800868888888888888800868888888888888800000000000000000000000000000000000000000000000000000000000000000000868888888888888800868800868800000000868800000000868800000000000000000000000000000000000000000000000000000000000000000000868888888888888800868800868800000000868800000000868800000000000000000000000000000000000000000000000000000000000000000000868888888888888800868800808866666600868800000000868800000000000000000000000000000000000000000000000000000000000000000000868800000000868800868888086088888800868800000000868800000000000000000000000000000000000000000000000000000000000000000000868800000000868800868888086088888800868800000000868800000000000000000000000000000000000000000000000000000000000000000000808800000000808800808888080088888800808800000000808800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000666666660600660600666666666666660600666666666666660600000000000000000000000000000000000000000000000000000000000000000000868888888800868800868888888888888800868888888888888800000000000000000000000000000000000000000000000000000000000000000000868888888800868800868888888888888800868888888888888800000000000000000000000000000000000000000000000000000000000000000000868888888800868800868888888888888800868888888888888800000000000000000000000000000000000000000000000000000000000000000000868800868800868800868800000000868800868800868800868800000000000000000000000000000000000000000000000000000000000000000000868800868800868800868800000000868800868800868800868800000000000000000000000000000000000000000000000000000000000000000000868800868800868800868866666666868800868800868800868800000000000000000000000000000000000000000000000000000000000000000000868800868888888800868888888888888800868800868800868800000000000000000000000000000000000000000000000000000000000000000000868800868888888800868888888888888800868800868800868800000000000000000000000000000000000000000000000000000000000000000000808800808888888800808888888888888800808800808800808800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000666666666666660600666666660600660600666666666666660600000000000000000000000000000000000000000000000000000000000000000000868888888888888800868888888800868800868888888888888800000000000000000000000000000000000000000000000000000000000000000000868888888888888800868888888800868800868888888888888800000000000000000000000000000000000000000000000000000000000000000000808888888888888800868888888800868800868888888888888800000000000000000000000000000000000000000000000000000000000000000000000000868800000000868800868800868800868800868800000000000000000000000000000000000000000000000000000000000000000000000000000000868800000000868800868800868800868800868800000000000000000000000000000000000000000000000000000000000000000000000000666666868866660600868800868800868800868866868866660600000000000000000000000000000000000000000000000000000000000000000000868888888888888800868800868888888800868888888888888800000000000000000000000000000000000000000000000000000000000000000000868888888888888800868800868888888800868888888888888800000000000000000000000000000000000000000000000000000000000000000000808888888888888800808800808888888800808888888888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000666666660600000000666666660600660600666666666666660600000000000000000000000000000000000000000000000000000000000000000000868888888800000000868888888800868800868888888888888800000000000000000000000000000000000000000000000000000000000000000000868888888800000000868888888800868800868888888888888800000000000000000000000000000000000000000000000000000000000000000000808888888866660600868888888800868800868888888888888800000000000000000000000000000000000000000000000000000000000000000000000000868888888800868800868800868800006088080000000000000000000000000000000000000000000000000000000000000000000000000000000000868888888800868800868800868800006088080000000000000000000000000000000000000000000000000000000000000000000000000000666666868888888800868800868800868800000088686600000000000000000000000000000000000000000000000000000000000000000000000000868888888800000000868800868888888800000000868800000000000000000000000000000000000000000000000000000000000000000000000000868888888800000000868800868888888800000000868800000000000000000000000000000000000000000000000000000000000000000000000000808888888800000000808800808888888800666666868866660600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000868888888888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000868888888888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000808888888888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000666666666666660600666666666666660600666666660600660600000000000000000000000000000000000000000000000000000000000000000000868888888888888800868888888888888800868888888800868800000000000000000000000000000000000000000000000000000000000000000000868888888888888800868888888888888800868888888800868800000000000000000000000000000000000000000000000000000000000000000000868888888888888800808888888888888800808888888800808800000000000000000000000000000000000000000000000000000000000000000000868800868800000000006088080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000868800868800000000006088080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000868800868800000000000088686600000000808888000000000000000000000000000000000000000000000000000000000000000000000000000000868800868800000000000000868800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000868800868800000000000000868800000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000808800808800000000006066868800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006088080000000000808088000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006088080000000000808080000000000000000000000000000000000000000000000000000000000000000000000000000000660600000000660600666688686666660600808880000000000000000000000000000000000000000000000000000000000000000000000000000000868800000000868800868888888888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000868800000000868800868888888888888800000080000000000000000000000000000000000000000000000000000000000000000000000000000000868866666666868800808888888888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000868888888888888800000000000000000000808800000000000000000000000000000000000000000000000000000000000000000000000000000000868888888888888800000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000868888888888888800666666660600000000808888000000000000000000000000000000000000000000000000000000000000000000000000000000868800000000868800868888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000868800000000868800868888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000808800000000808800808888888866660600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000868888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000868888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000666666660600660600666666868888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000868888888800868800868888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000868888888800868800868888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000868888888800868800808888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000868800868800868800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000868800868800868800000000000000000000cc000000ff00000000000000000000000000000000000000000000000000000000000000000000000000868800868800868800000000000000000000bc0c00fffb00000000000000000000000000000000000000000000000000000000000000000000000000868800868888888800000000000000000000bcccffbcfb00000000000000000000000000000000000000000000000000000000000000000000000000868800868888888800000000000000000000dccbccbb0f00000000000000000000000000000000000000000000000000000000000000000000000000808800808888888800000000000000000000dcbdccfb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0bdfb0f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f0cccf000000000000000000000000000000000000000000000000000000000000000000000000000000666666666666660600000000000000000000cfccbc0c00000000000000000000000000000000000000000000000000000000000000000000000000008688888888888888000000000000000000f0ccccbccd00000000000000000000000000000000000000000000000000000000000000000000000000008688888888888888000000000000000000cfccccccdd0c00000000000000000000000000000000000000000000000000000000000000000000000000808888888888888800000000000000ff00cfccccccdd0c00000000000000000000000000000000000000000000000000000000000000000000000000000000868800000000000000000000bfffccbbcbccddff00000000000000000000000000000000000000000000000000000000000000000000000000000000868800000000000000000000bffbbbccbbccfdfb00000000000000000000000000000000000000000000000000000000000000000000000000666666868866660600000000000000bcbfcbbbbbcbbffb00000000000000000000000000000000000000000000000000000000000000000000000000868888888888888800000000000000bcbfbbccbbbbbbfd00000000000000000000000000000000000000000000000000000000000000000000000000868888888888888800000000000000c0bbcbbbbbbbdbfb00000000000000000000000000000000000000000000000000000000000000000000000000808888888888888800000000000000f0bbbbbbbbbbbb0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f0fbbfbb1bc1fc0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bffb1f111111110f00000000000000000000000000000000000000000000000000000000000000000000000000666666660600000000000000000000bf1bc1c3cc1c110c00000000000000000000000000000000000000000000000000000000000000000000000000868888888800000000000000000000bf111c3333c1110c00000000000000000000000000000000000000000000000000000000000000000000000000868888888800000000000000000000bf11cc333333110c00000000000000000000000000000000000000000000000000000000000000000000000000808888888866660600000000000000bf111c3c3313c10000000000000000000000000000000000000000000000000000000000000000000000000000000000868888888800000000000000bf1bccccccccc10000000000000000000000000000000000000000000000000000000000000000000000000000000000868888888800000000000000bfbbf10f00cc0c0000000000000000000000000000000000000000000000000000000000000000000000000000666666868888888800000000000000f0ffff000000000000000000000000000000000000000000000000000000000000000000000000000000000000868888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000868888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000808888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fcffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004c44f40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ccccfff40fc00c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0ddcc1111fdbfcd00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0dd1c4d44d4dccd00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0cd4d444444c4cd00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0cd4444ff4f440f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cc44444cc4440f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cc4444c4c4440f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c044111141440f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fc000000000000c01c444414f40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dc0f0000000000004c444444fd00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0dc0f0000000000004c444f440f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ccccddf1000000000000c04444f4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cc11dd1d110f0000000000004c440f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bc111111110f000000000000f0ff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0b511c11111f10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0b51b111111510f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0b5bbbb1b115b0f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005cb5111111bb5b0f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005cb51b11bbbb550f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005c551b1111b1550f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005c55ccbcb5ffff0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cc550cbbb500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0ccc055c5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0cccc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") -const _hex348339 = pxsim.BufferMethods.createBufferFromHex("0a00080000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000090000000000000000020a0500070004030601010101010101010101") -const _hex348341 = pxsim.BufferMethods.createBufferFromHex("87040a000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000") -const _hex348509 = pxsim.BufferMethods.createBufferFromHex("8704a00078000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") +const _hex395321 = pxsim.BufferMethods.createBufferFromHex("8704a00078000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000666666666666660600666666666666660600666666666666660600000000000000000000000000000000000000000000000000000000000000000000868888888888888800868888888888888800868888888888888800000000000000000000000000000000000000000000000000000000000000000000868888888888888800868888888888888800868888888888888800000000000000000000000000000000000000000000000000000000000000000000868888888888888800868888888888888800868888888888888800000000000000000000000000000000000000000000000000000000000000000000868800868800000000868800000000868800868800000000868800000000000000000000000000000000000000000000000000000000000000000000868800868800000000868800000000868800868800000000868800000000000000000000000000000000000000000000000000000000000000000000868800868800000000868800000000868800868866666666868800000000000000000000000000000000000000000000000000000000000000000000868800868800000000868800000000868800868888888888888800000000000000000000000000000000000000000000000000000000000000000000868800868800000000868800000000868800868888888888888800000000000000000000000000000000000000000000000000000000000000000000808800808800000000808800000000808800808888888888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000660600000000660600666666666666660600666666666666660600000000000000000000000000000000000000000000000000000000000000000000868800000000868800868888888888888800868888888888888800000000000000000000000000000000000000000000000000000000000000000000868800000000868800868888888888888800868888888888888800000000000000000000000000000000000000000000000000000000000000000000868866666666868800868888888888888800868888888888888800000000000000000000000000000000000000000000000000000000000000000000868888888888888800868800868800000000868800000000868800000000000000000000000000000000000000000000000000000000000000000000868888888888888800868800868800000000868800000000868800000000000000000000000000000000000000000000000000000000000000000000868888888888888800868800808866666600868800000000868800000000000000000000000000000000000000000000000000000000000000000000868800000000868800868888086088888800868800000000868800000000000000000000000000000000000000000000000000000000000000000000868800000000868800868888086088888800868800000000868800000000000000000000000000000000000000000000000000000000000000000000808800000000808800808888080088888800808800000000808800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000666666660600660600666666666666660600666666666666660600000000000000000000000000000000000000000000000000000000000000000000868888888800868800868888888888888800868888888888888800000000000000000000000000000000000000000000000000000000000000000000868888888800868800868888888888888800868888888888888800000000000000000000000000000000000000000000000000000000000000000000868888888800868800868888888888888800868888888888888800000000000000000000000000000000000000000000000000000000000000000000868800868800868800868800000000868800868800868800868800000000000000000000000000000000000000000000000000000000000000000000868800868800868800868800000000868800868800868800868800000000000000000000000000000000000000000000000000000000000000000000868800868800868800868866666666868800868800868800868800000000000000000000000000000000000000000000000000000000000000000000868800868888888800868888888888888800868800868800868800000000000000000000000000000000000000000000000000000000000000000000868800868888888800868888888888888800868800868800868800000000000000000000000000000000000000000000000000000000000000000000808800808888888800808888888888888800808800808800808800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000666666666666660600666666660600660600666666666666660600000000000000000000000000000000000000000000000000000000000000000000868888888888888800868888888800868800868888888888888800000000000000000000000000000000000000000000000000000000000000000000868888888888888800868888888800868800868888888888888800000000000000000000000000000000000000000000000000000000000000000000808888888888888800868888888800868800868888888888888800000000000000000000000000000000000000000000000000000000000000000000000000868800000000868800868800868800868800868800000000000000000000000000000000000000000000000000000000000000000000000000000000868800000000868800868800868800868800868800000000000000000000000000000000000000000000000000000000000000000000000000666666868866660600868800868800868800868866868866660600000000000000000000000000000000000000000000000000000000000000000000868888888888888800868800868888888800868888888888888800000000000000000000000000000000000000000000000000000000000000000000868888888888888800868800868888888800868888888888888800000000000000000000000000000000000000000000000000000000000000000000808888888888888800808800808888888800808888888888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000666666660600000000666666660600660600666666666666660600000000000000000000000000000000000000000000000000000000000000000000868888888800000000868888888800868800868888888888888800000000000000000000000000000000000000000000000000000000000000000000868888888800000000868888888800868800868888888888888800000000000000000000000000000000000000000000000000000000000000000000808888888866660600868888888800868800868888888888888800000000000000000000000000000000000000000000000000000000000000000000000000868888888800868800868800868800006088080000000000000000000000000000000000000000000000000000000000000000000000000000000000868888888800868800868800868800006088080000000000000000000000000000000000000000000000000000000000000000000000000000666666868888888800868800868800868800000088686600000000000000000000000000000000000000000000000000000000000000000000000000868888888800000000868800868888888800000000868800000000000000000000000000000000000000000000000000000000000000000000000000868888888800000000868800868888888800000000868800000000000000000000000000000000000000000000000000000000000000000000000000808888888800000000808800808888888800666666868866660600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000868888888888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000868888888888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000808888888888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000666666666666660600666666666666660600666666660600660600000000000000000000000000000000000000000000000000000000000000000000868888888888888800868888888888888800868888888800868800000000000000000000000000000000000000000000000000000000000000000000868888888888888800868888888888888800868888888800868800000000000000000000000000000000000000000000000000000000000000000000868888888888888800808888888888888800808888888800808800000000000000000000000000000000000000000000000000000000000000000000868800868800000000006088080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000868800868800000000006088080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000868800868800000000000088686600000000808888000000000000000000000000000000000000000000000000000000000000000000000000000000868800868800000000000000868800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000868800868800000000000000868800000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000808800808800000000006066868800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006088080000000000808088000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006088080000000000808080000000000000000000000000000000000000000000000000000000000000000000000000000000660600000000660600666688686666660600808880000000000000000000000000000000000000000000000000000000000000000000000000000000868800000000868800868888888888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000868800000000868800868888888888888800000080000000000000000000000000000000000000000000000000000000000000000000000000000000868866666666868800808888888888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000868888888888888800000000000000000000808880000000000000000000000000000000000000000000000000000000000000000000000000000000868888888888888800000000000000000000808080000000000000000000000000000000000000000000000000000000000000000000000000000000868888888888888800666666660600000000808088000000000000000000000000000000000000000000000000000000000000000000000000000000868800000000868800868888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000868800000000868800868888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000808800000000808800808888888866660600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000868888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000868888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000666666660600660600666666868888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000868888888800868800868888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000868888888800868800868888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000868888888800868800808888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000868800868800868800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000868800868800868800000000000000000000cc000000ff00000000000000000000000000000000000000000000000000000000000000000000000000868800868800868800000000000000000000bc0c00fffb00000000000000000000000000000000000000000000000000000000000000000000000000868800868888888800000000000000000000bcccffbcfb00000000000000000000000000000000000000000000000000000000000000000000000000868800868888888800000000000000000000dccbccbb0f00000000000000000000000000000000000000000000000000000000000000000000000000808800808888888800000000000000000000dcbdccfb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0bdfb0f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f0cccf000000000000000000000000000000000000000000000000000000000000000000000000000000666666666666660600000000000000000000cfccbc0c00000000000000000000000000000000000000000000000000000000000000000000000000008688888888888888000000000000000000f0ccccbccd00000000000000000000000000000000000000000000000000000000000000000000000000008688888888888888000000000000000000cfccccccdd0c00000000000000000000000000000000000000000000000000000000000000000000000000808888888888888800000000000000ff00cfccccccdd0c00000000000000000000000000000000000000000000000000000000000000000000000000000000868800000000000000000000bfffccbbcbccddff00000000000000000000000000000000000000000000000000000000000000000000000000000000868800000000000000000000bffbbbccbbccfdfb00000000000000000000000000000000000000000000000000000000000000000000000000666666868866660600000000000000bcbfcbbbbbcbbffb00000000000000000000000000000000000000000000000000000000000000000000000000868888888888888800000000000000bcbfbbccbbbbbbfd00000000000000000000000000000000000000000000000000000000000000000000000000868888888888888800000000000000c0bbcbbbbbbbdbfb00000000000000000000000000000000000000000000000000000000000000000000000000808888888888888800000000000000f0bbbbbbbbbbbb0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f0fbbfbb1bc1fc0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bffb1f111111110f00000000000000000000000000000000000000000000000000000000000000000000000000666666660600000000000000000000bf1bc1c3cc1c110c00000000000000000000000000000000000000000000000000000000000000000000000000868888888800000000000000000000bf111c3333c1110c00000000000000000000000000000000000000000000000000000000000000000000000000868888888800000000000000000000bf11cc333333110c00000000000000000000000000000000000000000000000000000000000000000000000000808888888866660600000000000000bf111c3c3313c10000000000000000000000000000000000000000000000000000000000000000000000000000000000868888888800000000000000bf1bccccccccc10000000000000000000000000000000000000000000000000000000000000000000000000000000000868888888800000000000000bfbbf10f00cc0c0000000000000000000000000000000000000000000000000000000000000000000000000000666666868888888800000000000000f0ffff000000000000000000000000000000000000000000000000000000000000000000000000000000000000868888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000868888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000808888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fcffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004c44f40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ccccfff40fc00c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0ddcc1111fdbfcd00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0dd1c4d44d4dccd00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0cd4d444444c4cd00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0cd4444ff4f440f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cc44444cc4440f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cc4444c4c4440f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c044111141440f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fc000000000000c01c444414f40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dc0f0000000000004c444444fd00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0dc0f0000000000004c444f440f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ccccddf1000000000000c04444f4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cc11dd1d110f0000000000004c440f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bc111111110f000000000000f0ff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0b511c11111f10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0b51b111111510f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0b5bbbb1b115b0f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005cb5111111bb5b0f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005cb51b11bbbb550f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005c551b1111b1550f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005c55ccbcb5ffff0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cc550cbbb500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0ccc055c5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0cccc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") +const _hex395325 = pxsim.BufferMethods.createBufferFromHex("0a00080000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000090000000000000000020a0500070004030601010101010101010101") +const _hex395327 = pxsim.BufferMethods.createBufferFromHex("87040a000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000") +const _hex395495 = pxsim.BufferMethods.createBufferFromHex("8704a00078000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") @@ -2694,7 +2702,7 @@ function inline__P191221_mk(s) { -function inline__P348083(s) { +function inline__P394778(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2708,7 +2716,7 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = (globals.loading___348087 >= 0); + r0 = (globals.loading___394782 >= 0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } @@ -2748,7 +2756,7 @@ switch (step) { r0 = (s.tmp_3 - 1); s.tmp_0.arg2 = r0; s.tmp_5 = Math_map__P185488_mk(s); - r0 = (globals.loading___348087 * 100); + r0 = (globals.loading___394782 * 100); s.tmp_5.arg0 = r0; s.tmp_5.arg1 = 0; s.tmp_5.arg2 = 100; @@ -2765,7 +2773,7 @@ switch (step) { r0 = s.retval; s.tmp_0 = images_printCenter__P188862_mk(s); s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = globals.message___348118; + s.tmp_0.arg1 = globals.message___394813; r0 = pxsim_ImageMethods.height(globals.screen___187019); s.tmp_1 = r0; r0 = (s.tmp_1 * 0.55); @@ -2780,12 +2788,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -inline__P348083.info = {"start":4427,"length":381,"line":109,"column":34,"endLine":116,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":["screen2"]} +inline__P394778.info = {"start":4427,"length":381,"line":109,"column":34,"endLine":116,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":["screen2"]} -function inline__P348083_mk(s) { +function inline__P394778_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P348083, depth: s.depth + 1, + parent: s, fn: inline__P394778, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -2800,7 +2808,7 @@ function inline__P348083_mk(s) { -function inline__P348125(s) { +function inline__P394820(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2817,34 +2825,39 @@ switch (step) { } s.tmp_0 = Sprite_setKind__P187288_mk(s); s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = globals.SurvivedNPC___348079; + s.tmp_0.arg1 = globals.SurvivedNPC___394661; s.callLocIdx = 116; s.pc = 3; return s.tmp_0; case 3: r0 = s.retval; - r0 = pxsim_numops_toBoolDecr(globals.last_15___348134); + r0 = pxsim_numops_toBoolDecr(globals.last_15___394829); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - globals.last_15___348134 = (true); - s.tmp_0 = info_startCountdown__P187430_mk(s); - s.tmp_0.arg0 = 15; + globals.last_15___394829 = (true); + s.tmp_0 = info_stopCountdown__P187431_mk(s); s.callLocIdx = 117; s.pc = 4; return s.tmp_0; case 4: r0 = s.retval; + s.tmp_0 = timer_after__P188811_mk(s); + s.tmp_0.arg0 = 100; + s.tmp_0.arg1 = inline__P394834; + s.callLocIdx = 119; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; case 1: case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P348125.info = {"start":4862,"length":157,"line":117,"column":52,"endLine":123,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":["sprite","location"]} +inline__P394820.info = {"start":4862,"length":240,"line":117,"column":52,"endLine":126,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":["sprite","location"]} -function inline__P348125_mk(s) { +function inline__P394820_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P348125, depth: s.depth + 1, + parent: s, fn: inline__P394820, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -2856,7 +2869,40 @@ function inline__P348125_mk(s) { -function inline__P348141(s) { +function inline__P394834(s) { +let r0 = s.r0, 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 = info_startCountdown__P187430_mk(s); + s.tmp_0.arg0 = 15; + s.callLocIdx = 118; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +inline__P394834.info = {"start":5034,"length":59,"line":122,"column":25,"endLine":124,"endColumn":9,"fileName":"main.ts","functionName":"inline","argumentNames":[]} + +function inline__P394834_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: inline__P394834, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, +} } + + + + + +function inline__P394852(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2866,62 +2912,62 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.index___348147 = undefined; - s.sprite___348159 = undefined; - s.unnamed16548___U2 = undefined; - s.unnamed16549___U3 = undefined; - r0 = pxsim_numops_toBoolDecr(globals.in_game___348145); + s.index___394858 = undefined; + s.sprite___394870 = undefined; + s.unnamed19236___U2 = undefined; + s.unnamed19237___U3 = undefined; + r0 = pxsim_numops_toBoolDecr(globals.in_game___394856); 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.index___348147 = (0); + s.index___394858 = (0); case 1: - r0 = (s.index___348147 <= 9); + r0 = (s.index___394858 <= 9); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 2; continue; } s.tmp_1 = tiles_setWallAt__P187560_mk(s); s.tmp_2 = tiles_getTileLocation__P187561_mk(s); s.tmp_2.arg0 = 3; - r0 = (s.index___348147 + 1); + r0 = (s.index___394858 + 1); s.tmp_2.arg1 = r0; - s.callLocIdx = 123; s.pc = 8; return s.tmp_2; + s.callLocIdx = 125; s.pc = 8; return s.tmp_2; case 8: r0 = s.retval; s.tmp_1.arg0 = r0; s.tmp_1.arg1 = false; - s.callLocIdx = 124; s.pc = 7; return s.tmp_1; + s.callLocIdx = 126; s.pc = 7; return s.tmp_1; case 7: r0 = s.retval; - r0 = (s.index___348147 + 1); - s.index___348147 = (r0); + r0 = (s.index___394858 + 1); + s.index___394858 = (r0); { step = 1; continue; } case 2: - s.sprite___348159 = (undefined); + s.sprite___394870 = (undefined); s.tmp_0 = sprites_allOfKind__P187192_mk(s); - s.tmp_0.arg0 = globals.NPC___348070; - s.callLocIdx = 125; s.pc = 9; return s.tmp_0; + s.tmp_0.arg0 = globals.NPC___394652; + s.callLocIdx = 127; s.pc = 9; return s.tmp_0; case 9: r0 = s.retval; - s.unnamed16548___U2 = (r0); - s.unnamed16549___U3 = (0); + s.unnamed19236___U2 = (r0); + s.unnamed19237___U3 = (0); case 3: - s.tmp_0 = r0 = s.unnamed16549___U3; - r0 = pxsim_Array__length(s.unnamed16548___U2); + s.tmp_0 = r0 = s.unnamed19237___U3; + r0 = pxsim_Array__length(s.unnamed19236___U2); s.tmp_1 = r0; r0 = (s.tmp_0 < s.tmp_1); if (!r0) { step = 4; continue; } - r0 = pxsim_Array__getAt(s.unnamed16548___U2, s.unnamed16549___U3); - s.sprite___348159 = (r0); + r0 = pxsim_Array__getAt(s.unnamed19236___U2, s.unnamed19237___U3); + s.sprite___394870 = (r0); s.tmp_2 = scene_followPath__P188876_mk(s); - s.tmp_2.arg0 = s.sprite___348159; - s.tmp_3 = r0 = globals.paths___348167; + s.tmp_2.arg0 = s.sprite___394870; + s.tmp_3 = r0 = globals.paths___394754; s.tmp_5 = sprites_readDataNumber__P188838_mk(s); - s.tmp_5.arg0 = s.sprite___348159; + s.tmp_5.arg0 = s.sprite___394870; s.tmp_5.arg1 = "path_index"; - s.callLocIdx = 126; s.pc = 11; return s.tmp_5; + s.callLocIdx = 128; s.pc = 11; return s.tmp_5; case 11: r0 = s.retval; s.tmp_4 = r0; @@ -2929,35 +2975,41 @@ switch (step) { s.tmp_2.arg1 = r0; r0 = pxsim.Math_.randomRange(40, 80); s.tmp_2.arg2 = r0; - s.callLocIdx = 127; s.pc = 10; return s.tmp_2; + s.callLocIdx = 129; s.pc = 10; return s.tmp_2; case 10: r0 = s.retval; - r0 = (s.unnamed16549___U3 + 1); - s.unnamed16549___U3 = (r0); + r0 = (s.unnamed19237___U3 + 1); + s.unnamed19237___U3 = (r0); { step = 3; continue; } case 4: - s.unnamed16548___U2 = (undefined); - globals.in_game___348145 = (true); + s.unnamed19236___U2 = (undefined); + globals.in_game___394856 = (true); + s.tmp_0 = timer_after__P188811_mk(s); + s.tmp_0.arg0 = 100; + s.tmp_0.arg1 = inline__P394884; + s.callLocIdx = 131; s.pc = 12; return s.tmp_0; + case 12: + r0 = s.retval; { step = 6; continue; } case 5: - globals.in_game___348145 = (false); + globals.in_game___394856 = (false); s.tmp_0 = game_over__P187759_mk(s); - s.tmp_0.arg0 = globals.player_made_it___348177; + s.tmp_0.arg0 = globals.player_made_it___394890; s.tmp_0.arg1 = undefined; - s.callLocIdx = 128; s.pc = 12; return s.tmp_0; - case 12: + s.callLocIdx = 132; s.pc = 13; return s.tmp_0; + case 13: r0 = s.retval; case 6: r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P348141.info = {"start":5313,"length":451,"line":135,"column":20,"endLine":148,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":[]} +inline__P394852.info = {"start":5396,"length":537,"line":138,"column":20,"endLine":154,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":[]} -function inline__P348141_mk(s) { +function inline__P394852_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P348141, depth: s.depth + 1, + parent: s, fn: inline__P394852, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -2965,17 +3017,17 @@ function inline__P348141_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - index___348147: undefined, - sprite___348159: undefined, - unnamed16548___U2: undefined, - unnamed16549___U3: undefined, + index___394858: undefined, + sprite___394870: undefined, + unnamed19236___U2: undefined, + unnamed19237___U3: undefined, } } -function inline__P348183(s) { +function inline__P394884(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2985,54 +3037,30 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - globals.player_made_it___348177 = (true); - s.tmp_0 = Sprite_setKind__P187288_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = globals.SurvivedPlayer___348076; - s.callLocIdx = 132; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - r0 = pxsim_numops_toBoolDecr(globals.last_15___348134); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - globals.last_15___348134 = (true); s.tmp_0 = info_startCountdown__P187430_mk(s); - s.tmp_0.arg0 = 15; - s.callLocIdx = 133; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; + s.tmp_0.arg0 = 60; + s.callLocIdx = 130; s.pc = 1; return s.tmp_0; case 1: - case 2: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P348183.info = {"start":5938,"length":186,"line":153,"column":55,"endLine":160,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":["sprite","location"]} +inline__P394884.info = {"start":5794,"length":59,"line":147,"column":25,"endLine":149,"endColumn":9,"fileName":"main.ts","functionName":"inline","argumentNames":[]} -function inline__P348183_mk(s) { +function inline__P394884_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P348183, depth: s.depth + 1, + parent: s, fn: inline__P394884, 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 inline__P348198(s) { +function inline__P394900(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3047,329 +3075,59 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = Sprite_destroy__P187304_mk(s); + globals.player_made_it___394890 = (true); + s.tmp_0 = Sprite_setKind__P187288_mk(s); s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = globals.spray___188015; - s.tmp_0.arg2 = 100; - s.callLocIdx = 135; s.pc = 3; return s.tmp_0; + s.tmp_0.arg1 = globals.SurvivedPlayer___394658; + s.callLocIdx = 136; s.pc = 3; return s.tmp_0; case 3: r0 = s.retval; - s.tmp_0 = sprites_changeDataNumberBy__P188837_mk(s); - s.tmp_0.arg0 = s.arg1; - s.tmp_0.arg1 = "speed_dif"; - s.tmp_0.arg2 = -16; - s.callLocIdx = 136; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, inline__P348209); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); - s.tmp_1 = timer_after__P188811_mk(s); - s.tmp_1.arg0 = 500; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 138; s.pc = 5; return s.tmp_1; - case 5: - r0 = s.retval; - s.tmp_0 = character_setCharacterAnimationsEnabled__P188959_mk(s); - s.tmp_0.arg0 = s.arg1; - s.tmp_0.arg1 = false; - s.callLocIdx = 139; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - r0 = s.arg1.fields["_image"]; + r0 = pxsim_numops_toBoolDecr(globals.last_15___394829); s.tmp_1 = r0; - r0 = pxsim.image.ofBuffer(_hex348219); - s.tmp_2 = r0; - r0 = pxsim_ImageMethods.equals(s.tmp_1, s.tmp_2); + 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 = Sprite_setImage__P187273_mk(s); - s.tmp_3.arg0 = s.arg1; - r0 = pxsim.image.ofBuffer(_hex348223); - s.tmp_3.arg1 = r0; - s.callLocIdx = 141; s.pc = 7; return s.tmp_3; - case 7: - r0 = s.retval; - { step = 2; continue; } - case 1: - s.tmp_0 = Sprite_setImage__P187273_mk(s); - s.tmp_0.arg0 = s.arg1; - r0 = pxsim.image.ofBuffer(_hex348227); - s.tmp_0.arg1 = r0; - s.callLocIdx = 142; s.pc = 8; return s.tmp_0; - case 8: - r0 = s.retval; - case 2: - s.tmp_0 = pause__P185619_mk(s); - s.tmp_0.arg0 = 5; - s.callLocIdx = 143; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, inline__P348230); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); - s.tmp_1 = timer_after__P188811_mk(s); - s.tmp_1.arg0 = 100; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 145; s.pc = 10; return s.tmp_1; - case 10: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -inline__P348198.info = {"start":6178,"length":2821,"line":161,"column":52,"endLine":228,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":["sprite","otherSprite"]} - -function inline__P348198_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: inline__P348198, depth: s.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, -} } - -const _hex348219 = pxsim.BufferMethods.createBufferFromHex("8704200010000000000000f0ff000000000000f0bb0f0000000000bfbcfb00000000f0bbbbc10f000000f0bb1bc1fc000000bfbb1bc1c1000000bfbb1133c3000000bfbb1113cc000000bffb1fcc110c0000bffb1f1c110c00fcbcbb1111110cc0ccbcbc1b11fc0cc0cdcccbbcbbbb0fdcbdbcbcbbbbdbfcdcbbbccbbbbbbbfdbfcbbcbbbbcbbffbcfffbfbbbbccccfbff00cfbbcbcccdfc0000f0ccccccdd0c0000f0cccccccd000000f0ccccbccd00000000cfccdc0c00000000cfccbc0c00000000f0cffc0000000000ccbffc00000000c0ddbbbc0f000000c0bbcbbcfb000000bcbbffcfbb0f0000bcfc00f0bf0f0000cc000000f00f00000000000000000000000000000000") -const _hex348223 = pxsim.BufferMethods.createBufferFromHex("8704240010000000f0ffff0000000000bfbbf10f00cc0c00bf1bccccccccc100bf111c3c3313c100bf11cc333333110cbf111c3333c1110cbf1bc1c3cc1c110cbffb1f111111110ff0fbbfbb1bc1fc0ff0bbbbbbbbbbbb0fc0bbcbbbbbbbdbfbbcbfbbccbbbbbbfdbcbfcbbbbbcbbffbbffbbbccbbccfdfbbfffccbbcbccddffff00cfccccccdd0c0000cfccccccdd0c0000f0ccccbccd00000000cfccbc0c00000000f0cccf0000000000c0bdfb0f00000000dcbdccfb00000000dccbccbb0f000000bcccffbcfb000000bc0c00fffb000000cc000000ff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") -const _hex348227 = pxsim.BufferMethods.createBufferFromHex("87042400100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cc000000ff000000bc0c00fffb000000bcccffbcfb000000dccbccbb0f000000dcbdccfb00000000c0bdfb0f00000000f0cccf0000000000cfccbc0c000000f0ccccbccd000000cfccccccdd0cff00cfccccccdd0cbfffccbbcbccddffbffbbbccbbccfdfbbcbfcbbbbbcbbffbbcbfbbccbbbbbbfdc0bbcbbbbbbbdbfbf0bbbbbbbbbbbb0ff0fbbfbb1bc1fc0fbffb1f111111110fbf1bc1c3cc1c110cbf111c3333c1110cbf11cc333333110cbf111c3c3313c100bf1bccccccccc100bfbbf10f00cc0c00f0ffff0000000000") - - - - -function inline__P348209(s) { -let r0 = s.r0, 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 = sprites_changeDataNumberBy__P188837_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_0.arg1 = "speed_dif"; - s.tmp_0.arg2 = 18; - s.callLocIdx = 137; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -inline__P348209.info = {"start":6333,"length":84,"line":164,"column":21,"endLine":166,"endColumn":5,"fileName":"main.ts","functionName":"inline","argumentNames":[]} - -function inline__P348209_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: inline__P348209, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, -} } - - - - - -function inline__P348230(s) { -let r0 = s.r0, 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 = character_setCharacterAnimationsEnabled__P188959_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_0.arg1 = true; - s.callLocIdx = 144; s.pc = 1; return s.tmp_0; - case 1: + globals.last_15___394829 = (true); + s.tmp_0 = info_stopCountdown__P187431_mk(s); + s.callLocIdx = 137; s.pc = 4; return s.tmp_0; + case 4: r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -inline__P348230.info = {"start":8910,"length":86,"line":225,"column":21,"endLine":227,"endColumn":5,"fileName":"main.ts","functionName":"inline","argumentNames":[]} - -function inline__P348230_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: inline__P348230, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, -} } - - - - - -function inline__P348239(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (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; - } - globals.selected_option___348243 = (true); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -inline__P348239.info = {"start":19355,"length":55,"line":380,"column":31,"endLine":382,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":["option","index"]} - -function inline__P348239_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: inline__P348239, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, - arg1: undefined, -} } - - - - - -function inline__P348248(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (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_numops_toBoolDecr(true); - if (!r0) { step = 1; continue; } - s.tmp_0 = Sprite_destroy__P187304_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = globals.spray___188015; - s.tmp_0.arg2 = 100; - s.callLocIdx = 193; s.pc = 5; return s.tmp_0; + s.tmp_0 = timer_after__P188811_mk(s); + s.tmp_0.arg0 = 100; + s.tmp_0.arg1 = inline__P394913; + s.callLocIdx = 139; s.pc = 5; return s.tmp_0; case 5: r0 = s.retval; - case 1: - case 2: - s.tmp_0 = sprites_changeDataNumberBy__P188837_mk(s); - s.tmp_0.arg0 = s.arg1; - s.tmp_0.arg1 = "speed_dif"; - s.tmp_0.arg2 = -16; - s.callLocIdx = 194; s.pc = 6; return s.tmp_0; + s.tmp_0 = timer_background__P188812_mk(s); + s.tmp_0.arg0 = inline__P394916; + s.callLocIdx = 142; s.pc = 6; return s.tmp_0; case 6: r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, inline__P348259); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); - s.tmp_1 = timer_after__P188811_mk(s); - s.tmp_1.arg0 = 500; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 196; s.pc = 7; return s.tmp_1; - case 7: - r0 = s.retval; - s.tmp_0 = character_setCharacterAnimationsEnabled__P188959_mk(s); - s.tmp_0.arg0 = s.arg1; - s.tmp_0.arg1 = false; - s.callLocIdx = 197; s.pc = 8; return s.tmp_0; - case 8: - r0 = s.retval; - r0 = s.arg1.fields["_image"]; - s.tmp_1 = r0; - r0 = pxsim.image.ofBuffer(_hex348269); - s.tmp_2 = r0; - r0 = pxsim_ImageMethods.equals(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 = Sprite_setImage__P187273_mk(s); - s.tmp_3.arg0 = s.arg1; - r0 = pxsim.image.ofBuffer(_hex348273); - s.tmp_3.arg1 = r0; - s.callLocIdx = 199; s.pc = 9; return s.tmp_3; - case 9: - r0 = s.retval; - { step = 4; continue; } - case 3: - s.tmp_0 = Sprite_setImage__P187273_mk(s); - s.tmp_0.arg0 = s.arg1; - r0 = pxsim.image.ofBuffer(_hex348277); - s.tmp_0.arg1 = r0; - s.callLocIdx = 200; s.pc = 10; return s.tmp_0; - case 10: - r0 = s.retval; - case 4: - s.tmp_0 = pause__P185619_mk(s); - s.tmp_0.arg0 = 5; - s.callLocIdx = 201; s.pc = 11; return s.tmp_0; - case 11: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, inline__P348280); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); - s.tmp_1 = timer_after__P188811_mk(s); - s.tmp_1.arg0 = 100; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 203; s.pc = 12; return s.tmp_1; - case 12: - r0 = s.retval; - s.tmp_0 = scene_cameraFollowSprite__P187681_mk(s); - s.tmp_0.arg0 = s.arg1; - s.callLocIdx = 204; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; - s.tmp_0 = timer_after__P188811_mk(s); - s.tmp_0.arg0 = 5000; - s.tmp_0.arg1 = inline__P348286; - s.callLocIdx = 206; s.pc = 14; return s.tmp_0; - case 14: - r0 = s.retval; + case 1: + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P348248.info = {"start":19467,"length":2893,"line":383,"column":55,"endLine":456,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":["sprite","otherSprite"]} +inline__P394900.info = {"start":6107,"length":452,"line":159,"column":55,"endLine":175,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":["sprite","location"]} -function inline__P348248_mk(s) { +function inline__P394900_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P348248, depth: s.depth + 1, + parent: s, fn: inline__P394900, depth: s.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, } } -const _hex348269 = pxsim.BufferMethods.createBufferFromHex("8704200010000000000000f0ff000000000000f0bb0f0000000000bfbcfb00000000f0bbbbc10f000000f0bb1bc1fc000000bfbb1bc1c1000000bfbb1133c3000000bfbb1113cc000000bffb1fcc110c0000bffb1f1c110c00fcbcbb1111110cc0ccbcbc1b11fc0cc0cdcccbbcbbbb0fdcbdbcbcbbbbdbfcdcbbbccbbbbbbbfdbfcbbcbbbbcbbffbcfffbfbbbbccccfbff00cfbbcbcccdfc0000f0ccccccdd0c0000f0cccccccd000000f0ccccbccd00000000cfccdc0c00000000cfccbc0c00000000f0cffc0000000000ccbffc00000000c0ddbbbc0f000000c0bbcbbcfb000000bcbbffcfbb0f0000bcfc00f0bf0f0000cc000000f00f00000000000000000000000000000000") -const _hex348273 = pxsim.BufferMethods.createBufferFromHex("8704240010000000f0ffff0000000000bfbbf10f00cc0c00bf1bccccccccc100bf111c3c3313c100bf11cc333333110cbf111c3333c1110cbf1bc1c3cc1c110cbffb1f111111110ff0fbbfbb1bc1fc0ff0bbbbbbbbbbbb0fc0bbcbbbbbbbdbfbbcbfbbccbbbbbbfdbcbfcbbbbbcbbffbbffbbbccbbccfdfbbfffccbbcbccddffff00cfccccccdd0c0000cfccccccdd0c0000f0ccccbccd00000000cfccbc0c00000000f0cccf0000000000c0bdfb0f00000000dcbdccfb00000000dccbccbb0f000000bcccffbcfb000000bc0c00fffb000000cc000000ff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") -const _hex348277 = pxsim.BufferMethods.createBufferFromHex("87042000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cc000000ff000000bc0c00fffb000000bcccffbcfb000000dccbccbb0f000000dcbdccfb00000000c0bdfb0f00000000f0cccf0000000000cfccbc0c000000f0ccccbccd000000cfccccccdd0cff00cfccccccdd0cbfffccbbcbccddffbffbbbccbbccfdfbbcbfcbbbbbcbbffbbcbfbbccbbbbbbfdc0bbcbbbbbbbdbfbf0bbbbbbbbbbbb0ff0fbbfbb1bc1fc0fbffb1f111111110fbf1bc1c3cc1c110cbf111c3333c1110cbf11cc333333110c") -function inline__P348259(s) { +function inline__P394913(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3379,23 +3137,21 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = sprites_changeDataNumberBy__P188837_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_0.arg1 = "speed_dif"; - s.tmp_0.arg2 = 18; - s.callLocIdx = 195; s.pc = 1; return s.tmp_0; + s.tmp_0 = info_startCountdown__P187430_mk(s); + s.tmp_0.arg0 = 15; + s.callLocIdx = 138; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P348259.info = {"start":19648,"length":84,"line":388,"column":21,"endLine":390,"endColumn":5,"fileName":"main.ts","functionName":"inline","argumentNames":[]} +inline__P394913.info = {"start":6308,"length":59,"line":165,"column":25,"endLine":167,"endColumn":9,"fileName":"main.ts","functionName":"inline","argumentNames":[]} -function inline__P348259_mk(s) { +function inline__P394913_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P348259, depth: s.depth + 1, + parent: s, fn: inline__P394913, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, } } @@ -3404,7 +3160,430 @@ function inline__P348259_mk(s) { -function inline__P348280(s) { +function inline__P394916(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + s.index___394917 = undefined; + s.index___394917 = (0); + case 1: + r0 = (s.index___394917 < 50); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + s.tmp_1 = info_changeScoreBy__P187424_mk(s); + s.tmp_1.arg0 = 2; + s.callLocIdx = 140; s.pc = 3; return s.tmp_1; + case 3: + r0 = s.retval; + s.tmp_0 = pause__P185619_mk(s); + s.tmp_0.arg0 = 10; + s.callLocIdx = 141; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + r0 = (s.index___394917 + 1); + s.index___394917 = (r0); + { step = 1; continue; } + case 2: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +inline__P394916.info = {"start":6394,"length":156,"line":168,"column":25,"endLine":173,"endColumn":9,"fileName":"main.ts","functionName":"inline","argumentNames":[]} + +function inline__P394916_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: inline__P394916, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + index___394917: undefined, +} } + + + + + +function inline__P394928(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (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 = Sprite_destroy__P187304_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = globals.spray___188015; + s.tmp_0.arg2 = 100; + s.callLocIdx = 144; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.tmp_0 = sprites_changeDataNumberBy__P188837_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = "speed_dif"; + s.tmp_0.arg2 = -16; + s.callLocIdx = 145; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, inline__P394939); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); + s.tmp_1 = timer_after__P188811_mk(s); + s.tmp_1.arg0 = 500; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 147; s.pc = 5; return s.tmp_1; + case 5: + r0 = s.retval; + s.tmp_0 = character_setCharacterAnimationsEnabled__P188959_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = false; + s.callLocIdx = 148; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + r0 = s.arg1.fields["_image"]; + s.tmp_1 = r0; + r0 = pxsim.image.ofBuffer(_hex394949); + s.tmp_2 = r0; + r0 = pxsim_ImageMethods.equals(s.tmp_1, s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_3 = Sprite_setImage__P187273_mk(s); + s.tmp_3.arg0 = s.arg1; + r0 = pxsim.image.ofBuffer(_hex394953); + s.tmp_3.arg1 = r0; + s.callLocIdx = 150; s.pc = 7; return s.tmp_3; + case 7: + r0 = s.retval; + { step = 2; continue; } + case 1: + s.tmp_0 = Sprite_setImage__P187273_mk(s); + s.tmp_0.arg0 = s.arg1; + r0 = pxsim.image.ofBuffer(_hex394957); + s.tmp_0.arg1 = r0; + s.callLocIdx = 151; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + case 2: + s.tmp_0 = pause__P185619_mk(s); + s.tmp_0.arg0 = 5; + s.callLocIdx = 152; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, inline__P394960); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); + s.tmp_1 = timer_after__P188811_mk(s); + s.tmp_1.arg0 = 100; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 154; s.pc = 10; return s.tmp_1; + case 10: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +inline__P394928.info = {"start":6613,"length":2821,"line":176,"column":52,"endLine":243,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":["sprite","otherSprite"]} + +function inline__P394928_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: inline__P394928, depth: s.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, +} } + +const _hex394949 = pxsim.BufferMethods.createBufferFromHex("8704200010000000000000f0ff000000000000f0bb0f0000000000bfbcfb00000000f0bbbbc10f000000f0bb1bc1fc000000bfbb1bc1c1000000bfbb1133c3000000bfbb1113cc000000bffb1fcc110c0000bffb1f1c110c00fcbcbb1111110cc0ccbcbc1b11fc0cc0cdcccbbcbbbb0fdcbdbcbcbbbbdbfcdcbbbccbbbbbbbfdbfcbbcbbbbcbbffbcfffbfbbbbccccfbff00cfbbcbcccdfc0000f0ccccccdd0c0000f0cccccccd000000f0ccccbccd00000000cfccdc0c00000000cfccbc0c00000000f0cffc0000000000ccbffc00000000c0ddbbbc0f000000c0bbcbbcfb000000bcbbffcfbb0f0000bcfc00f0bf0f0000cc000000f00f00000000000000000000000000000000") +const _hex394953 = pxsim.BufferMethods.createBufferFromHex("8704240010000000f0ffff0000000000bfbbf10f00cc0c00bf1bccccccccc100bf111c3c3313c100bf11cc333333110cbf111c3333c1110cbf1bc1c3cc1c110cbffb1f111111110ff0fbbfbb1bc1fc0ff0bbbbbbbbbbbb0fc0bbcbbbbbbbdbfbbcbfbbccbbbbbbfdbcbfcbbbbbcbbffbbffbbbccbbccfdfbbfffccbbcbccddffff00cfccccccdd0c0000cfccccccdd0c0000f0ccccbccd00000000cfccbc0c00000000f0cccf0000000000c0bdfb0f00000000dcbdccfb00000000dccbccbb0f000000bcccffbcfb000000bc0c00fffb000000cc000000ff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") +const _hex394957 = pxsim.BufferMethods.createBufferFromHex("87042400100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cc000000ff000000bc0c00fffb000000bcccffbcfb000000dccbccbb0f000000dcbdccfb00000000c0bdfb0f00000000f0cccf0000000000cfccbc0c000000f0ccccbccd000000cfccccccdd0cff00cfccccccdd0cbfffccbbcbccddffbffbbbccbbccfdfbbcbfcbbbbbcbbffbbcbfbbccbbbbbbfdc0bbcbbbbbbbdbfbf0bbbbbbbbbbbb0ff0fbbfbb1bc1fc0fbffb1f111111110fbf1bc1c3cc1c110cbf111c3333c1110cbf11cc333333110cbf111c3c3313c100bf1bccccccccc100bfbbf10f00cc0c00f0ffff0000000000") + + + + +function inline__P394939(s) { +let r0 = s.r0, 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 = sprites_changeDataNumberBy__P188837_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_0.arg1 = "speed_dif"; + s.tmp_0.arg2 = 18; + s.callLocIdx = 146; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +inline__P394939.info = {"start":6768,"length":84,"line":179,"column":21,"endLine":181,"endColumn":5,"fileName":"main.ts","functionName":"inline","argumentNames":[]} + +function inline__P394939_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: inline__P394939, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, +} } + + + + + +function inline__P394960(s) { +let r0 = s.r0, 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 = character_setCharacterAnimationsEnabled__P188959_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_0.arg1 = true; + s.callLocIdx = 153; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +inline__P394960.info = {"start":9345,"length":86,"line":240,"column":21,"endLine":242,"endColumn":5,"fileName":"main.ts","functionName":"inline","argumentNames":[]} + +function inline__P394960_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: inline__P394960, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, +} } + + + + + +function inline__P395244(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (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; + } + globals.selected_option___394843 = (true); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +inline__P395244.info = {"start":19813,"length":55,"line":396,"column":31,"endLine":398,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":["option","index"]} + +function inline__P395244_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: inline__P395244, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, + arg1: undefined, +} } + + + + + +function inline__P395251(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (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_numops_toBoolDecr(true); + if (!r0) { step = 1; continue; } + s.tmp_0 = Sprite_destroy__P187304_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = globals.spray___188015; + s.tmp_0.arg2 = 100; + s.callLocIdx = 203; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + case 1: + case 2: + s.tmp_0 = sprites_changeDataNumberBy__P188837_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = "speed_dif"; + s.tmp_0.arg2 = -16; + s.callLocIdx = 204; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, inline__P395262); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); + s.tmp_1 = timer_after__P188811_mk(s); + s.tmp_1.arg0 = 500; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 206; s.pc = 7; return s.tmp_1; + case 7: + r0 = s.retval; + s.tmp_0 = character_setCharacterAnimationsEnabled__P188959_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = false; + s.callLocIdx = 207; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + r0 = s.arg1.fields["_image"]; + s.tmp_1 = r0; + r0 = pxsim.image.ofBuffer(_hex395272); + s.tmp_2 = r0; + r0 = pxsim_ImageMethods.equals(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 = Sprite_setImage__P187273_mk(s); + s.tmp_3.arg0 = s.arg1; + r0 = pxsim.image.ofBuffer(_hex395276); + s.tmp_3.arg1 = r0; + s.callLocIdx = 209; s.pc = 9; return s.tmp_3; + case 9: + r0 = s.retval; + { step = 4; continue; } + case 3: + s.tmp_0 = Sprite_setImage__P187273_mk(s); + s.tmp_0.arg0 = s.arg1; + r0 = pxsim.image.ofBuffer(_hex395280); + s.tmp_0.arg1 = r0; + s.callLocIdx = 210; s.pc = 10; return s.tmp_0; + case 10: + r0 = s.retval; + case 4: + s.tmp_0 = pause__P185619_mk(s); + s.tmp_0.arg0 = 5; + s.callLocIdx = 211; s.pc = 11; return s.tmp_0; + case 11: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, inline__P395283); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); + s.tmp_1 = timer_after__P188811_mk(s); + s.tmp_1.arg0 = 100; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 213; s.pc = 12; return s.tmp_1; + case 12: + r0 = s.retval; + s.tmp_0 = scene_cameraFollowSprite__P187681_mk(s); + s.tmp_0.arg0 = s.arg1; + s.callLocIdx = 214; s.pc = 13; return s.tmp_0; + case 13: + r0 = s.retval; + s.tmp_0 = timer_after__P188811_mk(s); + s.tmp_0.arg0 = 5000; + s.tmp_0.arg1 = inline__P395289; + s.callLocIdx = 216; s.pc = 14; return s.tmp_0; + case 14: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +inline__P395251.info = {"start":19925,"length":2893,"line":399,"column":55,"endLine":472,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":["sprite","otherSprite"]} + +function inline__P395251_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: inline__P395251, depth: s.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, +} } + +const _hex395272 = pxsim.BufferMethods.createBufferFromHex("8704200010000000000000f0ff000000000000f0bb0f0000000000bfbcfb00000000f0bbbbc10f000000f0bb1bc1fc000000bfbb1bc1c1000000bfbb1133c3000000bfbb1113cc000000bffb1fcc110c0000bffb1f1c110c00fcbcbb1111110cc0ccbcbc1b11fc0cc0cdcccbbcbbbb0fdcbdbcbcbbbbdbfcdcbbbccbbbbbbbfdbfcbbcbbbbcbbffbcfffbfbbbbccccfbff00cfbbcbcccdfc0000f0ccccccdd0c0000f0cccccccd000000f0ccccbccd00000000cfccdc0c00000000cfccbc0c00000000f0cffc0000000000ccbffc00000000c0ddbbbc0f000000c0bbcbbcfb000000bcbbffcfbb0f0000bcfc00f0bf0f0000cc000000f00f00000000000000000000000000000000") +const _hex395276 = pxsim.BufferMethods.createBufferFromHex("8704240010000000f0ffff0000000000bfbbf10f00cc0c00bf1bccccccccc100bf111c3c3313c100bf11cc333333110cbf111c3333c1110cbf1bc1c3cc1c110cbffb1f111111110ff0fbbfbb1bc1fc0ff0bbbbbbbbbbbb0fc0bbcbbbbbbbdbfbbcbfbbccbbbbbbfdbcbfcbbbbbcbbffbbffbbbccbbccfdfbbfffccbbcbccddffff00cfccccccdd0c0000cfccccccdd0c0000f0ccccbccd00000000cfccbc0c00000000f0cccf0000000000c0bdfb0f00000000dcbdccfb00000000dccbccbb0f000000bcccffbcfb000000bc0c00fffb000000cc000000ff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") +const _hex395280 = pxsim.BufferMethods.createBufferFromHex("87042000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cc000000ff000000bc0c00fffb000000bcccffbcfb000000dccbccbb0f000000dcbdccfb00000000c0bdfb0f00000000f0cccf0000000000cfccbc0c000000f0ccccbccd000000cfccccccdd0cff00cfccccccdd0cbfffccbbcbccddffbffbbbccbbccfdfbbcbfcbbbbbcbbffbbcbfbbccbbbbbbfdc0bbcbbbbbbbdbfbf0bbbbbbbbbbbb0ff0fbbfbb1bc1fc0fbffb1f111111110fbf1bc1c3cc1c110cbf111c3333c1110cbf11cc333333110c") + + + + +function inline__P395262(s) { +let r0 = s.r0, 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 = sprites_changeDataNumberBy__P188837_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_0.arg1 = "speed_dif"; + s.tmp_0.arg2 = 18; + s.callLocIdx = 205; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +inline__P395262.info = {"start":20106,"length":84,"line":404,"column":21,"endLine":406,"endColumn":5,"fileName":"main.ts","functionName":"inline","argumentNames":[]} + +function inline__P395262_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: inline__P395262, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, +} } + + + + + +function inline__P395283(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3417,19 +3596,19 @@ switch (step) { s.tmp_0 = character_setCharacterAnimationsEnabled__P188959_mk(s); s.tmp_0.arg0 = s.caps[0]; s.tmp_0.arg1 = true; - s.callLocIdx = 202; s.pc = 1; return s.tmp_0; + s.callLocIdx = 212; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P348280.info = {"start":22161,"length":86,"line":449,"column":21,"endLine":451,"endColumn":5,"fileName":"main.ts","functionName":"inline","argumentNames":[]} +inline__P395283.info = {"start":22619,"length":86,"line":465,"column":21,"endLine":467,"endColumn":5,"fileName":"main.ts","functionName":"inline","argumentNames":[]} -function inline__P348280_mk(s) { +function inline__P395283_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P348280, depth: s.depth + 1, + parent: s, fn: inline__P395283, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, } } @@ -3438,7 +3617,7 @@ function inline__P348280_mk(s) { -function inline__P348286(s) { +function inline__P395289(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3451,19 +3630,19 @@ switch (step) { s.tmp_0 = game_over__P187759_mk(s); s.tmp_0.arg0 = false; s.tmp_0.arg1 = undefined; - s.callLocIdx = 205; s.pc = 1; return s.tmp_0; + s.callLocIdx = 215; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P348286.info = {"start":22313,"length":44,"line":453,"column":22,"endLine":455,"endColumn":5,"fileName":"main.ts","functionName":"inline","argumentNames":[]} +inline__P395289.info = {"start":22771,"length":44,"line":469,"column":22,"endLine":471,"endColumn":5,"fileName":"main.ts","functionName":"inline","argumentNames":[]} -function inline__P348286_mk(s) { +function inline__P395289_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P348286, depth: s.depth + 1, + parent: s, fn: inline__P395289, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, } } @@ -3472,7 +3651,7 @@ function inline__P348286_mk(s) { -function inline__P348543(s) { +function inline__P395529(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3483,8 +3662,8 @@ switch (step) { case 0: s.tmp_3 = sprites_allOfKind__P187192_mk(s); - s.tmp_3.arg0 = globals.NPC___348070; - s.callLocIdx = 252; s.pc = 5; return s.tmp_3; + s.tmp_3.arg0 = globals.NPC___394652; + s.callLocIdx = 262; s.pc = 5; return s.tmp_3; case 5: r0 = s.retval; s.tmp_2 = r0; @@ -3497,43 +3676,43 @@ switch (step) { r0 = s.tmp_0; { step = 2; continue; } case 1: - r0 = globals.player_made_it___348177; + r0 = globals.player_made_it___394890; 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 = info_stopCountdown__P187431_mk(s); - s.callLocIdx = 253; s.pc = 6; return s.tmp_5; + s.callLocIdx = 263; s.pc = 6; return s.tmp_5; case 6: r0 = s.retval; s.tmp_0 = pause__P185619_mk(s); s.tmp_0.arg0 = 1000; - s.callLocIdx = 254; s.pc = 7; return s.tmp_0; + s.callLocIdx = 264; s.pc = 7; return s.tmp_0; case 7: r0 = s.retval; s.tmp_0 = info_startCountdown__P187430_mk(s); s.tmp_0.arg0 = 0; - s.callLocIdx = 255; s.pc = 8; return s.tmp_0; + s.callLocIdx = 265; s.pc = 8; return s.tmp_0; case 8: r0 = s.retval; case 3: case 4: s.tmp_0 = pause__P185619_mk(s); s.tmp_0.arg0 = 100; - s.callLocIdx = 256; s.pc = 9; return s.tmp_0; + s.callLocIdx = 266; s.pc = 9; return s.tmp_0; case 9: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P348543.info = {"start":67039,"length":191,"line":807,"column":8,"endLine":814,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":[]} +inline__P395529.info = {"start":67497,"length":191,"line":823,"column":8,"endLine":830,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":[]} -function inline__P348543_mk(s) { +function inline__P395529_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P348543, depth: s.depth + 1, + parent: s, fn: inline__P395529, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -3547,7 +3726,7 @@ function inline__P348543_mk(s) { -function inline__P348555(s) { +function inline__P395541(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3558,25 +3737,25 @@ switch (step) { case 0: s.tmp_0 = Sprite_setImage__P187273_mk(s); - s.tmp_0.arg0 = globals.sprite_map___348294; - s.tmp_1 = update_minimap__P348235_mk(s); - s.callLocIdx = 258; s.pc = 2; return s.tmp_1; + s.tmp_0.arg0 = globals.sprite_map___395223; + s.tmp_1 = update_minimap__P395137_mk(s); + s.callLocIdx = 268; s.pc = 2; return s.tmp_1; case 2: r0 = s.retval; s.tmp_0.arg1 = r0; - s.callLocIdx = 259; s.pc = 1; return s.tmp_0; + s.callLocIdx = 269; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P348555.info = {"start":67240,"length":57,"line":815,"column":8,"endLine":817,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":[]} +inline__P395541.info = {"start":67698,"length":57,"line":831,"column":8,"endLine":833,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":[]} -function inline__P348555_mk(s) { +function inline__P395541_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P348555, depth: s.depth + 1, + parent: s, fn: inline__P395541, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -3586,7 +3765,7 @@ function inline__P348555_mk(s) { -function inline__P348560(s) { +function inline__P395546(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3596,128 +3775,128 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sprite_shark___348563 = undefined; - s.unnamed16558___U1 = undefined; - s.unnamed16559___U2 = undefined; - s.sprite___348569 = undefined; - s.unnamed16560___U4 = undefined; - s.unnamed16561___U5 = undefined; - s.sprite___348586 = undefined; - s.unnamed16562___U7 = undefined; - s.unnamed16563___U8 = undefined; - r0 = pxsim_numops_toBoolDecr(globals.in_game___348145); + s.sprite_shark___395549 = undefined; + s.unnamed19246___U1 = undefined; + s.unnamed19247___U2 = undefined; + s.sprite___395555 = undefined; + s.unnamed19248___U4 = undefined; + s.unnamed19249___U5 = undefined; + s.sprite___395572 = undefined; + s.unnamed19250___U7 = undefined; + s.unnamed19251___U8 = undefined; + r0 = pxsim_numops_toBoolDecr(globals.in_game___394856); if (!r0) { step = 15; continue; } - s.sprite_shark___348563 = (undefined); + s.sprite_shark___395549 = (undefined); s.tmp_0 = sprites_allOfKind__P187192_mk(s); s.tmp_0.arg0 = globals.Enemy___187348; - s.callLocIdx = 261; s.pc = 17; return s.tmp_0; + s.callLocIdx = 271; s.pc = 17; return s.tmp_0; case 17: r0 = s.retval; - s.unnamed16558___U1 = (r0); - s.unnamed16559___U2 = (0); + s.unnamed19246___U1 = (r0); + s.unnamed19247___U2 = (0); case 1: - s.tmp_0 = r0 = s.unnamed16559___U2; - r0 = pxsim_Array__length(s.unnamed16558___U1); + s.tmp_0 = r0 = s.unnamed19247___U2; + r0 = pxsim_Array__length(s.unnamed19246___U1); s.tmp_1 = r0; r0 = (s.tmp_0 < s.tmp_1); if (!r0) { step = 14; continue; } - r0 = pxsim_Array__getAt(s.unnamed16558___U1, s.unnamed16559___U2); - s.sprite_shark___348563 = (r0); - globals.shortest_distance___348292 = (9999999999); - s.sprite___348569 = (undefined); + r0 = pxsim_Array__getAt(s.unnamed19246___U1, s.unnamed19247___U2); + s.sprite_shark___395549 = (r0); + globals.shortest_distance___395295 = (9999999999); + s.sprite___395555 = (undefined); s.tmp_0 = sprites_allOfKind__P187192_mk(s); - s.tmp_0.arg0 = globals.NPC___348070; - s.callLocIdx = 262; s.pc = 18; return s.tmp_0; + s.tmp_0.arg0 = globals.NPC___394652; + s.callLocIdx = 272; s.pc = 18; return s.tmp_0; case 18: r0 = s.retval; - s.unnamed16560___U4 = (r0); - s.unnamed16561___U5 = (0); + s.unnamed19248___U4 = (r0); + s.unnamed19249___U5 = (0); case 2: - s.tmp_0 = r0 = s.unnamed16561___U5; - r0 = pxsim_Array__length(s.unnamed16560___U4); + s.tmp_0 = r0 = s.unnamed19249___U5; + r0 = pxsim_Array__length(s.unnamed19248___U4); s.tmp_1 = r0; r0 = (s.tmp_0 < s.tmp_1); if (!r0) { step = 5; continue; } - r0 = pxsim_Array__getAt(s.unnamed16560___U4, s.unnamed16561___U5); - s.sprite___348569 = (r0); + r0 = pxsim_Array__getAt(s.unnamed19248___U4, s.unnamed19249___U5); + s.sprite___395555 = (r0); s.tmp_4 = spriteutils_distanceBetween__P188849_mk(s); - s.tmp_4.arg0 = s.sprite_shark___348563; - s.tmp_4.arg1 = s.sprite___348569; - s.callLocIdx = 263; s.pc = 19; return s.tmp_4; + s.tmp_4.arg0 = s.sprite_shark___395549; + s.tmp_4.arg1 = s.sprite___395555; + s.callLocIdx = 273; s.pc = 19; return s.tmp_4; case 19: r0 = s.retval; s.tmp_3 = r0; - r0 = (s.tmp_3 < globals.shortest_distance___348292); + r0 = (s.tmp_3 < globals.shortest_distance___395295); s.tmp_2 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_2); if (!r0) { step = 3; continue; } s.tmp_5 = spriteutils_distanceBetween__P188849_mk(s); - s.tmp_5.arg0 = s.sprite_shark___348563; - s.tmp_5.arg1 = s.sprite___348569; - s.callLocIdx = 264; s.pc = 20; return s.tmp_5; + s.tmp_5.arg0 = s.sprite_shark___395549; + s.tmp_5.arg1 = s.sprite___395555; + s.callLocIdx = 274; s.pc = 20; return s.tmp_5; case 20: r0 = s.retval; - globals.shortest_distance___348292 = (r0); - globals.sprite_closest_sprite___348290 = (s.sprite___348569); + globals.shortest_distance___395295 = (r0); + globals.sprite_closest_sprite___395293 = (s.sprite___395555); case 3: case 4: - r0 = (s.unnamed16561___U5 + 1); - s.unnamed16561___U5 = (r0); + r0 = (s.unnamed19249___U5 + 1); + s.unnamed19249___U5 = (r0); { step = 2; continue; } case 5: - s.unnamed16560___U4 = (undefined); - s.sprite___348586 = (undefined); + s.unnamed19248___U4 = (undefined); + s.sprite___395572 = (undefined); s.tmp_0 = sprites_allOfKind__P187192_mk(s); s.tmp_0.arg0 = globals.Player___187345; - s.callLocIdx = 265; s.pc = 21; return s.tmp_0; + s.callLocIdx = 275; s.pc = 21; return s.tmp_0; case 21: r0 = s.retval; - s.unnamed16562___U7 = (r0); - s.unnamed16563___U8 = (0); + s.unnamed19250___U7 = (r0); + s.unnamed19251___U8 = (0); case 6: - s.tmp_0 = r0 = s.unnamed16563___U8; - r0 = pxsim_Array__length(s.unnamed16562___U7); + s.tmp_0 = r0 = s.unnamed19251___U8; + r0 = pxsim_Array__length(s.unnamed19250___U7); s.tmp_1 = r0; r0 = (s.tmp_0 < s.tmp_1); if (!r0) { step = 9; continue; } - r0 = pxsim_Array__getAt(s.unnamed16562___U7, s.unnamed16563___U8); - s.sprite___348586 = (r0); + r0 = pxsim_Array__getAt(s.unnamed19250___U7, s.unnamed19251___U8); + s.sprite___395572 = (r0); s.tmp_4 = spriteutils_distanceBetween__P188849_mk(s); - s.tmp_4.arg0 = s.sprite_shark___348563; - s.tmp_4.arg1 = s.sprite___348586; - s.callLocIdx = 266; s.pc = 22; return s.tmp_4; + s.tmp_4.arg0 = s.sprite_shark___395549; + s.tmp_4.arg1 = s.sprite___395572; + s.callLocIdx = 276; s.pc = 22; return s.tmp_4; case 22: r0 = s.retval; s.tmp_3 = r0; - r0 = (s.tmp_3 < globals.shortest_distance___348292); + r0 = (s.tmp_3 < globals.shortest_distance___395295); s.tmp_2 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_2); if (!r0) { step = 7; continue; } s.tmp_5 = spriteutils_distanceBetween__P188849_mk(s); - s.tmp_5.arg0 = s.sprite_shark___348563; - s.tmp_5.arg1 = s.sprite___348586; - s.callLocIdx = 267; s.pc = 23; return s.tmp_5; + s.tmp_5.arg0 = s.sprite_shark___395549; + s.tmp_5.arg1 = s.sprite___395572; + s.callLocIdx = 277; s.pc = 23; return s.tmp_5; case 23: r0 = s.retval; - globals.shortest_distance___348292 = (r0); - globals.sprite_closest_sprite___348290 = (s.sprite___348586); + globals.shortest_distance___395295 = (r0); + globals.sprite_closest_sprite___395293 = (s.sprite___395572); case 7: case 8: - r0 = (s.unnamed16563___U8 + 1); - s.unnamed16563___U8 = (r0); + r0 = (s.unnamed19251___U8 + 1); + s.unnamed19251___U8 = (r0); { step = 6; continue; } case 9: - s.unnamed16562___U7 = (undefined); - r0 = globals.sprite_closest_sprite___348290.fields["_kind"]; + s.unnamed19250___U7 = (undefined); + r0 = globals.sprite_closest_sprite___395293.fields["_kind"]; s.tmp_1 = r0; - r0 = (s.tmp_1 == globals.NPC___348070); + r0 = (s.tmp_1 == globals.NPC___394652); 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 = globals.sprite_closest_sprite___348290.fields["_kind"]; + r0 = globals.sprite_closest_sprite___395293.fields["_kind"]; s.tmp_2 = r0; r0 = (s.tmp_2 == globals.Player___187345); case 11: @@ -3726,49 +3905,49 @@ switch (step) { r0 = pxsim_numops_toBoolDecr(s.tmp_3); if (!r0) { step = 12; continue; } s.tmp_4 = Sprite_follow__P187306_mk(s); - s.tmp_4.arg0 = s.sprite_shark___348563; - s.tmp_4.arg1 = globals.sprite_closest_sprite___348290; + s.tmp_4.arg0 = s.sprite_shark___395549; + s.tmp_4.arg1 = globals.sprite_closest_sprite___395293; s.tmp_6 = sprites_readDataNumber__P188838_mk(s); - s.tmp_6.arg0 = s.sprite_shark___348563; + s.tmp_6.arg0 = s.sprite_shark___395549; s.tmp_6.arg1 = "speed_dif"; - s.callLocIdx = 270; s.pc = 25; return s.tmp_6; + s.callLocIdx = 280; s.pc = 25; return s.tmp_6; case 25: r0 = s.retval; s.tmp_5 = r0; r0 = (48 + s.tmp_5); s.tmp_4.arg2 = r0; s.tmp_4.arg3 = 400; - s.callLocIdx = 271; s.pc = 24; return s.tmp_4; + s.callLocIdx = 281; s.pc = 24; return s.tmp_4; case 24: r0 = s.retval; { step = 13; continue; } case 12: s.tmp_0 = Sprite_follow__P187306_mk(s); - s.tmp_0.arg0 = s.sprite_shark___348563; - s.tmp_0.arg1 = globals.sprite_closest_sprite___348290; + s.tmp_0.arg0 = s.sprite_shark___395549; + s.tmp_0.arg1 = globals.sprite_closest_sprite___395293; s.tmp_0.arg2 = 0; s.tmp_0.arg3 = 400; - s.callLocIdx = 272; s.pc = 26; return s.tmp_0; + s.callLocIdx = 282; s.pc = 26; return s.tmp_0; case 26: r0 = s.retval; case 13: - r0 = (s.unnamed16559___U2 + 1); - s.unnamed16559___U2 = (r0); + r0 = (s.unnamed19247___U2 + 1); + s.unnamed19247___U2 = (r0); { step = 1; continue; } case 14: - s.unnamed16558___U1 = (undefined); + s.unnamed19246___U1 = (undefined); case 15: case 16: r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P348560.info = {"start":67307,"length":1167,"line":818,"column":8,"endLine":841,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":[]} +inline__P395546.info = {"start":67765,"length":1167,"line":834,"column":8,"endLine":857,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":[]} -function inline__P348560_mk(s) { +function inline__P395546_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P348560, depth: s.depth + 1, + parent: s, fn: inline__P395546, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -3777,22 +3956,22 @@ function inline__P348560_mk(s) { tmp_4: undefined, tmp_5: undefined, tmp_6: undefined, - sprite_shark___348563: undefined, - unnamed16558___U1: undefined, - unnamed16559___U2: undefined, - sprite___348569: undefined, - unnamed16560___U4: undefined, - unnamed16561___U5: undefined, - sprite___348586: undefined, - unnamed16562___U7: undefined, - unnamed16563___U8: undefined, + sprite_shark___395549: undefined, + unnamed19246___U1: undefined, + unnamed19247___U2: undefined, + sprite___395555: undefined, + unnamed19248___U4: undefined, + unnamed19249___U5: undefined, + sprite___395572: undefined, + unnamed19250___U7: undefined, + unnamed19251___U8: undefined, } } -function inline__P348625(s) { +function inline__P395611(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3802,50 +3981,50 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sprite_fish___348628 = undefined; - s.unnamed16564___U1 = undefined; - s.unnamed16565___U2 = undefined; - s.sprite_shark___348633 = undefined; - s.unnamed16566___U4 = undefined; - s.unnamed16567___U5 = undefined; - r0 = pxsim_numops_toBoolDecr(globals.in_game___348145); + s.sprite_fish___395614 = undefined; + s.unnamed19252___U1 = undefined; + s.unnamed19253___U2 = undefined; + s.sprite_shark___395619 = undefined; + s.unnamed19254___U4 = undefined; + s.unnamed19255___U5 = undefined; + r0 = pxsim_numops_toBoolDecr(globals.in_game___394856); if (!r0) { step = 11; continue; } - s.sprite_fish___348628 = (undefined); + s.sprite_fish___395614 = (undefined); s.tmp_0 = sprites_allOfKind__P187192_mk(s); - s.tmp_0.arg0 = globals.NPC___348070; - s.callLocIdx = 274; s.pc = 13; return s.tmp_0; + s.tmp_0.arg0 = globals.NPC___394652; + s.callLocIdx = 284; s.pc = 13; return s.tmp_0; case 13: r0 = s.retval; - s.unnamed16564___U1 = (r0); - s.unnamed16565___U2 = (0); + s.unnamed19252___U1 = (r0); + s.unnamed19253___U2 = (0); case 1: - s.tmp_0 = r0 = s.unnamed16565___U2; - r0 = pxsim_Array__length(s.unnamed16564___U1); + s.tmp_0 = r0 = s.unnamed19253___U2; + r0 = pxsim_Array__length(s.unnamed19252___U1); s.tmp_1 = r0; r0 = (s.tmp_0 < s.tmp_1); if (!r0) { step = 10; continue; } - r0 = pxsim_Array__getAt(s.unnamed16564___U1, s.unnamed16565___U2); - s.sprite_fish___348628 = (r0); - s.sprite_shark___348633 = (undefined); + r0 = pxsim_Array__getAt(s.unnamed19252___U1, s.unnamed19253___U2); + s.sprite_fish___395614 = (r0); + s.sprite_shark___395619 = (undefined); s.tmp_0 = sprites_allOfKind__P187192_mk(s); s.tmp_0.arg0 = globals.Enemy___187348; - s.callLocIdx = 275; s.pc = 14; return s.tmp_0; + s.callLocIdx = 285; s.pc = 14; return s.tmp_0; case 14: r0 = s.retval; - s.unnamed16566___U4 = (r0); - s.unnamed16567___U5 = (0); + s.unnamed19254___U4 = (r0); + s.unnamed19255___U5 = (0); case 2: - s.tmp_0 = r0 = s.unnamed16567___U5; - r0 = pxsim_Array__length(s.unnamed16566___U4); + s.tmp_0 = r0 = s.unnamed19255___U5; + r0 = pxsim_Array__length(s.unnamed19254___U4); s.tmp_1 = r0; r0 = (s.tmp_0 < s.tmp_1); if (!r0) { step = 9; continue; } - r0 = pxsim_Array__getAt(s.unnamed16566___U4, s.unnamed16567___U5); - s.sprite_shark___348633 = (r0); + r0 = pxsim_Array__getAt(s.unnamed19254___U4, s.unnamed19255___U5); + s.sprite_shark___395619 = (r0); s.tmp_4 = spriteutils_distanceBetween__P188849_mk(s); - s.tmp_4.arg0 = s.sprite_fish___348628; - s.tmp_4.arg1 = s.sprite_shark___348633; - s.callLocIdx = 276; s.pc = 15; return s.tmp_4; + s.tmp_4.arg0 = s.sprite_fish___395614; + s.tmp_4.arg1 = s.sprite_shark___395619; + s.callLocIdx = 286; s.pc = 15; return s.tmp_4; case 15: r0 = s.retval; s.tmp_3 = r0; @@ -3857,9 +4036,9 @@ switch (step) { { step = 4; continue; } case 3: s.tmp_7 = sprites_readDataBoolean__P188842_mk(s); - s.tmp_7.arg0 = s.sprite_fish___348628; + s.tmp_7.arg0 = s.sprite_fish___395614; s.tmp_7.arg1 = "running_away"; - s.callLocIdx = 277; s.pc = 16; return s.tmp_7; + s.callLocIdx = 287; s.pc = 16; return s.tmp_7; case 16: r0 = s.retval; s.tmp_6 = r0; @@ -3872,83 +4051,83 @@ switch (step) { r0 = pxsim_numops_toBoolDecr(s.tmp_8); if (!r0) { step = 7; continue; } s.tmp_9 = scene_followPath__P188876_mk(s); - s.tmp_9.arg0 = s.sprite_fish___348628; - s.tmp_10 = r0 = globals.paths___348167; + s.tmp_9.arg0 = s.sprite_fish___395614; + s.tmp_10 = r0 = globals.paths___394754; s.tmp_12 = sprites_readDataNumber__P188838_mk(s); - s.tmp_12.arg0 = s.sprite_fish___348628; + s.tmp_12.arg0 = s.sprite_fish___395614; s.tmp_12.arg1 = "path_index"; - s.callLocIdx = 278; s.pc = 18; return s.tmp_12; + s.callLocIdx = 288; s.pc = 18; return s.tmp_12; case 18: r0 = s.retval; s.tmp_11 = r0; r0 = pxsim_Array__getAt(s.tmp_10, s.tmp_11); s.tmp_9.arg1 = r0; s.tmp_9.arg2 = 0; - s.callLocIdx = 279; s.pc = 17; return s.tmp_9; + s.callLocIdx = 289; s.pc = 17; return s.tmp_9; case 17: r0 = s.retval; s.tmp_0 = spriteutils_setVelocityAtAngle__P188852_mk(s); - s.tmp_0.arg0 = s.sprite_fish___348628; + s.tmp_0.arg0 = s.sprite_fish___395614; s.tmp_1 = spriteutils_angleFrom__P188850_mk(s); - s.tmp_1.arg0 = s.sprite_shark___348633; - s.tmp_1.arg1 = s.sprite_fish___348628; - s.callLocIdx = 280; s.pc = 20; return s.tmp_1; + s.tmp_1.arg0 = s.sprite_shark___395619; + s.tmp_1.arg1 = s.sprite_fish___395614; + s.callLocIdx = 290; s.pc = 20; return s.tmp_1; case 20: r0 = s.retval; s.tmp_0.arg1 = r0; s.tmp_0.arg2 = 70; - s.callLocIdx = 281; s.pc = 19; return s.tmp_0; + s.callLocIdx = 291; s.pc = 19; return s.tmp_0; case 19: r0 = s.retval; s.tmp_0 = sprites_setDataBoolean__P188841_mk(s); - s.tmp_0.arg0 = s.sprite_fish___348628; + s.tmp_0.arg0 = s.sprite_fish___395614; s.tmp_0.arg1 = "running_away"; s.tmp_0.arg2 = true; - s.callLocIdx = 282; s.pc = 21; return s.tmp_0; + s.callLocIdx = 292; s.pc = 21; return s.tmp_0; case 21: r0 = s.retval; r0 = pxsim_numops_toBoolDecr(true); if (!r0) { step = 5; continue; } - r0 = pxsim_pxtcore_mkAction(1, inline__P348661); + r0 = pxsim_pxtcore_mkAction(1, inline__P395647); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.sprite_fish___348628); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.sprite_fish___395614); s.tmp_1 = timer_after__P188811_mk(s); s.tmp_1.arg0 = 500; s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 290; s.pc = 22; return s.tmp_1; + s.callLocIdx = 300; s.pc = 22; return s.tmp_1; case 22: r0 = s.retval; case 5: case 6: case 7: case 8: - r0 = (s.unnamed16567___U5 + 1); - s.unnamed16567___U5 = (r0); + r0 = (s.unnamed19255___U5 + 1); + s.unnamed19255___U5 = (r0); { step = 2; continue; } case 9: - s.unnamed16566___U4 = (undefined); + s.unnamed19254___U4 = (undefined); s.tmp_0 = pause__P185619_mk(s); s.tmp_0.arg0 = 50; - s.callLocIdx = 291; s.pc = 23; return s.tmp_0; + s.callLocIdx = 301; s.pc = 23; return s.tmp_0; case 23: r0 = s.retval; - r0 = (s.unnamed16565___U2 + 1); - s.unnamed16565___U2 = (r0); + r0 = (s.unnamed19253___U2 + 1); + s.unnamed19253___U2 = (r0); { step = 1; continue; } case 10: - s.unnamed16564___U1 = (undefined); + s.unnamed19252___U1 = (undefined); case 11: case 12: r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P348625.info = {"start":68484,"length":1171,"line":842,"column":8,"endLine":861,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":[]} +inline__P395611.info = {"start":68942,"length":1171,"line":858,"column":8,"endLine":877,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":[]} -function inline__P348625_mk(s) { +function inline__P395611_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P348625, depth: s.depth + 1, + parent: s, fn: inline__P395611, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -3963,19 +4142,19 @@ function inline__P348625_mk(s) { tmp_10: undefined, tmp_11: undefined, tmp_12: undefined, - sprite_fish___348628: undefined, - unnamed16564___U1: undefined, - unnamed16565___U2: undefined, - sprite_shark___348633: undefined, - unnamed16566___U4: undefined, - unnamed16567___U5: undefined, + sprite_fish___395614: undefined, + unnamed19252___U1: undefined, + unnamed19253___U2: undefined, + sprite_shark___395619: undefined, + unnamed19254___U4: undefined, + unnamed19255___U5: undefined, } } -function inline__P348661(s) { +function inline__P395647(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3990,7 +4169,7 @@ switch (step) { s.tmp_1 = scene_aStar__P188872_mk(s); s.tmp_2 = tiles_locationOfSprite__P188992_mk(s); s.tmp_2.arg0 = s.caps[0]; - s.callLocIdx = 283; s.pc = 3; return s.tmp_2; + s.callLocIdx = 293; s.pc = 3; return s.tmp_2; case 3: r0 = s.retval; s.tmp_1.arg0 = r0; @@ -3998,48 +4177,48 @@ switch (step) { s.tmp_4 = sprites_readDataNumber__P188838_mk(s); s.tmp_4.arg0 = s.caps[0]; s.tmp_4.arg1 = "target_col"; - s.callLocIdx = 284; s.pc = 5; return s.tmp_4; + s.callLocIdx = 294; s.pc = 5; return s.tmp_4; case 5: r0 = s.retval; s.tmp_3.arg0 = r0; s.tmp_5 = sprites_readDataNumber__P188838_mk(s); s.tmp_5.arg0 = s.caps[0]; s.tmp_5.arg1 = "target_row"; - s.callLocIdx = 285; s.pc = 6; return s.tmp_5; + s.callLocIdx = 295; s.pc = 6; return s.tmp_5; case 6: r0 = s.retval; s.tmp_3.arg1 = r0; - s.callLocIdx = 286; s.pc = 4; return s.tmp_3; + s.callLocIdx = 296; s.pc = 4; return s.tmp_3; case 4: r0 = s.retval; s.tmp_1.arg1 = r0; s.tmp_1.arg2 = null; - s.callLocIdx = 287; s.pc = 2; return s.tmp_1; + s.callLocIdx = 297; s.pc = 2; return s.tmp_1; case 2: r0 = s.retval; s.tmp_0.arg1 = r0; r0 = pxsim.Math_.randomRange(40, 80); s.tmp_0.arg2 = r0; - s.callLocIdx = 288; s.pc = 1; return s.tmp_0; + s.callLocIdx = 298; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; s.tmp_0 = sprites_setDataBoolean__P188841_mk(s); s.tmp_0.arg0 = s.caps[0]; s.tmp_0.arg1 = "running_away"; s.tmp_0.arg2 = false; - s.callLocIdx = 289; s.pc = 7; return s.tmp_0; + s.callLocIdx = 299; s.pc = 7; return s.tmp_0; case 7: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P348661.info = {"start":69184,"length":376,"line":851,"column":41,"endLine":854,"endColumn":25,"fileName":"main.ts","functionName":"inline","argumentNames":[]} +inline__P395647.info = {"start":69642,"length":376,"line":867,"column":41,"endLine":870,"endColumn":25,"fileName":"main.ts","functionName":"inline","argumentNames":[]} -function inline__P348661_mk(s) { +function inline__P395647_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P348661, depth: s.depth + 1, + parent: s, fn: inline__P395647, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -4053,7 +4232,7 @@ function inline__P348661_mk(s) { -function tiles_locationOfSprite__P188992(s) { +function inline__P395664(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4063,59 +4242,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 = tiles_getTileLocation__P187561_mk(s); - s.tmp_1 = tiles_screenCoordinateToTile__P189014_mk(s); - s.tmp_2 = Sprite_x__P187242_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 2087; s.pc = 3; return s.tmp_2; + r0 = pxsim_numops_toBoolDecr(globals.in_game___394856); + if (!r0) { step = 1; continue; } + s.tmp_0 = info_changeScoreBy__P187424_mk(s); + s.tmp_0.arg0 = -1; + s.callLocIdx = 303; s.pc = 3; return s.tmp_0; case 3: r0 = s.retval; - s.tmp_1.arg0 = r0; - s.callLocIdx = 2088; s.pc = 2; return s.tmp_1; - case 2: - r0 = s.retval; - s.tmp_0.arg0 = r0; - s.tmp_3 = tiles_screenCoordinateToTile__P189014_mk(s); - s.tmp_4 = Sprite_y__P187244_mk(s); - s.tmp_4.arg0 = s.arg0; - s.callLocIdx = 2089; s.pc = 5; return s.tmp_4; - case 5: - r0 = s.retval; - s.tmp_3.arg0 = r0; - s.callLocIdx = 2090; s.pc = 4; return s.tmp_3; - case 4: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 2091; s.pc = 1; return s.tmp_0; case 1: - r0 = s.retval; + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -tiles_locationOfSprite__P188992.info = {"start":9471,"length":165,"line":260,"column":4,"endLine":262,"endColumn":5,"fileName":"pxt_modules/tilemaps/tilemap.ts","functionName":"locationOfSprite","argumentNames":["s"]} +inline__P395664.info = {"start":70142,"length":71,"line":878,"column":27,"endLine":882,"endColumn":1,"fileName":"main.ts","functionName":"inline","argumentNames":[]} -function tiles_locationOfSprite__P188992_mk(s) { +function inline__P395664_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_locationOfSprite__P188992, depth: s.depth + 1, + parent: s, fn: inline__P395664, depth: s.depth + 1, pc: 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_screenCoordinateToTile__P189014(s) { +function game_onUpdateInterval__P187761(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4125,55 +4279,79 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tm___205923 = undefined; + s.timer___195825 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = game_currentScene__P187749_mk(s); - s.callLocIdx = 2108; s.pc = 4; return s.tmp_0; - case 4: + s.tmp_0 = game_init__P189572_mk(s); + s.tmp_0.arg0 = undefined; + s.callLocIdx = 1204; s.pc = 6; return s.tmp_0; + case 6: r0 = s.retval; - r0 = r0.fields["tileMap"]; - s.tm___205923 = (r0); - r0 = pxsim_numops_toBoolDecr(s.tm___205923); + 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; } - r0 = (s.arg0 >> 4); - { step = 3; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: + r0 = (s.arg0 < 0); case 2: - s.tmp_2 = r0 = s.arg0; - r0 = s.tm___205923.fields["_scale"]; - s.tmp_3 = r0; - r0 = (s.tmp_2 >> s.tmp_3); + // 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___195825 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.timer___195825, 0); + r0 = pxsim_pxtcore_mkAction(3, inline__P195829); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.timer___195825); + 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__P185609_mk(s); + s.tmp_2 = game_eventContext__P187752_mk(s); + s.callLocIdx = 1205; s.pc = 8; return s.tmp_2; + case 8: + r0 = s.retval; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 19; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 1209; s.pc = 7; return s.tmp_1; + case 7: + r0 = s.retval; + case 5: + r0 = undefined; return leave(s, r0) default: oops() } } } -tiles_screenCoordinateToTile__P189014.info = {"start":14355,"length":380,"line":413,"column":4,"endLine":420,"endColumn":5,"fileName":"pxt_modules/tilemaps/tilemap.ts","functionName":"screenCoordinateToTile","argumentNames":["value"]} +game_onUpdateInterval__P187761.info = {"start":7929,"length":417,"line":256,"column":4,"endLine":267,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"onUpdateInterval","argumentNames":["period","a"]} -function tiles_screenCoordinateToTile__P189014_mk(s) { +function game_onUpdateInterval__P187761_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_screenCoordinateToTile__P189014, depth: s.depth + 1, + parent: s, fn: game_onUpdateInterval__P187761, depth: s.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___205923: undefined, + timer___195825: undefined, arg0: undefined, + arg1: undefined, } } -function tiles_TileMap_scale__P187536(s) { +function inline__P195829(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4183,32 +4361,55 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C187534_VT)) failedCast(r0); - r0 = s.arg0.fields["_scale"]; - return leaveAccessor(s, r0) + s.time___195830 = undefined; + s.tmp_1 = game_currentScene__P187749_mk(s); + s.callLocIdx = 1206; s.pc = 3; return s.tmp_1; + case 3: + r0 = s.retval; + s.tmp_0 = r0; + r0 = s.tmp_0.fields["_millis"]; + s.time___195830 = (r0); + r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); + s.tmp_1 = r0; + r0 = (s.tmp_1 <= s.time___195830); + 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___195830 + s.caps[1]); + s.tmp_3 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_2, s.tmp_3); + s.tmp_0 = lambda_1_mk(s); + s.tmp_0.argL = s.caps[2]; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 1208; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + case 1: + case 2: + r0 = undefined; + return leave(s, r0) default: oops() } } } -tiles_TileMap_scale__P187536.info = {"start":6125,"length":55,"line":220,"column":8,"endLine":222,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"scale","argumentNames":["this"]} -tiles_TileMap_scale__P187536.isGetter = true; +inline__P195829.info = {"start":8159,"length":179,"line":260,"column":81,"endLine":266,"endColumn":9,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":[]} -function tiles_TileMap_scale__P187536_mk(s) { +function inline__P195829_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_scale__P187536, depth: s.depth + 1, + parent: s, fn: inline__P195829, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + time___195830: undefined, } } -function Sprite_y__P187244(s) { +function game_init__P189572(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4222,35 +4423,95 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); - r0 = s.arg0.fields["_y"]; + r0 = pxsim_numops_toBoolDecr(globals._scene___189564); s.tmp_1 = r0; - r0 = (s.tmp_1 / 256); + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = s.arg0.fields["_image"]; - s.tmp_4 = r0; - r0 = pxsim_ImageMethods.height(s.tmp_4); - s.tmp_3 = r0; - r0 = (s.tmp_3 / 2); + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + r0 = s.arg0; + case 2: + // jmp value (already in r0) s.tmp_2 = r0; - r0 = (s.tmp_0 + s.tmp_2); - return leaveAccessor(s, r0) + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 3; continue; } + r0 = pxsim_pxtcore_mkClassInstance(scene_Scene__C187636_VT); + s.tmp_3 = r0; + s.tmp_4 = scene_Scene_constructor__P187657_mk(s); + s.tmp_4.arg0 = s.tmp_3; + s.tmp_5 = control_pushEventContext__P185615_mk(s); + s.callLocIdx = 1147; s.pc = 14; return s.tmp_5; + case 14: + r0 = s.retval; + s.tmp_4.arg1 = r0; + s.tmp_4.arg2 = globals._scene___189564; + s.callLocIdx = 1148; s.pc = 13; return s.tmp_4; + case 13: + r0 = s.retval; + globals._scene___189564 = (s.tmp_3); + case 3: + case 4: + s.tmp_0 = scene_Scene_init__P187658_mk(s); + s.tmp_0.arg0 = globals._scene___189564; + s.callLocIdx = 1149; s.pc = 15; return s.tmp_0; + case 15: + r0 = s.retval; + r0 = pxsim_numops_toBoolDecr(globals.winEffect___187747); + 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; } + globals.winEffect___187747 = (globals.confetti___188018); + case 5: + case 6: + r0 = pxsim_numops_toBoolDecr(globals.loseEffect___187748); + 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; } + globals.loseEffect___187748 = (globals.melt___188039); + case 7: + case 8: + r0 = pxsim_numops_toBoolDecr(globals.winSound___189563); + 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; } + globals.winSound___189563 = (globals.powerUp___186835); + case 9: + case 10: + r0 = pxsim_numops_toBoolDecr(globals.loseSound___189561); + 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; } + globals.loseSound___189561 = (globals.wawawawaa___186832); + case 11: + case 12: + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_y__P187244.info = {"start":1849,"length":85,"line":81,"column":4,"endLine":83,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"y","argumentNames":["this"]} -Sprite_y__P187244.isGetter = true; +game_init__P189572.info = {"start":1202,"length":452,"line":45,"column":4,"endLine":60,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"init","argumentNames":["forceNewScene"]} -function Sprite_y__P187244_mk(s) { +function game_init__P189572_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_y__P187244, depth: s.depth + 1, + parent: s, fn: game_init__P189572, depth: s.depth + 1, pc: 0, retval: undefined, 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, } } @@ -4258,7 +4519,7 @@ function Sprite_y__P187244_mk(s) { -function Fx_toFloat__P185383(s) { +function inline__P195328(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4268,29 +4529,96 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.rounds___195331 = undefined; + s.j___195339 = undefined; + s.x___195344 = undefined; + s.y___195350 = undefined; + s.c___195356 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg0 / 256); + 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___195331 = (r0); + s.j___195339 = (0); + case 1: + r0 = (s.j___195339 < s.rounds___195331); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + s.tmp_1 = Math_FastRandom_randomRange__P187807_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 = 53; s.pc = 3; return s.tmp_1; + case 3: + r0 = s.retval; + s.x___195344 = (r0); + s.tmp_0 = Math_FastRandom_randomRange__P187807_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 = 54; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + s.y___195350 = (r0); + r0 = pxsim_ImageMethods.getPixel(s.arg0, s.x___195344, s.y___195350); + s.c___195356 = (r0); + s.tmp_0 = r0 = s.arg0; + s.tmp_1 = r0 = s.x___195344; + r0 = (s.y___195350 + 1); + s.tmp_2 = r0; + r0 = pxsim_ImageMethods.setPixel(s.tmp_0, s.tmp_1, s.tmp_2, s.c___195356); + s.tmp_0 = r0 = s.arg0; + s.tmp_1 = r0 = s.x___195344; + r0 = (s.y___195350 + 2); + s.tmp_2 = r0; + r0 = pxsim_ImageMethods.setPixel(s.tmp_0, s.tmp_1, s.tmp_2, s.c___195356); + r0 = (s.j___195339 + 1); + s.j___195339 = (r0); + { step = 1; continue; } + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -Fx_toFloat__P185383.info = {"start":2235,"length":81,"line":71,"column":4,"endLine":73,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"toFloat","argumentNames":["v"]} +inline__P195328.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 Fx_toFloat__P185383_mk(s) { +function inline__P195328_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_toFloat__P185383, depth: s.depth + 1, + parent: s, fn: inline__P195328, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + rounds___195331: undefined, + j___195339: undefined, + x___195344: undefined, + y___195350: undefined, + c___195356: undefined, arg0: undefined, + arg1: undefined, } } -function Sprite_x__P187242(s) { +function Math_FastRandom_randomRange__P187807(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4302,45 +4630,60 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); - r0 = s.arg0.fields["_x"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 / 256); + if (!checkSubtype(r0, Math_FastRandom__C187803_VT)) failedCast(r0); + r0 = (s.arg2 > s.arg1); s.tmp_0 = r0; - r0 = s.arg0.fields["_image"]; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_2 = Math_FastRandom_next__P187806_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 1337; s.pc = 3; return s.tmp_2; + case 3: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.arg2 - s.arg1); s.tmp_4 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_4); + r0 = (s.tmp_4 + 1); s.tmp_3 = r0; - r0 = (s.tmp_3 / 2); - s.tmp_2 = r0; - r0 = (s.tmp_0 + s.tmp_2); - return leaveAccessor(s, r0) + r0 = (s.tmp_1 % s.tmp_3); + { step = 2; continue; } + case 1: + r0 = 0; + case 2: + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = (s.arg1 + s.tmp_5); + return leave(s, r0) default: oops() } } } -Sprite_x__P187242.info = {"start":1501,"length":84,"line":70,"column":4,"endLine":72,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"x","argumentNames":["this"]} -Sprite_x__P187242.isGetter = true; +Math_FastRandom_randomRange__P187807.info = {"start":2079,"length":131,"line":62,"column":8,"endLine":64,"endColumn":9,"fileName":"pxt_modules/game/mathUtil.ts","functionName":"randomRange","argumentNames":["this","min","max"]} -function Sprite_x__P187242_mk(s) { +function Math_FastRandom_randomRange__P187807_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_x__P187242, depth: s.depth + 1, + parent: s, fn: Math_FastRandom_randomRange__P187807, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, + tmp_5: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function scene_aStar__P188872(s) { +function Math_FastRandom_next__P187806(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4350,62 +4693,38 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tm___205953 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - s.tmp_0 = game_currentScene__P187749_mk(s); - s.callLocIdx = 1790; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - r0 = r0.fields["tileMap"]; - s.tm___205953 = (r0); - s.tmp_3 = scene_isWalkable__P191303_mk(s); - s.tmp_3.arg0 = s.arg1; - s.tmp_3.arg1 = s.arg2; - s.tmp_3.arg2 = s.tm___205953; - s.callLocIdx = 1791; s.pc = 5; return s.tmp_3; - case 5: - r0 = s.retval; + r0 = s.arg0; + if (!checkSubtype(r0, Math_FastRandom__C187803_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 = 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 = undefined; - { step = 3; continue; } - case 1: - case 2: - r0 = pxsim_pxtcore_mkAction(1, inline__P205968); - s.tmp_4 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_4, 0, s.arg1); - r0 = pxsim_pxtcore_mkAction(1, inline__P205973); + 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 = pxsim_pxtrt_stclo(s.tmp_5, 0, s.arg1); - s.tmp_6 = scene_generalAStar__P188874_mk(s); - s.tmp_6.arg0 = s.tm___205953; - s.tmp_6.arg1 = s.arg0; - s.tmp_6.arg2 = s.arg2; - s.tmp_6.arg3 = s.tmp_4; - s.tmp_6.arg4 = s.tmp_5; - s.callLocIdx = 1797; s.pc = 6; return s.tmp_6; - case 6: - r0 = s.retval; - case 3: + 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() } } } -scene_aStar__P188872.info = {"start":937,"length":377,"line":31,"column":4,"endLine":39,"endColumn":5,"fileName":"pxt_modules/arcade-tilemap-a-star/a-star.ts","functionName":"aStar","argumentNames":["start","end","onTilesOf"]} +Math_FastRandom_next__P187806.info = {"start":1713,"length":107,"line":53,"column":8,"endLine":55,"endColumn":9,"fileName":"pxt_modules/game/mathUtil.ts","functionName":"next","argumentNames":["this"]} -function scene_aStar__P188872_mk(s) { +function Math_FastRandom_next__P187806_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_aStar__P188872, depth: s.depth + 1, + parent: s, fn: Math_FastRandom_next__P187806, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -4414,17 +4733,15 @@ function scene_aStar__P188872_mk(s) { tmp_4: undefined, tmp_5: undefined, tmp_6: undefined, - tm___205953: undefined, + tmp_7: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function inline__P205968(s) { +function effects_ImageEffect_constructor__P188034(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4436,33 +4753,47 @@ 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 = scene_tileLocationHeuristic__P191299_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.caps[0]; - s.callLocIdx = 1792; s.pc = 1; return s.tmp_0; + r0 = s.arg0; + if (!checkSubtype(r0, effects_ImageEffect__C188033_VT)) failedCast(r0); + r0 = (s.arg0).fields["effect"] = (s.arg2); + r0 = pxsim_pxtcore_mkClassInstance(Math_FastRandom__C187803_VT); + s.tmp_0 = r0; + s.tmp_1 = Math_FastRandom_constructor__P187805_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = undefined; + s.callLocIdx = 1643; 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() } } } -inline__P205968.info = {"start":1221,"length":34,"line":37,"column":12,"endLine":37,"endColumn":46,"fileName":"pxt_modules/arcade-tilemap-a-star/a-star.ts","functionName":"inline","argumentNames":["t"]} +effects_ImageEffect_constructor__P188034.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 inline__P205968_mk(s) { +function effects_ImageEffect_constructor__P188034_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P205968, depth: s.depth + 1, + parent: s, fn: effects_ImageEffect_constructor__P188034, 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 inline__P205973(s) { +function inline__P195436(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4472,55 +4803,81 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.factory___195439 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_2 = tiles_Location_x__P187510_mk(s); + r0 = pxsim_pxtcore_mkClassInstance(particles_ConfettiFactory__C187962_VT); + s.tmp_0 = r0; + s.tmp_2 = if_width_1_mk(s); s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 1793; s.pc = 3; return s.tmp_2; + 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 = 41; s.pc = 3; return s.tmp_2; } + } case 3: r0 = s.retval; s.tmp_1 = r0; - s.tmp_4 = tiles_Location_x__P187510_mk(s); - s.tmp_4.arg0 = s.caps[0]; - s.callLocIdx = 1794; s.pc = 4; return s.tmp_4; + 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 = 42; s.pc = 4; return s.tmp_3; } + } 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 = tiles_Location_y__P187511_mk(s); - s.tmp_6.arg0 = s.arg0; - s.callLocIdx = 1795; s.pc = 5; return s.tmp_6; + r0 = 16; + case 2: + // jmp value (already in r0) + s.tmp_4 = r0; + s.tmp_5 = particles_ConfettiFactory_constructor__P187963_mk(s); + s.tmp_5.arg0 = s.tmp_0; + s.tmp_5.arg1 = s.tmp_4; + s.tmp_5.arg2 = 16; + s.callLocIdx = 43; s.pc = 5; return s.tmp_5; case 5: r0 = s.retval; - s.tmp_5 = r0; - s.tmp_8 = tiles_Location_y__P187511_mk(s); - s.tmp_8.arg0 = s.caps[0]; - s.callLocIdx = 1796; s.pc = 6; return s.tmp_8; + s.factory___195439 = (s.tmp_0); + s.tmp_0 = particles_SprayFactory_setSpeed__P187939_mk(s); + s.tmp_0.arg0 = s.factory___195439; + s.tmp_0.arg1 = 30; + s.callLocIdx = 44; s.pc = 6; return s.tmp_0; case 6: r0 = s.retval; - s.tmp_7 = r0; - r0 = (s.tmp_5 === s.tmp_7); - case 2: - // jmp value (already in r0) - s.tmp_9 = r0; - r0 = s.tmp_9; + r0 = pxsim_pxtcore_mkClassInstance(particles_ParticleSource__C187895_VT); + s.tmp_0 = r0; + s.tmp_1 = particles_ParticleSource_constructor__P187900_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___195439; + s.callLocIdx = 45; s.pc = 7; return s.tmp_1; + case 7: + r0 = s.retval; + r0 = s.tmp_0; return leave(s, r0) default: oops() } } } -inline__P205973.info = {"start":1270,"length":35,"line":38,"column":12,"endLine":38,"endColumn":47,"fileName":"pxt_modules/arcade-tilemap-a-star/a-star.ts","functionName":"inline","argumentNames":["l"]} +inline__P195436.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 inline__P205973_mk(s) { +function inline__P195436_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P205973, depth: s.depth + 1, + parent: s, fn: inline__P195436, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -4528,18 +4885,16 @@ function inline__P205973_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, + factory___195439: undefined, arg0: undefined, + arg1: undefined, } } -function scene_isWalkable__P191303(s) { +function particles_ParticleSource_constructor__P187900(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4549,81 +4904,130 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.img___204488 = undefined; + s.sources___195460 = undefined; + s.removedSource___195469 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } - s.tmp_1 = scene_isWall__P191302_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_1.arg1 = s.arg2; - s.callLocIdx = 1843; s.pc = 6; return s.tmp_1; + r0 = s.arg0; + if (!checkSubtype(r0, particles_ParticleSource__C187895_VT)) failedCast(r0); + s.tmp_0 = sprites_BaseSprite_constructor__P187077_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 1506; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.tmp_0 = particles_init__P189922_mk(s); + s.callLocIdx = 1507; s.pc = 6; return s.tmp_0; case 6: r0 = s.retval; + s.tmp_0 = particles_particleSources__P189928_mk(s); + s.callLocIdx = 1508; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + s.sources___195460 = (r0); + r0 = pxsim_Array__length(s.sources___195460); + s.tmp_1 = r0; + r0 = (s.tmp_1 >= globals.MAX_SOURCES___189899); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = false; - { step = 5; continue; } + s.tmp_2 = particles_sortSources__P189925_mk(s); + s.tmp_2.arg0 = s.sources___195460; + s.callLocIdx = 1509; s.pc = 8; return s.tmp_2; + case 8: + r0 = s.retval; + r0 = pxsim_Array_.removeAt(s.sources___195460, 0); + s.removedSource___195469 = (r0); + s.tmp_0 = particles_ParticleSource_clear__P187910_mk(s); + s.tmp_0.arg0 = s.removedSource___195469; + s.callLocIdx = 1511; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; + s.tmp_0 = particles_ParticleSource_destroy__P187909_mk(s); + s.tmp_0.arg0 = s.removedSource___195469; + s.callLocIdx = 1512; s.pc = 10; return s.tmp_0; + case 10: + r0 = s.retval; case 1: case 2: - 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); + r0 = (s.arg0).fields["pFlags"] = (0); + s.tmp_0 = particles_ParticleSource_setRate__P187912_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg2; + s.callLocIdx = 1513; s.pc = 11; return s.tmp_0; + case 11: + r0 = s.retval; + s.tmp_0 = particles_ParticleSource_setAcceleration__P187904_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.tmp_0.arg2 = 0; + s.callLocIdx = 1514; s.pc = 12; return s.tmp_0; + case 12: + r0 = s.retval; + s.tmp_0 = particles_ParticleSource_setAnchor__P187911_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 1515; 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 = true; - { step = 5; continue; } + r0 = s.tmp_0; + { step = 4; continue; } case 3: + r0 = globals.defaultFactory___187915; case 4: - s.tmp_4 = tiles_TileMap_getTileImage__P187556_mk(s); - s.tmp_4.arg0 = s.arg2; - s.tmp_5 = tiles_TileMap_getTileIndex__P187547_mk(s); - s.tmp_5.arg0 = s.arg2; - r0 = s.arg0.fields["_col"]; - s.tmp_5.arg1 = r0; - r0 = s.arg0.fields["_row"]; - s.tmp_5.arg2 = r0; - s.callLocIdx = 1846; s.pc = 8; return s.tmp_5; - case 8: + // jmp value (already in r0) + s.tmp_1 = r0; + s.tmp_2 = particles_ParticleSource_setFactory__P187914_mk(s); + s.tmp_2.arg0 = s.arg0; + s.tmp_2.arg1 = s.tmp_1; + s.callLocIdx = 1516; s.pc = 14; return s.tmp_2; + case 14: r0 = s.retval; - s.tmp_4.arg1 = r0; - s.callLocIdx = 1847; s.pc = 7; return s.tmp_4; - case 7: + r0 = pxsim_Array__push(s.sources___195460, s.arg0); + s.tmp_0 = particles_ParticleSource_enabled__P187908_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = true; + s.callLocIdx = 1517; s.pc = 15; return s.tmp_0; + case 15: r0 = s.retval; - s.img___204488 = (r0); - r0 = pxsim_ImageMethods.equals(s.img___204488, s.arg1); - case 5: + r0 = undefined; return leave(s, r0) default: oops() } } } -scene_isWalkable__P191303.info = {"start":7750,"length":280,"line":226,"column":4,"endLine":231,"endColumn":5,"fileName":"pxt_modules/arcade-tilemap-a-star/a-star.ts","functionName":"isWalkable","argumentNames":["l","onTilesOf","tm"]} +particles_ParticleSource_constructor__P187900.info = {"start":2290,"length":899,"line":86,"column":8,"endLine":109,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["this","anchor","particlesPerSecond","factory"]} -function scene_isWalkable__P191303_mk(s) { +function particles_ParticleSource_constructor__P187900_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_isWalkable__P191303, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_constructor__P187900, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - img___204488: undefined, + sources___195460: undefined, + removedSource___195469: undefined, arg0: undefined, arg1: undefined, arg2: undefined, + arg3: undefined, } } -function scene_isWall__P191302(s) { +function particles_particleSources__P189928(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4633,54 +5037,33 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.r___204267 = undefined; - s.c___204271 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - s.tmp_0 = scene_locationRow__P191300_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1840; s.pc = 1; return s.tmp_0; + s.sources___195099 = undefined; + s.tmp_0 = game_currentScene__P187749_mk(s); + s.callLocIdx = 1568; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - s.r___204267 = (r0); - s.tmp_0 = scene_locationCol__P191301_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1841; s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; - s.c___204271 = (r0); - s.tmp_0 = tiles_TileMap_isObstacle__P187553_mk(s); - s.tmp_0.arg0 = s.arg1; - s.tmp_0.arg1 = s.c___204271; - s.tmp_0.arg2 = s.r___204267; - s.callLocIdx = 1842; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; + r0 = r0.fields["particleSources"]; + s.sources___195099 = (r0); + r0 = s.sources___195099; return leave(s, r0) default: oops() } } } -scene_isWall__P191302.info = {"start":7573,"length":169,"line":220,"column":4,"endLine":224,"endColumn":5,"fileName":"pxt_modules/arcade-tilemap-a-star/a-star.ts","functionName":"isWall","argumentNames":["l","tm"]} +particles_particleSources__P189928.info = {"start":12831,"length":119,"line":420,"column":4,"endLine":423,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"particleSources","argumentNames":[]} -function scene_isWall__P191302_mk(s) { +function particles_particleSources__P189928_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_isWall__P191302, depth: s.depth + 1, + parent: s, fn: particles_particleSources__P189928, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - r___204267: undefined, - c___204271: undefined, - arg0: undefined, - arg1: undefined, + sources___195099: undefined, } } -function scene_locationCol__P191301(s) { +function particles_sortSources__P189925(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4694,25 +5077,24 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_1 = tiles_Location_x__P187510_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 1839; s.pc = 1; return s.tmp_1; + s.tmp_0 = helpers_arraySort__P185320_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = inline__P195671; + s.callLocIdx = 1555; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - s.tmp_0 = r0; - r0 = (s.tmp_0 >> 4); + r0 = undefined; return leave(s, r0) default: oops() } } } -scene_locationCol__P191301.info = {"start":7483,"length":82,"line":216,"column":4,"endLine":218,"endColumn":5,"fileName":"pxt_modules/arcade-tilemap-a-star/a-star.ts","functionName":"locationCol","argumentNames":["l"]} +particles_sortSources__P189925.info = {"start":10009,"length":129,"line":331,"column":4,"endLine":333,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"sortSources","argumentNames":["sources"]} -function scene_locationCol__P191301_mk(s) { +function particles_sortSources__P189925_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_locationCol__P191301, depth: s.depth + 1, + parent: s, fn: particles_sortSources__P189925, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, arg0: undefined, } } @@ -4720,7 +5102,7 @@ function scene_locationCol__P191301_mk(s) { -function scene_locationRow__P191300(s) { +function inline__P195671(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4732,35 +5114,54 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_1 = tiles_Location_y__P187511_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 1838; s.pc = 1; return s.tmp_1; - case 1: - r0 = s.retval; + 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 = (s.tmp_0 >> 4); + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + r0 = s.arg0.fields["id"]; + s.tmp_3 = r0; + r0 = s.arg1.fields["id"]; + s.tmp_4 = r0; + r0 = (s.tmp_3 - s.tmp_4); + case 2: + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = s.tmp_5; return leave(s, r0) default: oops() } } } -scene_locationRow__P191300.info = {"start":7393,"length":82,"line":212,"column":4,"endLine":214,"endColumn":5,"fileName":"pxt_modules/arcade-tilemap-a-star/a-star.ts","functionName":"locationRow","argumentNames":["l"]} +inline__P195671.info = {"start":10080,"length":50,"line":332,"column":21,"endLine":332,"endColumn":71,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["a","b"]} -function scene_locationRow__P191300_mk(s) { +function inline__P195671_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_locationRow__P191300, depth: s.depth + 1, + parent: s, fn: inline__P195671, depth: s.depth + 1, pc: 0, retval: undefined, 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 tiles_TileMap_isObstacle__P187553(s) { +function helpers_arraySort__P185320(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4773,86 +5174,57 @@ 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__C187534_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); + r0 = pxsim_numops_toBoolDecr(s.arg1); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = false; - { step = 5; continue; } + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: + r0 = pxsim_Array__length(s.arg0); + s.tmp_2 = r0; + r0 = (s.tmp_2 > 1); case 2: - s.tmp_8 = tiles_TileMapData_isOutsideMap__P187533_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 = 944; s.pc = 6; return s.tmp_8; - case 6: - r0 = s.retval; - s.tmp_7 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_7); + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); if (!r0) { step = 3; continue; } - r0 = true; - { step = 5; continue; } + s.arg1 = (inline__P195694); 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); + s.tmp_0 = helpers_sortHelper__P189174_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() } } } -tiles_TileMap_isObstacle__P187553.info = {"start":12421,"length":211,"line":404,"column":8,"endLine":409,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"isObstacle","argumentNames":["this","col","row"]} +helpers_arraySort__P185320.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 tiles_TileMap_isObstacle__P187553_mk(s) { +function helpers_arraySort__P185320_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_isObstacle__P187553, depth: s.depth + 1, + parent: s, fn: helpers_arraySort__P185320, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - tmp_11: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function tiles_TileMap_enabled__P187544(s) { +function inline__P195694(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4862,44 +5234,142 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.aIsUndef___195697 = undefined; + s.bIsUndef___195701 = undefined; + s.aIsNull___195712 = undefined; + s.bIsNull___195716 = 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__C187534_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); + r0 = (s.arg0 === undefined); + s.aIsUndef___195697 = (r0); + r0 = (s.arg1 === undefined); + s.bIsUndef___195701 = (r0); + s.tmp_0 = r0 = s.aIsUndef___195697; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + r0 = s.bIsUndef___195701; + case 2: + // jmp value (already in r0) s.tmp_1 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); - return leaveAccessor(s, r0) + if (!r0) { step = 3; continue; } + r0 = 0; + { step = 17; continue; } + { step = 8; continue; } + case 3: + r0 = pxsim_numops_toBoolDecr(s.aIsUndef___195697); + if (!r0) { step = 4; continue; } + r0 = 1; + { step = 17; continue; } + { step = 7; continue; } + case 4: + r0 = pxsim_numops_toBoolDecr(s.bIsUndef___195701); + if (!r0) { step = 5; continue; } + r0 = -1; + { step = 17; continue; } + case 5: + case 6: + case 7: + case 8: + r0 = (s.arg0 === null); + s.aIsNull___195712 = (r0); + r0 = (s.arg1 === null); + s.bIsNull___195716 = (r0); + s.tmp_0 = r0 = s.aIsNull___195712; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 9; continue; } + r0 = s.tmp_0; + { step = 10; continue; } + case 9: + r0 = s.bIsNull___195716; + 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___195712); + if (!r0) { step = 12; continue; } + r0 = 1; + { step = 17; continue; } + { step = 15; continue; } + case 12: + r0 = pxsim_numops_toBoolDecr(s.bIsNull___195716); + 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() } } } -tiles_TileMap_enabled__P187544.info = {"start":7107,"length":66,"line":261,"column":8,"endLine":263,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"enabled","argumentNames":["this"]} -tiles_TileMap_enabled__P187544.isGetter = true; +inline__P195694.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 tiles_TileMap_enabled__P187544_mk(s) { +function inline__P195694_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_enabled__P187544, depth: s.depth + 1, + parent: s, fn: inline__P195694, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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___195697: undefined, + bIsUndef___195701: undefined, + aIsNull___195712: undefined, + bIsNull___195716: undefined, arg0: undefined, + arg1: undefined, } } -function tiles_TileMapData_isOutsideMap__P187533(s) { +function helpers_sortHelper__P189174(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4909,78 +5379,114 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.len___195751 = undefined; + s.i___195754 = undefined; + s.j___195760 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMapData__C187521_VT)) failedCast(r0); - r0 = (s.arg1 < 0); + 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: - s.tmp_1 = r0 = s.arg1; - r0 = s.arg0.fields["_width"]; + r0 = pxsim_numops_toBoolDecr(s.arg1); s.tmp_2 = r0; - r0 = (s.tmp_1 >= s.tmp_2); + 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); + r0 = pxsim_numops_toBoolDecr(s.tmp_3); if (!r0) { step = 3; continue; } - r0 = s.tmp_3; - { step = 4; continue; } + r0 = s.arg0; + { step = 11; 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; } + r0 = pxsim_Array__length(s.arg0); + s.len___195751 = (r0); + s.i___195754 = (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); + s.tmp_1 = r0 = s.i___195754; + r0 = (s.len___195751 - 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___195754 + 1); + s.j___195760 = (r0); case 6: - // jmp value (already in r0) - s.tmp_7 = r0; - r0 = s.tmp_7; + r0 = (s.j___195760 < s.len___195751); + 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___195754); + s.tmp_3.arg0 = r0; + r0 = pxsim_Array__getAt(s.arg0, s.j___195760); + 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__P189173_mk(s); + s.tmp_4.arg0 = s.arg0; + s.tmp_4.arg1 = s.i___195754; + s.tmp_4.arg2 = s.j___195760; + s.callLocIdx = 2; s.pc = 13; return s.tmp_4; + case 13: + r0 = s.retval; + case 7: + case 8: + r0 = (s.j___195760 + 1); + s.j___195760 = (r0); + { step = 6; continue; } + case 9: + r0 = (s.i___195754 + 1); + s.i___195754 = (r0); + { step = 5; continue; } + case 10: + r0 = s.arg0; + case 11: return leave(s, r0) default: oops() } } } -tiles_TileMapData_isOutsideMap__P187533.info = {"start":5580,"length":132,"line":199,"column":8,"endLine":201,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"isOutsideMap","argumentNames":["this","col","row"]} +helpers_sortHelper__P189174.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 tiles_TileMapData_isOutsideMap__P187533_mk(s) { +function helpers_sortHelper__P189174_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMapData_isOutsideMap__P187533, depth: s.depth + 1, + parent: s, fn: helpers_sortHelper__P189174, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, + len___195751: undefined, + i___195754: undefined, + j___195760: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function tiles_TileMapData_height__P187524(s) { +function helpers_swap__P189173(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4990,32 +5496,46 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.temp___195789 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMapData__C187521_VT)) failedCast(r0); - r0 = s.arg0.fields["_height"]; - return leaveAccessor(s, r0) + r0 = pxsim_Array__getAt(s.arg0, s.arg1); + s.temp___195789 = (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___195789); + r0 = undefined; + return leave(s, r0) default: oops() } } } -tiles_TileMapData_height__P187524.info = {"start":3734,"length":65,"line":139,"column":8,"endLine":141,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"height","argumentNames":["this"]} -tiles_TileMapData_height__P187524.isGetter = true; +helpers_swap__P189173.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 tiles_TileMapData_height__P187524_mk(s) { +function helpers_swap__P189173_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMapData_height__P187524, depth: s.depth + 1, + parent: s, fn: helpers_swap__P189173, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + temp___195789: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function tiles_TileMapData_width__P187523(s) { +function particles_init__P189922(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5025,32 +5545,59 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMapData__C187521_VT)) failedCast(r0); - r0 = s.arg0.fields["_width"]; - return leaveAccessor(s, r0) + s.scene___195801 = undefined; + s.tmp_0 = game_currentScene__P187749_mk(s); + s.callLocIdx = 1545; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + s.scene___195801 = (r0); + r0 = s.scene___195801.fields["particleSources"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + { step = 3; continue; } + case 1: + case 2: + s.tmp_1 = r0 = s.scene___195801; + r0 = pxsim_Array__mk(); + s.tmp_2 = r0; + r0 = (s.tmp_1).fields["particleSources"] = (s.tmp_2); + r0 = pxsim.control.millis(); + globals.lastUpdate___189917 = (r0); + s.tmp_0 = game_onUpdate__P187760_mk(s); + s.tmp_0.arg0 = particles_updateParticles__P189923; + s.callLocIdx = 1546; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.tmp_0 = game_onUpdateInterval__P187761_mk(s); + s.tmp_0.arg0 = 250; + s.tmp_0.arg1 = particles_pruneParticles__P189924; + s.callLocIdx = 1547; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + case 3: + r0 = undefined; + return leave(s, r0) default: oops() } } } -tiles_TileMapData_width__P187523.info = {"start":3661,"length":63,"line":135,"column":8,"endLine":137,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"width","argumentNames":["this"]} -tiles_TileMapData_width__P187523.isGetter = true; +particles_init__P189922.info = {"start":9219,"length":276,"line":303,"column":4,"endLine":310,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"init","argumentNames":[]} -function tiles_TileMapData_width__P187523_mk(s) { +function particles_init__P189922_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMapData_width__P187523, depth: s.depth + 1, + parent: s, fn: particles_init__P189922, 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, + scene___195801: undefined, } } -function tiles_TileMapData_isWall__P187532(s) { +function particles_pruneParticles__P189924(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5060,41 +5607,51 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMapData__C187521_VT)) failedCast(r0); - r0 = s.arg0.fields["layers"]; - s.tmp_1 = r0; - r0 = pxsim_ImageMethods.getPixel(s.tmp_1, s.arg1, s.arg2); - s.tmp_0 = r0; - r0 = (s.tmp_0 === 2); - return leave(s, r0) - default: oops() -} } } -tiles_TileMapData_isWall__P187532.info = {"start":5463,"length":107,"line":195,"column":8,"endLine":197,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"isWall","argumentNames":["this","col","row"]} + s.sources___194936 = undefined; + s.tmp_0 = particles_particleSources__P189928_mk(s); + s.callLocIdx = 1551; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.sources___194936 = (r0); + r0 = pxsim_numops_toBoolDecr(s.sources___194936); + if (!r0) { step = 1; continue; } + s.tmp_0 = helpers_arrayForEach__P185324_mk(s); + s.tmp_1 = helpers_arraySlice__P185329_mk(s); + s.tmp_1.arg0 = s.sources___194936; + s.tmp_1.arg1 = 0; + r0 = pxsim_Array__length(s.sources___194936); + s.tmp_1.arg2 = r0; + s.callLocIdx = 1552; s.pc = 5; return s.tmp_1; + case 5: + r0 = s.retval; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = inline__P194945; + s.callLocIdx = 1554; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + case 1: + case 2: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +particles_pruneParticles__P189924.info = {"start":9847,"length":156,"line":326,"column":4,"endLine":329,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"pruneParticles","argumentNames":[]} -function tiles_TileMapData_isWall__P187532_mk(s) { +function particles_pruneParticles__P189924_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMapData_isWall__P187532, depth: s.depth + 1, + parent: s, fn: particles_pruneParticles__P189924, 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, + sources___194936: undefined, } } -function tiles_TileMap_getTileImage__P187556(s) { +function inline__P194945(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5106,38 +5663,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__C187534_VT)) failedCast(r0); - s.tmp_0 = tiles_TileMapData_getTileImage__P187530_mk(s); - r0 = s.arg0.fields["_map"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 967; s.pc = 1; return s.tmp_0; + s.tmp_0 = particles_ParticleSource__prune__P187903_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1553; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -tiles_TileMap_getTileImage__P187556.info = {"start":13699,"length":96,"line":442,"column":8,"endLine":444,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTileImage","argumentNames":["this","index"]} +inline__P194945.info = {"start":9980,"length":15,"line":328,"column":62,"endLine":328,"endColumn":77,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["s"]} -function tiles_TileMap_getTileImage__P187556_mk(s) { +function inline__P194945_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_getTileImage__P187556, depth: s.depth + 1, + parent: s, fn: inline__P194945, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, - arg1: undefined, } } -function tiles_TileMap_data__P189508(s) { +function particles_ParticleSource__prune__P187903(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5147,24 +5699,147 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.scene___194975 = undefined; + s.sources___194983 = undefined; + s.current___194997 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C187534_VT)) failedCast(r0); - r0 = s.arg0.fields["_map"]; - return leaveAccessor(s, r0) + if (!checkSubtype(r0, particles_ParticleSource__C187895_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__P187749_mk(s); + s.callLocIdx = 1526; s.pc = 21; return s.tmp_5; + case 21: + r0 = s.retval; + s.scene___194975 = (r0); + r0 = pxsim_numops_toBoolDecr(s.scene___194975); + if (!r0) { step = 7; continue; } + r0 = s.scene___194975.fields["allSprites"]; + s.tmp_0 = r0; + r0 = pxsim_Array_.removeElement(s.tmp_0, s.arg0); + case 7: + case 8: + s.tmp_0 = particles_particleSources__P189928_mk(s); + s.callLocIdx = 1527; s.pc = 22; return s.tmp_0; + case 22: + r0 = s.retval; + s.sources___194983 = (r0); + s.tmp_0 = r0 = s.sources___194983; + 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___194983); + 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___194983, 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___194997 = (r0); + case 15: + s.tmp_0 = r0 = s.current___194997; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 16; continue; } + r0 = s.tmp_0; + { step = 17; continue; } + case 16: + r0 = s.current___194997.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___194997.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___194997.fields["next"]; + r0 = r0.fields["next"]; + s.tmp_4 = r0; + r0 = (s.current___194997).fields["next"] = (s.tmp_4); + { step = 19; continue; } + case 18: + r0 = s.current___194997.fields["next"]; + s.current___194997 = (r0); + case 19: + { step = 15; continue; } + case 20: + r0 = undefined; + return leave(s, r0) default: oops() } } } -tiles_TileMap_data__P189508.info = {"start":6344,"length":75,"line":231,"column":8,"endLine":233,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"data","argumentNames":["this"]} -tiles_TileMap_data__P189508.isGetter = true; +particles_ParticleSource__prune__P187903.info = {"start":5087,"length":830,"line":165,"column":8,"endLine":188,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"_prune","argumentNames":["this"]} -function tiles_TileMap_data__P189508_mk(s) { +function particles_ParticleSource__prune__P187903_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_data__P189508, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource__prune__P187903, depth: s.depth + 1, pc: 0, retval: undefined, 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___194975: undefined, + sources___194983: undefined, + current___194997: undefined, arg0: undefined, } } @@ -5172,7 +5847,7 @@ function tiles_TileMap_data__P189508_mk(s) { -function tiles_TileMapData_getTileImage__P187530(s) { +function helpers_arraySlice__P185329(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5182,94 +5857,114 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.size___200693 = undefined; - s.cachedImage___200697 = undefined; - s.originalImage___200704 = undefined; + s.res___195020 = undefined; + s.len___195022 = undefined; + s.i___195056 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMapData__C187521_VT)) failedCast(r0); - r0 = s.arg0.fields["_scale"]; - s.tmp_0 = r0; - r0 = (1 << s.tmp_0); - s.size___200693 = (r0); - r0 = s.arg0.fields["cachedTileView"]; - s.tmp_0 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.arg1); - s.cachedImage___200697 = (r0); - r0 = pxsim_numops_toBoolDecr(s.cachedImage___200697); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = pxsim_Array__mk(); + s.res___195020 = (r0); + r0 = pxsim_Array__length(s.arg0); + s.len___195022 = (r0); + r0 = (s.arg1 === undefined); 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___200704 = (r0); - r0 = pxsim_numops_toBoolDecr(s.originalImage___200704); - if (!r0) { step = 5; continue; } - r0 = pxsim_ImageMethods.width(s.originalImage___200704); - s.tmp_1 = r0; - r0 = (s.tmp_1 <= s.size___200693); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + if (!r0) { step = 1; continue; } + s.arg1 = (0); + { step = 4; continue; } case 1: - r0 = pxsim_ImageMethods.height(s.originalImage___200704); - s.tmp_2 = r0; - r0 = (s.tmp_2 <= s.size___200693); + 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__P185342_mk(s); + r0 = (s.len___195022 + 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: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 3; continue; } - s.cachedImage___200697 = (s.originalImage___200704); - { step = 4; continue; } case 3: - r0 = pxsim.image.create(s.size___200693, s.size___200693); - s.cachedImage___200697 = (r0); - r0 = pxsim_ImageMethods.drawImage(s.cachedImage___200697, s.originalImage___200704, 0, 0); case 4: - r0 = s.arg0.fields["cachedTileView"]; + r0 = (s.arg1 > s.len___195022); s.tmp_0 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, s.arg1, s.cachedImage___200697); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + r0 = s.res___195020; + { 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___195022); + { 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___195022 + s.arg2); + s.arg2 = (r0); case 8: - r0 = s.cachedImage___200697; + case 9: + case 10: + r0 = (s.arg2 > s.len___195022); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 11; continue; } + s.arg2 = (s.len___195022); + case 11: + case 12: + s.i___195056 = (s.arg1); + case 13: + r0 = (s.i___195056 < s.arg2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 14; continue; } + s.tmp_1 = r0 = s.res___195020; + r0 = pxsim_Array__getAt(s.arg0, s.i___195056); + s.tmp_2 = r0; + r0 = pxsim_Array__push(s.tmp_1, s.tmp_2); + r0 = (s.i___195056 + 1); + s.i___195056 = (r0); + { step = 13; continue; } + case 14: + r0 = s.res___195020; + case 15: return leave(s, r0) default: oops() } } } -tiles_TileMapData_getTileImage__P187530.info = {"start":4599,"length":717,"line":172,"column":8,"endLine":189,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTileImage","argumentNames":["this","index"]} +helpers_arraySlice__P185329.info = {"start":8909,"length":690,"line":299,"column":4,"endLine":324,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arraySlice","argumentNames":["arr","start","end"]} -function tiles_TileMapData_getTileImage__P187530_mk(s) { +function helpers_arraySlice__P185329_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMapData_getTileImage__P187530, depth: s.depth + 1, + parent: s, fn: helpers_arraySlice__P185329, depth: s.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___200693: undefined, - cachedImage___200697: undefined, - originalImage___200704: undefined, + res___195020: undefined, + len___195022: undefined, + i___195056: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function tiles_TileMapData_scale__P187525(s) { +function Math_max__P185342(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5281,30 +5976,39 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } + r0 = (s.arg0 >= s.arg1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMapData__C187521_VT)) failedCast(r0); - r0 = s.arg0.fields["_scale"]; - return leaveAccessor(s, r0) + { step = 3; continue; } + case 1: + case 2: + r0 = s.arg1; + case 3: + return leave(s, r0) default: oops() } } } -tiles_TileMapData_scale__P187525.info = {"start":3809,"length":66,"line":143,"column":8,"endLine":145,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"scale","argumentNames":["this"]} -tiles_TileMapData_scale__P187525.isGetter = true; +Math_max__P185342.info = {"start":15575,"length":105,"line":529,"column":4,"endLine":532,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"max","argumentNames":["a","b"]} -function tiles_TileMapData_scale__P187525_mk(s) { +function Math_max__P185342_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMapData_scale__P187525, depth: s.depth + 1, + parent: s, fn: Math_max__P185342, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, + arg1: undefined, } } -function tiles_TileMap_getTileIndex__P187547(s) { +function helpers_arrayForEach__P185324(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5314,43 +6018,58 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.len___192814 = undefined; + s.i___192817 = 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__C187534_VT)) failedCast(r0); - s.tmp_0 = tiles_TileMapData_getTile__P187527_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 = 902; s.pc = 1; return s.tmp_0; + r0 = pxsim_Array__length(s.arg0); + s.len___192814 = (r0); + s.i___192817 = (0); case 1: + r0 = (s.i___192817 < s.len___192814); + 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___192817); + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.i___192817; + 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___192817 + 1); + s.i___192817 = (r0); + { step = 1; continue; } + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -tiles_TileMap_getTileIndex__P187547.info = {"start":7380,"length":105,"line":273,"column":8,"endLine":275,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTileIndex","argumentNames":["this","col","row"]} +helpers_arrayForEach__P185324.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 tiles_TileMap_getTileIndex__P187547_mk(s) { +function helpers_arrayForEach__P185324_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_getTileIndex__P187547, depth: s.depth + 1, + parent: s, fn: helpers_arrayForEach__P185324, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + len___192814: undefined, + i___192817: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function tiles_TileMapData_getTile__P187527(s) { +function particles_updateParticles__P189923(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5360,73 +6079,81 @@ 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__C187521_VT)) failedCast(r0); - s.tmp_1 = tiles_TileMapData_isOutsideMap__P187533_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_1.arg1 = s.arg1; - s.tmp_1.arg2 = s.arg2; - s.callLocIdx = 879; s.pc = 4; return s.tmp_1; - case 4: + s.sources___195842 = undefined; + s.time___195849 = undefined; + s.dt___195852 = undefined; + s.i___195858 = undefined; + s.tmp_0 = particles_particleSources__P189928_mk(s); + s.callLocIdx = 1548; s.pc = 6; return s.tmp_0; + case 6: r0 = s.retval; + s.sources___195842 = (r0); + r0 = pxsim_numops_toBoolDecr(s.sources___195842); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = 0; - { step = 3; continue; } + { step = 5; 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); + s.tmp_2 = particles_sortSources__P189925_mk(s); + s.tmp_2.arg0 = s.sources___195842; + s.callLocIdx = 1549; s.pc = 7; return s.tmp_2; + case 7: + r0 = s.retval; + r0 = pxsim.control.millis(); + s.time___195849 = (r0); + r0 = (s.time___195849 - globals.lastUpdate___189917); + s.dt___195852 = (r0); + globals.lastUpdate___189917 = (s.time___195849); + s.i___195858 = (0); case 3: + s.tmp_1 = r0 = s.i___195858; + r0 = pxsim_Array__length(s.sources___195842); + 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__P187902_mk(s); + r0 = pxsim_Array__getAt(s.sources___195842, s.i___195858); + s.tmp_3.arg0 = r0; + s.tmp_3.arg1 = s.dt___195852; + s.callLocIdx = 1550; s.pc = 8; return s.tmp_3; + case 8: + r0 = s.retval; + r0 = (s.i___195858 + 1); + s.i___195858 = (r0); + { step = 3; continue; } + case 4: + case 5: + r0 = undefined; return leave(s, r0) default: oops() } } } -tiles_TileMapData_getTile__P187527.info = {"start":3997,"length":200,"line":152,"column":8,"endLine":156,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTile","argumentNames":["this","col","row"]} +particles_updateParticles__P189923.info = {"start":9501,"length":340,"line":312,"column":4,"endLine":324,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"updateParticles","argumentNames":[]} -function tiles_TileMapData_getTile__P187527_mk(s) { +function particles_updateParticles__P189923_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMapData_getTile__P187527, depth: s.depth + 1, + parent: s, fn: particles_updateParticles__P189923, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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, + sources___195842: undefined, + time___195849: undefined, + dt___195852: undefined, + i___195858: undefined, } } -function tiles_Location_row__P187508(s) { +function particles_ParticleSource__update__P187902(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5436,32 +6163,266 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.p___195921 = undefined; + s.current___195940 = undefined; + s.fixedDt___195948 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_Location__C187506_VT)) failedCast(r0); - r0 = s.arg0.fields["_row"]; - return leaveAccessor(s, r0) - default: oops() -} } } -tiles_Location_row__P187508.info = {"start":467,"length":51,"line":23,"column":8,"endLine":25,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"row","argumentNames":["this"]} -tiles_Location_row__P187508.isGetter = true; - -function tiles_Location_row__P187508_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_Location_row__P187508, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - + if (!checkSubtype(r0, particles_ParticleSource__C187895_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__P187909_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1521; s.pc = 28; return s.tmp_0; + case 28: + r0 = s.retval; + case 1: + case 2: + { step = 10; continue; } + case 3: + r0 = s.arg0.fields["anchor"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 4; continue; } + r0 = s.tmp_0; + { step = 5; continue; } + case 4: + s.tmp_2 = if_flags_1_mk(s); + r0 = s.arg0.fields["anchor"]; + s.tmp_2.arg0 = r0; + if (!s.tmp_2.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "flags"); + } else { + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["flags"]; + if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["flags"]; } + else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } + else { s.callLocIdx = 1522; 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 = 1523; 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__P187907_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 1524; 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__C187931_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__C187931_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___195921 = (r0); + r0 = pxsim_numops_toBoolDecr(s.p___195921); + 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___195921).fields["next"] = (s.tmp_2); + r0 = (s.arg0).fields["head"] = (s.p___195921); + { 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___195940 = (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___195948 = (r0); + r0 = pxsim_numops_toBoolDecr(s.fixedDt___195948); + if (!r0) { step = 23; continue; } + case 19: + r0 = s.current___195940.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___195940; + 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__C187895_v4_3_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.current___195940; + s.tmp_0.arg2 = s.fixedDt___195948; + if (!checkSubtype(s.tmp_0.arg0, particles_ParticleSource__C187895_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___195940.fields["next"]; + s.tmp_0 = r0; + s.current___195940 = (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___195940; + 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___195940.fields["next"]; + s.tmp_0 = r0; + s.current___195940 = (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() +} } } +particles_ParticleSource__update__P187902.info = {"start":3677,"length":1400,"line":123,"column":8,"endLine":163,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"_update","argumentNames":["this","dt"]} -function tiles_Location_col__P187507(s) { +function particles_ParticleSource__update__P187902_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_ParticleSource__update__P187902, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + p___195921: undefined, + current___195940: undefined, + fixedDt___195948: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function particles_ParticleSource_updateParticle__P189919(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5473,30 +6434,89 @@ 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_Location__C187506_VT)) failedCast(r0); - r0 = s.arg0.fields["_col"]; - return leaveAccessor(s, r0) + if (!checkSubtype(r0, particles_ParticleSource__C187895_VT)) failedCast(r0); + r0 = (s.arg2 >> 10); + s.arg2 = (r0); + s.tmp_0 = r0 = s.arg1; + r0 = s.arg1.fields["vx"]; + s.tmp_2 = r0; + r0 = s.arg0.fields["ax"]; + s.tmp_4 = r0; + r0 = pxsim.Math_.imul(s.tmp_4, s.arg2); + s.tmp_5 = r0; + r0 = (s.tmp_5 >> 8); + s.tmp_3 = r0; + r0 = (s.tmp_2 + s.tmp_3); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["vx"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg1; + r0 = s.arg1.fields["vy"]; + s.tmp_2 = r0; + r0 = s.arg0.fields["ay"]; + s.tmp_4 = r0; + r0 = pxsim.Math_.imul(s.tmp_4, s.arg2); + s.tmp_5 = r0; + r0 = (s.tmp_5 >> 8); + s.tmp_3 = r0; + r0 = (s.tmp_2 + s.tmp_3); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["vy"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg1; + r0 = s.arg1.fields["_x"]; + s.tmp_2 = r0; + r0 = s.arg1.fields["vx"]; + s.tmp_4 = r0; + r0 = pxsim.Math_.imul(s.tmp_4, s.arg2); + s.tmp_5 = r0; + r0 = (s.tmp_5 >> 8); + s.tmp_3 = r0; + r0 = (s.tmp_2 + s.tmp_3); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_x"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg1; + r0 = s.arg1.fields["_y"]; + s.tmp_2 = r0; + r0 = s.arg1.fields["vy"]; + s.tmp_4 = r0; + r0 = pxsim.Math_.imul(s.tmp_4, s.arg2); + s.tmp_5 = r0; + r0 = (s.tmp_5 >> 8); + s.tmp_3 = r0; + r0 = (s.tmp_2 + s.tmp_3); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_y"] = (s.tmp_1); + r0 = undefined; + return leave(s, r0) default: oops() } } } -tiles_Location_col__P187507.info = {"start":406,"length":51,"line":19,"column":8,"endLine":21,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"col","argumentNames":["this"]} -tiles_Location_col__P187507.isGetter = true; +particles_ParticleSource_updateParticle__P189919.info = {"start":8231,"length":357,"line":276,"column":8,"endLine":284,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"updateParticle","argumentNames":["this","p","fixedDt"]} -function tiles_Location_col__P187507_mk(s) { +function particles_ParticleSource_updateParticle__P189919_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_Location_col__P187507, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_updateParticle__P189919, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function scene_tileLocationHeuristic__P191299(s) { +function Fx_rightShift__P185381(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5506,66 +6526,59 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.startCol___205988 = undefined; - s.startRow___205992 = undefined; - s.endCol___205996 = undefined; - s.endRow___206000 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = scene_locationCol__P191301_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1834; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.startCol___205988 = (r0); - s.tmp_0 = scene_locationRow__P191300_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1835; s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; - s.startRow___205992 = (r0); - s.tmp_0 = scene_locationCol__P191301_mk(s); - s.tmp_0.arg0 = s.arg1; - s.callLocIdx = 1836; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.endCol___205996 = (r0); - s.tmp_0 = scene_locationRow__P191300_mk(s); - s.tmp_0.arg0 = s.arg1; - s.callLocIdx = 1837; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - s.endRow___206000 = (r0); - r0 = (s.startCol___205988 - s.endCol___205996); - s.tmp_1 = r0; - r0 = pxsim.Math_.pow(s.tmp_1, 2); + r0 = (s.arg0 >> s.arg1); + return leave(s, r0) + default: oops() +} } } +Fx_rightShift__P185381.info = {"start":2031,"length":108,"line":65,"column":4,"endLine":67,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"rightShift","argumentNames":["a","n"]} + +function Fx_rightShift__P185381_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Fx_rightShift__P185381, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, + arg1: undefined, +} } + + + + + +function Fx_mul__P185372(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = pxsim.Math_.imul(s.arg0, s.arg1); s.tmp_0 = r0; - r0 = (s.startRow___205992 - s.endRow___206000); - s.tmp_3 = r0; - r0 = pxsim.Math_.pow(s.tmp_3, 2); - s.tmp_2 = r0; - r0 = (s.tmp_0 + s.tmp_2); + r0 = (s.tmp_0 >> 8); return leave(s, r0) default: oops() } } } -scene_tileLocationHeuristic__P191299.info = {"start":6929,"length":350,"line":200,"column":4,"endLine":208,"endColumn":5,"fileName":"pxt_modules/arcade-tilemap-a-star/a-star.ts","functionName":"tileLocationHeuristic","argumentNames":["tile","target"]} +Fx_mul__P185372.info = {"start":872,"length":133,"line":29,"column":4,"endLine":31,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"mul","argumentNames":["a","b"]} -function scene_tileLocationHeuristic__P191299_mk(s) { +function Fx_mul__P185372_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_tileLocationHeuristic__P191299, depth: s.depth + 1, + parent: s, fn: Fx_mul__P185372, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - startCol___205988: undefined, - startRow___205992: undefined, - endCol___205996: undefined, - endRow___206000: undefined, arg0: undefined, arg1: undefined, } } @@ -5574,7 +6587,7 @@ function scene_tileLocationHeuristic__P191299_mk(s) { -function scene_generalAStar__P188874(s) { +function Fx_add__P185369(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5584,566 +6597,406 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.consideredTiles___203902 = undefined; - s.encountedLocations___203924 = undefined; - s.updateOrFillLocation___203927 = undefined; - s.end___203997 = undefined; - s.currLocation___204003 = undefined; - s.row___204014 = undefined; - s.col___204019 = undefined; - s.dataForCurrLocation___204024 = undefined; - s.neighbors___204036 = undefined; - s.corners___204038 = undefined; - s.left___204040 = undefined; - s.right___204046 = undefined; - s.top___204053 = undefined; - s.bottom___204059 = undefined; - s.leftIsWall___204066 = undefined; - s.rightIsWall___204073 = undefined; - s.topIsWall___204080 = undefined; - s.bottomIsWall___204087 = undefined; - s.topLeft___204102 = undefined; - s.bottomLeft___204120 = undefined; - s.topRight___204145 = undefined; - s.bottomRight___204164 = undefined; - s.neighborCost___204194 = undefined; - s.node___204200 = undefined; - s.unnamed8928___U24 = undefined; - s.unnamed8929___U25 = undefined; - s.cornerCost___204210 = undefined; - s.corner___204216 = undefined; - s.unnamed8930___U28 = undefined; - s.unnamed8931___U29 = undefined; - s.endCol___204222 = undefined; - s.endDataNode___204229 = undefined; - s.curr___204242 = undefined; - s.output___204244 = 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_3 = scene_isWalkable__P191303_mk(s); + r0 = (s.arg0 + s.arg1); + return leave(s, r0) + default: oops() +} } } +Fx_add__P185369.info = {"start":511,"length":118,"line":20,"column":4,"endLine":22,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"add","argumentNames":["a","b"]} + +function Fx_add__P185369_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Fx_add__P185369, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, + arg1: undefined, +} } + + + + + +function particles_ParticleFactory_createParticle__P187933(s) { +let r0 = s.r0, 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___196045 = 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__C187931_VT)) failedCast(r0); + r0 = pxsim_pxtcore_mkClassInstance(particles_Particle__C187876_VT); + s.p___196045 = (r0); + s.tmp_0 = r0 = s.p___196045; + s.tmp_3 = if_x_1_mk(s); s.tmp_3.arg0 = s.arg1; - s.tmp_3.arg1 = s.arg2; - s.tmp_3.arg2 = s.arg0; - s.callLocIdx = 1798; s.pc = 52; return s.tmp_3; - case 52: + 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 = 1575; s.pc = 1; return s.tmp_3; } + } + case 1: r0 = s.retval; s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + r0 = (s.tmp_2 * 256); + s.tmp_4 = r0; + r0 = (s.tmp_4 | 0); s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = undefined; - { step = 51; continue; } - case 1: + r0 = (s.tmp_0).fields["_x"] = (s.tmp_1); + s.tmp_0 = r0 = s.p___196045; + 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 = 1577; s.pc = 2; return s.tmp_3; } + } case 2: - r0 = pxsim_pxtcore_mkClassInstance(Heap__C188863_VT); - s.tmp_4 = r0; - s.tmp_5 = Heap_constructor__P188864_mk(s); - s.tmp_5.arg0 = s.tmp_4; - s.tmp_5.arg1 = inline__P203905; - s.callLocIdx = 1799; s.pc = 53; return s.tmp_5; - case 53: - r0 = s.retval; - s.consideredTiles___203902 = (s.tmp_4); - r0 = pxsim_Array__mk(); - s.tmp_0 = r0; - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); - s.encountedLocations___203924 = (s.tmp_0); - r0 = pxsim_pxtcore_mkAction(4, updateOrFillLocation__P203927); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.encountedLocations___203924); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.arg3); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 3, s.consideredTiles___203902); - s.updateOrFillLocation___203927 = (s.tmp_0); - s.tmp_1 = lambda_4_mk(s); - s.tmp_1.argL = s.updateOrFillLocation___203927; - s.tmp_1.arg0 = s.arg1; - s.tmp_1.arg1 = null; - s.tmp_1.arg2 = 0; - setupLambda(s.tmp_1, s.tmp_1.argL); - s.callLocIdx = 1807; s.pc = 54; return s.tmp_1; - case 54: r0 = s.retval; - s.end___203997 = (null); - case 3: - r0 = s.consideredTiles___203902.fields["store"]; s.tmp_2 = r0; - r0 = pxsim_Array__length(s.tmp_2); + r0 = (s.tmp_2 * 256); + s.tmp_4 = r0; + r0 = (s.tmp_4 | 0); s.tmp_1 = r0; - r0 = (s.tmp_1 !== 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 40; continue; } - s.tmp_3 = Heap_pop__P188866_mk(s); - s.tmp_3.arg0 = s.consideredTiles___203902; - s.callLocIdx = 1809; s.pc = 55; return s.tmp_3; - case 55: - r0 = s.retval; - s.currLocation___204003 = (r0); - s.tmp_1 = lambda_2_mk(s); - s.tmp_1.argL = s.arg4; - r0 = s.currLocation___204003.fields["loc"]; - s.tmp_1.arg0 = r0; - setupLambda(s.tmp_1, s.tmp_1.argL); - s.callLocIdx = 1810; s.pc = 56; return s.tmp_1; - case 56: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - r0 = s.currLocation___204003.fields["loc"]; - s.end___203997 = (r0); - { step = 40; continue; } + r0 = (s.tmp_0).fields["_y"] = (s.tmp_1); + r0 = (s.p___196045).fields["vx"] = (0); + r0 = (s.p___196045).fields["vy"] = (0); + r0 = (s.p___196045).fields["lifespan"] = (500); + r0 = s.p___196045; + return leave(s, r0) + default: oops() +} } } +particles_ParticleFactory_createParticle__P187933.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 particles_ParticleFactory_createParticle__P187933_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_ParticleFactory_createParticle__P187933, depth: s.depth + 1, + pc: 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___196045: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function game_onUpdate__P187760(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (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 = game_init__P189572_mk(s); + s.tmp_0.arg0 = undefined; + s.callLocIdx = 1201; s.pc = 4; return s.tmp_0; case 4: - case 5: - s.tmp_0 = scene_locationRow__P191300_mk(s); - r0 = s.currLocation___204003.fields["loc"]; - s.tmp_0.arg0 = r0; - s.callLocIdx = 1811; s.pc = 57; return s.tmp_0; - case 57: - r0 = s.retval; - s.row___204014 = (r0); - s.tmp_0 = scene_locationCol__P191301_mk(s); - r0 = s.currLocation___204003.fields["loc"]; - s.tmp_0.arg0 = r0; - s.callLocIdx = 1812; s.pc = 58; return s.tmp_0; - case 58: r0 = s.retval; - s.col___204019 = (r0); - r0 = pxsim_Array__getAt(s.encountedLocations___203924, s.col___204019); - s.tmp_0 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.row___204014); - s.dataForCurrLocation___204024 = (r0); - s.tmp_0 = r0 = s.dataForCurrLocation___204024; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 6; continue; } - r0 = s.tmp_0; - { step = 7; continue; } - case 6: - r0 = s.dataForCurrLocation___204024.fields["visited"]; - case 7: - // jmp value (already in r0) + r0 = pxsim_numops_toBoolDecr(s.arg0); s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 8; continue; } + 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 8: - case 9: - r0 = (s.dataForCurrLocation___204024).fields["visited"] = (true); - r0 = pxsim_Array__mk(); - s.neighbors___204036 = (r0); - r0 = pxsim_Array__mk(); - s.corners___204038 = (r0); - s.tmp_0 = tiles_getTileLocation__P187561_mk(s); - r0 = (s.col___204019 - 1); - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.row___204014; - s.callLocIdx = 1813; s.pc = 59; return s.tmp_0; - case 59: - r0 = s.retval; - s.left___204040 = (r0); - s.tmp_0 = tiles_getTileLocation__P187561_mk(s); - r0 = (s.col___204019 + 1); - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.row___204014; - s.callLocIdx = 1814; s.pc = 60; return s.tmp_0; - case 60: - r0 = s.retval; - s.right___204046 = (r0); - s.tmp_0 = tiles_getTileLocation__P187561_mk(s); - s.tmp_0.arg0 = s.col___204019; - r0 = (s.row___204014 - 1); - s.tmp_0.arg1 = r0; - s.callLocIdx = 1815; s.pc = 61; return s.tmp_0; - case 61: - r0 = s.retval; - s.top___204053 = (r0); - s.tmp_0 = tiles_getTileLocation__P187561_mk(s); - s.tmp_0.arg0 = s.col___204019; - r0 = (s.row___204014 + 1); - s.tmp_0.arg1 = r0; - s.callLocIdx = 1816; s.pc = 62; return s.tmp_0; - case 62: + case 1: + case 2: + s.tmp_2 = control_EventContext_registerFrameHandler__P185609_mk(s); + s.tmp_3 = game_eventContext__P187752_mk(s); + s.callLocIdx = 1202; s.pc = 6; return s.tmp_3; + case 6: r0 = s.retval; - s.bottom___204059 = (r0); - s.tmp_2 = scene_isWalkable__P191303_mk(s); - s.tmp_2.arg0 = s.left___204040; - s.tmp_2.arg1 = s.arg2; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = 20; s.tmp_2.arg2 = s.arg0; - s.callLocIdx = 1817; s.pc = 63; return s.tmp_2; - case 63: + s.callLocIdx = 1203; s.pc = 5; return s.tmp_2; + case 5: r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); - s.leftIsWall___204066 = (r0); - s.tmp_2 = scene_isWalkable__P191303_mk(s); - s.tmp_2.arg0 = s.right___204046; - s.tmp_2.arg1 = s.arg2; - s.tmp_2.arg2 = s.arg0; - s.callLocIdx = 1818; s.pc = 64; return s.tmp_2; - case 64: + case 3: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +game_onUpdate__P187760.info = {"start":7427,"length":169,"line":242,"column":4,"endLine":246,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"onUpdate","argumentNames":["a"]} + +function game_onUpdate__P187760_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: game_onUpdate__P187760, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + arg0: undefined, +} } + + + + + +function particles_SprayFactory_constructor__P187936(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (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__C187935_VT)) failedCast(r0); + r0 = undefined; + s.tmp_0 = particles_initTrig__P189943_mk(s); + s.callLocIdx = 1582; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); - s.rightIsWall___204073 = (r0); - s.tmp_2 = scene_isWalkable__P191303_mk(s); - s.tmp_2.arg0 = s.top___204053; - s.tmp_2.arg1 = s.arg2; - s.tmp_2.arg2 = s.arg0; - s.callLocIdx = 1819; s.pc = 65; return s.tmp_2; - case 65: + s.tmp_0 = particles_SprayFactory_setSpeed__P187939_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 1583; s.pc = 2; return s.tmp_0; + case 2: r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); - s.topIsWall___204080 = (r0); - s.tmp_2 = scene_isWalkable__P191303_mk(s); - s.tmp_2.arg0 = s.bottom___204059; - s.tmp_2.arg1 = s.arg2; - s.tmp_2.arg2 = s.arg0; - s.callLocIdx = 1820; s.pc = 66; return s.tmp_2; - case 66: + s.tmp_0 = particles_SprayFactory_setDirection__P187940_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg2; + s.tmp_0.arg2 = s.arg3; + s.callLocIdx = 1584; s.pc = 3; return s.tmp_0; + case 3: r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); - s.bottomIsWall___204087 = (r0); - r0 = pxsim_numops_toBoolDecr(s.leftIsWall___204066); - 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 = 18; continue; } - r0 = pxsim_Array__push(s.neighbors___204036, s.left___204040); - r0 = pxsim_numops_toBoolDecr(s.topIsWall___204080); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +particles_SprayFactory_constructor__P187936.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__P187936_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_SprayFactory_constructor__P187936, 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__P189943(s) { +let r0 = s.r0, 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___189929); 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 = 12; continue; } - s.tmp_2 = tiles_getTileLocation__P187561_mk(s); - r0 = (s.col___204019 - 1); - s.tmp_2.arg0 = r0; - r0 = (s.row___204014 - 1); - s.tmp_2.arg1 = r0; - s.callLocIdx = 1821; s.pc = 67; return s.tmp_2; - case 67: + if (!r0) { step = 1; continue; } + s.tmp_2 = particles_cacheSin__P187929_mk(s); + s.tmp_2.arg0 = 100; + s.callLocIdx = 1570; s.pc = 3; return s.tmp_2; + case 3: r0 = s.retval; - s.topLeft___204102 = (r0); - s.tmp_3 = scene_isWall__P191302_mk(s); - s.tmp_3.arg0 = s.topLeft___204102; - s.tmp_3.arg1 = s.arg0; - s.callLocIdx = 1822; s.pc = 68; return s.tmp_3; - case 68: + globals.cachedSin___189929 = (r0); + s.tmp_0 = particles_cacheCos__P187930_mk(s); + s.tmp_0.arg0 = 100; + s.callLocIdx = 1571; s.pc = 4; return s.tmp_0; + case 4: 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); + globals.cachedCos___189930 = (r0); + case 1: + case 2: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +particles_initTrig__P189943.info = {"start":291,"length":155,"line":11,"column":4,"endLine":16,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"initTrig","argumentNames":[]} + +function particles_initTrig__P189943_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_initTrig__P189943, 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__P187930(s) { +let r0 = s.r0, 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___195563 = undefined; + s.anglePerSlice___195565 = undefined; + s.i___195571 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = pxsim_Array__mk(); + s.cos___195563 = (r0); + r0 = (6.283185307179586 / s.arg0); + s.anglePerSlice___195565 = (r0); + s.i___195571 = (0); + case 1: + r0 = (s.i___195571 < s.arg0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 10; continue; } - r0 = pxsim_Array__push(s.corners___204038, s.topLeft___204102); - case 10: - case 11: - case 12: - case 13: - r0 = pxsim_numops_toBoolDecr(s.bottomIsWall___204087); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + if (!r0) { step = 2; continue; } + s.tmp_1 = r0 = s.cos___195563; + r0 = (s.i___195571 * s.anglePerSlice___195565); + 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___195571 + 1); + s.i___195571 = (r0); + { step = 1; continue; } + case 2: + r0 = s.cos___195563; + return leave(s, r0) + default: oops() +} } } +particles_cacheCos__P187930.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__P187930_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_cacheCos__P187930, depth: s.depth + 1, + pc: 0, retval: undefined, 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___195563: undefined, + anglePerSlice___195565: undefined, + i___195571: undefined, + arg0: undefined, +} } + + + + + +function particles_cacheSin__P187929(s) { +let r0 = s.r0, 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___195589 = undefined; + s.anglePerSlice___195591 = undefined; + s.i___195597 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = pxsim_Array__mk(); + s.sin___195589 = (r0); + r0 = (6.283185307179586 / s.arg0); + s.anglePerSlice___195591 = (r0); + s.i___195597 = (0); + case 1: + r0 = (s.i___195597 < s.arg0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 16; continue; } - s.tmp_2 = tiles_getTileLocation__P187561_mk(s); - r0 = (s.col___204019 - 1); - s.tmp_2.arg0 = r0; - r0 = (s.row___204014 + 1); - s.tmp_2.arg1 = r0; - s.callLocIdx = 1823; s.pc = 69; return s.tmp_2; - case 69: - r0 = s.retval; - s.bottomLeft___204120 = (r0); - s.tmp_3 = scene_isWall__P191302_mk(s); - s.tmp_3.arg0 = s.bottomLeft___204120; - s.tmp_3.arg1 = s.arg0; - s.callLocIdx = 1824; s.pc = 70; return s.tmp_3; - case 70: - 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 = 14; continue; } - r0 = pxsim_Array__push(s.corners___204038, s.bottomLeft___204120); - case 14: - case 15: - case 16: - case 17: - case 18: - case 19: - r0 = pxsim_numops_toBoolDecr(s.rightIsWall___204073); - 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 = 28; continue; } - r0 = pxsim_Array__push(s.neighbors___204036, s.right___204046); - r0 = pxsim_numops_toBoolDecr(s.topIsWall___204080); - 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_2 = tiles_getTileLocation__P187561_mk(s); - r0 = (s.col___204019 + 1); - s.tmp_2.arg0 = r0; - r0 = (s.row___204014 - 1); - s.tmp_2.arg1 = r0; - s.callLocIdx = 1825; s.pc = 71; return s.tmp_2; - case 71: - r0 = s.retval; - s.topRight___204145 = (r0); - s.tmp_3 = scene_isWall__P191302_mk(s); - s.tmp_3.arg0 = s.topRight___204145; - s.tmp_3.arg1 = s.arg0; - s.callLocIdx = 1826; s.pc = 72; return s.tmp_3; - case 72: - 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 = 20; continue; } - r0 = pxsim_Array__push(s.corners___204038, s.topRight___204145); - case 20: - case 21: - case 22: - case 23: - r0 = pxsim_numops_toBoolDecr(s.bottomIsWall___204087); - 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 = 26; continue; } - s.tmp_2 = tiles_getTileLocation__P187561_mk(s); - r0 = (s.col___204019 + 1); - s.tmp_2.arg0 = r0; - r0 = (s.row___204014 + 1); - s.tmp_2.arg1 = r0; - s.callLocIdx = 1827; s.pc = 73; return s.tmp_2; - case 73: - r0 = s.retval; - s.bottomRight___204164 = (r0); - s.tmp_3 = scene_isWall__P191302_mk(s); - s.tmp_3.arg0 = s.bottomRight___204164; - s.tmp_3.arg1 = s.arg0; - s.callLocIdx = 1828; s.pc = 74; return s.tmp_3; - case 74: - 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 = 24; continue; } - r0 = pxsim_Array__push(s.corners___204038, s.bottomRight___204164); - case 24: - case 25: - case 26: - case 27: - case 28: - case 29: - r0 = pxsim_numops_toBoolDecr(s.topIsWall___204080); - 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 = 30; continue; } - r0 = pxsim_Array__push(s.neighbors___204036, s.top___204053); - case 30: - case 31: - r0 = pxsim_numops_toBoolDecr(s.bottomIsWall___204087); - 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 = 32; continue; } - r0 = pxsim_Array__push(s.neighbors___204036, s.bottom___204059); - case 32: - case 33: - r0 = s.currLocation___204003.fields["cost"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 + 1); - s.neighborCost___204194 = (r0); - s.node___204200 = (undefined); - s.unnamed8928___U24 = (s.neighbors___204036); - s.unnamed8929___U25 = (0); - case 34: - s.tmp_0 = r0 = s.unnamed8929___U25; - r0 = pxsim_Array__length(s.unnamed8928___U24); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 35; continue; } - r0 = pxsim_Array__getAt(s.unnamed8928___U24, s.unnamed8929___U25); - s.node___204200 = (r0); - s.tmp_2 = lambda_4_mk(s); - s.tmp_2.argL = s.updateOrFillLocation___203927; - s.tmp_2.arg0 = s.node___204200; - s.tmp_2.arg1 = s.dataForCurrLocation___204024; - s.tmp_2.arg2 = s.neighborCost___204194; - setupLambda(s.tmp_2, s.tmp_2.argL); - s.callLocIdx = 1829; s.pc = 75; return s.tmp_2; - case 75: - r0 = s.retval; - r0 = (s.unnamed8929___U25 + 1); - s.unnamed8929___U25 = (r0); - { step = 34; continue; } - case 35: - s.unnamed8928___U24 = (undefined); - r0 = pxsim_Array__length(s.corners___204038); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 38; continue; } - r0 = s.currLocation___204003.fields["cost"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 + 1.414213562373095); - s.cornerCost___204210 = (r0); - s.corner___204216 = (undefined); - s.unnamed8930___U28 = (s.corners___204038); - s.unnamed8931___U29 = (0); - case 36: - s.tmp_0 = r0 = s.unnamed8931___U29; - r0 = pxsim_Array__length(s.unnamed8930___U28); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 37; continue; } - r0 = pxsim_Array__getAt(s.unnamed8930___U28, s.unnamed8931___U29); - s.corner___204216 = (r0); - s.tmp_2 = lambda_4_mk(s); - s.tmp_2.argL = s.updateOrFillLocation___203927; - s.tmp_2.arg0 = s.corner___204216; - s.tmp_2.arg1 = s.dataForCurrLocation___204024; - s.tmp_2.arg2 = s.cornerCost___204210; - setupLambda(s.tmp_2, s.tmp_2.argL); - s.callLocIdx = 1830; s.pc = 76; return s.tmp_2; - case 76: - r0 = s.retval; - r0 = (s.unnamed8931___U29 + 1); - s.unnamed8931___U29 = (r0); - { step = 36; continue; } - case 37: - s.unnamed8930___U28 = (undefined); - case 38: - case 39: - { step = 3; continue; } - case 40: - s.tmp_0 = r0 = s.end___203997; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 41; continue; } - r0 = s.tmp_0; - { step = 42; continue; } - case 41: - s.tmp_1 = r0 = s.encountedLocations___203924; - s.tmp_3 = scene_locationCol__P191301_mk(s); - s.tmp_3.arg0 = s.end___203997; - s.callLocIdx = 1831; s.pc = 77; return s.tmp_3; - case 77: - r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_Array__getAt(s.tmp_1, s.tmp_2); - case 42: - // jmp value (already in r0) - s.tmp_4 = r0; - s.endCol___204222 = (s.tmp_4); - s.tmp_0 = r0 = s.endCol___204222; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 43; continue; } - r0 = s.tmp_0; - { step = 44; continue; } - case 43: - s.tmp_1 = r0 = s.endCol___204222; - s.tmp_3 = scene_locationRow__P191300_mk(s); - s.tmp_3.arg0 = s.end___203997; - s.callLocIdx = 1832; s.pc = 78; return s.tmp_3; - case 78: - r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_Array__getAt(s.tmp_1, s.tmp_2); - case 44: - // jmp value (already in r0) + if (!r0) { step = 2; continue; } + s.tmp_1 = r0 = s.sin___195589; + r0 = (s.i___195597 * s.anglePerSlice___195591); s.tmp_4 = r0; - s.endDataNode___204229 = (s.tmp_4); - r0 = pxsim_numops_toBoolDecr(s.end___203997); - 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 = 45; continue; } - r0 = s.tmp_0; - { step = 46; continue; } - case 45: - r0 = pxsim_numops_toBoolDecr(s.endDataNode___204229); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); - case 46: - // jmp value (already in r0) + r0 = pxsim.Math_.sin(s.tmp_4); s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 47; continue; } - r0 = undefined; - { step = 51; continue; } - case 47: - case 48: - s.curr___204242 = (s.endDataNode___204229); - r0 = pxsim_Array__mk(); - s.output___204244 = (r0); - case 49: - r0 = pxsim_numops_toBoolDecr(s.curr___204242); - if (!r0) { step = 50; continue; } - s.tmp_0 = helpers_arrayUnshift__P185319_mk(s); - s.tmp_0.arg0 = s.output___204244; - r0 = s.curr___204242.fields["l"]; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1833; s.pc = 79; return s.tmp_0; - case 79: - r0 = s.retval; - r0 = s.curr___204242.fields["parent"]; - s.curr___204242 = (r0); - { step = 49; continue; } - case 50: - r0 = s.output___204244; - case 51: + 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___195597 + 1); + s.i___195597 = (r0); + { step = 1; continue; } + case 2: + r0 = s.sin___195589; return leave(s, r0) default: oops() } } } -scene_generalAStar__P188874.info = {"start":1723,"length":5198,"line":53,"column":4,"endLine":198,"endColumn":5,"fileName":"pxt_modules/arcade-tilemap-a-star/a-star.ts","functionName":"generalAStar","argumentNames":["tm","start","onTilesOf","heuristic","isEnd"]} +particles_cacheSin__P187929.info = {"start":594,"length":263,"line":22,"column":4,"endLine":29,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"cacheSin","argumentNames":["slices"]} -function scene_generalAStar__P188874_mk(s) { +function particles_cacheSin__P187929_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_generalAStar__P188874, depth: s.depth + 1, + parent: s, fn: particles_cacheSin__P187929, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -6151,52 +7004,17 @@ function scene_generalAStar__P188874_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - consideredTiles___203902: undefined, - encountedLocations___203924: undefined, - updateOrFillLocation___203927: undefined, - end___203997: undefined, - currLocation___204003: undefined, - row___204014: undefined, - col___204019: undefined, - dataForCurrLocation___204024: undefined, - neighbors___204036: undefined, - corners___204038: undefined, - left___204040: undefined, - right___204046: undefined, - top___204053: undefined, - bottom___204059: undefined, - leftIsWall___204066: undefined, - rightIsWall___204073: undefined, - topIsWall___204080: undefined, - bottomIsWall___204087: undefined, - topLeft___204102: undefined, - bottomLeft___204120: undefined, - topRight___204145: undefined, - bottomRight___204164: undefined, - neighborCost___204194: undefined, - node___204200: undefined, - unnamed8928___U24: undefined, - unnamed8929___U25: undefined, - cornerCost___204210: undefined, - corner___204216: undefined, - unnamed8930___U28: undefined, - unnamed8931___U29: undefined, - endCol___204222: undefined, - endDataNode___204229: undefined, - curr___204242: undefined, - output___204244: undefined, + sin___195589: undefined, + anglePerSlice___195591: undefined, + i___195597: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, } } -function inline__P203905(s) { +function particles_SprayFactory_setDirection__P187940(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6209,34 +7027,49 @@ 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.fields["cost"]; + r0 = s.arg0; + if (!checkSubtype(r0, particles_SprayFactory__C187935_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + s.tmp_4 = particles_toRadians__P189948_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 = 1592; s.pc = 1; return s.tmp_4; + case 1: + r0 = s.retval; + s.tmp_3 = r0; + r0 = (s.tmp_3 / globals.angleSlice___189942); s.tmp_2 = r0; - r0 = pxsim.Math_.pow(s.tmp_2, 2); + r0 = (s.tmp_2 | 0); s.tmp_1 = r0; - r0 = s.arg0.fields["extraCost"]; + r0 = (s.tmp_0).fields["minAngle"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + s.tmp_4 = particles_toRadians__P189948_mk(s); + s.tmp_4.arg0 = s.arg2; + s.callLocIdx = 1593; s.pc = 2; return s.tmp_4; + case 2: + r0 = s.retval; s.tmp_3 = r0; - r0 = (s.tmp_1 + s.tmp_3); - s.tmp_0 = r0; - r0 = s.arg1.fields["cost"]; - s.tmp_6 = r0; - r0 = pxsim.Math_.pow(s.tmp_6, 2); - s.tmp_5 = r0; - r0 = s.arg1.fields["extraCost"]; - s.tmp_7 = r0; - r0 = (s.tmp_5 + s.tmp_7); - s.tmp_4 = r0; - r0 = (s.tmp_0 - s.tmp_4); + r0 = (s.tmp_3 / globals.angleSlice___189942); + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["spread"] = (s.tmp_1); + r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P203905.info = {"start":2110,"length":67,"line":62,"column":12,"endLine":62,"endColumn":79,"fileName":"pxt_modules/arcade-tilemap-a-star/a-star.ts","functionName":"inline","argumentNames":["a","b"]} +particles_SprayFactory_setDirection__P187940.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 inline__P203905_mk(s) { +function particles_SprayFactory_setDirection__P187940_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P203905, depth: s.depth + 1, + parent: s, fn: particles_SprayFactory_setDirection__P187940, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -6245,16 +7078,16 @@ function inline__P203905_mk(s) { tmp_4: undefined, tmp_5: undefined, tmp_6: undefined, - tmp_7: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function updateOrFillLocation__P203927(s) { +function particles_toRadians__P189948(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6264,164 +7097,52 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.row___203931 = undefined; - s.col___203935 = undefined; - s.colData___203943 = undefined; - s.lData___203953 = undefined; - s.h___203984 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - s.tmp_0 = scene_locationRow__P191300_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1800; s.pc = 12; return s.tmp_0; - case 12: - r0 = s.retval; - s.row___203931 = (r0); - s.tmp_0 = scene_locationCol__P191301_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1801; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; - s.col___203935 = (r0); - s.tmp_1 = tiles_TileMap_isObstacle__P187553_mk(s); - s.tmp_1.arg0 = s.caps[0]; - s.tmp_1.arg1 = s.col___203935; - s.tmp_1.arg2 = s.row___203931; - s.callLocIdx = 1802; s.pc = 14; return s.tmp_1; - case 14: - r0 = s.retval; + r0 = (s.arg0 < 0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - { step = 11; continue; } - case 1: - case 2: - r0 = pxsim_Array__getAt(s.caps[1], s.col___203935); - s.tmp_2 = r0; - r0 = pxsim_numops_toBool(s.tmp_2); - if (!r0) { step = 3; continue; } - r0 = s.tmp_2; - { step = 4; continue; } + s.tmp_3 = Math_abs__P185340_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 1574; s.pc = 3; return s.tmp_3; case 3: - s.tmp_3 = r0 = s.caps[1]; - s.tmp_4 = r0 = s.col___203935; - r0 = pxsim_Array__mk(); - s.tmp_5 = r0; - r0 = pxsim_Array_.setAt(s.tmp_3, s.tmp_4, s.tmp_5); - r0 = s.tmp_5; - case 4: - // jmp value (already in r0) - s.tmp_6 = r0; - s.colData___203943 = (s.tmp_6); - r0 = pxsim_Array__getAt(s.colData___203943, s.row___203931); - s.lData___203953 = (r0); - r0 = pxsim_numops_toBoolDecr(s.lData___203953); - 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_mkClassInstance(scene_LocationNode__C191297_VT); - s.tmp_2 = r0; - s.tmp_3 = scene_LocationNode_constructor__P191298_mk(s); - s.tmp_3.arg0 = s.tmp_2; - s.tmp_3.arg1 = s.arg0; - s.tmp_3.arg2 = s.arg1; - s.tmp_3.arg3 = s.arg2; - s.callLocIdx = 1803; s.pc = 15; return s.tmp_3; - case 15: r0 = s.retval; - r0 = pxsim_Array_.setAt(s.colData___203943, s.row___203931, s.tmp_2); - { step = 10; continue; } - case 5: - r0 = s.lData___203953.fields["visited"]; s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + r0 = (s.tmp_2 % 360); 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 = 6; continue; } - r0 = s.tmp_0; - { step = 7; continue; } - case 6: - r0 = s.lData___203953.fields["lastCost"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 > s.arg2); - case 7: - // jmp value (already in r0) - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - if (!r0) { step = 8; continue; } - r0 = (s.lData___203953).fields["lastCost"] = (s.arg2); - r0 = (s.lData___203953).fields["parent"] = (s.arg1); - { step = 9; continue; } - case 8: - { step = 11; continue; } - case 9: - case 10: - s.tmp_0 = lambda_2_mk(s); - s.tmp_0.argL = s.caps[2]; - s.tmp_0.arg0 = s.arg0; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 1804; s.pc = 16; return s.tmp_0; - case 16: - r0 = s.retval; - s.h___203984 = (r0); - r0 = pxsim_pxtcore_mkClassInstance(scene_PrioritizedLocation__C191295_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_PrioritizedLocation_constructor__P191296_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = s.arg0; - s.tmp_1.arg2 = s.arg2; - s.tmp_1.arg3 = s.h___203984; - s.callLocIdx = 1805; s.pc = 17; return s.tmp_1; - case 17: - r0 = s.retval; - s.tmp_2 = Heap_push__P188865_mk(s); - s.tmp_2.arg0 = s.caps[3]; - s.tmp_2.arg1 = s.tmp_0; - s.callLocIdx = 1806; s.pc = 18; return s.tmp_2; - case 18: - r0 = s.retval; - case 11: - r0 = undefined; + r0 = (360 - s.tmp_1); + s.arg0 = (r0); + { step = 2; continue; } + case 1: + r0 = (s.arg0 % 360); + s.arg0 = (r0); + case 2: + r0 = (s.arg0 * 0.017453292519943295); return leave(s, r0) default: oops() } } } -updateOrFillLocation__P203927.info = {"start":2261,"length":1162,"line":66,"column":8,"endLine":103,"endColumn":9,"fileName":"pxt_modules/arcade-tilemap-a-star/a-star.ts","functionName":"updateOrFillLocation","argumentNames":["l","parent","cost"]} +particles_toRadians__P189948.info = {"start":1307,"length":206,"line":45,"column":4,"endLine":52,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"toRadians","argumentNames":["degrees"]} -function updateOrFillLocation__P203927_mk(s) { +function particles_toRadians__P189948_mk(s) { checkStack(s.depth); return { - parent: s, fn: updateOrFillLocation__P203927, depth: s.depth + 1, + parent: s, fn: particles_toRadians__P189948, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - row___203931: undefined, - col___203935: undefined, - colData___203943: undefined, - lData___203953: undefined, - h___203984: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function scene_LocationNode_constructor__P191298(s) { +function particles_ParticleFactory_constructor__P187932(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6433,39 +7154,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.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_LocationNode__C191297_VT)) failedCast(r0); - r0 = (s.arg0).fields["l"] = (s.arg1); - r0 = (s.arg0).fields["parent"] = (s.arg2); - r0 = (s.arg0).fields["lastCost"] = (s.arg3); - r0 = (s.arg0).fields["visited"] = (false); + if (!checkSubtype(r0, particles_ParticleFactory__C187931_VT)) failedCast(r0); r0 = undefined; return leave(s, r0) default: oops() } } } -scene_LocationNode_constructor__P191298.info = {"start":317,"length":189,"line":13,"column":8,"endLine":19,"endColumn":9,"fileName":"pxt_modules/arcade-tilemap-a-star/a-star.ts","functionName":"inline","argumentNames":["this","l","parent","lastCost"]} +particles_ParticleFactory_constructor__P187932.info = {"start":1617,"length":78,"line":59,"column":8,"endLine":61,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"inline","argumentNames":["this"]} -function scene_LocationNode_constructor__P191298_mk(s) { +function particles_ParticleFactory_constructor__P187932_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_LocationNode_constructor__P191298, depth: s.depth + 1, + parent: s, fn: particles_ParticleFactory_constructor__P187932, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function scene_PrioritizedLocation_constructor__P191296(s) { +function particles_ParticleSource_setFactory__P187914(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6478,75 +7189,35 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_PrioritizedLocation__C191295_VT)) failedCast(r0); - r0 = (s.arg0).fields["loc"] = (s.arg1); - r0 = (s.arg0).fields["cost"] = (s.arg2); - r0 = (s.arg0).fields["extraCost"] = (s.arg3); + if (!checkSubtype(r0, particles_ParticleSource__C187895_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(s.arg1); + if (!r0) { step = 1; continue; } + r0 = (s.arg0).fields["_factory"] = (s.arg1); + case 1: + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_PrioritizedLocation_constructor__P191296.info = {"start":60,"length":176,"line":2,"column":8,"endLine":7,"endColumn":13,"fileName":"pxt_modules/arcade-tilemap-a-star/a-star.ts","functionName":"inline","argumentNames":["this","loc","cost","extraCost"]} +particles_ParticleSource_setFactory__P187914.info = {"start":8107,"length":114,"line":271,"column":8,"endLine":274,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"setFactory","argumentNames":["this","factory"]} -function scene_PrioritizedLocation_constructor__P191296_mk(s) { +function particles_ParticleSource_setFactory__P187914_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_PrioritizedLocation_constructor__P191296, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_setFactory__P187914, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, -} } - - - - - -function Heap_length__P188868(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (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, Heap__C188863_VT)) failedCast(r0); - r0 = s.arg0.fields["store"]; - s.tmp_0 = r0; - r0 = pxsim_Array__length(s.tmp_0); - return leaveAccessor(s, r0) - default: oops() -} } } -Heap_length__P188868.info = {"start":1832,"length":54,"line":77,"column":4,"endLine":79,"endColumn":5,"fileName":"pxt_modules/pxt-heap/heap.ts","functionName":"length","argumentNames":["this"]} -Heap_length__P188868.isGetter = true; - -function Heap_length__P188868_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Heap_length__P188868, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, } } -function Heap_pop__P188866(s) { +function particles_ParticleSource_setRate__P187912(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6556,66 +7227,43 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.output___204280 = undefined; - s.nextRoot___204285 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Heap__C188863_VT)) failedCast(r0); - r0 = s.arg0.fields["store"]; - s.tmp_0 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, 0); - s.output___204280 = (r0); - r0 = s.arg0.fields["store"]; - s.tmp_0 = r0; - r0 = pxsim_Array_.pop(s.tmp_0); - s.nextRoot___204285 = (r0); - r0 = s.arg0.fields["store"]; + if (!checkSubtype(r0, particles_ParticleSource__C187895_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = (1000 / s.arg1); s.tmp_2 = r0; - r0 = pxsim_Array__length(s.tmp_2); + r0 = pxsim.Math_.ceil(s.tmp_2); s.tmp_1 = r0; - r0 = (s.tmp_1 > 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.arg0.fields["store"]; - s.tmp_3 = r0; - r0 = pxsim_Array_.setAt(s.tmp_3, 0, s.nextRoot___204285); - s.tmp_0 = Heap_percolateDown__P191290_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 1789; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - case 1: - case 2: - r0 = s.output___204280; + r0 = (s.tmp_0).fields["period"] = (s.tmp_1); + r0 = (s.arg0).fields["timer"] = (0); + r0 = undefined; return leave(s, r0) default: oops() } } } -Heap_pop__P188866.info = {"start":1536,"length":236,"line":61,"column":4,"endLine":71,"endColumn":5,"fileName":"pxt_modules/pxt-heap/heap.ts","functionName":"pop","argumentNames":["this"]} +particles_ParticleSource_setRate__P187912.info = {"start":7785,"length":139,"line":258,"column":8,"endLine":261,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"setRate","argumentNames":["this","particlesPerSecond"]} -function Heap_pop__P188866_mk(s) { +function particles_ParticleSource_setRate__P187912_mk(s) { checkStack(s.depth); return { - parent: s, fn: Heap_pop__P188866, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_setRate__P187912, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - output___204280: undefined, - nextRoot___204285: undefined, arg0: undefined, + arg1: undefined, } } -function Heap_percolateDown__P191290(s) { +function particles_ParticleSource_setAnchor__P187911(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6625,142 +7273,25 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.data___204300 = undefined; - s.max___204303 = undefined; - s.left___204311 = undefined; - s.right___204315 = undefined; - s.curr___204319 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Heap__C188863_VT)) failedCast(r0); - r0 = s.arg0.fields["store"]; - s.data___204300 = (r0); - r0 = s.arg0.fields["store"]; - s.tmp_0 = r0; - r0 = pxsim_Array__length(s.tmp_0); - s.max___204303 = (r0); - case 1: - r0 = (s.arg1 < s.max___204303); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 12; continue; } - r0 = (s.arg1 << 1); - s.tmp_1 = r0; - r0 = (s.tmp_1 + 1); - s.left___204311 = (r0); - r0 = (s.arg1 << 1); - s.tmp_0 = r0; - r0 = (s.tmp_0 + 2); - s.right___204315 = (r0); - s.curr___204319 = (s.arg1); - r0 = (s.left___204311 < s.max___204303); - 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_2 = if_comparator_3_mk(s); - s.tmp_2.arg0 = s.arg0; - r0 = pxsim_Array__getAt(s.data___204300, s.curr___204319); - s.tmp_2.arg1 = r0; - r0 = pxsim_Array__getAt(s.data___204300, s.left___204311); - s.tmp_2.arg2 = r0; - if (!s.tmp_2.arg0.vtable.iface) { - setupLambda(s.tmp_2, pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "comparator"), 3); - s.callLocIdx = 1783; s.pc = 13; return s.tmp_2; - } else { - s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["comparator"]; - if (s.tmp_2.fn == null) { setupLambda(s.tmp_2, s.tmp_2.arg0.fields["comparator"], 3); s.callLocIdx = 1783; s.pc = 13; return s.tmp_2; } - else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 1783; s.pc = 13; return s.tmp_2;; } - else { s.callLocIdx = 1783; s.pc = 13; return s.tmp_2; } - } - case 13: - r0 = s.retval; - 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 = 4; continue; } - s.curr___204319 = (s.left___204311); - case 4: - case 5: - r0 = (s.right___204315 < s.max___204303); - 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_2 = if_comparator_3_mk(s); - s.tmp_2.arg0 = s.arg0; - r0 = pxsim_Array__getAt(s.data___204300, s.curr___204319); - s.tmp_2.arg1 = r0; - r0 = pxsim_Array__getAt(s.data___204300, s.right___204315); - s.tmp_2.arg2 = r0; - if (!s.tmp_2.arg0.vtable.iface) { - setupLambda(s.tmp_2, pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "comparator"), 3); - s.callLocIdx = 1784; s.pc = 14; return s.tmp_2; - } else { - s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["comparator"]; - if (s.tmp_2.fn == null) { setupLambda(s.tmp_2, s.tmp_2.arg0.fields["comparator"], 3); s.callLocIdx = 1784; s.pc = 14; return s.tmp_2; } - else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 1784; s.pc = 14; return s.tmp_2;; } - else { s.callLocIdx = 1784; s.pc = 14; return s.tmp_2; } - } - case 14: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_1 > 0); - case 7: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 8; continue; } - s.curr___204319 = (s.right___204315); - case 8: - case 9: - r0 = (s.curr___204319 == s.arg1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 10; continue; } - { step = 12; continue; } - case 10: - case 11: - r0 = pxsim_Array__getAt(s.data___204300, s.arg1); - s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.data___204300, s.curr___204319); - s.tmp_2 = r0; - r0 = pxsim_Array_.setAt(s.data___204300, s.curr___204319, s.tmp_1); - r0 = pxsim_Array_.setAt(s.data___204300, s.arg1, s.tmp_2); - s.arg1 = (s.curr___204319); - { step = 1; continue; } - case 12: + if (!checkSubtype(r0, particles_ParticleSource__C187895_VT)) failedCast(r0); + r0 = (s.arg0).fields["anchor"] = (s.arg1); r0 = undefined; return leave(s, r0) default: oops() } } } -Heap_percolateDown__P191290.info = {"start":367,"length":645,"line":13,"column":4,"endLine":36,"endColumn":5,"fileName":"pxt_modules/pxt-heap/heap.ts","functionName":"percolateDown","argumentNames":["this","i"]} +particles_ParticleSource_setAnchor__P187911.info = {"start":7577,"length":79,"line":250,"column":8,"endLine":252,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"setAnchor","argumentNames":["this","anchor"]} -function Heap_percolateDown__P191290_mk(s) { +function particles_ParticleSource_setAnchor__P187911_mk(s) { checkStack(s.depth); return { - parent: s, fn: Heap_percolateDown__P191290, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_setAnchor__P187911, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - data___204300: undefined, - max___204303: undefined, - left___204311: undefined, - right___204315: undefined, - curr___204319: undefined, arg0: undefined, arg1: undefined, } } @@ -6769,7 +7300,7 @@ function Heap_percolateDown__P191290_mk(s) { -function Heap_rightChild__P191294(s) { +function particles_ParticleSource_clear__P187910(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6781,34 +7312,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, Heap__C188863_VT)) failedCast(r0); - r0 = (s.arg1 << 1); - s.tmp_0 = r0; - r0 = (s.tmp_0 + 2); + if (!checkSubtype(r0, particles_ParticleSource__C187895_VT)) failedCast(r0); + r0 = (s.arg0).fields["head"] = (undefined); + r0 = undefined; return leave(s, r0) default: oops() } } } -Heap_rightChild__P191294.info = {"start":2435,"length":68,"line":110,"column":4,"endLine":112,"endColumn":5,"fileName":"pxt_modules/pxt-heap/heap.ts","functionName":"rightChild","argumentNames":["this","i"]} +particles_ParticleSource_clear__P187910.info = {"start":7407,"length":54,"line":242,"column":8,"endLine":244,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"clear","argumentNames":["this"]} -function Heap_rightChild__P191294_mk(s) { +function particles_ParticleSource_clear__P187910_mk(s) { checkStack(s.depth); return { - parent: s, fn: Heap_rightChild__P191294, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_clear__P187910, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, - arg1: undefined, } } -function Heap_leftChild__P191293(s) { +function particles_ParticleSource_destroy__P187909(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6820,34 +7347,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, Heap__C188863_VT)) failedCast(r0); - r0 = (s.arg1 << 1); - s.tmp_0 = r0; - r0 = (s.tmp_0 + 1); + if (!checkSubtype(r0, particles_ParticleSource__C187895_VT)) failedCast(r0); + s.tmp_0 = particles_ParticleSource_enabled__P187908_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = false; + s.callLocIdx = 1531; 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__P187903_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1532; s.pc = 2; return s.tmp_0; + case 2: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -Heap_leftChild__P191293.info = {"start":2362,"length":67,"line":106,"column":4,"endLine":108,"endColumn":5,"fileName":"pxt_modules/pxt-heap/heap.ts","functionName":"leftChild","argumentNames":["this","i"]} +particles_ParticleSource_destroy__P187909.info = {"start":7077,"length":240,"line":232,"column":8,"endLine":237,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"destroy","argumentNames":["this"]} -function Heap_leftChild__P191293_mk(s) { +function particles_ParticleSource_destroy__P187909_mk(s) { checkStack(s.depth); return { - parent: s, fn: Heap_leftChild__P191293, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_destroy__P187909, 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 Heap_push__P188865(s) { +function particles_ParticleSource_enabled__P187908(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6863,27 +7405,53 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Heap__C188863_VT)) failedCast(r0); - r0 = s.arg0.fields["store"]; + if (!checkSubtype(r0, particles_ParticleSource__C187895_VT)) failedCast(r0); + s.tmp_1 = r0 = s.arg1; + s.tmp_3 = particles_ParticleSource_enabled__P187907_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 1530; 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_Array__push(s.tmp_0, s.arg1); - s.tmp_0 = Heap_percolateUp__P191291_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1787; 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() } } } -Heap_push__P188865.info = {"start":1456,"length":74,"line":56,"column":4,"endLine":59,"endColumn":5,"fileName":"pxt_modules/pxt-heap/heap.ts","functionName":"push","argumentNames":["this","v"]} +particles_ParticleSource_enabled__P187908.info = {"start":6799,"length":214,"line":222,"column":8,"endLine":227,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"enabled","argumentNames":["this","v"]} -function Heap_push__P188865_mk(s) { +function particles_ParticleSource_enabled__P187908_mk(s) { checkStack(s.depth); return { - parent: s, fn: Heap_push__P188865, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_enabled__P187908, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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, } } @@ -6892,7 +7460,7 @@ function Heap_push__P188865_mk(s) { -function Heap_percolateUp__P191291(s) { +function particles_ParticleSource_enabled__P187907(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6902,90 +7470,39 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.i___204394 = undefined; - s.curr___204402 = undefined; - s.parentIndex___204407 = undefined; - s.parent___204411 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Heap__C188863_VT)) failedCast(r0); - r0 = s.arg0.fields["store"]; - s.tmp_1 = r0; - r0 = pxsim_Array__length(s.tmp_1); - s.tmp_0 = r0; - r0 = (s.tmp_0 - 1); - s.i___204394 = (r0); - case 1: - r0 = (s.i___204394 > 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - r0 = s.arg0.fields["store"]; - s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_1, s.i___204394); - s.curr___204402 = (r0); - r0 = (s.i___204394 - 1); - s.tmp_0 = r0; - r0 = (s.tmp_0 >> 1); - s.parentIndex___204407 = (r0); - r0 = s.arg0.fields["store"]; - s.tmp_0 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.parentIndex___204407); - s.parent___204411 = (r0); - s.tmp_2 = if_comparator_3_mk(s); - s.tmp_2.arg0 = s.arg0; - s.tmp_2.arg1 = s.parent___204411; - s.tmp_2.arg2 = s.curr___204402; - if (!s.tmp_2.arg0.vtable.iface) { - setupLambda(s.tmp_2, pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "comparator"), 3); - s.callLocIdx = 1786; s.pc = 5; return s.tmp_2; - } else { - s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["comparator"]; - if (s.tmp_2.fn == null) { setupLambda(s.tmp_2, s.tmp_2.arg0.fields["comparator"], 3); s.callLocIdx = 1786; s.pc = 5; return s.tmp_2; } - else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 1786; s.pc = 5; return s.tmp_2;; } - else { s.callLocIdx = 1786; s.pc = 5; return s.tmp_2; } - } - case 5: - 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 = 2; continue; } - { step = 4; continue; } - case 2: - case 3: - r0 = s.arg0.fields["store"]; + if (!checkSubtype(r0, particles_ParticleSource__C187895_VT)) failedCast(r0); + r0 = s.arg0.fields["pFlags"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 & 1); s.tmp_3 = r0; - r0 = pxsim_Array_.setAt(s.tmp_3, s.i___204394, s.parent___204411); - r0 = s.arg0.fields["store"]; + 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_Array_.setAt(s.tmp_0, s.parentIndex___204407, s.curr___204402); - s.i___204394 = (s.parentIndex___204407); - { step = 1; continue; } - case 4: - r0 = undefined; - return leave(s, r0) + r0 = pxsim_Boolean__bang(s.tmp_0); + return leaveAccessor(s, r0) default: oops() } } } -Heap_percolateUp__P191291.info = {"start":1018,"length":432,"line":38,"column":4,"endLine":54,"endColumn":5,"fileName":"pxt_modules/pxt-heap/heap.ts","functionName":"percolateUp","argumentNames":["this"]} +particles_ParticleSource_enabled__P187907.info = {"start":6605,"length":76,"line":215,"column":8,"endLine":217,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"enabled","argumentNames":["this"]} +particles_ParticleSource_enabled__P187907.isGetter = true; -function Heap_percolateUp__P191291_mk(s) { +function particles_ParticleSource_enabled__P187907_mk(s) { checkStack(s.depth); return { - parent: s, fn: Heap_percolateUp__P191291, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_enabled__P187907, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - i___204394: undefined, - curr___204402: undefined, - parentIndex___204407: undefined, - parent___204411: undefined, + tmp_4: undefined, arg0: undefined, } } @@ -6993,7 +7510,7 @@ function Heap_percolateUp__P191291_mk(s) { -function Heap_parent__P191292(s) { +function particles_ParticleSource_setAcceleration__P187904(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7006,33 +7523,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, Heap__C188863_VT)) failedCast(r0); - r0 = (s.arg1 - 1); - s.tmp_0 = r0; - r0 = (s.tmp_0 >> 1); + if (!checkSubtype(r0, particles_ParticleSource__C187895_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() } } } -Heap_parent__P191292.info = {"start":2292,"length":64,"line":102,"column":4,"endLine":104,"endColumn":5,"fileName":"pxt_modules/pxt-heap/heap.ts","functionName":"parent","argumentNames":["this","i"]} +particles_ParticleSource_setAcceleration__P187904.info = {"start":6009,"length":113,"line":193,"column":8,"endLine":196,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"setAcceleration","argumentNames":["this","ax","ay"]} -function Heap_parent__P191292_mk(s) { +function particles_ParticleSource_setAcceleration__P187904_mk(s) { checkStack(s.depth); return { - parent: s, fn: Heap_parent__P191292, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_setAcceleration__P187904, 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 Heap_constructor__P188864(s) { +function sprites_BaseSprite_constructor__P187077(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7048,22 +7579,33 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Heap__C188863_VT)) failedCast(r0); - r0 = (s.arg0).fields["comparator"] = (s.arg1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["store"] = (s.tmp_1); + if (!checkSubtype(r0, sprites_BaseSprite__C187075_VT)) failedCast(r0); + s.tmp_0 = sprites_BaseSprite_z__P187080_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 170; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + s.tmp_0 = scene_Scene_addSprite__P187661_mk(s); + s.tmp_1 = game_currentScene__P187749_mk(s); + s.callLocIdx = 171; 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 = 172; s.pc = 2; return s.tmp_0; + case 2: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -Heap_constructor__P188864.info = {"start":257,"length":104,"line":7,"column":4,"endLine":11,"endColumn":5,"fileName":"pxt_modules/pxt-heap/heap.ts","functionName":"inline","argumentNames":["this","comparator"]} +sprites_BaseSprite_constructor__P187077.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 Heap_constructor__P188864_mk(s) { +function sprites_BaseSprite_constructor__P187077_mk(s) { checkStack(s.depth); return { - parent: s, fn: Heap_constructor__P188864, depth: s.depth + 1, + parent: s, fn: sprites_BaseSprite_constructor__P187077, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -7075,7 +7617,7 @@ function Heap_constructor__P188864_mk(s) { -function helpers_arrayUnshift__P185319(s) { +function scene_Scene_addSprite__P187661(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7090,18 +7632,45 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_Array_.insertAt(s.arg0, 0, s.arg1); - r0 = pxsim_Array__length(s.arg0); - return leave(s, r0) - default: oops() -} } } -helpers_arrayUnshift__P185319.info = {"start":4898,"length":126,"line":180,"column":4,"endLine":183,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arrayUnshift","argumentNames":["arr","value"]} - -function helpers_arrayUnshift__P185319_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: helpers_arrayUnshift__P185319, depth: s.depth + 1, + r0 = s.arg0; + if (!checkSubtype(r0, scene_Scene__C187636_VT)) failedCast(r0); + r0 = s.arg0.fields["allSprites"]; + s.tmp_0 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.arg1); + s.tmp_0 = r0 = s.arg0; + r0 = s.tmp_0.fields["spriteNextId"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + 1); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["spriteNextId"] = (s.tmp_1); + s.tmp_3 = if_id_2_mk(s); + s.tmp_3.arg0 = s.arg1; + s.tmp_3.arg1 = s.tmp_2; + if (!s.tmp_3.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapSetByString(s.tmp_3.arg0, "id", s.tmp_3.arg1); + } else { + s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["set/id"]; + if (s.tmp_3.fn === null) { s.tmp_3.arg0.fields["id"] = s.tmp_3.arg1; } + else if (s.tmp_3.fn === undefined) { failedCast(s.tmp_3.arg0) } + else { s.callLocIdx = 1039; s.pc = 1; return s.tmp_3; } + } + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +scene_Scene_addSprite__P187661.info = {"start":6859,"length":128,"line":193,"column":8,"endLine":196,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"addSprite","argumentNames":["this","sprite"]} + +function scene_Scene_addSprite__P187661_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: scene_Scene_addSprite__P187661, depth: s.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, } } @@ -7110,7 +7679,7 @@ function helpers_arrayUnshift__P185319_mk(s) { -function tiles_Location_y__P187511(s) { +function sprites_BaseSprite_z__P187080(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7120,50 +7689,56 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scale___204864 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_Location__C187506_VT)) failedCast(r0); - r0 = s.arg0.fields["tileMap"]; - s.tmp_0 = r0; - r0 = s.tmp_0.fields["_scale"]; - s.scale___204864 = (r0); - r0 = s.arg0.fields["_row"]; + if (!checkSubtype(r0, sprites_BaseSprite__C187075_VT)) failedCast(r0); + r0 = s.arg0.fields["_z"]; s.tmp_1 = r0; - r0 = (s.tmp_1 << s.scale___204864); + r0 = (s.tmp_1 !== s.arg1); s.tmp_0 = r0; - r0 = (s.scale___204864 - 1); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = (s.arg0).fields["_z"] = (s.arg1); + s.tmp_1 = game_currentScene__P187749_mk(s); + s.callLocIdx = 173; 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 = (1 << s.tmp_3); + r0 = (s.tmp_3 | 1); s.tmp_2 = r0; - r0 = (s.tmp_0 + s.tmp_2); - return leaveAccessor(s, r0) + r0 = (s.tmp_0).fields["flags"] = (s.tmp_2); + case 1: + case 2: + r0 = undefined; + return leave(s, r0) default: oops() } } } -tiles_Location_y__P187511.info = {"start":836,"length":135,"line":38,"column":8,"endLine":41,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"y","argumentNames":["this"]} -tiles_Location_y__P187511.isGetter = true; +sprites_BaseSprite_z__P187080.info = {"start":656,"length":174,"line":30,"column":8,"endLine":35,"endColumn":9,"fileName":"pxt_modules/game/basesprite.ts","functionName":"z","argumentNames":["this","v"]} -function tiles_Location_y__P187511_mk(s) { +function sprites_BaseSprite_z__P187080_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_Location_y__P187511, depth: s.depth + 1, + parent: s, fn: sprites_BaseSprite_z__P187080, depth: s.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___204864: undefined, arg0: undefined, + arg1: undefined, } } -function tiles_Location_x__P187510(s) { +function sprites_BaseSprite_z__P187079(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7173,42 +7748,24 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scale___204882 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_Location__C187506_VT)) failedCast(r0); - r0 = s.arg0.fields["tileMap"]; - s.tmp_0 = r0; - r0 = s.tmp_0.fields["_scale"]; - s.scale___204882 = (r0); - r0 = s.arg0.fields["_col"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 << s.scale___204882); - s.tmp_0 = r0; - r0 = (s.scale___204882 - 1); - s.tmp_3 = r0; - r0 = (1 << s.tmp_3); - s.tmp_2 = r0; - r0 = (s.tmp_0 + s.tmp_2); + if (!checkSubtype(r0, sprites_BaseSprite__C187075_VT)) failedCast(r0); + r0 = s.arg0.fields["_z"]; return leaveAccessor(s, r0) default: oops() } } } -tiles_Location_x__P187510.info = {"start":691,"length":135,"line":33,"column":8,"endLine":36,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"x","argumentNames":["this"]} -tiles_Location_x__P187510.isGetter = true; +sprites_BaseSprite_z__P187079.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__P187079.isGetter = true; -function tiles_Location_x__P187510_mk(s) { +function sprites_BaseSprite_z__P187079_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_Location_x__P187510, depth: s.depth + 1, + parent: s, fn: sprites_BaseSprite_z__P187079, depth: s.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___204882: undefined, arg0: undefined, } } @@ -7216,7 +7773,7 @@ function tiles_Location_x__P187510_mk(s) { -function sprites_setDataBoolean__P188841(s) { +function helpers_arrayShift__P185317(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7226,79 +7783,29 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.d___205852 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(s.arg0); - 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 = 5; continue; } - case 3: - case 4: - s.tmp_4 = Sprite_data__P187258_mk(s); - s.tmp_4.arg0 = s.arg0; - s.callLocIdx = 1768; s.pc = 6; return s.tmp_4; - case 6: - r0 = s.retval; - s.d___205852 = (r0); - s.tmp_0 = r0 = s.d___205852; - s.tmp_1 = r0 = s.arg1; - r0 = pxsim_numops_toBoolDecr(s.arg2); - 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_pxtrt.mapSetGeneric(s.tmp_0, s.tmp_1, s.tmp_2); - case 5: - r0 = undefined; + r0 = pxsim_Array_.removeAt(s.arg0, 0); return leave(s, r0) default: oops() } } } -sprites_setDataBoolean__P188841.info = {"start":2275,"length":180,"line":73,"column":4,"endLine":77,"endColumn":5,"fileName":"pxt_modules/arcade-sprite-data/main.ts","functionName":"setDataBoolean","argumentNames":["sprite","name","value"]} +helpers_arrayShift__P185317.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 sprites_setDataBoolean__P188841_mk(s) { +function helpers_arrayShift__P185317_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_setDataBoolean__P188841, depth: s.depth + 1, + parent: s, fn: helpers_arrayShift__P185317, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - d___205852: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function Sprite_data__P187258(s) { +function particles_SprayFactory_setSpeed__P187939(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7310,49 +7817,40 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); - r0 = s.arg0.fields["_data"]; + if (!checkSubtype(r0, particles_SprayFactory__C187935_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg1 * 256); s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + r0 = (s.tmp_2 | 0); s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_3 = r0 = s.arg0; - r0 = pxsim_pxtrt.mkMap(); - s.tmp_4 = r0; - r0 = (s.tmp_3).fields["_data"] = (s.tmp_4); - case 1: - case 2: - r0 = s.arg0.fields["_data"]; - return leaveAccessor(s, r0) + r0 = (s.tmp_0).fields["speed"] = (s.tmp_1); + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_data__P187258.info = {"start":4194,"length":92,"line":160,"column":4,"endLine":163,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"data","argumentNames":["this"]} -Sprite_data__P187258.isGetter = true; +particles_SprayFactory_setSpeed__P187939.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 Sprite_data__P187258_mk(s) { +function particles_SprayFactory_setSpeed__P187939_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_data__P187258, depth: s.depth + 1, + parent: s, fn: particles_SprayFactory_setSpeed__P187939, depth: s.depth + 1, pc: 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 spriteutils_angleFrom__P188850(s) { +function particles_ConfettiFactory_constructor__P187963(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7362,71 +7860,75 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.confetti___196077 = undefined; + s.i___196093 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(s.arg0); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = s.arg0; + if (!checkSubtype(r0, particles_ConfettiFactory__C187962_VT)) failedCast(r0); + r0 = pxsim_Array__mk(); 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 = pxsim.image.ofBuffer(_hex196080); + s.tmp_1 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); + r0 = pxsim.image.ofBuffer(_hex196082); s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); - case 2: - // jmp value (already in r0) + r0 = pxsim_Array__push(s.tmp_0, s.tmp_2); + r0 = pxsim.image.ofBuffer(_hex196084); s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 3; continue; } - r0 = 0; - { step = 5; continue; } - case 3: - case 4: - s.tmp_6 = Sprite_y__P187244_mk(s); - s.tmp_6.arg0 = s.arg1; - s.callLocIdx = 1774; s.pc = 6; return s.tmp_6; - case 6: - r0 = s.retval; - s.tmp_5 = r0; - s.tmp_8 = Sprite_y__P187244_mk(s); - s.tmp_8.arg0 = s.arg0; - s.callLocIdx = 1775; s.pc = 7; return s.tmp_8; - case 7: - r0 = s.retval; - s.tmp_7 = r0; - r0 = (s.tmp_5 - s.tmp_7); + r0 = pxsim_Array__push(s.tmp_0, s.tmp_3); + r0 = pxsim.image.ofBuffer(_hex196086); s.tmp_4 = r0; - s.tmp_11 = Sprite_x__P187242_mk(s); - s.tmp_11.arg0 = s.arg1; - s.callLocIdx = 1776; s.pc = 8; return s.tmp_11; - case 8: + r0 = pxsim_Array__push(s.tmp_0, s.tmp_4); + r0 = pxsim.image.ofBuffer(_hex196088); + s.tmp_5 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.tmp_5); + s.confetti___196077 = (s.tmp_0); + s.tmp_0 = particles_ShapeFactory_constructor__P187958_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___196077, 0); + s.tmp_0.arg3 = r0; + s.callLocIdx = 1616; s.pc = 3; return s.tmp_0; + case 3: r0 = s.retval; - s.tmp_10 = r0; - s.tmp_13 = Sprite_x__P187242_mk(s); - s.tmp_13.arg0 = s.arg0; - s.callLocIdx = 1777; s.pc = 9; return s.tmp_13; - case 9: + s.i___196093 = (1); + case 1: + s.tmp_1 = r0 = s.i___196093; + r0 = pxsim_Array__length(s.confetti___196077); + 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__P187959_mk(s); + s.tmp_3.arg0 = s.arg0; + r0 = pxsim_Array__getAt(s.confetti___196077, s.i___196093); + s.tmp_3.arg1 = r0; + s.callLocIdx = 1617; s.pc = 4; return s.tmp_3; + case 4: r0 = s.retval; - s.tmp_12 = r0; - r0 = (s.tmp_10 - s.tmp_12); - s.tmp_9 = r0; - r0 = pxsim.Math_.atan2(s.tmp_4, s.tmp_9); - case 5: + r0 = (s.i___196093 + 1); + s.i___196093 = (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() } } } -spriteutils_angleFrom__P188850.info = {"start":1673,"length":178,"line":54,"column":4,"endLine":60,"endColumn":5,"fileName":"pxt_modules/arcade-sprite-util/spriteutils.ts","functionName":"angleFrom","argumentNames":["a","b"]} +particles_ConfettiFactory_constructor__P187963.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 spriteutils_angleFrom__P188850_mk(s) { +function particles_ConfettiFactory_constructor__P187963_mk(s) { checkStack(s.depth); return { - parent: s, fn: spriteutils_angleFrom__P188850, depth: s.depth + 1, + parent: s, fn: particles_ConfettiFactory_constructor__P187963, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -7434,23 +7936,23 @@ function spriteutils_angleFrom__P188850_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, + confetti___196077: undefined, + i___196093: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } +const _hex196080 = pxsim.BufferMethods.createBufferFromHex("87040100010000000f000000") +const _hex196082 = pxsim.BufferMethods.createBufferFromHex("8704010002000000ff000000") +const _hex196084 = pxsim.BufferMethods.createBufferFromHex("87040200010000000f0000000f000000") +const _hex196086 = pxsim.BufferMethods.createBufferFromHex("8704020002000000ff0000000f000000") +const _hex196088 = pxsim.BufferMethods.createBufferFromHex("87040200020000000f000000ff000000") -function spriteutils_setVelocityAtAngle__P188852(s) { +function particles_ShapeFactory_addShape__P187959(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7463,58 +7965,38 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = 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 = s.arg0; + if (!checkSubtype(r0, particles_ShapeFactory__C187957_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(s.arg1); if (!r0) { step = 1; continue; } - { step = 3; continue; } + r0 = s.arg0.fields["sources"]; + s.tmp_0 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.arg1); case 1: case 2: - s.tmp_2 = Sprite_setVelocity__P187290_mk(s); - s.tmp_2.arg0 = s.arg0; - r0 = pxsim.Math_.cos(s.arg1); - s.tmp_3 = r0; - r0 = (s.tmp_3 * s.arg2); - s.tmp_2.arg1 = r0; - r0 = pxsim.Math_.sin(s.arg1); - s.tmp_4 = r0; - r0 = (s.tmp_4 * s.arg2); - s.tmp_2.arg2 = r0; - s.callLocIdx = 1778; s.pc = 4; return s.tmp_2; - case 4: - r0 = s.retval; - case 3: r0 = undefined; return leave(s, r0) default: oops() } } } -spriteutils_setVelocityAtAngle__P188852.info = {"start":3148,"length":270,"line":95,"column":4,"endLine":103,"endColumn":5,"fileName":"pxt_modules/arcade-sprite-util/spriteutils.ts","functionName":"setVelocityAtAngle","argumentNames":["target","angleInRadians","speed"]} +particles_ShapeFactory_addShape__P187959.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 spriteutils_setVelocityAtAngle__P188852_mk(s) { +function particles_ShapeFactory_addShape__P187959_mk(s) { checkStack(s.depth); return { - parent: s, fn: spriteutils_setVelocityAtAngle__P188852, depth: s.depth + 1, + parent: s, fn: particles_ShapeFactory_addShape__P187959, depth: s.depth + 1, pc: 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_setVelocity__P187290(s) { +function particles_ShapeFactory_constructor__P187958(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7528,44 +8010,71 @@ 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, Sprite__C187233_VT)) failedCast(r0); - s.tmp_0 = Sprite_vx__P187247_mk(s); + if (!checkSubtype(r0, particles_ShapeFactory__C187957_VT)) failedCast(r0); + s.tmp_0 = particles_AreaFactory_constructor__P187946_mk(s); s.tmp_0.arg0 = s.arg0; s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 346; s.pc = 1; return s.tmp_0; + s.tmp_0.arg2 = s.arg2; + s.tmp_0.arg3 = undefined; + s.tmp_0.arg4 = undefined; + s.callLocIdx = 1606; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - s.tmp_0 = Sprite_vy__P187249_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg2; - s.callLocIdx = 347; s.pc = 2; return s.tmp_0; - case 2: - 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() } } } -Sprite_setVelocity__P187290.info = {"start":12526,"length":93,"line":450,"column":4,"endLine":453,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"setVelocity","argumentNames":["this","vx","vy"]} +particles_ShapeFactory_constructor__P187958.info = {"start":6668,"length":285,"line":212,"column":8,"endLine":219,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"inline","argumentNames":["this","xRange","yRange","source"]} -function Sprite_setVelocity__P187290_mk(s) { +function particles_ShapeFactory_constructor__P187958_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_setVelocity__P187290, depth: s.depth + 1, + parent: s, fn: particles_ShapeFactory_constructor__P187958, depth: s.depth + 1, pc: 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 Sprite_vy__P187249(s) { +function particles_AreaFactory_constructor__P187946(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7578,39 +8087,77 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 * 256); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_vy"] = (s.tmp_1); + if (!checkSubtype(r0, particles_AreaFactory__C187941_VT)) failedCast(r0); + s.tmp_0 = particles_SprayFactory_constructor__P187936_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 = 1594; 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__C187803_VT); + s.tmp_0 = r0; + s.tmp_1 = Math_FastRandom_constructor__P187805_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = undefined; + s.callLocIdx = 1595; s.pc = 6; return s.tmp_1; + case 6: + r0 = s.retval; + r0 = (s.arg0).fields["galois"] = (s.tmp_0); r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_vy__P187249.info = {"start":2705,"length":51,"line":108,"column":4,"endLine":110,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"vy","argumentNames":["this","v"]} +particles_AreaFactory_constructor__P187946.info = {"start":3950,"length":374,"line":139,"column":8,"endLine":146,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"inline","argumentNames":["this","xRange","yRange","minLifespan","maxLifespan"]} -function Sprite_vy__P187249_mk(s) { +function particles_AreaFactory_constructor__P187946_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_vy__P187249, depth: s.depth + 1, + parent: s, fn: particles_AreaFactory_constructor__P187946, 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 Sprite_vy__P187248(s) { +function effects_ScreenEffect_constructor__P188011(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7622,33 +8169,47 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); - r0 = s.arg0.fields["_vy"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) + if (!checkSubtype(r0, effects_ScreenEffect__C188010_VT)) failedCast(r0); + s.tmp_0 = effects_ParticleEffect_constructor__P188007_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 = 1626; 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() } } } -Sprite_vy__P187248.info = {"start":2543,"length":60,"line":103,"column":4,"endLine":105,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"vy","argumentNames":["this"]} -Sprite_vy__P187248.isGetter = true; +effects_ScreenEffect_constructor__P188011.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 Sprite_vy__P187248_mk(s) { +function effects_ScreenEffect_constructor__P188011_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_vy__P187248, depth: s.depth + 1, + parent: s, fn: effects_ScreenEffect_constructor__P188011, 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 Sprite_vx__P187247(s) { +function effects_ParticleEffect_constructor__P188007(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7661,39 +8222,37 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 * 256); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_vx"] = (s.tmp_1); + if (!checkSubtype(r0, effects_ParticleEffect__C188006_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() } } } -Sprite_vx__P187247.info = {"start":2374,"length":51,"line":97,"column":4,"endLine":99,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"vx","argumentNames":["this","v"]} +effects_ParticleEffect_constructor__P188007.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 Sprite_vx__P187247_mk(s) { +function effects_ParticleEffect_constructor__P188007_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_vx__P187247, depth: s.depth + 1, + parent: s, fn: effects_ParticleEffect_constructor__P188007, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function Sprite_vx__P187246(s) { +function scene_Scene_init__P187658(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7708,22 +8267,117 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); - r0 = s.arg0.fields["_vx"]; + if (!checkSubtype(r0, scene_Scene__C187636_VT)) failedCast(r0); + r0 = s.arg0.fields["allSprites"]; 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; } + { step = 3; continue; } + case 1: + case 2: + s.tmp_1 = power_poke__P186922_mk(s); + s.callLocIdx = 1019; s.pc = 4; return s.tmp_1; + case 4: + r0 = s.retval; + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["allSprites"] = (s.tmp_1); + r0 = (s.arg0).fields["spriteNextId"] = (0); + r0 = pxsim_pxtcore_mkAction(1, inline__P196212); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = control_EventContext_registerFrameHandler__P185609_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 = 1022; s.pc = 5; return s.tmp_1; + case 5: + r0 = s.retval; + s.tmp_0 = control_EventContext_registerFrameHandler__P185609_mk(s); + r0 = s.arg0.fields["eventContext"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = 13; + s.tmp_0.arg2 = controller__moveSprites__P187139; + s.callLocIdx = 1023; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, inline__P196235); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = control_EventContext_registerFrameHandler__P185609_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 = 1025; s.pc = 7; return s.tmp_1; + case 7: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, inline__P196248); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = control_EventContext_registerFrameHandler__P185609_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 = 1029; s.pc = 8; return s.tmp_1; + case 8: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, inline__P196269); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = control_EventContext_registerFrameHandler__P185609_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 = 1031; s.pc = 9; return s.tmp_1; + case 9: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, inline__P196277); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = control_EventContext_registerFrameHandler__P185609_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 = 1035; s.pc = 10; return s.tmp_1; + case 10: + r0 = s.retval; + s.tmp_0 = control_EventContext_registerFrameHandler__P185609_mk(s); + r0 = s.arg0.fields["eventContext"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = 200; + s.tmp_0.arg2 = control___screen_update__P186980; + s.callLocIdx = 1036; s.pc = 11; return s.tmp_0; + case 11: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, inline__P196306); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = helpers_arrayForEach__P185324_mk(s); + s.tmp_1.arg0 = globals.scene_Scene_initializers___187656; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 1038; s.pc = 12; return s.tmp_1; + case 12: + r0 = s.retval; + case 3: + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_vx__P187246.info = {"start":2212,"length":60,"line":92,"column":4,"endLine":94,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"vx","argumentNames":["this"]} -Sprite_vx__P187246.isGetter = true; +scene_Scene_init__P187658.info = {"start":4168,"length":2477,"line":122,"column":8,"endLine":180,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"init","argumentNames":["this"]} -function Sprite_vx__P187246_mk(s) { +function scene_Scene_init__P187658_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_vx__P187246, depth: s.depth + 1, + parent: s, fn: scene_Scene_init__P187658, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, arg0: undefined, } } @@ -7731,7 +8385,7 @@ function Sprite_vx__P187246_mk(s) { -function sprites_readDataBoolean__P188842(s) { +function inline__P196212(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7741,74 +8395,47 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.d___192519 = 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 = 2; continue; } - case 1: - r0 = pxsim_numops_toBoolDecr(s.arg1); + s.tmp_0 = r0 = s.caps[0]; + r0 = s.tmp_0.fields["_millis"]; 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 = false; - { step = 5; continue; } - case 3: - case 4: - s.tmp_4 = Sprite_data__P187258_mk(s); - s.tmp_4.arg0 = s.arg0; - s.callLocIdx = 1769; s.pc = 6; return s.tmp_4; - case 6: - r0 = s.retval; - s.d___192519 = (r0); - r0 = pxsim_pxtrt.mapGetGeneric(s.d___192519, s.arg1); + r0 = s.caps[0].fields["eventContext"]; + r0 = r0.fields["deltaTimeMillis"]; s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); + r0 = (s.tmp_2 + s.tmp_3); s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); - case 5: + r0 = (s.tmp_0).fields["_millis"] = (s.tmp_1); + s.tmp_0 = controller___update__P187167_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 = 1021; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_readDataBoolean__P188842.info = {"start":2670,"length":179,"line":86,"column":4,"endLine":90,"endColumn":5,"fileName":"pxt_modules/arcade-sprite-data/main.ts","functionName":"readDataBoolean","argumentNames":["sprite","name"]} +inline__P196212.info = {"start":4458,"length":217,"line":129,"column":72,"endLine":133,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} -function sprites_readDataBoolean__P188842_mk(s) { +function inline__P196212_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_readDataBoolean__P188842, depth: s.depth + 1, + parent: s, fn: inline__P196212, depth: s.depth + 1, pc: 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___192519: undefined, - arg0: undefined, - arg1: undefined, } } -function Sprite_follow__P187306(s) { +function inline__P196235(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7818,172 +8445,41 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sc___192542 = undefined; - s.lastTime___192551 = undefined; - s.fs___192694 = 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__C187233_VT)) failedCast(r0); - r0 = (s.arg1 === s.arg0); - 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_1 = game_currentScene__P187749_mk(s); - s.callLocIdx = 443; s.pc = 14; return s.tmp_1; - case 14: - r0 = s.retval; - s.sc___192542 = (r0); - r0 = s.sc___192542.fields["followingSprites"]; - 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.sc___192542; - r0 = pxsim_Array__mk(); - s.tmp_4 = r0; - r0 = (s.tmp_3).fields["followingSprites"] = (s.tmp_4); - r0 = pxsim_pxtrt.mklocRef(); - s.lastTime___192551 = (r0); - s.tmp_0 = r0 = s.lastTime___192551; - s.tmp_2 = game_runtime__P187765_mk(s); - s.callLocIdx = 444; s.pc = 15; return s.tmp_2; - case 15: - r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); - r0 = pxsim_pxtcore_mkAction(2, inline__P192557); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.lastTime___192551); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.sc___192542); - s.tmp_1 = control_EventContext_registerFrameHandler__P185609_mk(s); - r0 = s.sc___192542.fields["eventContext"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 14; - s.tmp_1.arg2 = s.tmp_0; - s.callLocIdx = 470; s.pc = 16; return s.tmp_1; - case 16: - r0 = s.retval; - case 3: - case 4: - r0 = pxsim_pxtcore_mkAction(1, inline__P192696); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = helpers_arrayFind__P185326_mk(s); - r0 = s.sc___192542.fields["followingSprites"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 471; s.pc = 17; return s.tmp_1; - case 17: - r0 = s.retval; - s.fs___192694 = (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 = 5; continue; } - r0 = s.tmp_0; - { step = 6; continue; } - case 5: - r0 = pxsim_numops_toBoolDecr(s.arg2); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); - case 6: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 9; continue; } - r0 = pxsim_numops_toBoolDecr(s.fs___192694); - if (!r0) { step = 7; continue; } - r0 = s.sc___192542.fields["followingSprites"]; - s.tmp_4 = r0; - r0 = pxsim_Array_.removeElement(s.tmp_4, s.fs___192694); - s.tmp_0 = Sprite_vx__P187247_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 472; s.pc = 18; return s.tmp_0; - case 18: - r0 = s.retval; - s.tmp_0 = Sprite_vy__P187249_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 473; s.pc = 19; return s.tmp_0; - case 19: - r0 = s.retval; - case 7: - case 8: - { step = 12; continue; } - case 9: - r0 = pxsim_numops_toBoolDecr(s.fs___192694); + s.tmp_0 = PhysicsEngine__C187376_v4_2_mk(s); + r0 = s.caps[0].fields["physicsEngine"]; + s.tmp_0.arg0 = r0; + r0 = s.caps[0].fields["eventContext"]; s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 10; continue; } - r0 = pxsim_pxtcore_mkClassInstance(sprites_FollowingSprite__C187189_VT); + r0 = s.tmp_1.fields["deltaTimeMillis"]; s.tmp_2 = r0; - s.tmp_3 = sprites_FollowingSprite_constructor__P187190_mk(s); - s.tmp_3.arg0 = s.tmp_2; - s.tmp_3.arg1 = s.arg0; - s.tmp_3.arg2 = s.arg1; - s.tmp_3.arg3 = s.arg2; - s.tmp_3.arg4 = s.arg3; - s.callLocIdx = 474; s.pc = 20; return s.tmp_3; - case 20: + r0 = (s.tmp_2 / 1000); + s.tmp_0.arg1 = r0; + if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C187376_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.move; + s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - r0 = s.sc___192542.fields["followingSprites"]; - s.tmp_4 = r0; - r0 = pxsim_Array__push(s.tmp_4, s.tmp_2); - { step = 11; continue; } - case 10: - r0 = (s.fs___192694).fields["target"] = (s.arg1); - r0 = (s.fs___192694).fields["rate"] = (s.arg2); - r0 = (s.fs___192694).fields["turnRate"] = (s.arg3); - case 11: - case 12: - case 13: r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_follow__P187306.info = {"start":30060,"length":3128,"line":899,"column":4,"endLine":978,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"follow","argumentNames":["this","target","speed","turnRate"]} +inline__P196235.info = {"start":4970,"length":159,"line":138,"column":69,"endLine":141,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} -function Sprite_follow__P187306_mk(s) { +function inline__P196235_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_follow__P187306, depth: s.depth + 1, + parent: s, fn: inline__P196235, depth: s.depth + 1, pc: 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___192542: undefined, - lastTime___192551: undefined, - fs___192694: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function inline__P192557(s) { +function inline__P196248(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7993,77 +8489,80 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.currTime___192558 = undefined; - s.timeDiff___192561 = undefined; - s.destroyedSprites___192567 = undefined; - s.tmp_0 = game_runtime__P187765_mk(s); - s.callLocIdx = 445; s.pc = 3; return s.tmp_0; + s.dt___196249 = undefined; + s.s___196257 = undefined; + s.unnamed8922___U2 = undefined; + s.unnamed8923___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___196249 = (r0); + s.tmp_0 = scene_Camera_update__P187593_mk(s); + r0 = s.caps[0].fields["camera"]; + s.tmp_0.arg0 = r0; + s.callLocIdx = 1027; s.pc = 3; return s.tmp_0; case 3: r0 = s.retval; - s.currTime___192558 = (r0); - s.tmp_1 = r0 = s.currTime___192558; - r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); - s.tmp_2 = r0; - r0 = (s.tmp_1 - s.tmp_2); - s.tmp_0 = r0; - r0 = (s.tmp_0 / 1000); - s.timeDiff___192561 = (r0); - r0 = pxsim_pxtrt.mklocRef(); - s.destroyedSprites___192567 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.destroyedSprites___192567, false); - r0 = pxsim_pxtcore_mkAction(2, inline__P192571); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.destroyedSprites___192567); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.timeDiff___192561); - s.tmp_1 = helpers_arrayForEach__P185324_mk(s); - r0 = s.caps[1].fields["followingSprites"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 468; s.pc = 4; return s.tmp_1; + s.s___196257 = (undefined); + r0 = s.caps[0].fields["allSprites"]; + s.unnamed8922___U2 = (r0); + s.unnamed8923___U3 = (0); + case 1: + s.tmp_0 = r0 = s.unnamed8923___U3; + r0 = pxsim_Array__length(s.unnamed8922___U2); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 2; continue; } + r0 = pxsim_Array__getAt(s.unnamed8922___U2, s.unnamed8923___U3); + s.s___196257 = (r0); + s.tmp_2 = if___update_3_mk(s); + s.tmp_2.arg0 = s.s___196257; + r0 = s.caps[0].fields["camera"]; + s.tmp_2.arg1 = r0; + s.tmp_2.arg2 = s.dt___196249; + if (!s.tmp_2.arg0.vtable.iface) { + setupLambda(s.tmp_2, pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "__update"), 3); + s.callLocIdx = 1028; 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 = 1028; s.pc = 4; return s.tmp_2; } + else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 1028; s.pc = 4; return s.tmp_2;; } + else { s.callLocIdx = 1028; s.pc = 4; return s.tmp_2; } + } case 4: r0 = s.retval; - r0 = pxsim_pxtrt_stlocRef(s.caps[0], s.currTime___192558); - r0 = pxsim_pxtrt_ldlocRef(s.destroyedSprites___192567); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_1 = r0 = s.caps[1]; - s.tmp_3 = helpers_arrayFilter__P185325_mk(s); - r0 = s.caps[1].fields["followingSprites"]; - s.tmp_3.arg0 = r0; - s.tmp_3.arg1 = inline__P192678; - s.callLocIdx = 469; s.pc = 5; return s.tmp_3; - case 5: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_1).fields["followingSprites"] = (s.tmp_2); - case 1: + r0 = (s.unnamed8923___U3 + 1); + s.unnamed8923___U3 = (r0); + { step = 1; continue; } case 2: + s.unnamed8922___U2 = (undefined); r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P192557.info = {"start":30389,"length":2197,"line":907,"column":79,"endLine":955,"endColumn":13,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":[]} +inline__P196248.info = {"start":5318,"length":214,"line":147,"column":79,"endLine":153,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} -function inline__P192557_mk(s) { +function inline__P196248_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P192557, depth: s.depth + 1, + parent: s, fn: inline__P196248, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - currTime___192558: undefined, - timeDiff___192561: undefined, - destroyedSprites___192567: undefined, + dt___196249: undefined, + s___196257: undefined, + unnamed8922___U2: undefined, + unnamed8923___U3: undefined, } } -function inline__P192571(s) { +function inline__P196269(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8073,288 +8572,30 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.target___192574 = undefined; - s.self___192575 = undefined; - s.turnRate___192576 = undefined; - s.rate___192577 = undefined; - s.dx___192591 = undefined; - s.dy___192597 = undefined; - s.maxMomentumDiff___192616 = undefined; - s.angleToTarget___192623 = undefined; - s.targetTrajectoryVx___192628 = undefined; - s.targetTrajectoryVy___192634 = undefined; - s.diffVx___192640 = undefined; - s.diffVy___192645 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - s.tmp_0 = if_target_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, "target"); - } else { - s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["target"]; - if (s.tmp_0.fn == null) { s.retval = s.tmp_0.arg0.fields["target"]; } - else if (!s.tmp_0.fn.isGetter) { s.retval = bind(s.tmp_0); } - else { s.callLocIdx = 446; s.pc = 8; return s.tmp_0; } - } - case 8: + s.tmp_0 = scene_Scene_render__P187663_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.callLocIdx = 1030; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - s.target___192574 = (r0); - s.tmp_2 = if_self_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, "self"); - } else { - s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["self"]; - if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["self"]; } - else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } - else { s.callLocIdx = 447; s.pc = 9; return s.tmp_2; } - } - case 9: - r0 = s.retval; - s.self___192575 = (r0); - s.tmp_3 = if_turnRate_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, "turnRate"); - } else { - s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["turnRate"]; - if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["turnRate"]; } - else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } - else { s.callLocIdx = 448; s.pc = 10; return s.tmp_3; } - } - case 10: - r0 = s.retval; - s.turnRate___192576 = (r0); - s.tmp_4 = if_rate_1_mk(s); - s.tmp_4.arg0 = s.tmp_1; - if (!s.tmp_4.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_4.arg0, "rate"); - } else { - s.tmp_4.fn = s.tmp_4.arg0.vtable.iface["rate"]; - if (s.tmp_4.fn == null) { s.retval = s.tmp_4.arg0.fields["rate"]; } - else if (!s.tmp_4.fn.isGetter) { s.retval = bind(s.tmp_4); } - else { s.callLocIdx = 449; s.pc = 11; return s.tmp_4; } - } - case 11: - r0 = s.retval; - s.rate___192577 = (r0); - r0 = s.self___192575.fields["flags"]; - s.tmp_2 = r0; - r0 = s.target___192574.fields["flags"]; - s.tmp_3 = r0; - r0 = (s.tmp_2 | s.tmp_3); - 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; } - s.tmp_4 = Sprite_vx__P187247_mk(s); - s.tmp_4.arg0 = s.self___192575; - s.tmp_4.arg1 = 0; - s.callLocIdx = 450; s.pc = 12; return s.tmp_4; - case 12: - r0 = s.retval; - s.tmp_0 = Sprite_vy__P187249_mk(s); - s.tmp_0.arg0 = s.self___192575; - s.tmp_0.arg1 = 0; - s.callLocIdx = 451; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; - r0 = pxsim_pxtrt_stlocRef(s.caps[0], true); - { step = 7; continue; } - case 1: - case 2: - s.tmp_1 = Sprite_x__P187242_mk(s); - s.tmp_1.arg0 = s.target___192574; - s.callLocIdx = 452; s.pc = 14; return s.tmp_1; - case 14: - r0 = s.retval; - s.tmp_0 = r0; - s.tmp_3 = Sprite_x__P187242_mk(s); - s.tmp_3.arg0 = s.self___192575; - s.callLocIdx = 453; s.pc = 15; return s.tmp_3; - case 15: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_0 - s.tmp_2); - s.dx___192591 = (r0); - s.tmp_1 = Sprite_y__P187244_mk(s); - s.tmp_1.arg0 = s.target___192574; - s.callLocIdx = 454; s.pc = 16; return s.tmp_1; - case 16: - r0 = s.retval; - s.tmp_0 = r0; - s.tmp_3 = Sprite_y__P187244_mk(s); - s.tmp_3.arg0 = s.self___192575; - s.callLocIdx = 455; s.pc = 17; return s.tmp_3; - case 17: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_0 - s.tmp_2); - s.dy___192597 = (r0); - s.tmp_2 = Math_abs__P185340_mk(s); - s.tmp_2.arg0 = s.dx___192591; - s.callLocIdx = 456; s.pc = 18; return s.tmp_2; - case 18: - r0 = s.retval; - 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: - s.tmp_4 = Math_abs__P185340_mk(s); - s.tmp_4.arg0 = s.dy___192597; - s.callLocIdx = 457; s.pc = 19; return s.tmp_4; - case 19: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_3 < 2); - 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 = Sprite_vx__P187247_mk(s); - s.tmp_6.arg0 = s.self___192575; - s.tmp_6.arg1 = 0; - s.callLocIdx = 458; s.pc = 20; return s.tmp_6; - case 20: - r0 = s.retval; - s.tmp_0 = Sprite_vy__P187249_mk(s); - s.tmp_0.arg0 = s.self___192575; - s.tmp_0.arg1 = 0; - s.callLocIdx = 459; s.pc = 21; return s.tmp_0; - case 21: - r0 = s.retval; - { step = 7; continue; } - case 5: - case 6: - r0 = (s.caps[1] * s.turnRate___192576); - s.tmp_0 = r0; - r0 = (s.rate___192577 / 50); - s.tmp_1 = r0; - r0 = (s.tmp_0 * s.tmp_1); - s.maxMomentumDiff___192616 = (r0); - r0 = pxsim.Math_.atan2(s.dy___192597, s.dx___192591); - s.angleToTarget___192623 = (r0); - r0 = pxsim.Math_.cos(s.angleToTarget___192623); - s.tmp_0 = r0; - r0 = (s.tmp_0 * s.rate___192577); - s.targetTrajectoryVx___192628 = (r0); - r0 = pxsim.Math_.sin(s.angleToTarget___192623); - s.tmp_0 = r0; - r0 = (s.tmp_0 * s.rate___192577); - s.targetTrajectoryVy___192634 = (r0); - s.tmp_0 = r0 = s.targetTrajectoryVx___192628; - s.tmp_2 = Sprite_vx__P187246_mk(s); - s.tmp_2.arg0 = s.self___192575; - s.callLocIdx = 460; s.pc = 22; return s.tmp_2; - case 22: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0 - s.tmp_1); - s.diffVx___192640 = (r0); - s.tmp_0 = r0 = s.targetTrajectoryVy___192634; - s.tmp_2 = Sprite_vy__P187248_mk(s); - s.tmp_2.arg0 = s.self___192575; - s.callLocIdx = 461; s.pc = 23; return s.tmp_2; - case 23: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0 - s.tmp_1); - s.diffVy___192645 = (r0); - s.tmp_0 = Sprite_vx__P187247_mk(s); - s.tmp_1 = r0 = s.self___192575; - s.tmp_0.arg0 = r0; - s.tmp_3 = Sprite_vx__P187246_mk(s); - s.tmp_3.arg0 = s.tmp_1; - s.callLocIdx = 463; s.pc = 25; return s.tmp_3; - case 25: - r0 = s.retval; - s.tmp_2 = r0; - s.tmp_5 = Math_clamp__P185339_mk(s); - r0 = (0 - s.maxMomentumDiff___192616); - s.tmp_5.arg0 = r0; - s.tmp_5.arg1 = s.maxMomentumDiff___192616; - s.tmp_5.arg2 = s.diffVx___192640; - s.callLocIdx = 462; s.pc = 26; return s.tmp_5; - case 26: - r0 = s.retval; - s.tmp_4 = r0; - r0 = (s.tmp_2 + s.tmp_4); - s.tmp_0.arg1 = r0; - s.callLocIdx = 464; s.pc = 24; return s.tmp_0; - case 24: - r0 = s.retval; - s.tmp_0 = Sprite_vy__P187249_mk(s); - s.tmp_1 = r0 = s.self___192575; - s.tmp_0.arg0 = r0; - s.tmp_3 = Sprite_vy__P187248_mk(s); - s.tmp_3.arg0 = s.tmp_1; - s.callLocIdx = 466; s.pc = 28; return s.tmp_3; - case 28: - r0 = s.retval; - s.tmp_2 = r0; - s.tmp_5 = Math_clamp__P185339_mk(s); - r0 = (0 - s.maxMomentumDiff___192616); - s.tmp_5.arg0 = r0; - s.tmp_5.arg1 = s.maxMomentumDiff___192616; - s.tmp_5.arg2 = s.diffVy___192645; - s.callLocIdx = 465; s.pc = 29; return s.tmp_5; - case 29: - r0 = s.retval; - s.tmp_4 = r0; - r0 = (s.tmp_2 + s.tmp_4); - s.tmp_0.arg1 = r0; - s.callLocIdx = 467; s.pc = 27; return s.tmp_0; - case 27: - r0 = s.retval; - case 7: r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P192571.info = {"start":30600,"length":1635,"line":912,"column":44,"endLine":946,"endColumn":17,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["fs"]} +inline__P196269.info = {"start":5673,"length":109,"line":158,"column":76,"endLine":161,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} -function inline__P192571_mk(s) { +function inline__P196269_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P192571, depth: s.depth + 1, + parent: s, fn: inline__P196269, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - target___192574: undefined, - self___192575: undefined, - turnRate___192576: undefined, - rate___192577: undefined, - dx___192591: undefined, - dy___192597: undefined, - maxMomentumDiff___192616: undefined, - angleToTarget___192623: undefined, - targetTrajectoryVx___192628: undefined, - targetTrajectoryVy___192634: undefined, - diffVx___192640: undefined, - diffVy___192645: undefined, - arg0: undefined, } } -function inline__P192678(s) { +function inline__P196277(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8364,85 +8605,108 @@ 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["self"]; - r0 = r0.fields["flags"]; - s.tmp_3 = r0; - r0 = s.arg0.fields["target"]; - r0 = r0.fields["flags"]; - s.tmp_4 = r0; - r0 = (s.tmp_3 | s.tmp_4); - s.tmp_2 = r0; - r0 = (s.tmp_2 & 2); + s.tmp_0 = r0 = globals.stats___187746; + 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___185604; + case 2: + // jmp value (already in r0) s.tmp_1 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); + if (!r0) { step = 3; continue; } + s.tmp_2 = lambda_2_mk(s); + s.tmp_2.argL = globals.control_EventContext_onStats___185604; + if ((globals.control_EventContext_lastStats___185603) && (globals.control_EventContext_lastStats___185603).vtable) { + setupResume(s, 8); + pxsim_String__stringConv(globals.control_EventContext_lastStats___185603); + checkResumeConsumed(); + return; + } else { s.retval = (globals.control_EventContext_lastStats___185603) + ""; } + case 8: + r0 = s.retval; + s.tmp_3 = r0; + r0 = s.caps[0].fields["allSprites"]; + s.tmp_8 = r0; + r0 = pxsim_Array__length(s.tmp_8); + s.tmp_7 = r0; + if ((s.tmp_7) && (s.tmp_7).vtable) { + setupResume(s, 9); + pxsim_String__stringConv(s.tmp_7); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_7) + ""; } + case 9: + r0 = s.retval; + s.tmp_6 = r0; + r0 = pxsim_String__concat(" sprites:", s.tmp_6); + s.tmp_5 = r0; + if ((s.tmp_5) && (s.tmp_5).vtable) { + setupResume(s, 10); + pxsim_String__stringConv(s.tmp_5); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_5) + ""; } + case 10: + r0 = s.retval; + s.tmp_4 = r0; + r0 = pxsim_String__concat(s.tmp_3, s.tmp_4); + s.tmp_2.arg0 = r0; + setupLambda(s.tmp_2, s.tmp_2.argL); + s.callLocIdx = 1032; s.pc = 7; return s.tmp_2; + case 7: + r0 = s.retval; + case 3: + case 4: + r0 = pxsim_numops_toBoolDecr(globals.debug___187745); + if (!r0) { step = 5; continue; } + s.tmp_0 = PhysicsEngine__C187376_v3_1_mk(s); + r0 = s.caps[0].fields["physicsEngine"]; + s.tmp_0.arg0 = r0; + if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C187376_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__P187871_mk(s); + s.callLocIdx = 1033; s.pc = 12; return s.tmp_0; + case 12: + r0 = s.retval; + s.tmp_0 = power_checkDeepSleep__P186923_mk(s); + s.callLocIdx = 1034; s.pc = 13; return s.tmp_0; + case 13: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P192678.info = {"start":32485,"length":67,"line":953,"column":32,"endLine":953,"endColumn":99,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["fs"]} +inline__P196277.info = {"start":5899,"length":504,"line":163,"column":80,"endLine":175,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} -function inline__P192678_mk(s) { +function inline__P196277_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P192678, depth: s.depth + 1, + parent: s, fn: inline__P196277, depth: s.depth + 1, pc: 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 inline__P192696(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (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["self"]; - r0 = r0.fields["id"]; - s.tmp_0 = r0; - r0 = s.caps[0].fields["id"]; - s.tmp_1 = r0; - r0 = (s.tmp_0 == s.tmp_1); - return leave(s, r0) - default: oops() -} } } -inline__P192696.info = {"start":32644,"length":27,"line":958,"column":44,"endLine":958,"endColumn":71,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["fs"]} - -function inline__P192696_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: inline__P192696, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, } } -function sprites_FollowingSprite_constructor__P187190(s) { +function inline__P196306(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8454,41 +8718,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; } - r0 = s.arg0; - if (!checkSubtype(r0, sprites_FollowingSprite__C187189_VT)) failedCast(r0); - r0 = (s.arg0).fields["self"] = (s.arg1); - r0 = (s.arg0).fields["target"] = (s.arg2); - r0 = (s.arg0).fields["rate"] = (s.arg3); - r0 = (s.arg0).fields["turnRate"] = (s.arg4); + 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 = 1037; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_FollowingSprite_constructor__P187190.info = {"start":401,"length":163,"line":18,"column":8,"endLine":23,"endColumn":13,"fileName":"pxt_modules/game/sprites.ts","functionName":"inline","argumentNames":["this","self","target","rate","turnRate"]} +inline__P196306.info = {"start":6621,"length":12,"line":179,"column":39,"endLine":179,"endColumn":51,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":["f"]} -function sprites_FollowingSprite_constructor__P187190_mk(s) { +function inline__P196306_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_FollowingSprite_constructor__P187190, depth: s.depth + 1, + parent: s, fn: inline__P196306, 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 control_EventContext_registerFrameHandler__P185609(s) { +function game_consoleOverlay_draw__P187871(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8498,84 +8756,191 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.fn___192840 = undefined; - s.i___192849 = 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__C185601_VT)) failedCast(r0); - r0 = s.arg0.fields["frameCallbacks"]; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.height___196355 = undefined; + s.top___196360 = undefined; + s.i___196366 = undefined; + s.t___196379 = undefined; + s.tOff___196386 = undefined; + s.tab___196388 = undefined; + s.unnamed8926___U6 = undefined; + s.unnamed8927___U7 = undefined; + s.padding___196390 = undefined; + r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___189862); 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; } - 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__P189246_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 59; s.pc = 8; return s.tmp_0; - case 8: - r0 = s.retval; + r0 = s.tmp_0; + { step = 2; continue; } case 1: + r0 = pxsim_numops_toBoolDecr(globals.instance___189816); + s.tmp_4 = r0; + r0 = pxsim_Boolean__bang(s.tmp_4); + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); case 2: - r0 = pxsim_pxtcore_mkClassInstance(control_FrameCallback__C185598_VT); - s.fn___192840 = (r0); - r0 = (s.fn___192840).fields["order"] = (s.arg1); - r0 = (s.fn___192840).fields["handler"] = (s.arg2); - s.i___192849 = (0); + // 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: - s.tmp_1 = r0 = s.i___192849; - r0 = s.arg0.fields["frameCallbacks"]; - s.tmp_3 = r0; - r0 = pxsim_Array__length(s.tmp_3); + case 4: + s.tmp_7 = if_charHeight_1_mk(s); + s.tmp_7.arg0 = globals.consoleFont___189870; + 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 = 1499; s.pc = 14; return s.tmp_7; } + } + case 14: + r0 = s.retval; + s.tmp_6 = r0; + r0 = (s.tmp_6 + 2); + s.height___196355 = (r0); + r0 = pxsim_numops_toBoolDecr(globals.stats___187746); + if (!r0) { step = 5; continue; } + r0 = s.height___196355; + { 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___196360 = (r0); + s.i___196366 = (0); + case 7: + s.tmp_1 = r0 = s.i___196366; + r0 = pxsim_Array__length(globals.consoleStrings___189862); 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___192849); - r0 = r0.fields["order"]; + if (!r0) { step = 12; continue; } + r0 = pxsim_Array__getAt(globals.consoleStrings___189862, s.i___196366); s.tmp_5 = r0; - r0 = (s.tmp_5 > s.arg1); + r0 = pxsim_String_.indexOf(s.tmp_5, "\t", undefined); 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___192849, s.fn___192840); - r0 = s.fn___192840; + 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__P185334_mk(s); + r0 = pxsim_Array__getAt(globals.consoleStrings___189862, s.i___196366); + s.tmp_6.arg0 = r0; + s.tmp_6.arg1 = "\t"; + s.tmp_6.arg2 = undefined; + s.callLocIdx = 1500; s.pc = 15; return s.tmp_6; + case 15: + r0 = s.retval; + s.t___196379 = (r0); + s.tOff___196386 = (0); + s.tab___196388 = (undefined); + s.unnamed8926___U6 = (s.t___196379); + s.unnamed8927___U7 = (0); + case 8: + s.tmp_0 = r0 = s.unnamed8927___U7; + r0 = pxsim_Array__length(s.unnamed8926___U6); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 9; continue; } + r0 = pxsim_Array__getAt(s.unnamed8926___U6, s.unnamed8927___U7); + s.tab___196388 = (r0); + s.tmp_2 = r0 = globals.tabSize___189864; + s.tmp_5 = r0 = s.tOff___196386; + r0 = pxsim_String_.length(s.tab___196388); + s.tmp_6 = r0; + r0 = (s.tmp_5 + s.tmp_6); + s.tmp_4 = r0; + r0 = (s.tmp_4 % globals.tabSize___189864); + s.tmp_3 = r0; + r0 = (s.tmp_2 - s.tmp_3); + s.padding___196390 = (r0); + s.tmp_0 = helpers_imagePrint__P186977_mk(s); + s.tmp_0.arg0 = globals.screen___187019; + s.tmp_0.arg1 = s.tab___196388; + s.tmp_2 = r0 = s.tOff___196386; + s.tmp_4 = if_charWidth_1_mk(s); + s.tmp_4.arg0 = globals.consoleFont___189870; + 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 = 1501; 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___196360; + r0 = (s.i___196366 * s.height___196355); + s.tmp_6 = r0; + r0 = (s.tmp_5 + s.tmp_6); + s.tmp_0.arg3 = r0; + s.tmp_0.arg4 = globals.consoleColor___189861; + s.tmp_0.arg5 = globals.consoleFont___189870; + s.tmp_0.arg6 = undefined; + s.callLocIdx = 1502; s.pc = 16; return s.tmp_0; + case 16: + r0 = s.retval; + s.tmp_0 = r0 = s.tOff___196386; + r0 = pxsim_String_.length(s.tab___196388); + s.tmp_2 = r0; + r0 = (s.tmp_2 + s.padding___196390); + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); + s.tOff___196386 = (r0); + r0 = (s.unnamed8927___U7 + 1); + s.unnamed8927___U7 = (r0); + { step = 8; continue; } + case 9: + s.unnamed8926___U6 = (undefined); + { step = 11; continue; } + case 10: + s.tmp_0 = helpers_imagePrint__P186977_mk(s); + s.tmp_0.arg0 = globals.screen___187019; + r0 = pxsim_Array__getAt(globals.consoleStrings___189862, s.i___196366); + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = 4; + s.tmp_1 = r0 = s.top___196360; + r0 = (s.i___196366 * s.height___196355); + s.tmp_2 = r0; + r0 = (s.tmp_1 + s.tmp_2); + s.tmp_0.arg3 = r0; + s.tmp_0.arg4 = globals.consoleColor___189861; + s.tmp_0.arg5 = globals.consoleFont___189870; + s.tmp_0.arg6 = undefined; + s.callLocIdx = 1503; s.pc = 18; return s.tmp_0; + case 18: + r0 = s.retval; + case 11: + r0 = (s.i___196366 + 1); + s.i___196366 = (r0); { step = 7; continue; } - case 4: - case 5: - r0 = (s.i___192849 + 1); - s.i___192849 = (r0); - { step = 3; continue; } - case 6: - r0 = s.arg0.fields["frameCallbacks"]; - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.fn___192840); - r0 = s.fn___192840; - case 7: + case 12: + case 13: + r0 = undefined; return leave(s, r0) default: oops() } } } -control_EventContext_registerFrameHandler__P185609.info = {"start":4675,"length":643,"line":143,"column":8,"endLine":160,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"registerFrameHandler","argumentNames":["this","order","handler"]} +game_consoleOverlay_draw__P187871.info = {"start":1364,"length":859,"line":44,"column":4,"endLine":61,"endColumn":5,"fileName":"pxt_modules/game/console.ts","functionName":"draw","argumentNames":[]} -function control_EventContext_registerFrameHandler__P185609_mk(s) { +function game_consoleOverlay_draw__P187871_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_registerFrameHandler__P185609, depth: s.depth + 1, + parent: s, fn: game_consoleOverlay_draw__P187871, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -8585,18 +8950,22 @@ function control_EventContext_registerFrameHandler__P185609_mk(s) { tmp_5: undefined, tmp_6: undefined, tmp_7: undefined, - fn___192840: undefined, - i___192849: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, + height___196355: undefined, + top___196360: undefined, + i___196366: undefined, + t___196379: undefined, + tOff___196386: undefined, + tab___196388: undefined, + unnamed8926___U6: undefined, + unnamed8927___U7: undefined, + padding___196390: undefined, } } -function control_EventContext_registerFrameCallbacks__P189246(s) { +function scene_systemMenu_isVisible__P187852(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8606,55 +8975,33 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.worker___192883 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, control_EventContext__C185601_VT)) failedCast(r0); - r0 = s.arg0.fields["frameCallbacks"]; + r0 = pxsim_numops_toBoolDecr(globals.instance___189816); 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); - 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___192883 = (r0); - r0 = pxsim_pxtcore_mkAction(2, inline__P192889); + r0 = pxsim_numops_toBoolDecr(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.worker___192883); - r0 = pxsim.control.runInParallel(s.tmp_0); - case 3: - r0 = undefined; + r0 = pxsim_Boolean__bang(s.tmp_0); return leave(s, r0) default: oops() } } } -control_EventContext_registerFrameCallbacks__P189246.info = {"start":3481,"length":895,"line":105,"column":8,"endLine":129,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"registerFrameCallbacks","argumentNames":["this"]} +scene_systemMenu_isVisible__P187852.info = {"start":13170,"length":62,"line":395,"column":4,"endLine":397,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"isVisible","argumentNames":[]} -function control_EventContext_registerFrameCallbacks__P189246_mk(s) { +function scene_systemMenu_isVisible__P187852_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_registerFrameCallbacks__P189246, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_isVisible__P187852, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - worker___192883: undefined, - arg0: undefined, } } -function inline__P192889(s) { +function helpers_imagePrint__P186977(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8664,343 +9011,460 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.delay___192919 = undefined; - r0 = s.caps[0].fields["runningCallbacks"]; + s.x0___193610 = undefined; + s.cp___193612 = undefined; + s.mult___193613 = undefined; + s.dataW___193618 = undefined; + s.dataH___193624 = undefined; + s.byteHeight___193630 = undefined; + s.charSize___193636 = undefined; + s.dataSize___193640 = undefined; + s.fontdata___193644 = undefined; + s.lastchar___193647 = undefined; + s.imgBuf___193654 = undefined; + s.xOffset___193678 = undefined; + s.yOffset___193679 = undefined; + s.ch___193694 = undefined; + s.l___193713 = undefined; + s.r___193714 = undefined; + s.off___193716 = undefined; + s.guess___193717 = undefined; + s.m___193736 = undefined; + s.v___193745 = undefined; + s.i___193801 = undefined; + s.j___193806 = undefined; + s.mask___193807 = undefined; + s.c___193808 = undefined; + s.n___193825 = 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; } - r0 = pxsim_pxtcore_mkAction(1, inline__P192895); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.caps[0]); - s.tmp_2 = pauseUntil__P185573_mk(s); - s.tmp_2.arg0 = s.tmp_1; - s.tmp_2.arg1 = undefined; - s.callLocIdx = 53; s.pc = 5; return s.tmp_2; - case 5: + s.tmp_2 = image_getFontForText__P186964_mk(s); + s.tmp_2.arg0 = s.arg1; + s.callLocIdx = 139; s.pc = 39; return s.tmp_2; + case 39: r0 = s.retval; + s.arg5 = (r0); 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(); + r0 = pxsim_numops_toBoolDecr(s.arg4); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["prevTimeMillis"] = (s.tmp_1); + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + s.arg4 = (1); case 3: - r0 = s.caps[0].fields["frameWorker"]; - s.tmp_1 = r0; - r0 = (s.caps[1] == s.tmp_1); + case 4: + s.x0___193610 = (s.arg2); + s.cp___193612 = (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 = 140; 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 = 4; continue; } - s.tmp_2 = control_EventContext_runCallbacks__P189245_mk(s); - s.tmp_2.arg0 = s.caps[0]; - s.callLocIdx = 54; s.pc = 6; return s.tmp_2; - case 6: + 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 = 141; s.pc = 41; return s.tmp_2; } + } + case 41: r0 = s.retval; - s.delay___192919 = (r0); - s.tmp_0 = pause__P185619_mk(s); - s.tmp_0.arg0 = s.delay___192919; - s.callLocIdx = 55; s.pc = 7; return s.tmp_0; - case 7: + { step = 6; continue; } + case 5: + r0 = 1; + case 6: + // jmp value (already in r0) + s.tmp_3 = r0; + s.mult___193613 = (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 = 142; s.pc = 42; return s.tmp_1; } + } + case 42: r0 = s.retval; - { step = 3; continue; } - case 4: - r0 = (s.caps[0]).fields["runningCallbacks"] = (false); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -inline__P192889.info = {"start":3642,"length":723,"line":109,"column":34,"endLine":128,"endColumn":13,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":[]} - -function inline__P192889_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: inline__P192889, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - delay___192919: undefined, -} } - - - - - -function inline__P192895(s) { -let r0 = s.r0, 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() -} } } -inline__P192895.info = {"start":3873,"length":28,"line":113,"column":31,"endLine":113,"endColumn":59,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":[]} - -function inline__P192895_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: inline__P192895, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, -} } - - - - - -function control_EventContext_runCallbacks__P189245(s) { -let r0 = s.r0, 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___192928 = undefined; - s.f___192941 = undefined; - s.unnamed8896___U2 = undefined; - s.unnamed8897___U3 = undefined; - s.runtime___192946 = undefined; - s.fps___192966 = undefined; - s.delay___193028 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; + r0 = pxsim.Math_.idiv(s.tmp_0, s.mult___193613); + s.dataW___193618 = (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 = 143; s.pc = 43; return s.tmp_1; } } - r0 = s.arg0; - if (!checkSubtype(r0, control_EventContext__C185601_VT)) failedCast(r0); - r0 = pxsim.control.millis(); - s.loopStart___192928 = (r0); - s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["prevTimeMillis"]; - s.tmp_2 = r0; - r0 = (s.loopStart___192928 - s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["deltaTimeMillis"] = (s.tmp_1); - r0 = (s.arg0).fields["prevTimeMillis"] = (s.loopStart___192928); - s.f___192941 = (undefined); - r0 = s.arg0.fields["frameCallbacks"]; - s.unnamed8896___U2 = (r0); - s.unnamed8897___U3 = (0); - case 1: - s.tmp_0 = r0 = s.unnamed8897___U3; - r0 = pxsim_Array__length(s.unnamed8896___U2); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 2; continue; } - r0 = pxsim_Array__getAt(s.unnamed8896___U2, s.unnamed8897___U3); - s.f___192941 = (r0); - s.tmp_2 = if_handler_1_mk(s); - s.tmp_2.arg0 = s.f___192941; - if (!s.tmp_2.arg0.vtable.iface) { - setupLambda(s.tmp_2, pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "handler"), 1); - s.callLocIdx = 50; s.pc = 13; return s.tmp_2; + case 43: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim.Math_.idiv(s.tmp_0, s.mult___193613); + s.dataH___193624 = (r0); + r0 = (s.dataH___193624 + 7); + s.tmp_0 = r0; + r0 = (s.tmp_0 >> 3); + s.byteHeight___193630 = (r0); + r0 = (s.byteHeight___193630 * s.dataW___193618); + s.charSize___193636 = (r0); + r0 = (2 + s.charSize___193636); + s.dataSize___193640 = (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_2.fn = s.tmp_2.arg0.vtable.iface["handler"]; - if (s.tmp_2.fn == null) { setupLambda(s.tmp_2, s.tmp_2.arg0.fields["handler"], 1); s.callLocIdx = 50; s.pc = 13; return s.tmp_2; } - else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 50; s.pc = 13; return s.tmp_2;; } - else { s.callLocIdx = 50; s.pc = 13; return s.tmp_2; } + 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 = 144; s.pc = 44; return s.tmp_0; } } - case 13: + case 44: r0 = s.retval; - r0 = (s.unnamed8897___U3 + 1); - s.unnamed8897___U3 = (r0); - { step = 1; continue; } - case 2: - s.unnamed8896___U2 = (undefined); - r0 = pxsim.control.millis(); + s.fontdata___193644 = (r0); + r0 = pxsim.BufferMethods.length(s.fontdata___193644); + s.tmp_1 = r0; + r0 = pxsim.Math_.idiv(s.tmp_1, s.dataSize___193640); s.tmp_0 = r0; - r0 = (s.tmp_0 - s.loopStart___192928); - s.runtime___192946 = (r0); - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["timeInSample"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 + s.runtime___192946); + r0 = (s.tmp_0 - 1); + s.lastchar___193647 = (r0); + r0 = (s.mult___193613 == 1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; continue; } + r0 = (8 + s.charSize___193636); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["timeInSample"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["framesInSample"]; + r0 = pxsim.control.createBuffer(s.tmp_1); + s.imgBuf___193654 = (r0); + r0 = pxsim.BufferMethods.setByte(s.imgBuf___193654, 0, 135); + r0 = pxsim.BufferMethods.setByte(s.imgBuf___193654, 1, 1); + r0 = pxsim.BufferMethods.setByte(s.imgBuf___193654, 2, s.dataW___193618); + r0 = pxsim.BufferMethods.setByte(s.imgBuf___193654, 4, s.dataH___193624); + case 7: + case 8: + case 9: + s.tmp_1 = r0 = s.cp___193612; + r0 = pxsim_String_.length(s.arg1); s.tmp_2 = r0; - r0 = (s.tmp_2 + 1); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["framesInSample"] = (s.tmp_1); - r0 = s.arg0.fields["timeInSample"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 > 1000); + r0 = (s.tmp_1 < s.tmp_2); s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 38; continue; } + s.xOffset___193678 = (0); + s.yOffset___193679 = (0); + s.tmp_0 = r0 = s.arg6; r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 3; continue; } + if (r0) { step = 10; continue; } r0 = s.tmp_0; - { step = 4; continue; } - case 3: - r0 = s.arg0.fields["framesInSample"]; + { step = 11; continue; } + case 10: + s.tmp_1 = r0 = s.cp___193612; + r0 = pxsim_Array__length(s.arg6); s.tmp_2 = r0; - r0 = (s.tmp_2 > 30); - case 4: + 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 = 11; continue; } - r0 = s.arg0.fields["framesInSample"]; - s.tmp_4 = r0; - r0 = s.arg0.fields["timeInSample"]; - s.tmp_6 = r0; - r0 = (s.tmp_6 / 1000); - s.tmp_5 = r0; - r0 = (s.tmp_4 / s.tmp_5); - s.fps___192966 = (r0); - r0 = pxsim.Math_.round(s.fps___192966); - s.tmp_1 = r0; - if ((s.tmp_1) && (s.tmp_1).vtable) { - setupResume(s, 14); - pxsim_String__stringConv(s.tmp_1); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_1) + ""; } - case 14: + if (!r0) { step = 12; continue; } + s.tmp_4 = if_xOffset_1_mk(s); + r0 = pxsim_Array__getAt(s.arg6, s.cp___193612); + 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 = 145; s.pc = 45; return s.tmp_4; } + } + case 45: r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_String__concat("fps:", s.tmp_0); - globals.control_EventContext_lastStats___185603 = (r0); - r0 = (s.fps___192966 < 99); + s.xOffset___193678 = (r0); + s.tmp_0 = if_yOffset_1_mk(s); + r0 = pxsim_Array__getAt(s.arg6, s.cp___193612); + 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 = 146; s.pc = 46; return s.tmp_0; } + } + case 46: + r0 = s.retval; + s.yOffset___193679 = (r0); + case 12: + case 13: + s.tmp_0 = r0 = s.cp___193612; + r0 = (s.tmp_0 + 1); + s.cp___193612 = (r0); + r0 = pxsim_String_.charCodeAt(s.arg1, s.tmp_0); + s.ch___193694 = (r0); + r0 = (s.ch___193694 == 10); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - if ((globals.control_EventContext_lastStats___185603) && (globals.control_EventContext_lastStats___185603).vtable) { - setupResume(s, 15); - pxsim_String__stringConv(globals.control_EventContext_lastStats___185603); - checkResumeConsumed(); - return; - } else { s.retval = (globals.control_EventContext_lastStats___185603) + ""; } - case 15: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.fps___192966 * 10); - s.tmp_7 = r0; - r0 = pxsim.Math_.round(s.tmp_7); - s.tmp_6 = r0; - r0 = (s.tmp_6 % 10); - s.tmp_5 = r0; - if ((s.tmp_5) && (s.tmp_5).vtable) { - setupResume(s, 16); - pxsim_String__stringConv(s.tmp_5); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_5) + ""; } - case 16: + 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 = 147; s.pc = 47; return s.tmp_4; } + } + case 47: 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, 17); - pxsim_String__stringConv(s.tmp_3); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_3) + ""; } - case 17: - r0 = s.retval; + r0 = (s.tmp_3 + 2); s.tmp_2 = r0; - r0 = pxsim_String__concat(s.tmp_1, s.tmp_2); - globals.control_EventContext_lastStats___185603 = (r0); - case 5: - case 6: - s.tmp_2 = control_ramSize__P185552_mk(s); - s.callLocIdx = 51; s.pc = 18; return s.tmp_2; - case 18: - r0 = s.retval; + r0 = (s.tmp_1 + s.tmp_2); + s.arg3 = (r0); + s.arg2 = (s.x0___193610); + case 14: + case 15: + r0 = (s.ch___193694 < 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___193713 = (0); + s.r___193714 = (s.lastchar___193647); + s.off___193716 = (0); + r0 = (s.ch___193694 - 32); + s.tmp_0 = r0; + r0 = (s.tmp_0 * s.dataSize___193640); + s.guess___193717 = (r0); + r0 = pxsim.BufferMethods.getNumber(s.fontdata___193644, 4, s.guess___193717); s.tmp_1 = r0; - r0 = (s.tmp_1 > 2000000); + r0 = (s.tmp_1 == s.ch___193694); 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.control.profilingEnabled(); - 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_String_.mkEmpty(); - s.tmp_8 = r0; - r0 = (s.fps___192966 * 100); - s.tmp_11 = r0; - r0 = (s.tmp_11 | 0); - 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) + ""; } + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 18; continue; } + s.off___193716 = (s.guess___193717); + { step = 25; continue; } + case 18: case 19: - r0 = s.retval; - s.tmp_9 = r0; - r0 = pxsim_String__concat(s.tmp_8, s.tmp_9); - s.tmp_7 = r0; - r0 = pxsim_String__concat(s.tmp_7, "/100 fps - "); - s.tmp_6 = r0; - r0 = s.arg0.fields["framesInSample"]; - s.tmp_13 = r0; - if ((s.tmp_13) && (s.tmp_13).vtable) { - setupResume(s, 20); - pxsim_String__stringConv(s.tmp_13); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_13) + ""; } + r0 = (s.l___193713 <= s.r___193714); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 24; continue; } + s.tmp_1 = r0 = s.l___193713; + r0 = (s.r___193714 - s.l___193713); + s.tmp_3 = r0; + r0 = (s.tmp_3 >> 1); + s.tmp_2 = r0; + r0 = (s.tmp_1 + s.tmp_2); + s.m___193736 = (r0); + s.tmp_0 = r0 = s.fontdata___193644; + r0 = (s.m___193736 * s.dataSize___193640); + s.tmp_1 = r0; + r0 = pxsim.BufferMethods.getNumber(s.tmp_0, 4, s.tmp_1); + s.v___193745 = (r0); + r0 = (s.v___193745 == s.ch___193694); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 20; continue; } + r0 = (s.m___193736 * s.dataSize___193640); + s.off___193716 = (r0); + { step = 24; continue; } case 20: + case 21: + r0 = (s.v___193745 < s.ch___193694); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 22; continue; } + r0 = (s.m___193736 + 1); + s.l___193713 = (r0); + { step = 23; continue; } + case 22: + r0 = (s.m___193736 - 1); + s.r___193714 = (r0); + case 23: + { step = 19; continue; } + case 24: + case 25: + r0 = (s.mult___193613 == 1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 26; continue; } + s.tmp_1 = r0 = s.imgBuf___193654; + s.tmp_3 = r0 = s.fontdata___193644; + r0 = (s.off___193716 + 2); + s.tmp_4 = r0; + r0 = pxsim.BufferMethods.slice(s.tmp_3, s.tmp_4, s.charSize___193636); + s.tmp_2 = r0; + r0 = pxsim.BufferMethods.write(s.tmp_1, 8, s.tmp_2); + s.tmp_0 = helpers_imageDrawIcon__P186944_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.imgBuf___193654; + r0 = (s.arg2 + s.xOffset___193678); + s.tmp_0.arg2 = r0; + r0 = (s.arg3 + s.yOffset___193679); + s.tmp_0.arg3 = r0; + s.tmp_0.arg4 = s.arg4; + s.callLocIdx = 148; s.pc = 48; return s.tmp_0; + case 48: r0 = s.retval; - s.tmp_12 = r0; - r0 = pxsim_String__concat(s.tmp_6, s.tmp_12); + 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 = 149; 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___193716 + 2); + s.off___193716 = (r0); + s.i___193801 = (0); + case 27: + r0 = (s.i___193801 < s.dataW___193618); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 36; continue; } + s.j___193806 = (0); + s.mask___193807 = (1); + s.tmp_0 = r0 = s.off___193716; + r0 = (s.tmp_0 + 1); + s.off___193716 = (r0); + r0 = pxsim.BufferMethods.getByte(s.fontdata___193644, s.tmp_0); + s.c___193808 = (r0); + case 28: + r0 = (s.j___193806 < s.dataH___193624); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 35; continue; } + r0 = (s.mask___193807 == 256); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 29; continue; } + s.tmp_2 = r0 = s.off___193716; + r0 = (s.tmp_2 + 1); + s.off___193716 = (r0); + r0 = pxsim.BufferMethods.getByte(s.fontdata___193644, s.tmp_2); + s.c___193808 = (r0); + s.mask___193807 = (1); + case 29: + case 30: + s.n___193825 = (0); + case 31: + r0 = (s.c___193808 & s.mask___193807); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 32; continue; } + r0 = (s.n___193825 + 1); + s.n___193825 = (r0); + r0 = (s.mask___193807 << 1); + s.mask___193807 = (r0); + { step = 31; continue; } + case 32: + r0 = pxsim_numops_toBoolDecr(s.n___193825); + if (!r0) { step = 33; continue; } + s.tmp_0 = helpers_imageFillRect__P186945_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = r0 = s.arg2; + r0 = (s.xOffset___193678 * s.mult___193613); + 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___193806 + s.yOffset___193679); s.tmp_5 = r0; - r0 = pxsim_String__concat(s.tmp_5, " frames"); + r0 = (s.tmp_5 * s.mult___193613); s.tmp_4 = r0; - r0 = pxsim.control.dmesg(s.tmp_4); - r0 = pxsim.control.gc(); - r0 = pxsim_pxtcore.dumpPerfCounters(); - case 9: - case 10: - r0 = (s.arg0).fields["timeInSample"] = (0); - r0 = (s.arg0).fields["framesInSample"] = (0); - case 11: - case 12: - s.tmp_0 = Math_max__P185342_mk(s); - s.tmp_0.arg0 = 1; - r0 = (20 - s.runtime___192946); - s.tmp_0.arg1 = r0; - s.callLocIdx = 52; s.pc = 21; return s.tmp_0; - case 21: + r0 = (s.tmp_3 + s.tmp_4); + s.tmp_0.arg2 = r0; + s.tmp_0.arg3 = s.mult___193613; + r0 = (s.mult___193613 * s.n___193825); + s.tmp_0.arg4 = r0; + s.tmp_0.arg5 = s.arg4; + s.callLocIdx = 150; s.pc = 50; return s.tmp_0; + case 50: r0 = s.retval; - s.delay___193028 = (r0); - r0 = s.delay___193028; + r0 = (s.j___193806 + s.n___193825); + s.j___193806 = (r0); + { step = 34; continue; } + case 33: + r0 = (s.mask___193807 << 1); + s.mask___193807 = (r0); + r0 = (s.j___193806 + 1); + s.j___193806 = (r0); + case 34: + { step = 28; continue; } + case 35: + r0 = (s.arg2 + s.mult___193613); + s.arg2 = (r0); + r0 = (s.i___193801 + 1); + s.i___193801 = (r0); + { step = 27; continue; } + case 36: + case 37: + { step = 9; continue; } + case 38: + r0 = undefined; return leave(s, r0) default: oops() } } } -control_EventContext_runCallbacks__P189245.info = {"start":2182,"length":1246,"line":74,"column":8,"endLine":102,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"runCallbacks","argumentNames":["this"]} +helpers_imagePrint__P186977.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 control_EventContext_runCallbacks__P189245_mk(s) { +function helpers_imagePrint__P186977_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_runCallbacks__P189245, depth: s.depth + 1, + parent: s, fn: helpers_imagePrint__P186977, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -9008,29 +9472,45 @@ function control_EventContext_runCallbacks__P189245_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, - loopStart___192928: undefined, - f___192941: undefined, - unnamed8896___U2: undefined, - unnamed8897___U3: undefined, - runtime___192946: undefined, - fps___192966: undefined, - delay___193028: undefined, + x0___193610: undefined, + cp___193612: undefined, + mult___193613: undefined, + dataW___193618: undefined, + dataH___193624: undefined, + byteHeight___193630: undefined, + charSize___193636: undefined, + dataSize___193640: undefined, + fontdata___193644: undefined, + lastchar___193647: undefined, + imgBuf___193654: undefined, + xOffset___193678: undefined, + yOffset___193679: undefined, + ch___193694: undefined, + l___193713: undefined, + r___193714: undefined, + off___193716: undefined, + guess___193717: undefined, + m___193736: undefined, + v___193745: undefined, + i___193801: undefined, + j___193806: undefined, + mask___193807: undefined, + c___193808: undefined, + n___193825: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, + arg5: undefined, + arg6: undefined, } } -function Math_max__P185342(s) { +function image_getFontForText__P186964(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9040,41 +9520,60 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.i___193904 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg0 >= s.arg1); + s.i___193904 = (0); + case 1: + s.tmp_1 = r0 = s.i___193904; + 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 = 1; continue; } - r0 = s.arg0; - { step = 3; continue; } - case 1: + if (!r0) { step = 4; continue; } + r0 = pxsim_String_.charCodeAt(s.arg0, s.i___193904); + 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___186963; + { step = 5; continue; } case 2: - r0 = s.arg1; case 3: + r0 = (s.i___193904 + 1); + s.i___193904 = (r0); + { step = 1; continue; } + case 4: + r0 = globals.font8___186962; + case 5: return leave(s, r0) default: oops() } } } -Math_max__P185342.info = {"start":15575,"length":105,"line":529,"column":4,"endLine":532,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"max","argumentNames":["a","b"]} +image_getFontForText__P186964.info = {"start":11713,"length":259,"line":136,"column":4,"endLine":143,"endColumn":5,"fileName":"pxt_modules/screen/text.ts","functionName":"getFontForText","argumentNames":["text"]} -function Math_max__P185342_mk(s) { +function image_getFontForText__P186964_mk(s) { checkStack(s.depth); return { - parent: s, fn: Math_max__P185342, depth: s.depth + 1, + parent: s, fn: image_getFontForText__P186964, depth: s.depth + 1, pc: 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___193904: undefined, arg0: undefined, - arg1: undefined, } } -function pauseUntil__P185573(s) { +function helpers_imageDrawIcon__P186944(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9087,74 +9586,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_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + s.tmp_0 = r0 = s.arg0; + s.tmp_1 = r0 = s.arg1; + s.tmp_3 = helpers_pack__P189316_mk(s); + s.tmp_3.arg0 = s.arg2; + s.tmp_3.arg1 = s.arg3; + s.callLocIdx = 120; s.pc = 1; return s.tmp_3; case 1: - s.tmp_2 = lambda_1_mk(s); - s.tmp_2.argL = s.arg0; - setupLambda(s.tmp_2, s.tmp_2.argL); - s.callLocIdx = 37; s.pc = 8; return s.tmp_2; - case 8: - r0 = s.retval; - case 2: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 3; continue; } - { step = 7; continue; } - case 3: - case 4: - r0 = pxsim_numops_toBoolDecr(s.arg1); - s.tmp_5 = r0; - r0 = pxsim_Boolean__bang(s.tmp_5); - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - if (!r0) { step = 5; continue; } - s.arg1 = (0); - case 5: - case 6: - s.tmp_0 = control___queuePollEvent__P185572_mk(s); - s.tmp_0.arg0 = s.arg1; - s.tmp_0.arg1 = s.arg0; - s.tmp_0.arg2 = undefined; - s.callLocIdx = 38; s.pc = 9; return s.tmp_0; - case 9: r0 = s.retval; - case 7: + 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() } } } -pauseUntil__P185573.info = {"start":2205,"length":227,"line":73,"column":0,"endLine":77,"endColumn":1,"fileName":"pxt_modules/base/poll.ts","functionName":"pauseUntil","argumentNames":["condition","timeOut"]} +helpers_imageDrawIcon__P186944.info = {"start":3500,"length":145,"line":128,"column":4,"endLine":130,"endColumn":5,"fileName":"pxt_modules/screen/image.ts","functionName":"imageDrawIcon","argumentNames":["img","icon","x","y","c"]} -function pauseUntil__P185573_mk(s) { +function helpers_imageDrawIcon__P186944_mk(s) { checkStack(s.depth); return { - parent: s, fn: pauseUntil__P185573, depth: s.depth + 1, + parent: s, fn: helpers_imageDrawIcon__P186944, depth: s.depth + 1, pc: 0, retval: undefined, 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, } } -function control___queuePollEvent__P185572(s) { +function helpers_pack__P189316(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9164,97 +9637,59 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ev___193050 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = pxsim_pxtcore_mkClassInstance(control_PollEvent__C189219_VT); - s.tmp_0 = r0; - s.tmp_1 = control_PollEvent_constructor__P189220_mk(s); - s.tmp_1.arg0 = s.tmp_0; - r0 = pxsim.control.allocateNotifyEvent(); - s.tmp_1.arg1 = r0; - s.tmp_1.arg2 = 1; - r0 = pxsim.control.millis(); - s.tmp_1.arg3 = r0; - s.tmp_1.arg4 = s.arg0; - s.tmp_1.arg5 = s.arg1; - r0 = pxsim_numops_toBoolDecr(s.arg2); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); - s.tmp_1.arg6 = r0; - s.callLocIdx = 35; s.pc = 5; return s.tmp_1; - case 5: + s.tmp_2 = Math_clamp__P185339_mk(s); + s.tmp_2.arg0 = -30000; + s.tmp_2.arg1 = 30000; + r0 = (s.arg0 | 0); + s.tmp_2.arg2 = r0; + s.callLocIdx = 118; s.pc = 1; return s.tmp_2; + case 1: r0 = s.retval; - s.ev___193050 = (s.tmp_0); - r0 = pxsim_numops_toBoolDecr(globals._pollEventQueue___189222); 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(); - s.tmp_2 = r0; - r0 = pxsim_Array__push(s.tmp_2, s.ev___193050); - globals._pollEventQueue___189222 = (s.tmp_2); - r0 = pxsim.control.runInParallel(control_pollEvents__P189223); - { step = 2; continue; } - case 1: - r0 = pxsim_Array__push(globals._pollEventQueue___189222, s.ev___193050); + s.tmp_5 = Math_clamp__P185339_mk(s); + s.tmp_5.arg0 = -30000; + s.tmp_5.arg1 = 30000; + r0 = (s.arg1 | 0); + s.tmp_5.arg2 = r0; + s.callLocIdx = 119; s.pc = 2; return s.tmp_5; case 2: - r0 = pxsim_numops_toBoolDecr(s.arg2); - if (!r0) { step = 3; continue; } - s.tmp_0 = control_onEvent__P185597_mk(s); - r0 = s.ev___193050.fields["eid"]; - s.tmp_0.arg0 = r0; - r0 = s.ev___193050.fields["vid"]; - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = s.arg2; - s.tmp_0.arg3 = 16; - s.callLocIdx = 36; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - { step = 4; continue; } - case 3: - r0 = s.ev___193050.fields["eid"]; - s.tmp_0 = r0; - r0 = s.ev___193050.fields["vid"]; - s.tmp_1 = r0; - setupResume(s, 7); - pxsim.control.waitForEvent(s.tmp_0, s.tmp_1); - checkResumeConsumed(); - return; - case 7: r0 = s.retval; - case 4: - r0 = undefined; + s.tmp_4 = r0; + r0 = (s.tmp_4 << 16); + s.tmp_3 = r0; + r0 = (s.tmp_0 | s.tmp_3); return leave(s, r0) default: oops() } } } -control___queuePollEvent__P185572.info = {"start":1262,"length":739,"line":39,"column":4,"endLine":64,"endColumn":5,"fileName":"pxt_modules/base/poll.ts","functionName":"__queuePollEvent","argumentNames":["timeOut","condition","handler"]} +helpers_pack__P189316.info = {"start":3152,"length":145,"line":120,"column":4,"endLine":122,"endColumn":5,"fileName":"pxt_modules/screen/image.ts","functionName":"pack","argumentNames":["x","y"]} -function control___queuePollEvent__P185572_mk(s) { +function helpers_pack__P189316_mk(s) { checkStack(s.depth); return { - parent: s, fn: control___queuePollEvent__P185572, depth: s.depth + 1, + parent: s, fn: helpers_pack__P189316, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - ev___193050: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function control_pollEvents__P189223(s) { +function Math_clamp__P185339(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9264,139 +9699,46 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.now___193176 = undefined; - s.i___193179 = undefined; - s.ev___193185 = undefined; - case 1: - r0 = pxsim_Array__length(globals._pollEventQueue___189222); - s.tmp_1 = r0; - r0 = (s.tmp_1 > 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 12; continue; } - r0 = pxsim.control.millis(); - s.now___193176 = (r0); - s.i___193179 = (0); - case 2: - s.tmp_1 = r0 = s.i___193179; - r0 = pxsim_Array__length(globals._pollEventQueue___189222); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 11; continue; } - r0 = pxsim_Array__getAt(globals._pollEventQueue___189222, s.i___193179); - s.ev___193185 = (r0); - s.tmp_1 = if_condition_1_mk(s); - s.tmp_1.arg0 = s.ev___193185; - if (!s.tmp_1.arg0.vtable.iface) { - setupLambda(s.tmp_1, pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "condition"), 1); - s.callLocIdx = 32; s.pc = 13; return s.tmp_1; - } else { - s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["condition"]; - if (s.tmp_1.fn == null) { setupLambda(s.tmp_1, s.tmp_1.arg0.fields["condition"], 1); s.callLocIdx = 32; s.pc = 13; return s.tmp_1; } - else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 32; s.pc = 13; return s.tmp_1;; } - else { s.callLocIdx = 32; s.pc = 13; return s.tmp_1; } + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.lambdaArgs = null; } - case 13: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = s.tmp_0; - { step = 6; continue; } - case 3: - r0 = s.ev___193185.fields["timeOut"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 > 0); - s.tmp_2 = r0; - r0 = pxsim_numops_toBool(s.tmp_2); - if (r0) { step = 4; continue; } - r0 = s.tmp_2; - { step = 5; continue; } - case 4: - r0 = s.ev___193185.fields["start"]; - s.tmp_5 = r0; - r0 = (s.now___193176 - s.tmp_5); - s.tmp_4 = r0; - r0 = s.ev___193185.fields["timeOut"]; - s.tmp_6 = r0; - r0 = (s.tmp_4 > s.tmp_6); - case 5: - // jmp value (already in r0) - s.tmp_7 = r0; - r0 = s.tmp_7; - case 6: - // jmp value (already in r0) - s.tmp_8 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_8); - if (!r0) { step = 9; continue; } - r0 = s.ev___193185.fields["eid"]; - s.tmp_9 = r0; - r0 = s.ev___193185.fields["vid"]; - s.tmp_10 = r0; - r0 = pxsim.control.raiseEvent(s.tmp_9, s.tmp_10); - r0 = s.ev___193185.fields["once"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - s.tmp_1 = helpers_arraySplice__P185315_mk(s); - s.tmp_1.arg0 = globals._pollEventQueue___189222; - s.tmp_1.arg1 = s.i___193179; - s.tmp_1.arg2 = 1; - s.callLocIdx = 33; s.pc = 14; return s.tmp_1; - case 14: + s.tmp_0 = Math_min__P185343_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_1 = Math_max__P185342_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_1.arg1 = s.arg2; + s.callLocIdx = 16; s.pc = 2; return s.tmp_1; + case 2: r0 = s.retval; - r0 = (s.i___193179 - 1); - s.i___193179 = (r0); - case 7: - case 8: - case 9: - case 10: - r0 = (s.i___193179 + 1); - s.i___193179 = (r0); - { step = 2; continue; } - case 11: - s.tmp_0 = pause__P185619_mk(s); - s.tmp_0.arg0 = 50; - s.callLocIdx = 34; s.pc = 15; return s.tmp_0; - case 15: + s.tmp_0.arg1 = r0; + s.callLocIdx = 17; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - { step = 1; continue; } - case 12: - globals._pollEventQueue___189222 = (undefined); - r0 = undefined; return leave(s, r0) default: oops() } } } -control_pollEvents__P189223.info = {"start":618,"length":638,"line":20,"column":4,"endLine":37,"endColumn":5,"fileName":"pxt_modules/base/poll.ts","functionName":"pollEvents","argumentNames":[]} +Math_clamp__P185339.info = {"start":14654,"length":130,"line":501,"column":4,"endLine":503,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"clamp","argumentNames":["min","max","value"]} -function control_pollEvents__P189223_mk(s) { +function Math_clamp__P185339_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_pollEvents__P189223, depth: s.depth + 1, + parent: s, fn: Math_clamp__P185339, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - now___193176: undefined, - i___193179: undefined, - ev___193185: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function helpers_arraySplice__P185315(s) { +function Math_min__P185343(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9406,55 +9748,41 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.i___193233 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = (s.arg1 < 0); + r0 = (s.arg0 <= s.arg1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - { step = 5; continue; } + r0 = s.arg0; + { step = 3; continue; } case 1: case 2: - s.i___193233 = (0); + r0 = s.arg1; case 3: - r0 = (s.i___193233 < s.arg2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - r0 = pxsim_Array_.removeAt(s.arg0, s.arg1); - r0 = (s.i___193233 + 1); - s.i___193233 = (r0); - { step = 3; continue; } - case 4: - case 5: - r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_arraySplice__P185315.info = {"start":3642,"length":213,"line":137,"column":4,"endLine":144,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arraySplice","argumentNames":["arr","start","len"]} +Math_min__P185343.info = {"start":15790,"length":105,"line":538,"column":4,"endLine":541,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"min","argumentNames":["a","b"]} -function helpers_arraySplice__P185315_mk(s) { +function Math_min__P185343_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arraySplice__P185315, depth: s.depth + 1, + parent: s, fn: Math_min__P185343, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - i___193233: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function control_PollEvent_constructor__P189220(s) { +function helpers_stringSplit__P185334(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9464,49 +9792,186 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.A___196444 = undefined; + s.lim___196446 = undefined; + s.s___196462 = undefined; + s.p___196465 = undefined; + s.R___196466 = undefined; + s.z___196480 = undefined; + s.T___196493 = undefined; + s.q___196494 = undefined; + s.e___196500 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); - s.arg5 = (s.lambdaArgs[5]); - s.arg6 = (s.lambdaArgs[6]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, control_PollEvent__C189219_VT)) failedCast(r0); - r0 = (s.arg0).fields["eid"] = (s.arg1); - r0 = (s.arg0).fields["vid"] = (s.arg2); - r0 = (s.arg0).fields["start"] = (s.arg3); - r0 = (s.arg0).fields["timeOut"] = (s.arg4); - r0 = (s.arg0).fields["condition"] = (s.arg5); - r0 = (s.arg0).fields["once"] = (s.arg6); - r0 = undefined; + r0 = pxsim_Array__mk(); + s.A___196444 = (r0); + s.lim___196446 = (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___196446 = (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___196446 = (0); + { step = 3; continue; } + case 2: + r0 = (s.arg2 | 0); + s.lim___196446 = (r0); + case 3: + case 4: + r0 = pxsim_String_.length(s.arg0); + s.s___196462 = (r0); + s.p___196465 = (0); + s.R___196466 = (s.arg1); + r0 = (s.lim___196446 == 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + r0 = s.A___196444; + { 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___196444, 0, s.arg0); + r0 = s.A___196444; + { step = 21; continue; } + case 7: + case 8: + r0 = (s.s___196462 == 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 11; continue; } + s.tmp_1 = helpers_splitMatch__P189175_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_1.arg1 = 0; + s.tmp_1.arg2 = s.R___196466; + s.callLocIdx = 12; s.pc = 22; return s.tmp_1; + case 22: + r0 = s.retval; + s.z___196480 = (r0); + r0 = (s.z___196480 > -1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 9; continue; } + r0 = s.A___196444; + { step = 21; continue; } + case 9: + case 10: + r0 = pxsim_Array_.setAt(s.A___196444, 0, s.arg0); + r0 = s.A___196444; + { step = 21; continue; } + case 11: + case 12: + s.q___196494 = (s.p___196465); + case 13: + r0 = (s.q___196494 != s.s___196462); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 20; continue; } + s.tmp_1 = helpers_splitMatch__P189175_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_1.arg1 = s.q___196494; + s.tmp_1.arg2 = s.R___196466; + s.callLocIdx = 13; s.pc = 23; return s.tmp_1; + case 23: + r0 = s.retval; + s.e___196500 = (r0); + r0 = (s.e___196500 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 14; continue; } + r0 = (s.q___196494 + 1); + s.q___196494 = (r0); + { step = 19; continue; } + case 14: + r0 = (s.e___196500 == s.p___196465); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 15; continue; } + r0 = (s.q___196494 + 1); + s.q___196494 = (r0); + { step = 18; continue; } + case 15: + s.tmp_0 = helpers_stringSlice__P185332_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.p___196465; + s.tmp_0.arg2 = s.q___196494; + s.callLocIdx = 14; s.pc = 24; return s.tmp_0; + case 24: + r0 = s.retval; + s.T___196493 = (r0); + r0 = pxsim_Array__push(s.A___196444, s.T___196493); + r0 = pxsim_Array__length(s.A___196444); + s.tmp_1 = r0; + r0 = (s.tmp_1 == s.lim___196446); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 16; continue; } + r0 = s.A___196444; + { step = 21; continue; } + case 16: + case 17: + s.p___196465 = (s.e___196500); + s.q___196494 = (s.p___196465); + case 18: + case 19: + { step = 13; continue; } + case 20: + s.tmp_0 = helpers_stringSlice__P185332_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.p___196465; + s.tmp_0.arg2 = s.q___196494; + s.callLocIdx = 15; s.pc = 25; return s.tmp_0; + case 25: + r0 = s.retval; + s.T___196493 = (r0); + r0 = pxsim_Array__push(s.A___196444, s.T___196493); + r0 = s.A___196444; + case 21: return leave(s, r0) default: oops() } } } -control_PollEvent_constructor__P189220.info = {"start":239,"length":316,"line":8,"column":8,"endLine":15,"endColumn":9,"fileName":"pxt_modules/base/poll.ts","functionName":"inline","argumentNames":["this","eid","vid","start","timeOut","condition","once"]} +helpers_stringSplit__P185334.info = {"start":11930,"length":1319,"line":407,"column":4,"endLine":451,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"stringSplit","argumentNames":["S","separator","limit"]} -function control_PollEvent_constructor__P189220_mk(s) { +function helpers_stringSplit__P185334_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_PollEvent_constructor__P189220, depth: s.depth + 1, + parent: s, fn: helpers_stringSplit__P185334, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + A___196444: undefined, + lim___196446: undefined, + s___196462: undefined, + p___196465: undefined, + R___196466: undefined, + z___196480: undefined, + T___196493: undefined, + q___196494: undefined, + e___196500: undefined, arg0: undefined, arg1: undefined, arg2: undefined, - arg3: undefined, - arg4: undefined, - arg5: undefined, - arg6: undefined, } } -function control_onEvent__P185597(s) { +function helpers_splitMatch__P189175(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9516,63 +9981,85 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ctx___193092 = undefined; + s.r___196576 = undefined; + s.s___196579 = undefined; + s.i___196589 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } - s.tmp_0 = control_eventContext__P185614_mk(s); - s.callLocIdx = 47; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.ctx___193092 = (r0); - r0 = pxsim_numops_toBoolDecr(s.ctx___193092); + r0 = pxsim_String_.length(s.arg2); + s.r___196576 = (r0); + r0 = pxsim_String_.length(s.arg0); + s.s___196579 = (r0); + r0 = (s.arg1 + s.r___196576); s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = (s.tmp_1 > s.s___196579); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = pxsim.control.internalOnEvent(s.arg0, s.arg1, s.arg2, s.arg3); - { step = 2; continue; } + r0 = -1; + { step = 7; continue; } case 1: - s.tmp_0 = control_EventContext_registerHandler__P185611_mk(s); - s.tmp_0.arg0 = s.ctx___193092; - s.tmp_0.arg1 = s.arg0; - s.tmp_0.arg2 = s.arg1; - s.tmp_0.arg3 = s.arg2; - s.tmp_0.arg4 = s.arg3; - s.callLocIdx = 48; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; case 2: - r0 = undefined; + s.i___196589 = (0); + case 3: + r0 = (s.i___196589 < s.r___196576); + 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___196589); + 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___196589); + 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___196589 + 1); + s.i___196589 = (r0); + { step = 3; continue; } + case 6: + r0 = (s.arg1 + s.r___196576); + case 7: return leave(s, r0) default: oops() } } } -control_onEvent__P185597.info = {"start":336,"length":325,"line":9,"column":4,"endLine":15,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"onEvent","argumentNames":["src","value","handler","flags"]} +helpers_splitMatch__P189175.info = {"start":13255,"length":289,"line":453,"column":4,"endLine":462,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"splitMatch","argumentNames":["S","q","R"]} -function control_onEvent__P185597_mk(s) { +function helpers_splitMatch__P189175_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_onEvent__P185597, depth: s.depth + 1, + parent: s, fn: helpers_splitMatch__P189175, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - ctx___193092: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + r___196576: undefined, + s___196579: undefined, + i___196589: undefined, arg0: undefined, arg1: undefined, arg2: undefined, - arg3: undefined, } } -function control_eventContext__P185614(s) { +function helpers_stringSlice__P185332(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9582,42 +10069,73 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.eventContexts___189248); + s.len___196545 = 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___196545 = (r0); + r0 = (s.arg1 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - s.tmp_0 = r0 = globals.eventContexts___189248; - r0 = pxsim_Array__length(globals.eventContexts___189248); - s.tmp_2 = r0; - r0 = (s.tmp_2 - 1); - s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); - { step = 2; continue; } + s.tmp_1 = Math_max__P185342_mk(s); + r0 = (s.len___196545 + s.arg1); + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 0; + s.callLocIdx = 11; s.pc = 7; return s.tmp_1; + case 7: + r0 = s.retval; + s.arg1 = (r0); case 1: - r0 = undefined; case 2: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = s.tmp_3; + r0 = (s.arg2 == null); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + s.arg2 = (s.len___196545); + case 3: + case 4: + r0 = (s.arg2 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + r0 = (s.len___196545 + s.arg2); + s.arg2 = (r0); + case 5: + case 6: + 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() } } } -control_eventContext__P185614.info = {"start":6907,"length":136,"line":209,"column":4,"endLine":211,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"eventContext","argumentNames":[]} +helpers_stringSlice__P185332.info = {"start":11047,"length":365,"line":373,"column":4,"endLine":389,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"stringSlice","argumentNames":["s","start","end"]} -function control_eventContext__P185614_mk(s) { +function helpers_stringSlice__P185332_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_eventContext__P185614, depth: s.depth + 1, + parent: s, fn: helpers_stringSlice__P185332, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, + len___196545: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function control_EventContext_registerHandler__P185611(s) { +function scene_Scene_render__P187663(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9627,113 +10145,147 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.h___193115 = undefined; - s.unnamed8902___U1 = undefined; - s.unnamed8903___U2 = undefined; - s.hn___193138 = undefined; + s.s___196673 = undefined; + s.unnamed8924___U1 = undefined; + s.unnamed8925___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.arg4 = (s.lambdaArgs[4]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, control_EventContext__C185601_VT)) failedCast(r0); - s.h___193115 = (undefined); - r0 = s.arg0.fields["handlers"]; - s.unnamed8902___U1 = (r0); - s.unnamed8903___U2 = (0); - case 1: - s.tmp_0 = r0 = s.unnamed8903___U2; - r0 = pxsim_Array__length(s.unnamed8902___U1); + if (!checkSubtype(r0, scene_Scene__C187636_VT)) failedCast(r0); + r0 = s.arg0.fields["flags"]; s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 6; continue; } - r0 = pxsim_Array__getAt(s.unnamed8902___U1, s.unnamed8903___U2); - s.h___193115 = (r0); - r0 = s.h___193115.fields["src"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 == s.arg1); - s.tmp_2 = r0; - r0 = pxsim_numops_toBool(s.tmp_2); - if (r0) { step = 2; continue; } - r0 = s.tmp_2; - { step = 3; continue; } + r0 = (s.tmp_1 & 4); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + { step = 11; continue; } + case 1: case 2: - r0 = s.h___193115.fields["value"]; + s.tmp_2 = r0 = s.arg0; + r0 = s.tmp_2.fields["flags"]; s.tmp_4 = r0; - r0 = (s.tmp_4 == s.arg2); + 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: - // jmp value (already in r0) - s.tmp_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); - if (!r0) { step = 4; continue; } - r0 = (s.h___193115).fields["flags"] = (s.arg4); - r0 = (s.h___193115).fields["handler"] = (s.arg3); - { step = 7; continue; } + 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__P187663_mk(s); + r0 = s.arg0.fields["previousScene"]; + s.tmp_3.arg0 = r0; + s.callLocIdx = 1040; s.pc = 12; return s.tmp_3; + case 12: + r0 = s.retval; + { step = 6; continue; } case 5: - r0 = (s.unnamed8903___U2 + 1); - s.unnamed8903___U2 = (r0); - { step = 1; continue; } + s.tmp_0 = scene_Background_draw__P187491_mk(s); + r0 = s.arg0.fields["background"]; + s.tmp_0.arg0 = r0; + s.callLocIdx = 1041; s.pc = 13; return s.tmp_0; + case 13: + r0 = s.retval; case 6: - s.unnamed8902___U1 = (undefined); - r0 = pxsim_pxtcore_mkClassInstance(control_EventHandler__C189240_VT); + r0 = s.arg0.fields["flags"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 & 1); s.tmp_0 = r0; - s.tmp_1 = control_EventHandler_constructor__P189243_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = s.arg1; - s.tmp_1.arg2 = s.arg2; - s.tmp_1.arg3 = s.arg3; - s.tmp_1.arg4 = s.arg4; - s.callLocIdx = 60; s.pc = 8; return s.tmp_1; - case 8: + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; continue; } + s.tmp_2 = helpers_arraySort__P185320_mk(s); + r0 = s.arg0.fields["allSprites"]; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = inline__P196650; + s.callLocIdx = 1046; s.pc = 14; return s.tmp_2; + case 14: r0 = s.retval; - s.hn___193138 = (s.tmp_0); - r0 = s.arg0.fields["handlers"]; - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.hn___193138); - s.tmp_0 = control_EventHandler_register__P189241_mk(s); - s.tmp_0.arg0 = s.hn___193138; - s.callLocIdx = 61; s.pc = 9; return s.tmp_0; + 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___196673 = (undefined); + r0 = s.arg0.fields["allSprites"]; + s.unnamed8924___U1 = (r0); + s.unnamed8925___U2 = (0); case 9: + s.tmp_0 = r0 = s.unnamed8925___U2; + r0 = pxsim_Array__length(s.unnamed8924___U1); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 10; continue; } + r0 = pxsim_Array__getAt(s.unnamed8924___U1, s.unnamed8925___U2); + s.s___196673 = (r0); + s.tmp_2 = if___draw_2_mk(s); + s.tmp_2.arg0 = s.s___196673; + 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 = 1047; 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 = 1047; s.pc = 15; return s.tmp_2; } + else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 1047; s.pc = 15; return s.tmp_2;; } + else { s.callLocIdx = 1047; s.pc = 15; return s.tmp_2; } + } + case 15: r0 = s.retval; - case 7: + r0 = (s.unnamed8925___U2 + 1); + s.unnamed8925___U2 = (r0); + { step = 9; continue; } + case 10: + s.unnamed8924___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() } } } -control_EventContext_registerHandler__P185611.info = {"start":5573,"length":525,"line":169,"column":8,"endLine":182,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"registerHandler","argumentNames":["this","src","value","handler","flags"]} +scene_Scene_render__P187663.info = {"start":7844,"length":917,"line":221,"column":8,"endLine":245,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"render","argumentNames":["this"]} -function control_EventContext_registerHandler__P185611_mk(s) { +function scene_Scene_render__P187663_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_registerHandler__P185611, depth: s.depth + 1, + parent: s, fn: scene_Scene_render__P187663, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, - tmp_5: undefined, - h___193115: undefined, - unnamed8902___U1: undefined, - unnamed8903___U2: undefined, - hn___193138: undefined, + s___196673: undefined, + unnamed8924___U1: undefined, + unnamed8925___U2: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, } } -function control_EventHandler_constructor__P189243(s) { +function inline__P196650(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9746,88 +10298,101 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, control_EventHandler__C189240_VT)) failedCast(r0); - r0 = (s.arg0).fields["src"] = (s.arg1); - r0 = (s.arg0).fields["value"] = (s.arg2); - r0 = (s.arg0).fields["handler"] = (s.arg3); - r0 = (s.arg0).fields["flags"] = (s.arg4); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -control_EventHandler_constructor__P189243.info = {"start":786,"length":165,"line":23,"column":8,"endLine":28,"endColumn":13,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":["this","src","value","handler","flags"]} - -function control_EventHandler_constructor__P189243_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: control_EventHandler_constructor__P189243, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, -} } - - - - - -function control_EventHandler_register__P189241(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (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_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 = 1042; s.pc = 3; return s.tmp_2; } } - r0 = s.arg0; - if (!checkSubtype(r0, control_EventHandler__C189240_VT)) failedCast(r0); - r0 = pxsim_pxtcore_mkAction(1, inline__P193159); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - r0 = s.arg0.fields["src"]; + case 3: + r0 = s.retval; s.tmp_1 = r0; - r0 = s.arg0.fields["value"]; - s.tmp_2 = r0; - r0 = s.arg0.fields["flags"]; + 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 = 1043; s.pc = 4; return s.tmp_4; } + } + case 4: + r0 = s.retval; s.tmp_3 = r0; - r0 = pxsim.control.internalOnEvent(s.tmp_1, s.tmp_2, s.tmp_0, s.tmp_3); - r0 = undefined; + 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 = 1044; 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 = 1045; 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() } } } -control_EventHandler_register__P189241.info = {"start":961,"length":165,"line":30,"column":8,"endLine":34,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"register","argumentNames":["this"]} +inline__P196650.info = {"start":8422,"length":52,"line":235,"column":37,"endLine":235,"endColumn":89,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":["a","b"]} -function control_EventHandler_register__P189241_mk(s) { +function inline__P196650_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventHandler_register__P189241, depth: s.depth + 1, + parent: s, fn: inline__P196650, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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 inline__P193159(s) { +function scene_Background_draw__P187491(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9837,45 +10402,62 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = s.caps[0].fields["handler"]; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, scene_Background__C187482_VT)) failedCast(r0); + r0 = s.arg0.fields["color"]; + s.tmp_0 = r0; + r0 = pxsim_ImageMethods.fill(globals.screen___187019, s.tmp_0); + r0 = s.arg0.fields["_image"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - s.tmp_1 = if_handler_1_mk(s); - s.tmp_1.arg0 = s.caps[0]; - if (!s.tmp_1.arg0.vtable.iface) { - setupLambda(s.tmp_1, pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "handler"), 1); - s.callLocIdx = 49; s.pc = 3; return s.tmp_1; - } else { - s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["handler"]; - if (s.tmp_1.fn == null) { setupLambda(s.tmp_1, s.tmp_1.arg0.fields["handler"], 1); s.callLocIdx = 49; s.pc = 3; return s.tmp_1; } - else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 49; s.pc = 3; return s.tmp_1;; } - else { s.callLocIdx = 49; s.pc = 3; return s.tmp_1; } - } - case 3: - r0 = s.retval; + r0 = s.arg0.fields["_image"]; + s.tmp_1 = r0; + r0 = pxsim_ImageMethods.drawTransparentImage(globals.screen___187019, s.tmp_1, 0, 0); case 1: case 2: + r0 = s.arg0.fields["_layers"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = pxsim_pxtcore_mkAction(1, inline__P196705); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.arg0); + s.tmp_2 = helpers_arrayForEach__P185324_mk(s); + r0 = s.arg0.fields["_layers"]; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = s.tmp_1; + s.callLocIdx = 868; s.pc = 5; return s.tmp_2; + case 5: + r0 = s.retval; + case 3: + case 4: r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P193159.info = {"start":1032,"length":71,"line":31,"column":58,"endLine":33,"endColumn":13,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":[]} +scene_Background_draw__P187491.info = {"start":1166,"length":545,"line":48,"column":8,"endLine":60,"endColumn":9,"fileName":"pxt_modules/game/background.ts","functionName":"draw","argumentNames":["this"]} -function inline__P193159_mk(s) { +function scene_Background_draw__P187491_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P193159, depth: s.depth + 1, + parent: s, fn: scene_Background_draw__P187491, 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 Math_clamp__P185339(s) { +function inline__P196705(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9885,46 +10467,66 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.ox___196707 = undefined; + s.oy___196718 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - s.tmp_0 = Math_min__P185343_mk(s); - s.tmp_0.arg0 = s.arg1; - s.tmp_1 = Math_max__P185342_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_1.arg1 = s.arg2; - s.callLocIdx = 16; s.pc = 2; return s.tmp_1; - case 2: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 17; s.pc = 1; return s.tmp_0; + 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___196707 = (r0); + r0 = s.caps[0].fields["camera"]; + r0 = r0.fields["drawOffsetY"]; + s.tmp_1 = r0; + r0 = s.arg0.fields["distance"]; + s.tmp_3 = r0; + r0 = (1 + s.tmp_3); + s.tmp_2 = r0; + r0 = (s.tmp_1 / s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim.Math_.round(s.tmp_0); + s.oy___196718 = (r0); + s.tmp_0 = scene_BackgroundLayer_draw__P187500_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.ox___196707; + s.tmp_0.arg2 = s.oy___196718; + s.callLocIdx = 867; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -Math_clamp__P185339.info = {"start":14654,"length":130,"line":501,"column":4,"endLine":503,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"clamp","argumentNames":["min","max","value"]} +inline__P196705.info = {"start":1373,"length":312,"line":53,"column":37,"endLine":58,"endColumn":17,"fileName":"pxt_modules/game/background.ts","functionName":"inline","argumentNames":["layer"]} -function Math_clamp__P185339_mk(s) { +function inline__P196705_mk(s) { checkStack(s.depth); return { - parent: s, fn: Math_clamp__P185339, depth: s.depth + 1, + parent: s, fn: inline__P196705, depth: s.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___196707: undefined, + oy___196718: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function Math_min__P185343(s) { +function scene_BackgroundLayer_draw__P187500(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9934,41 +10536,251 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.w___196736 = undefined; + s.h___196739 = undefined; + s.pw___196742 = undefined; + s.ph___196746 = undefined; + s.rx___196755 = undefined; + s.ry___196758 = undefined; + s.y___196827 = undefined; + s.py___196828 = undefined; + s.dh___196837 = undefined; + s.x___196845 = undefined; + s.rxl___196846 = undefined; + s.px___196852 = undefined; + s.dw___196856 = 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 <= s.arg1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } r0 = s.arg0; - { step = 3; continue; } - case 1: - case 2: - r0 = s.arg1; - case 3: - return leave(s, r0) - default: oops() -} } } -Math_min__P185343.info = {"start":15790,"length":105,"line":538,"column":4,"endLine":541,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"min","argumentNames":["a","b"]} - -function Math_min__P185343_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Math_min__P185343, depth: s.depth + 1, + if (!checkSubtype(r0, scene_BackgroundLayer__C187492_VT)) failedCast(r0); + r0 = pxsim_ImageMethods.width(globals.screen___187019); + s.w___196736 = (r0); + r0 = pxsim_ImageMethods.height(globals.screen___187019); + s.h___196739 = (r0); + r0 = s.arg0.fields["img"]; + s.tmp_0 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_0); + s.pw___196742 = (r0); + r0 = s.arg0.fields["img"]; + s.tmp_0 = r0; + r0 = pxsim_ImageMethods.height(s.tmp_0); + s.ph___196746 = (r0); + r0 = pxsim_numops_toBoolDecr(s.pw___196742); + 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___196746); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); + case 2: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 3; continue; } + { step = 23; continue; } + case 3: + case 4: + r0 = (0 - s.arg1); + s.rx___196755 = (r0); + r0 = (0 - s.arg2); + s.ry___196758 = (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___196755; + r0 = (s.w___196736 + s.pw___196742); + s.tmp_2 = r0; + r0 = (s.tmp_1 - s.tmp_2); + s.rx___196755 = (r0); + { step = 7; continue; } + case 6: + s.tmp_0 = r0 = s.rx___196755; + r0 = (s.w___196736 + s.pw___196742); + s.tmp_2 = r0; + r0 = (s.tmp_2 >> 1); + s.tmp_1 = r0; + r0 = (s.tmp_0 - s.tmp_1); + s.rx___196755 = (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___196758; + r0 = (s.h___196739 + s.ph___196746); + s.tmp_2 = r0; + r0 = (s.tmp_1 - s.tmp_2); + s.ry___196758 = (r0); + { step = 10; continue; } + case 9: + s.tmp_0 = r0 = s.ry___196758; + r0 = (s.h___196739 + s.ph___196746); + s.tmp_2 = r0; + r0 = (s.tmp_2 >> 1); + s.tmp_1 = r0; + r0 = (s.tmp_0 - s.tmp_1); + s.ry___196758 = (r0); + case 10: + r0 = (s.rx___196755 % s.w___196736); + s.rx___196755 = (r0); + r0 = (s.rx___196755 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 11; continue; } + r0 = (s.rx___196755 + s.w___196736); + s.rx___196755 = (r0); + case 11: + case 12: + r0 = (s.ry___196758 % s.h___196739); + s.ry___196758 = (r0); + r0 = (s.ry___196758 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 13; continue; } + r0 = (s.ry___196758 + s.h___196739); + s.ry___196758 = (r0); + case 13: + case 14: + r0 = pxsim.Math_.floor(s.rx___196755); + s.rx___196755 = (r0); + r0 = pxsim.Math_.floor(s.ry___196758); + s.ry___196758 = (r0); + s.y___196827 = (0); + s.py___196828 = (0); + case 15: + r0 = (s.y___196827 < s.h___196739); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 22; continue; } + r0 = (s.y___196827 % s.ph___196746); + s.py___196828 = (r0); + s.tmp_0 = Math_min__P185343_mk(s); + r0 = (s.ph___196746 - s.py___196828); + s.tmp_0.arg0 = r0; + r0 = (s.h___196739 - s.ry___196758); + s.tmp_0.arg1 = r0; + s.callLocIdx = 870; s.pc = 24; return s.tmp_0; + case 24: + r0 = s.retval; + s.dh___196837 = (r0); + s.x___196845 = (0); + s.rxl___196846 = (s.rx___196755); + case 16: + r0 = (s.x___196845 < s.w___196736); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 19; continue; } + r0 = (s.x___196845 % s.pw___196742); + s.px___196852 = (r0); + s.tmp_0 = Math_min__P185343_mk(s); + r0 = (s.pw___196742 - s.px___196852); + s.tmp_0.arg0 = r0; + r0 = (s.w___196736 - s.rxl___196846); + s.tmp_0.arg1 = r0; + s.callLocIdx = 871; s.pc = 25; return s.tmp_0; + case 25: + r0 = s.retval; + s.dw___196856 = (r0); + r0 = s.arg0.fields["img"]; + s.tmp_0 = r0; + r0 = pxsim_ImageMethods.drawImage(globals.screen___187019, s.tmp_0, s.rxl___196846, s.ry___196758); + r0 = (s.rxl___196846 + s.dw___196856); + s.tmp_0 = r0; + r0 = (s.tmp_0 % s.w___196736); + s.rxl___196846 = (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___196856; + { step = 18; continue; } + case 17: + r0 = s.w___196736; + case 18: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = (s.x___196845 + s.tmp_1); + s.x___196845 = (r0); + { step = 16; continue; } + case 19: + r0 = (s.ry___196758 + s.dh___196837); + s.tmp_0 = r0; + r0 = (s.tmp_0 % s.h___196739); + s.ry___196758 = (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___196837; + { step = 21; continue; } + case 20: + r0 = s.h___196739; + case 21: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = (s.y___196827 + s.tmp_1); + s.y___196827 = (r0); + { step = 15; continue; } + case 22: + case 23: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +scene_BackgroundLayer_draw__P187500.info = {"start":3063,"length":1537,"line":99,"column":8,"endLine":144,"endColumn":9,"fileName":"pxt_modules/game/background.ts","functionName":"draw","argumentNames":["this","offsetX","offsetY"]} + +function scene_BackgroundLayer_draw__P187500_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: scene_BackgroundLayer_draw__P187500, depth: s.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___196736: undefined, + h___196739: undefined, + pw___196742: undefined, + ph___196746: undefined, + rx___196755: undefined, + ry___196758: undefined, + y___196827: undefined, + py___196828: undefined, + dh___196837: undefined, + x___196845: undefined, + rxl___196846: undefined, + px___196852: undefined, + dw___196856: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function helpers_arrayFind__P185326(s) { +function scene_Camera_update__P187593(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9978,69 +10790,190 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.len___192745 = undefined; - s.i___192748 = undefined; - s.v___192753 = undefined; + s.elapsed___196937 = undefined; + s.percentComplete___196951 = undefined; + s.damp___196958 = undefined; + s.f___196967 = undefined; + s.x___196973 = undefined; + s.y___196980 = 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___192745 = (r0); - s.i___192748 = (0); - case 1: - r0 = (s.i___192748 < s.len___192745); + r0 = s.arg0; + if (!checkSubtype(r0, scene_Camera__C187577_VT)) failedCast(r0); + r0 = s.arg0.fields["sprite"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - r0 = pxsim_Array__getAt(s.arg0, s.i___192748); - s.v___192753 = (r0); - s.tmp_1 = lambda_3_mk(s); - s.tmp_1.argL = s.arg1; - s.tmp_1.arg0 = s.v___192753; - s.tmp_1.arg1 = s.i___192748; - setupLambda(s.tmp_1, s.tmp_1.argL); - s.callLocIdx = 8; s.pc = 6; return s.tmp_1; - case 6: + if (!r0) { step = 1; continue; } + s.tmp_1 = scene_Camera_offsetX__P187583_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_3 = Sprite_x__P187242_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_3.arg0 = r0; + s.callLocIdx = 1001; s.pc = 10; return s.tmp_3; + case 10: + r0 = s.retval; + s.tmp_2 = r0; + r0 = pxsim_ImageMethods.width(globals.screen___187019); + s.tmp_5 = r0; + r0 = (s.tmp_5 >> 1); + s.tmp_4 = r0; + r0 = (s.tmp_2 - s.tmp_4); + s.tmp_1.arg1 = r0; + s.callLocIdx = 1002; s.pc = 9; return s.tmp_1; + case 9: + r0 = s.retval; + s.tmp_0 = scene_Camera_offsetY__P187585_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_2 = Sprite_y__P187244_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 1003; s.pc = 12; return s.tmp_2; + case 12: + r0 = s.retval; + s.tmp_1 = r0; + r0 = pxsim_ImageMethods.height(globals.screen___187019); + 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 = 1004; s.pc = 11; return s.tmp_0; + case 11: + r0 = s.retval; + case 1: + case 2: + s.tmp_0 = scene_Camera_offsetX__P187583_mk(s); + s.tmp_1 = r0 = s.arg0; + s.tmp_0.arg0 = r0; + r0 = s.tmp_1.fields["_offsetX"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); + s.tmp_0.arg1 = r0; + s.callLocIdx = 1006; s.pc = 13; return s.tmp_0; + case 13: + r0 = s.retval; + s.tmp_0 = scene_Camera_offsetY__P187585_mk(s); + s.tmp_1 = r0 = s.arg0; + s.tmp_0.arg0 = r0; + r0 = s.tmp_1.fields["_offsetY"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); + s.tmp_0.arg1 = r0; + s.callLocIdx = 1008; s.pc = 14; return s.tmp_0; + case 14: r0 = s.retval; + 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 = 2; continue; } - r0 = s.v___192753; - { step = 5; continue; } - case 2: + 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___196937 = (r0); + r0 = s.arg0.fields["shakeDuration"]; + s.tmp_1 = r0; + r0 = (s.elapsed___196937 >= 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.i___192748 + 1); - s.i___192748 = (r0); - { step = 1; continue; } + r0 = s.arg0.fields["shakeDuration"]; + s.tmp_0 = r0; + r0 = (s.elapsed___196937 / s.tmp_0); + s.percentComplete___196951 = (r0); + s.damp___196958 = (1); + r0 = (s.percentComplete___196951 >= 0.75); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + s.tmp_1 = Math_max__P185342_mk(s); + s.tmp_1.arg0 = 0; + r0 = (1 - s.percentComplete___196951); + s.tmp_1.arg1 = r0; + s.callLocIdx = 1011; s.pc = 15; return s.tmp_1; + case 15: + r0 = s.retval; + s.damp___196958 = (r0); case 4: - r0 = undefined; case 5: + r0 = s.arg0.fields["shakeAmplitude"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 * s.damp___196958); + s.f___196967 = (r0); + r0 = pxsim.Math_.random(); + s.tmp_1 = r0; + r0 = (s.tmp_1 * s.f___196967); + s.tmp_0 = r0; + r0 = (s.tmp_0 >> 0); + s.x___196973 = (r0); + r0 = pxsim.Math_.random(); + s.tmp_1 = r0; + r0 = (s.tmp_1 * s.f___196967); + s.tmp_0 = r0; + r0 = (s.tmp_0 >> 0); + s.y___196980 = (r0); + s.tmp_0 = r0 = s.arg0; + r0 = s.tmp_0.fields["drawOffsetX"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + s.x___196973); + 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___196980); + 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() } } } -helpers_arrayFind__P185326.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"]} +scene_Camera_update__P187593.info = {"start":2297,"length":1397,"line":77,"column":8,"endLine":112,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"update","argumentNames":["this"]} -function helpers_arrayFind__P185326_mk(s) { +function scene_Camera_update__P187593_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arrayFind__P185326, depth: s.depth + 1, + parent: s, fn: scene_Camera_update__P187593, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - len___192745: undefined, - i___192748: undefined, - v___192753: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + elapsed___196937: undefined, + percentComplete___196951: undefined, + damp___196958: undefined, + f___196967: undefined, + x___196973: undefined, + y___196980: undefined, arg0: undefined, - arg1: undefined, } } -function helpers_arrayFilter__P185325(s) { +function scene_Camera_offsetY__P187585(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10050,62 +10983,78 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.res___192766 = undefined; - s.len___192768 = undefined; - s.i___192771 = undefined; - s.v___192776 = undefined; + s.scene___196999 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_Array__mk(); - s.res___192766 = (r0); - r0 = pxsim_Array__length(s.arg0); - s.len___192768 = (r0); - s.i___192771 = (0); - case 1: - r0 = (s.i___192771 < s.len___192768); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - r0 = pxsim_Array__getAt(s.arg0, s.i___192771); - s.v___192776 = (r0); - s.tmp_1 = lambda_3_mk(s); - s.tmp_1.argL = s.arg1; - s.tmp_1.arg0 = s.v___192776; - s.tmp_1.arg1 = s.i___192771; - setupLambda(s.tmp_1, s.tmp_1.argL); - s.callLocIdx = 7; s.pc = 5; return s.tmp_1; + r0 = s.arg0; + if (!checkSubtype(r0, scene_Camera__C187577_VT)) failedCast(r0); + s.tmp_0 = game_currentScene__P187749_mk(s); + s.callLocIdx = 998; s.pc = 5; return s.tmp_0; case 5: r0 = s.retval; + s.scene___196999 = (r0); + r0 = s.scene___196999.fields["tileMap"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - r0 = pxsim_Array__push(s.res___192766, s.v___192776); + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + r0 = s.scene___196999.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_9 = tiles_TileMap_offsetY__P187539_mk(s); + r0 = s.scene___196999.fields["tileMap"]; + s.tmp_9.arg0 = r0; + s.tmp_9.arg1 = s.arg1; + s.callLocIdx = 1000; s.pc = 6; return s.tmp_9; + case 6: + r0 = s.retval; + s.tmp_8 = r0; + r0 = (s.tmp_7).fields["_offsetY"] = (s.tmp_8); + { step = 4; continue; } case 3: - r0 = (s.i___192771 + 1); - s.i___192771 = (r0); - { step = 1; continue; } + r0 = (s.arg0).fields["_offsetY"] = (s.arg1); case 4: - r0 = s.res___192766; + r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_arrayFilter__P185325.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"]} +scene_Camera_offsetY__P187585.info = {"start":1034,"length":267,"line":37,"column":8,"endLine":44,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"offsetY","argumentNames":["this","v"]} -function helpers_arrayFilter__P185325_mk(s) { +function scene_Camera_offsetY__P187585_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arrayFilter__P185325, depth: s.depth + 1, + parent: s, fn: scene_Camera_offsetY__P187585, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - res___192766: undefined, - len___192768: undefined, - i___192771: undefined, - v___192776: 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, + scene___196999: undefined, arg0: undefined, arg1: undefined, } } @@ -10114,7 +11063,7 @@ function helpers_arrayFilter__P185325_mk(s) { -function helpers_arrayForEach__P185324(s) { +function tiles_TileMap_enabled__P187544(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10124,58 +11073,44 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.len___192814 = undefined; - s.i___192817 = 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___192814 = (r0); - s.i___192817 = (0); - case 1: - r0 = (s.i___192817 < s.len___192814); - 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___192817); - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.i___192817; - 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___192817 + 1); - s.i___192817 = (r0); - { step = 1; continue; } - case 2: - r0 = undefined; - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMap__C187534_VT)) failedCast(r0); + r0 = s.arg0.fields["_map"]; + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_Boolean__bang(s.tmp_0); + return leaveAccessor(s, r0) default: oops() } } } -helpers_arrayForEach__P185324.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"]} +tiles_TileMap_enabled__P187544.info = {"start":7107,"length":66,"line":261,"column":8,"endLine":263,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"enabled","argumentNames":["this"]} +tiles_TileMap_enabled__P187544.isGetter = true; -function helpers_arrayForEach__P185324_mk(s) { +function tiles_TileMap_enabled__P187544_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arrayForEach__P185324, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_enabled__P187544, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - len___192814: undefined, - i___192817: undefined, + tmp_2: undefined, + tmp_3: undefined, arg0: undefined, - arg1: undefined, } } -function Sprite_kind__P187287(s) { +function tiles_TileMap_offsetY__P187539(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10187,29 +11122,57 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); - r0 = s.arg0.fields["_kind"]; + if (!checkSubtype(r0, tiles_TileMap__C187534_VT)) failedCast(r0); + s.tmp_0 = Math_clamp__P185339_mk(s); + s.tmp_0.arg0 = 0; + s.tmp_1 = Math_max__P185342_mk(s); + s.tmp_3 = tiles_TileMap_areaHeight__P187541_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 893; s.pc = 3; return s.tmp_3; + case 3: + r0 = s.retval; + s.tmp_2 = r0; + r0 = pxsim_ImageMethods.height(globals.screen___187019); + s.tmp_4 = r0; + r0 = (s.tmp_2 - s.tmp_4); + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 0; + s.callLocIdx = 894; 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 = 895; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; return leave(s, r0) default: oops() } } } -Sprite_kind__P187287.info = {"start":10604,"length":41,"line":387,"column":4,"endLine":389,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"kind","argumentNames":["this"]} +tiles_TileMap_offsetY__P187539.info = {"start":6560,"length":123,"line":239,"column":8,"endLine":241,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"offsetY","argumentNames":["this","value"]} -function Sprite_kind__P187287_mk(s) { +function tiles_TileMap_offsetY__P187539_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_kind__P187287, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_offsetY__P187539, depth: s.depth + 1, pc: 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 spriteutils_distanceBetween__P188849(s) { +function tiles_TileMap_areaHeight__P187541(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10221,102 +11184,51 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(s.arg0); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMap__C187534_VT)) failedCast(r0); + r0 = s.arg0.fields["_map"]; 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 = 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 = pxsim_numops_toBoolDecr(s.arg1); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); + r0 = 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 = 0; - { step = 5; continue; } - case 3: - case 4: - s.tmp_8 = Sprite_x__P187242_mk(s); - s.tmp_8.arg0 = s.arg0; - s.callLocIdx = 1770; s.pc = 6; return s.tmp_8; - case 6: - r0 = s.retval; - s.tmp_7 = r0; - s.tmp_10 = Sprite_x__P187242_mk(s); - s.tmp_10.arg0 = s.arg1; - s.callLocIdx = 1771; s.pc = 7; return s.tmp_10; - case 7: - r0 = s.retval; - s.tmp_9 = r0; - r0 = (s.tmp_7 - s.tmp_9); - s.tmp_6 = r0; - r0 = pxsim.Math_.pow(s.tmp_6, 2); - s.tmp_5 = r0; - s.tmp_14 = Sprite_y__P187244_mk(s); - s.tmp_14.arg0 = s.arg0; - s.callLocIdx = 1772; s.pc = 8; return s.tmp_14; - case 8: - r0 = s.retval; - s.tmp_13 = r0; - s.tmp_16 = Sprite_y__P187244_mk(s); - s.tmp_16.arg0 = s.arg1; - s.callLocIdx = 1773; s.pc = 9; return s.tmp_16; - case 9: - r0 = s.retval; - s.tmp_15 = r0; - r0 = (s.tmp_13 - s.tmp_15); - s.tmp_12 = r0; - r0 = pxsim.Math_.pow(s.tmp_12, 2); - s.tmp_11 = r0; - r0 = (s.tmp_5 + s.tmp_11); s.tmp_4 = r0; - r0 = pxsim.Math_.sqrt(s.tmp_4); - case 5: + r0 = s.tmp_4; return leave(s, r0) default: oops() } } } -spriteutils_distanceBetween__P188849.info = {"start":1088,"length":168,"line":36,"column":4,"endLine":39,"endColumn":5,"fileName":"pxt_modules/arcade-sprite-util/spriteutils.ts","functionName":"distanceBetween","argumentNames":["a","b"]} +tiles_TileMap_areaHeight__P187541.info = {"start":6794,"length":93,"line":247,"column":8,"endLine":249,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"areaHeight","argumentNames":["this"]} -function spriteutils_distanceBetween__P188849_mk(s) { +function tiles_TileMap_areaHeight__P187541_mk(s) { checkStack(s.depth); return { - parent: s, fn: spriteutils_distanceBetween__P188849, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_areaHeight__P187541, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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, arg0: undefined, - arg1: undefined, } } -function update_minimap__P348235(s) { +function tiles_TileMap_scale__P187536(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10326,148 +11238,32 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sprite___348681 = undefined; - s.unnamed16552___U1 = undefined; - s.unnamed16553___U2 = undefined; - s.sprite___348690 = undefined; - s.unnamed16554___U4 = undefined; - s.unnamed16555___U5 = undefined; - s.sprite___348699 = undefined; - s.unnamed16556___U7 = undefined; - s.unnamed16557___U8 = undefined; - s.tmp_0 = minimap_minimap__P188832_mk(s); - s.tmp_0.arg0 = 3; - s.tmp_0.arg1 = 2; - s.tmp_0.arg2 = 11; - s.callLocIdx = 165; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - globals.map___348298 = (r0); - s.sprite___348681 = (undefined); - s.tmp_0 = sprites_allOfKind__P187192_mk(s); - s.tmp_0.arg0 = globals.NPC___348070; - s.callLocIdx = 166; s.pc = 8; return s.tmp_0; - case 8: - r0 = s.retval; - s.unnamed16552___U1 = (r0); - s.unnamed16553___U2 = (0); - case 1: - s.tmp_0 = r0 = s.unnamed16553___U2; - r0 = pxsim_Array__length(s.unnamed16552___U1); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 2; continue; } - r0 = pxsim_Array__getAt(s.unnamed16552___U1, s.unnamed16553___U2); - s.sprite___348681 = (r0); - s.tmp_2 = minimap_includeSprite__P188834_mk(s); - s.tmp_2.arg0 = globals.map___348298; - s.tmp_2.arg1 = s.sprite___348681; - s.tmp_2.arg2 = 0; - s.callLocIdx = 167; s.pc = 9; return s.tmp_2; - case 9: - r0 = s.retval; - r0 = (s.unnamed16553___U2 + 1); - s.unnamed16553___U2 = (r0); - { step = 1; continue; } - case 2: - s.unnamed16552___U1 = (undefined); - s.sprite___348690 = (undefined); - s.tmp_0 = sprites_allOfKind__P187192_mk(s); - s.tmp_0.arg0 = globals.SurvivedNPC___348079; - s.callLocIdx = 168; s.pc = 10; return s.tmp_0; - case 10: - r0 = s.retval; - s.unnamed16554___U4 = (r0); - s.unnamed16555___U5 = (0); - case 3: - s.tmp_0 = r0 = s.unnamed16555___U5; - r0 = pxsim_Array__length(s.unnamed16554___U4); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 4; continue; } - r0 = pxsim_Array__getAt(s.unnamed16554___U4, s.unnamed16555___U5); - s.sprite___348690 = (r0); - s.tmp_2 = minimap_includeSprite__P188834_mk(s); - s.tmp_2.arg0 = globals.map___348298; - s.tmp_2.arg1 = s.sprite___348690; - s.tmp_2.arg2 = 0; - s.callLocIdx = 169; s.pc = 11; return s.tmp_2; - case 11: - r0 = s.retval; - r0 = (s.unnamed16555___U5 + 1); - s.unnamed16555___U5 = (r0); - { step = 3; continue; } - case 4: - s.unnamed16554___U4 = (undefined); - s.sprite___348699 = (undefined); - s.tmp_0 = sprites_allOfKind__P187192_mk(s); - s.tmp_0.arg0 = globals.Enemy___187348; - s.callLocIdx = 170; s.pc = 12; return s.tmp_0; - case 12: - r0 = s.retval; - s.unnamed16556___U7 = (r0); - s.unnamed16557___U8 = (0); - case 5: - s.tmp_0 = r0 = s.unnamed16557___U8; - r0 = pxsim_Array__length(s.unnamed16556___U7); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 6; continue; } - r0 = pxsim_Array__getAt(s.unnamed16556___U7, s.unnamed16557___U8); - s.sprite___348699 = (r0); - s.tmp_2 = minimap_includeSprite__P188834_mk(s); - s.tmp_2.arg0 = globals.map___348298; - s.tmp_2.arg1 = s.sprite___348699; - s.tmp_2.arg2 = 0; - s.callLocIdx = 171; s.pc = 13; return s.tmp_2; - case 13: - r0 = s.retval; - r0 = (s.unnamed16557___U8 + 1); - s.unnamed16557___U8 = (r0); - { step = 5; continue; } - case 6: - s.unnamed16556___U7 = (undefined); - s.tmp_0 = minimap_includeSprite__P188834_mk(s); - s.tmp_0.arg0 = globals.map___348298; - s.tmp_0.arg1 = globals.sprite_player_fish___348300; - s.tmp_0.arg2 = 0; - s.callLocIdx = 172; s.pc = 14; return s.tmp_0; - case 14: - r0 = s.retval; - s.tmp_0 = minimap_getImage__P188833_mk(s); - s.tmp_0.arg0 = globals.map___348298; - s.callLocIdx = 173; s.pc = 15; return s.tmp_0; - case 15: - r0 = s.retval; - return leave(s, r0) + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMap__C187534_VT)) failedCast(r0); + r0 = s.arg0.fields["_scale"]; + return leaveAccessor(s, r0) default: oops() } } } -update_minimap__P348235.info = {"start":15810,"length":637,"line":287,"column":0,"endLine":300,"endColumn":1,"fileName":"main.ts","functionName":"update_minimap","argumentNames":[]} +tiles_TileMap_scale__P187536.info = {"start":6125,"length":55,"line":220,"column":8,"endLine":222,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"scale","argumentNames":["this"]} +tiles_TileMap_scale__P187536.isGetter = true; -function update_minimap__P348235_mk(s) { +function tiles_TileMap_scale__P187536_mk(s) { checkStack(s.depth); return { - parent: s, fn: update_minimap__P348235, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_scale__P187536, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - sprite___348681: undefined, - unnamed16552___U1: undefined, - unnamed16553___U2: undefined, - sprite___348690: undefined, - unnamed16554___U4: undefined, - unnamed16555___U5: undefined, - sprite___348699: undefined, - unnamed16556___U7: undefined, - unnamed16557___U8: undefined, + arg0: undefined, } } -function minimap_getImage__P188833(s) { +function tiles_TileMapData_height__P187524(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10481,29 +11277,55 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = if_image_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, "image"); - } else { - s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["image"]; - if (s.tmp_0.fn == null) { s.retval = s.tmp_0.arg0.fields["image"]; } - else if (!s.tmp_0.fn.isGetter) { s.retval = bind(s.tmp_0); } - else { s.callLocIdx = 1751; s.pc = 1; return s.tmp_0; } + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMapData__C187521_VT)) failedCast(r0); + r0 = s.arg0.fields["_height"]; + return leaveAccessor(s, r0) + default: oops() +} } } +tiles_TileMapData_height__P187524.info = {"start":3734,"length":65,"line":139,"column":8,"endLine":141,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"height","argumentNames":["this"]} +tiles_TileMapData_height__P187524.isGetter = true; + +function tiles_TileMapData_height__P187524_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: tiles_TileMapData_height__P187524, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function scene_Camera_offsetY__P187584(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (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 1: - r0 = s.retval; - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, scene_Camera__C187577_VT)) failedCast(r0); + r0 = s.arg0.fields["_offsetY"]; + return leaveAccessor(s, r0) default: oops() } } } -minimap_getImage__P188833.info = {"start":2905,"length":86,"line":92,"column":4,"endLine":94,"endColumn":5,"fileName":"pxt_modules/arcade-minimap/minimap.ts","functionName":"getImage","argumentNames":["minimap"]} +scene_Camera_offsetY__P187584.info = {"start":966,"length":59,"line":34,"column":8,"endLine":36,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"offsetY","argumentNames":["this"]} +scene_Camera_offsetY__P187584.isGetter = true; -function minimap_getImage__P188833_mk(s) { +function scene_Camera_offsetY__P187584_mk(s) { checkStack(s.depth); return { - parent: s, fn: minimap_getImage__P188833, depth: s.depth + 1, + parent: s, fn: scene_Camera_offsetY__P187584, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, } } @@ -10511,7 +11333,7 @@ function minimap_getImage__P188833_mk(s) { -function minimap_includeSprite__P188834(s) { +function scene_Camera_offsetX__P187583(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10521,160 +11343,66 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scale___200466 = undefined; - s.x___200473 = undefined; - s.y___200490 = undefined; + s.scene___197055 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - s.tmp_0 = Math_max__P185342_mk(s); - s.tmp_2 = if_scale_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, "scale"); - } else { - s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["scale"]; - if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["scale"]; } - else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } - else { s.callLocIdx = 1752; s.pc = 2; return s.tmp_2; } - } - case 2: + r0 = s.arg0; + if (!checkSubtype(r0, scene_Camera__C187577_VT)) failedCast(r0); + s.tmp_0 = game_currentScene__P187749_mk(s); + s.callLocIdx = 995; s.pc = 5; return s.tmp_0; + case 5: r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_1 - s.arg2); - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 1753; s.pc = 1; return s.tmp_0; + s.scene___197055 = (r0); + r0 = s.scene___197055.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.retval; - s.scale___200466 = (r0); - s.tmp_3 = Sprite_x__P187242_mk(s); - s.tmp_3.arg0 = s.arg1; - s.callLocIdx = 1754; s.pc = 3; return s.tmp_3; - case 3: - r0 = s.retval; - s.tmp_2 = r0; - s.tmp_5 = if_scale_1_mk(s); - s.tmp_5.arg0 = s.arg0; - if (!s.tmp_5.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "scale"); - } else { - s.tmp_5.fn = s.tmp_5.arg0.vtable.iface["scale"]; - if (s.tmp_5.fn == null) { s.retval = s.tmp_5.arg0.fields["scale"]; } - else if (!s.tmp_5.fn.isGetter) { s.retval = bind(s.tmp_5); } - else { s.callLocIdx = 1755; s.pc = 4; return s.tmp_5; } - } - case 4: - r0 = s.retval; - s.tmp_4 = r0; - r0 = (s.tmp_2 >> s.tmp_4); + r0 = s.scene___197055.fields["tileMap"]; s.tmp_1 = r0; - r0 = s.arg1.fields["_image"]; - s.tmp_9 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_9); - s.tmp_8 = r0; - r0 = (s.tmp_8 / 2); - s.tmp_7 = r0; - r0 = (s.tmp_7 >> s.scale___200466); + 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 = (s.tmp_1 - s.tmp_6); - s.tmp_0 = r0; - s.tmp_11 = if_borderWidth_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, "borderWidth"); - } else { - s.tmp_11.fn = s.tmp_11.arg0.vtable.iface["borderWidth"]; - if (s.tmp_11.fn == null) { s.retval = s.tmp_11.arg0.fields["borderWidth"]; } - else if (!s.tmp_11.fn.isGetter) { s.retval = bind(s.tmp_11); } - else { s.callLocIdx = 1757; s.pc = 5; return s.tmp_11; } - } - case 5: - r0 = s.retval; - s.tmp_10 = r0; - r0 = (s.tmp_0 + s.tmp_10); - s.x___200473 = (r0); - s.tmp_3 = Sprite_y__P187244_mk(s); - s.tmp_3.arg0 = s.arg1; - s.callLocIdx = 1758; s.pc = 6; return s.tmp_3; + r0 = pxsim_numops_toBoolDecr(s.tmp_6); + if (!r0) { step = 3; continue; } + s.tmp_7 = r0 = s.arg0; + s.tmp_9 = tiles_TileMap_offsetX__P187538_mk(s); + r0 = s.scene___197055.fields["tileMap"]; + s.tmp_9.arg0 = r0; + s.tmp_9.arg1 = s.arg1; + s.callLocIdx = 997; s.pc = 6; return s.tmp_9; case 6: r0 = s.retval; - s.tmp_2 = r0; - s.tmp_5 = if_scale_1_mk(s); - s.tmp_5.arg0 = s.arg0; - if (!s.tmp_5.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "scale"); - } else { - s.tmp_5.fn = s.tmp_5.arg0.vtable.iface["scale"]; - if (s.tmp_5.fn == null) { s.retval = s.tmp_5.arg0.fields["scale"]; } - else if (!s.tmp_5.fn.isGetter) { s.retval = bind(s.tmp_5); } - else { s.callLocIdx = 1759; s.pc = 7; return s.tmp_5; } - } - case 7: - r0 = s.retval; - s.tmp_4 = r0; - r0 = (s.tmp_2 >> s.tmp_4); - s.tmp_1 = r0; - r0 = s.arg1.fields["_image"]; - s.tmp_9 = r0; - r0 = pxsim_ImageMethods.height(s.tmp_9); s.tmp_8 = r0; - r0 = (s.tmp_8 / 2); - s.tmp_7 = r0; - r0 = (s.tmp_7 >> s.scale___200466); - s.tmp_6 = r0; - r0 = (s.tmp_1 - s.tmp_6); - s.tmp_0 = r0; - s.tmp_11 = if_borderWidth_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, "borderWidth"); - } else { - s.tmp_11.fn = s.tmp_11.arg0.vtable.iface["borderWidth"]; - if (s.tmp_11.fn == null) { s.retval = s.tmp_11.arg0.fields["borderWidth"]; } - else if (!s.tmp_11.fn.isGetter) { s.retval = bind(s.tmp_11); } - else { s.callLocIdx = 1761; s.pc = 8; return s.tmp_11; } - } - case 8: - r0 = s.retval; - s.tmp_10 = r0; - r0 = (s.tmp_0 + s.tmp_10); - s.y___200490 = (r0); - s.tmp_0 = minimap_renderScaledImage__P191289_mk(s); - r0 = s.arg1.fields["_image"]; - s.tmp_0.arg0 = r0; - s.tmp_1 = if_image_1_mk(s); - s.tmp_1.arg0 = s.arg0; - if (!s.tmp_1.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "image"); - } else { - s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["image"]; - if (s.tmp_1.fn == null) { s.retval = s.tmp_1.arg0.fields["image"]; } - else if (!s.tmp_1.fn.isGetter) { s.retval = bind(s.tmp_1); } - else { s.callLocIdx = 1763; s.pc = 10; return s.tmp_1; } - } - case 10: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = s.x___200473; - s.tmp_0.arg3 = s.y___200490; - s.tmp_0.arg4 = s.scale___200466; - s.callLocIdx = 1764; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; + r0 = (s.tmp_7).fields["_offsetX"] = (s.tmp_8); + { step = 4; continue; } + case 3: + r0 = (s.arg0).fields["_offsetX"] = (s.arg1); + case 4: r0 = undefined; return leave(s, r0) default: oops() } } } -minimap_includeSprite__P188834.info = {"start":3241,"length":451,"line":102,"column":4,"endLine":107,"endColumn":5,"fileName":"pxt_modules/arcade-minimap/minimap.ts","functionName":"includeSprite","argumentNames":["minimap","sprite","spriteScale"]} +scene_Camera_offsetX__P187583.info = {"start":690,"length":267,"line":26,"column":8,"endLine":33,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"offsetX","argumentNames":["this","v"]} -function minimap_includeSprite__P188834_mk(s) { +function scene_Camera_offsetX__P187583_mk(s) { checkStack(s.depth); return { - parent: s, fn: minimap_includeSprite__P188834, depth: s.depth + 1, + parent: s, fn: scene_Camera_offsetX__P187583, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -10686,21 +11414,16 @@ function minimap_includeSprite__P188834_mk(s) { tmp_7: undefined, tmp_8: undefined, tmp_9: undefined, - tmp_10: undefined, - tmp_11: undefined, - scale___200466: undefined, - x___200473: undefined, - y___200490: undefined, + scene___197055: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function minimap_renderScaledImage__P191289(s) { +function tiles_TileMap_offsetX__P187538(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10710,111 +11433,59 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tile___200520 = undefined; - s.i___200522 = undefined; - s.j___200528 = 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.tile___200520 = (s.arg0); - s.i___200522 = (0); - case 1: - s.tmp_1 = r0 = s.i___200522; - r0 = pxsim_ImageMethods.width(s.arg0); + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMap__C187534_VT)) failedCast(r0); + s.tmp_0 = Math_clamp__P185339_mk(s); + s.tmp_0.arg0 = 0; + s.tmp_1 = Math_max__P185342_mk(s); + s.tmp_3 = tiles_TileMap_areaWidth__P187540_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 890; s.pc = 3; return s.tmp_3; + case 3: + r0 = s.retval; s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 6; continue; } - s.j___200528 = (0); + r0 = pxsim_ImageMethods.width(globals.screen___187019); + s.tmp_4 = r0; + r0 = (s.tmp_2 - s.tmp_4); + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 0; + s.callLocIdx = 891; s.pc = 2; return s.tmp_1; case 2: - s.tmp_1 = r0 = s.j___200528; - r0 = pxsim_ImageMethods.height(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 = 5; continue; } - r0 = pxsim_ImageMethods.getPixel(s.arg0, s.i___200522, s.j___200528); - s.tmp_4 = r0; - r0 = (s.tmp_4 != 0); - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 3; continue; } - s.tmp_5 = r0 = s.arg1; - s.tmp_7 = r0 = s.arg2; - r0 = (s.i___200522 >> s.arg4); - s.tmp_8 = r0; - r0 = (s.tmp_7 + s.tmp_8); - s.tmp_6 = r0; - s.tmp_10 = r0 = s.arg3; - r0 = (s.j___200528 >> s.arg4); - s.tmp_11 = r0; - r0 = (s.tmp_10 + s.tmp_11); - s.tmp_9 = r0; - r0 = pxsim_ImageMethods.getPixel(s.arg0, s.i___200522, s.j___200528); - s.tmp_12 = r0; - r0 = pxsim_ImageMethods.setPixel(s.tmp_5, s.tmp_6, s.tmp_9, s.tmp_12); - case 3: - case 4: - s.tmp_0 = r0 = s.j___200528; - r0 = (1 << s.arg4); - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.j___200528 = (r0); - { step = 2; continue; } - case 5: - s.tmp_0 = r0 = s.i___200522; - r0 = (1 << s.arg4); - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.i___200522 = (r0); - { step = 1; continue; } - case 6: - r0 = undefined; + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = s.arg1; + s.callLocIdx = 892; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; return leave(s, r0) default: oops() } } } -minimap_renderScaledImage__P191289.info = {"start":544,"length":459,"line":26,"column":4,"endLine":35,"endColumn":5,"fileName":"pxt_modules/arcade-minimap/minimap.ts","functionName":"renderScaledImage","argumentNames":["source","destination","x","y","scale"]} +tiles_TileMap_offsetX__P187538.info = {"start":6429,"length":121,"line":235,"column":8,"endLine":237,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"offsetX","argumentNames":["this","value"]} -function minimap_renderScaledImage__P191289_mk(s) { +function tiles_TileMap_offsetX__P187538_mk(s) { checkStack(s.depth); return { - parent: s, fn: minimap_renderScaledImage__P191289, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_offsetX__P187538, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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, - tile___200520: undefined, - i___200522: undefined, - j___200528: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, } } -function Sprite_height__P187278(s) { +function tiles_TileMap_areaWidth__P187540(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10829,22 +11500,40 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); - r0 = s.arg0.fields["_image"]; + if (!checkSubtype(r0, tiles_TileMap__C187534_VT)) failedCast(r0); + r0 = s.arg0.fields["_map"]; s.tmp_0 = r0; - r0 = pxsim_ImageMethods.height(s.tmp_0); - return leaveAccessor(s, 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; + case 2: + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = s.tmp_4; + return leave(s, r0) default: oops() } } } -Sprite_height__P187278.info = {"start":8639,"length":54,"line":314,"column":4,"endLine":316,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"height","argumentNames":["this"]} -Sprite_height__P187278.isGetter = true; +tiles_TileMap_areaWidth__P187540.info = {"start":6693,"length":91,"line":243,"column":8,"endLine":245,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"areaWidth","argumentNames":["this"]} -function Sprite_height__P187278_mk(s) { +function tiles_TileMap_areaWidth__P187540_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_height__P187278, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_areaWidth__P187540, depth: s.depth + 1, pc: 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, } } @@ -10852,7 +11541,7 @@ function Sprite_height__P187278_mk(s) { -function Sprite_width__P187277(s) { +function tiles_TileMapData_width__P187523(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10867,22 +11556,19 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); - r0 = s.arg0.fields["_image"]; - s.tmp_0 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_0); + if (!checkSubtype(r0, tiles_TileMapData__C187521_VT)) failedCast(r0); + r0 = s.arg0.fields["_width"]; return leaveAccessor(s, r0) default: oops() } } } -Sprite_width__P187277.info = {"start":8494,"length":52,"line":309,"column":4,"endLine":311,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"width","argumentNames":["this"]} -Sprite_width__P187277.isGetter = true; +tiles_TileMapData_width__P187523.info = {"start":3661,"length":63,"line":135,"column":8,"endLine":137,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"width","argumentNames":["this"]} +tiles_TileMapData_width__P187523.isGetter = true; -function Sprite_width__P187277_mk(s) { +function tiles_TileMapData_width__P187523_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_width__P187277, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_width__P187523, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, } } @@ -10890,7 +11576,7 @@ function Sprite_width__P187277_mk(s) { -function minimap_minimap__P188832(s) { +function scene_Camera_offsetX__P187582(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10900,199 +11586,32 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tilemap___200575 = undefined; - s.numRows___200586 = undefined; - s.numCols___200593 = undefined; - s.tileWidth___200600 = undefined; - s.minimap___200605 = undefined; - s.r___200632 = undefined; - s.c___200637 = undefined; - s.idx___200642 = undefined; - s.tile___200648 = undefined; - s.nx___200653 = undefined; - s.ny___200662 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - s.tmp_0 = game_currentScene__P187749_mk(s); - s.callLocIdx = 1742; s.pc = 10; return s.tmp_0; - case 10: - r0 = s.retval; - r0 = r0.fields["tileMap"]; - s.tilemap___200575 = (r0); - r0 = pxsim_numops_toBoolDecr(s.tilemap___200575); - 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_pxtrt.mkMap(); - s.tmp_2 = r0; - r0 = pxsim.image.create(1, 1); - s.tmp_3 = r0; - r0 = pxsim_pxtrt.mapSetByString(s.tmp_2, "image", s.tmp_3); - r0 = pxsim_pxtrt.mapSetByString(s.tmp_2, "scale", s.arg0); - r0 = pxsim_pxtrt.mapSetByString(s.tmp_2, "borderWidth", s.arg1); - r0 = pxsim_pxtrt.mapSetByString(s.tmp_2, "borderColor", s.arg2); - r0 = s.tmp_2; - { step = 9; continue; } - case 1: - case 2: - s.tmp_5 = tiles_TileMap_areaHeight__P187541_mk(s); - s.tmp_5.arg0 = s.tilemap___200575; - s.callLocIdx = 1743; s.pc = 11; return s.tmp_5; - case 11: - r0 = s.retval; - s.tmp_4 = r0; - r0 = s.tilemap___200575.fields["_scale"]; - s.tmp_6 = r0; - r0 = (s.tmp_4 >> s.tmp_6); - s.numRows___200586 = (r0); - s.tmp_1 = tiles_TileMap_areaWidth__P187540_mk(s); - s.tmp_1.arg0 = s.tilemap___200575; - s.callLocIdx = 1745; s.pc = 12; return s.tmp_1; - case 12: - r0 = s.retval; - s.tmp_0 = r0; - r0 = s.tilemap___200575.fields["_scale"]; - s.tmp_2 = r0; - r0 = (s.tmp_0 >> s.tmp_2); - s.numCols___200593 = (r0); - r0 = s.tilemap___200575.fields["_scale"]; - s.tmp_0 = r0; - r0 = (1 << s.tmp_0); - s.tileWidth___200600 = (r0); - r0 = (s.numCols___200593 * s.tileWidth___200600); - s.tmp_2 = r0; - r0 = (s.tmp_2 >> s.arg0); - s.tmp_1 = r0; - r0 = (s.arg1 * 2); - s.tmp_3 = r0; - r0 = (s.tmp_1 + s.tmp_3); - s.tmp_0 = r0; - r0 = (s.numRows___200586 * s.tileWidth___200600); - s.tmp_6 = r0; - r0 = (s.tmp_6 >> s.arg0); - s.tmp_5 = r0; - r0 = (s.arg1 * 2); - s.tmp_7 = r0; - r0 = (s.tmp_5 + s.tmp_7); - s.tmp_4 = r0; - r0 = pxsim.image.create(s.tmp_0, s.tmp_4); - s.minimap___200605 = (r0); - r0 = (s.arg1 > 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = pxsim_ImageMethods.fill(s.minimap___200605, s.arg2); - case 3: - case 4: - s.r___200632 = (0); - case 5: - r0 = (s.r___200632 < s.numRows___200586); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 8; continue; } - s.c___200637 = (0); - case 6: - r0 = (s.c___200637 < s.numCols___200593); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - s.tmp_1 = tiles_TileMap_getTileIndex__P187547_mk(s); - s.tmp_1.arg0 = s.tilemap___200575; - s.tmp_1.arg1 = s.c___200637; - s.tmp_1.arg2 = s.r___200632; - s.callLocIdx = 1748; s.pc = 13; return s.tmp_1; - case 13: - r0 = s.retval; - s.idx___200642 = (r0); - s.tmp_0 = tiles_TileMap_getTileImage__P187556_mk(s); - s.tmp_0.arg0 = s.tilemap___200575; - s.tmp_0.arg1 = s.idx___200642; - s.callLocIdx = 1749; s.pc = 14; return s.tmp_0; - case 14: - r0 = s.retval; - s.tile___200648 = (r0); - r0 = (s.c___200637 * s.tileWidth___200600); - s.tmp_1 = r0; - r0 = (s.tmp_1 >> s.arg0); - s.tmp_0 = r0; - r0 = (s.tmp_0 + s.arg1); - s.nx___200653 = (r0); - r0 = (s.r___200632 * s.tileWidth___200600); - s.tmp_1 = r0; - r0 = (s.tmp_1 >> s.arg0); - s.tmp_0 = r0; - r0 = (s.tmp_0 + s.arg1); - s.ny___200662 = (r0); - s.tmp_0 = minimap_renderScaledImage__P191289_mk(s); - s.tmp_0.arg0 = s.tile___200648; - s.tmp_0.arg1 = s.minimap___200605; - s.tmp_0.arg2 = s.nx___200653; - s.tmp_0.arg3 = s.ny___200662; - s.tmp_0.arg4 = s.arg0; - s.callLocIdx = 1750; s.pc = 15; return s.tmp_0; - case 15: - r0 = s.retval; - r0 = (s.c___200637 + 1); - s.c___200637 = (r0); - { step = 6; continue; } - case 7: - r0 = (s.r___200632 + 1); - s.r___200632 = (r0); - { step = 5; continue; } - case 8: - r0 = pxsim_pxtrt.mkMap(); - s.tmp_0 = r0; - r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "image", s.minimap___200605); - r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "scale", s.arg0); - r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "borderWidth", s.arg1); - r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "borderColor", s.arg2); - r0 = s.tmp_0; - case 9: - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, scene_Camera__C187577_VT)) failedCast(r0); + r0 = s.arg0.fields["_offsetX"]; + return leaveAccessor(s, r0) default: oops() } } } -minimap_minimap__P188832.info = {"start":1349,"length":1436,"line":45,"column":4,"endLine":87,"endColumn":5,"fileName":"pxt_modules/arcade-minimap/minimap.ts","functionName":"minimap","argumentNames":["scale","borderWidth","borderColor"]} +scene_Camera_offsetX__P187582.info = {"start":622,"length":59,"line":23,"column":8,"endLine":25,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"offsetX","argumentNames":["this"]} +scene_Camera_offsetX__P187582.isGetter = true; -function minimap_minimap__P188832_mk(s) { +function scene_Camera_offsetX__P187582_mk(s) { checkStack(s.depth); return { - parent: s, fn: minimap_minimap__P188832, depth: s.depth + 1, + parent: s, fn: scene_Camera_offsetX__P187582, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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, - tilemap___200575: undefined, - numRows___200586: undefined, - numCols___200593: undefined, - tileWidth___200600: undefined, - minimap___200605: undefined, - r___200632: undefined, - c___200637: undefined, - idx___200642: undefined, - tile___200648: undefined, - nx___200653: undefined, - ny___200662: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function tiles_TileMap_areaHeight__P187541(s) { +function Sprite_y__P187244(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11107,34 +11626,28 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C187534_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"]; + if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); + r0 = s.arg0.fields["_y"]; 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) + r0 = (s.tmp_1 / 256); + s.tmp_0 = r0; + r0 = s.arg0.fields["_image"]; s.tmp_4 = r0; - r0 = s.tmp_4; - return leave(s, r0) + r0 = pxsim_ImageMethods.height(s.tmp_4); + s.tmp_3 = r0; + r0 = (s.tmp_3 / 2); + s.tmp_2 = r0; + r0 = (s.tmp_0 + s.tmp_2); + return leaveAccessor(s, r0) default: oops() } } } -tiles_TileMap_areaHeight__P187541.info = {"start":6794,"length":93,"line":247,"column":8,"endLine":249,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"areaHeight","argumentNames":["this"]} +Sprite_y__P187244.info = {"start":1849,"length":85,"line":81,"column":4,"endLine":83,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"y","argumentNames":["this"]} +Sprite_y__P187244.isGetter = true; -function tiles_TileMap_areaHeight__P187541_mk(s) { +function Sprite_y__P187244_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_areaHeight__P187541, depth: s.depth + 1, + parent: s, fn: Sprite_y__P187244, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -11148,7 +11661,7 @@ function tiles_TileMap_areaHeight__P187541_mk(s) { -function tiles_TileMap_areaWidth__P187540(s) { +function Fx_toFloat__P185383(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11162,41 +11675,17 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C187534_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["_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; - case 2: - // jmp value (already in r0) - s.tmp_4 = r0; - r0 = s.tmp_4; + r0 = (s.arg0 / 256); return leave(s, r0) default: oops() } } } -tiles_TileMap_areaWidth__P187540.info = {"start":6693,"length":91,"line":243,"column":8,"endLine":245,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"areaWidth","argumentNames":["this"]} +Fx_toFloat__P185383.info = {"start":2235,"length":81,"line":71,"column":4,"endLine":73,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"toFloat","argumentNames":["v"]} -function tiles_TileMap_areaWidth__P187540_mk(s) { +function Fx_toFloat__P185383_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_areaWidth__P187540, depth: s.depth + 1, + parent: s, fn: Fx_toFloat__P185383, depth: s.depth + 1, pc: 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, } } @@ -11204,7 +11693,7 @@ function tiles_TileMap_areaWidth__P187540_mk(s) { -function info_stopCountdown__P187431(s) { +function Sprite_x__P187242(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11214,33 +11703,47 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = info_updateFlag__P189496_mk(s); - s.tmp_0.arg0 = 1; - s.tmp_0.arg1 = false; - s.callLocIdx = 808; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = (globals.infoState___189446).fields["gameEnd"] = (undefined); - r0 = (globals.infoState___189446).fields["countdownExpired"] = (true); - r0 = undefined; - return leave(s, r0) + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); + r0 = s.arg0.fields["_x"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 / 256); + s.tmp_0 = r0; + r0 = s.arg0.fields["_image"]; + s.tmp_4 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_4); + s.tmp_3 = r0; + r0 = (s.tmp_3 / 2); + s.tmp_2 = r0; + r0 = (s.tmp_0 + s.tmp_2); + return leaveAccessor(s, r0) default: oops() } } } -info_stopCountdown__P187431.info = {"start":9829,"length":170,"line":338,"column":4,"endLine":342,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"stopCountdown","argumentNames":[]} +Sprite_x__P187242.info = {"start":1501,"length":84,"line":70,"column":4,"endLine":72,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"x","argumentNames":["this"]} +Sprite_x__P187242.isGetter = true; -function info_stopCountdown__P187431_mk(s) { +function Sprite_x__P187242_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_stopCountdown__P187431, depth: s.depth + 1, + parent: s, fn: Sprite_x__P187242, depth: s.depth + 1, pc: 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 info_updateFlag__P189496(s) { +function PhysicsEngine_move__P187382(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11255,47 +11758,19 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = info_initHUD__P189492_mk(s); - s.callLocIdx = 810; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - r0 = pxsim_numops_toBoolDecr(s.arg1); - if (!r0) { step = 1; continue; } - s.tmp_0 = r0 = globals.infoState___189446; - r0 = s.tmp_0.fields["visibilityFlag"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 | s.arg0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["visibilityFlag"] = (s.tmp_1); - { step = 2; continue; } - case 1: - s.tmp_0 = r0 = globals.infoState___189446; - r0 = globals.infoState___189446.fields["visibilityFlag"]; - s.tmp_4 = r0; - r0 = (~ s.tmp_4); - s.tmp_3 = r0; - r0 = (s.tmp_3 | s.arg0); - s.tmp_2 = r0; - r0 = (~ s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["visibilityFlag"] = (s.tmp_1); - case 2: + r0 = s.arg0; + if (!checkSubtype(r0, PhysicsEngine__C187376_VT)) failedCast(r0); r0 = undefined; return leave(s, r0) default: oops() } } } -info_updateFlag__P189496.info = {"start":11455,"length":204,"line":393,"column":4,"endLine":397,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"updateFlag","argumentNames":["flag","on"]} +PhysicsEngine_move__P187382.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 info_updateFlag__P189496_mk(s) { +function PhysicsEngine_move__P187382_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_updateFlag__P189496, depth: s.depth + 1, + parent: s, fn: PhysicsEngine_move__P187382, depth: s.depth + 1, pc: 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, } } @@ -11304,7 +11779,7 @@ function info_updateFlag__P189496_mk(s) { -function info_initHUD__P189492(s) { +function PhysicsEngine_draw__P187381(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11314,47 +11789,31 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.infoState___189446); - if (!r0) { step = 1; continue; } - { step = 3; continue; } - case 1: - case 2: - r0 = pxsim_pxtcore_mkClassInstance(info_InfoState__C189443_VT); - s.tmp_0 = r0; - s.tmp_1 = info_InfoState_constructor__P189444_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 779; s.pc = 4; return s.tmp_1; - case 4: - r0 = s.retval; - globals.infoState___189446 = (s.tmp_0); - s.tmp_0 = scene_createRenderable__P187600_mk(s); - s.tmp_0.arg0 = 100; - s.tmp_0.arg1 = inline__P193334; - s.tmp_0.arg2 = undefined; - s.callLocIdx = 795; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - case 3: + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, PhysicsEngine__C187376_VT)) failedCast(r0); r0 = undefined; return leave(s, r0) default: oops() } } } -info_initHUD__P189492.info = {"start":2595,"length":2080,"line":97,"column":4,"endLine":147,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"initHUD","argumentNames":[]} +PhysicsEngine_draw__P187381.info = {"start":279,"length":10,"line":15,"column":4,"endLine":15,"endColumn":14,"fileName":"pxt_modules/game/physics.ts","functionName":"draw","argumentNames":["this"]} -function info_initHUD__P189492_mk(s) { +function PhysicsEngine_draw__P187381_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_initHUD__P189492, depth: s.depth + 1, + parent: s, fn: PhysicsEngine_draw__P187381, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, + arg0: undefined, } } -function inline__P193334(s) { +function controller___update__P187167(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11364,218 +11823,51 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ps___193343 = undefined; - s.p___193364 = undefined; - s.scene___193397 = undefined; - s.elapsed___193400 = undefined; - s.t___193408 = undefined; - r0 = pxsim_numops_toBoolDecr(globals.infoState___189446); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 23; continue; } - case 1: - case 2: - r0 = globals.infoState___189446.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__P185325_mk(s); - s.tmp_2.arg0 = globals.players___189447; - s.tmp_2.arg1 = inline__P193345; - s.callLocIdx = 780; s.pc = 24; return s.tmp_2; - case 24: - r0 = s.retval; - s.ps___193343 = (r0); - s.tmp_0 = helpers_arrayForEach__P185324_mk(s); - s.tmp_0.arg0 = s.ps___193343; - s.tmp_0.arg1 = inline__P193354; - s.callLocIdx = 782; s.pc = 25; return s.tmp_0; - case 25: - r0 = s.retval; - s.tmp_0 = helpers_arrayForEach__P185324_mk(s); - s.tmp_0.arg0 = s.ps___193343; - s.tmp_0.arg1 = inline__P193360; - s.callLocIdx = 784; s.pc = 26; return s.tmp_0; - case 26: - r0 = s.retval; - { step = 12; continue; } - case 3: - s.p___193364 = (globals.player1___187474); - s.tmp_1 = info_PlayerInfo_hasScore__P187461_mk(s); - s.tmp_1.arg0 = s.p___193364; - s.callLocIdx = 785; 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___189446.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__P187469_mk(s); - s.tmp_4.arg0 = s.p___193364; - s.callLocIdx = 786; s.pc = 28; return s.tmp_4; - case 28: - r0 = s.retval; - case 6: - case 7: - s.tmp_1 = info_PlayerInfo_hasLife__P187465_mk(s); - s.tmp_1.arg0 = s.p___193364; - s.callLocIdx = 787; 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___189446.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__P187470_mk(s); - s.tmp_4.arg0 = s.p___193364; - s.callLocIdx = 788; s.pc = 30; return s.tmp_4; - case 30: - r0 = s.retval; - case 10: - case 11: - s.tmp_0 = info_PlayerInfo_raiseLifeZero__P187467_mk(s); - s.tmp_0.arg0 = s.p___193364; - s.tmp_0.arg1 = true; - s.callLocIdx = 789; s.pc = 31; return s.tmp_0; - case 31: - r0 = s.retval; - case 12: - r0 = globals.infoState___189446.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___189446.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__P187749_mk(s); - s.callLocIdx = 790; s.pc = 32; return s.tmp_4; - case 32: - r0 = s.retval; - s.scene___193397 = (r0); - r0 = globals.infoState___189446.fields["gameEnd"]; - s.tmp_0 = r0; - r0 = s.scene___193397.fields["_millis"]; - s.tmp_1 = r0; - r0 = (s.tmp_0 - s.tmp_1); - s.elapsed___193400 = (r0); - s.tmp_0 = info_drawTimer__P189497_mk(s); - s.tmp_0.arg0 = s.elapsed___193400; - s.callLocIdx = 792; s.pc = 33; return s.tmp_0; - case 33: - r0 = s.retval; - r0 = (s.elapsed___193400 / 1000); - s.t___193408 = (r0); - r0 = (s.t___193408 <= 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 19; continue; } - s.t___193408 = (0); - r0 = globals.infoState___189446.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.dtms___197415 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = (s.arg0 * 1000); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 17; continue; } - r0 = (globals.infoState___189446).fields["countdownExpired"] = (true); - r0 = (globals.infoState___189446).fields["gameEnd"] = (undefined); - r0 = globals.infoState___189446.fields["countdownEndHandler"]; + r0 = (s.tmp_0 | 0); + s.dtms___197415 = (r0); + r0 = pxsim_pxtcore_mkAction(1, inline__P197422); 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___189446; - if (!s.tmp_1.arg0.vtable.iface) { - setupLambda(s.tmp_1, pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "countdownEndHandler"), 1); - s.callLocIdx = 793; 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 = 793; s.pc = 34; return s.tmp_1; } - else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 793; s.pc = 34; return s.tmp_1;; } - else { s.callLocIdx = 793; s.pc = 34; return s.tmp_1; } - } - case 34: + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.dtms___197415); + s.tmp_1 = helpers_arrayForEach__P185324_mk(s); + s.tmp_2 = controller_players__P187135_mk(s); + s.callLocIdx = 241; s.pc = 2; return s.tmp_2; + case 2: r0 = s.retval; - { step = 16; continue; } - case 15: - s.tmp_0 = game_over__P187759_mk(s); - s.tmp_0.arg0 = false; - s.tmp_0.arg1 = undefined; - s.callLocIdx = 794; s.pc = 35; return s.tmp_0; - case 35: + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 243; s.pc = 1; return s.tmp_1; + case 1: 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() } } } -inline__P193334.info = {"start":2755,"length":1903,"line":104,"column":12,"endLine":145,"endColumn":13,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":[]} +controller___update__P187167.info = {"start":17961,"length":137,"line":550,"column":4,"endLine":553,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"__update","argumentNames":["dt"]} -function inline__P193334_mk(s) { +function controller___update__P187167_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P193334, depth: s.depth + 1, + parent: s, fn: controller___update__P187167, depth: s.depth + 1, pc: 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___193343: undefined, - p___193364: undefined, - scene___193397: undefined, - elapsed___193400: undefined, - t___193408: undefined, + dtms___197415: undefined, + arg0: undefined, } } -function inline__P193345(s) { +function inline__P197422(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11589,26 +11881,24 @@ 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); + s.tmp_0 = controller_Controller___update__P187165_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.caps[0]; + s.callLocIdx = 242; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P193345.info = {"start":3003,"length":8,"line":109,"column":46,"endLine":109,"endColumn":54,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["p"]} +inline__P197422.info = {"start":18063,"length":27,"line":552,"column":26,"endLine":552,"endColumn":53,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["ctrl"]} -function inline__P193345_mk(s) { +function inline__P197422_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P193345, depth: s.depth + 1, + parent: s, fn: inline__P197422, 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, } } @@ -11616,7 +11906,7 @@ function inline__P193345_mk(s) { -function inline__P193354(s) { +function controller_Controller___update__P187165(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11628,33 +11918,55 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = info_PlayerInfo_drawPlayer__P187468_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 781; s.pc = 1; return s.tmp_0; + r0 = s.arg0; + if (!checkSubtype(r0, controller_Controller__C187140_VT)) failedCast(r0); + r0 = pxsim_pxtrt.mklocRef(); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.arg1); + s.arg1 = (s.tmp_0); + s.tmp_1 = r0 = s.arg1; + r0 = pxsim_pxtrt_ldlocRef(s.arg1); + s.tmp_3 = r0; + r0 = (s.tmp_3 | 0); + s.tmp_2 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_1, s.tmp_2); + r0 = pxsim_pxtcore_mkAction(1, inline__P197435); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); + s.tmp_1 = helpers_arrayForEach__P185324_mk(s); + r0 = s.arg0.fields["buttons"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 240; s.pc = 1; return s.tmp_1; case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P193354.info = {"start":3087,"length":19,"line":111,"column":31,"endLine":111,"endColumn":50,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["p"]} +controller_Controller___update__P187165.info = {"start":17439,"length":124,"line":532,"column":8,"endLine":535,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"__update","argumentNames":["this","dtms"]} -function inline__P193354_mk(s) { +function controller_Controller___update__P187165_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P193354, depth: s.depth + 1, + parent: s, fn: controller_Controller___update__P187165, depth: s.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 inline__P193360(s) { +function inline__P197435(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11668,22 +11980,23 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = info_PlayerInfo_raiseLifeZero__P187467_mk(s); + s.tmp_0 = controller_Button___update__P187132_mk(s); s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = false; - s.callLocIdx = 783; s.pc = 1; return s.tmp_0; + r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); + s.tmp_0.arg1 = r0; + s.callLocIdx = 239; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P193360.info = {"start":3189,"length":27,"line":113,"column":31,"endLine":113,"endColumn":58,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["p"]} +inline__P197435.info = {"start":17526,"length":25,"line":534,"column":33,"endLine":534,"endColumn":58,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["btn"]} -function inline__P193360_mk(s) { +function inline__P197435_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P193360, depth: s.depth + 1, + parent: s, fn: inline__P197435, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -11693,7 +12006,7 @@ function inline__P193360_mk(s) { -function info_drawTimer__P189497(s) { +function controller_Button___update__P187132(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11703,289 +12016,105 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.font___193436 = undefined; - s.smallFont___193438 = undefined; - s.seconds___193440 = undefined; - s.width___193444 = undefined; - s.left___193449 = undefined; - s.color1___193459 = undefined; - s.color2___193463 = undefined; - s.temp___193476 = undefined; - s.remainder___193512 = undefined; - s.decimalLeft___193531 = undefined; - s.minutes___193549 = undefined; - s.remainder___193553 = undefined; + s.delay___197451 = undefined; + s.interval___197460 = undefined; + s.count___197473 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg0 < 0); + r0 = s.arg0; + if (!checkSubtype(r0, controller_Button__C187120_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; } - s.arg0 = (0); + { step = 11; continue; } case 1: case 2: - r0 = (s.arg0 | 0); - s.arg0 = (r0); - s.font___193436 = (globals.font8___186962); - s.smallFont___193438 = (globals.font5___186967); - r0 = pxsim.Math_.idiv(s.arg0, 1000); - s.seconds___193440 = (r0); - s.tmp_2 = if_charWidth_1_mk(s); - s.tmp_2.arg0 = s.font___193436; - 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 = 811; s.pc = 11; return s.tmp_2; } - } - case 11: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_1 * 5); - s.tmp_0 = r0; - r0 = (s.tmp_0 - 2); - s.width___193444 = (r0); - r0 = pxsim_ImageMethods.width(globals.screen___187019); - s.tmp_2 = r0; - r0 = (s.tmp_2 >> 1); + 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.width___193444 >> 1); - s.tmp_3 = r0; - r0 = (s.tmp_1 - s.tmp_3); - s.tmp_0 = r0; - r0 = (s.tmp_0 + 1); - s.left___193449 = (r0); - r0 = globals.infoState___189446.fields["fontColor"]; - s.color1___193459 = (r0); - r0 = globals.infoState___189446.fields["bgColor"]; - s.color2___193463 = (r0); - r0 = (s.seconds___193440 < 10); + 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; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = globals.defaultRepeatDelay___189395; { step = 4; continue; } case 3: - r0 = (s.seconds___193440 & 1); + r0 = s.arg0.fields["repeatDelay"]; case 4: // jmp value (already in r0) + s.tmp_2 = r0; + s.delay___197451 = (s.tmp_2); + r0 = s.arg0.fields["repeatInterval"]; s.tmp_1 = r0; - r0 = pxsim_numops_toBool(s.tmp_1); - if (r0) { step = 5; continue; } - r0 = s.tmp_1; + r0 = (s.tmp_1 === undefined); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + r0 = globals.defaultRepeatInterval___189397; { step = 6; continue; } case 5: - r0 = pxsim_ImageMethods.isMono(globals.screen___187019); - 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.fields["repeatInterval"]; case 6: // jmp value (already in r0) - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); + s.tmp_2 = r0; + s.interval___197460 = (s.tmp_2); + r0 = s.arg0.fields["_pressedElasped"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 < s.delay___197451); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 7; continue; } - s.temp___193476 = (s.color1___193459); - s.color1___193459 = (s.color2___193463); - s.color2___193463 = (s.temp___193476); + { step = 11; continue; } case 7: case 8: - s.tmp_0 = helpers_imageFillRect__P186945_mk(s); - s.tmp_0.arg0 = globals.screen___187019; - r0 = (s.left___193449 - 3); - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = 0; - r0 = (s.width___193444 + 6); - s.tmp_0.arg3 = r0; - s.tmp_2 = if_charHeight_1_mk(s); - s.tmp_2.arg0 = s.font___193436; - 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 = 812; 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___189446.fields["borderColor"]; - s.tmp_0.arg5 = r0; - s.callLocIdx = 813; s.pc = 12; return s.tmp_0; - case 12: - r0 = s.retval; - s.tmp_0 = helpers_imageFillRect__P186945_mk(s); - s.tmp_0.arg0 = globals.screen___187019; - r0 = (s.left___193449 - 2); - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = 0; - r0 = (s.width___193444 + 4); - s.tmp_0.arg3 = r0; - s.tmp_2 = if_charHeight_1_mk(s); - s.tmp_2.arg0 = s.font___193436; - 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 = 814; s.pc = 15; return s.tmp_2; } - } - case 15: - r0 = s.retval; + r0 = s.arg0.fields["_pressedElasped"]; + s.tmp_5 = r0; + r0 = (s.tmp_5 - s.delay___197451); + s.tmp_4 = r0; + r0 = (s.tmp_4 - s.interval___197460); + s.tmp_3 = r0; + r0 = (s.tmp_3 / s.interval___197460); + s.tmp_2 = r0; + r0 = pxsim.Math_.floor(s.tmp_2); + s.count___197473 = (r0); + r0 = s.arg0.fields["_repeatCount"]; s.tmp_1 = r0; - r0 = (s.tmp_1 + 2); - s.tmp_0.arg4 = r0; - s.tmp_0.arg5 = s.color2___193463; - s.callLocIdx = 815; s.pc = 14; return s.tmp_0; - case 14: - r0 = s.retval; - r0 = (s.seconds___193440 < 60); + r0 = (s.count___197473 != 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___193512 = (r0); - s.tmp_0 = helpers_imagePrint__P186977_mk(s); - s.tmp_0.arg0 = globals.screen___187019; - s.tmp_3 = info_formatDecimal__P189499_mk(s); - s.tmp_3.arg0 = s.seconds___193440; - s.callLocIdx = 816; 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___193449; - s.tmp_0.arg3 = 1; - s.tmp_0.arg4 = s.color1___193459; - s.tmp_0.arg5 = s.font___193436; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 817; s.pc = 16; return s.tmp_0; - case 16: - r0 = s.retval; - s.tmp_0 = r0 = s.left___193449; - s.tmp_3 = if_charWidth_1_mk(s); - s.tmp_3.arg0 = s.font___193436; - 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 = 818; 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___193531 = (r0); - s.tmp_0 = helpers_imagePrint__P186977_mk(s); - s.tmp_0.arg0 = globals.screen___187019; - s.tmp_1 = info_formatDecimal__P189499_mk(s); - s.tmp_1.arg0 = s.remainder___193512; - s.callLocIdx = 819; s.pc = 21; return s.tmp_1; - case 21: + s.tmp_2 = controller_Button_raiseButtonRepeat__P189402_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 189; s.pc = 12; return s.tmp_2; + case 12: r0 = s.retval; - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = s.decimalLeft___193531; - s.tmp_0.arg3 = 3; - s.tmp_0.arg4 = s.color1___193459; - s.tmp_0.arg5 = s.smallFont___193438; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 820; s.pc = 20; return s.tmp_0; - case 20: - r0 = s.retval; - { step = 10; continue; } + r0 = (s.arg0).fields["_repeatCount"] = (s.count___197473); case 9: - r0 = pxsim.Math_.idiv(s.seconds___193440, 60); - s.minutes___193549 = (r0); - r0 = (s.seconds___193440 % 60); - s.remainder___193553 = (r0); - s.tmp_0 = helpers_imagePrint__P186977_mk(s); - s.tmp_0.arg0 = globals.screen___187019; - s.tmp_5 = info_formatDecimal__P189499_mk(s); - s.tmp_5.arg0 = s.minutes___193549; - s.callLocIdx = 821; 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__P189499_mk(s); - s.tmp_8.arg0 = s.remainder___193553; - s.callLocIdx = 822; 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___193449; - s.tmp_0.arg3 = 1; - s.tmp_0.arg4 = s.color1___193459; - s.tmp_0.arg5 = s.font___193436; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 823; s.pc = 22; return s.tmp_0; - case 22: - r0 = s.retval; case 10: + case 11: r0 = undefined; return leave(s, r0) default: oops() } } } -info_drawTimer__P189497.info = {"start":13488,"length":1328,"line":462,"column":4,"endLine":497,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"drawTimer","argumentNames":["millis"]} +controller_Button___update__P187132.info = {"start":5117,"length":704,"line":164,"column":8,"endLine":181,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"__update","argumentNames":["this","dtms"]} -function info_drawTimer__P189497_mk(s) { +function controller_Button___update__P187132_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_drawTimer__P189497, depth: s.depth + 1, + parent: s, fn: controller_Button___update__P187132, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -11993,29 +12122,18 @@ function info_drawTimer__P189497_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - font___193436: undefined, - smallFont___193438: undefined, - seconds___193440: undefined, - width___193444: undefined, - left___193449: undefined, - color1___193459: undefined, - color2___193463: undefined, - temp___193476: undefined, - remainder___193512: undefined, - decimalLeft___193531: undefined, - minutes___193549: undefined, - remainder___193553: undefined, + delay___197451: undefined, + interval___197460: undefined, + count___197473: undefined, arg0: undefined, + arg1: undefined, } } -function info_formatDecimal__P189499(s) { +function controller_Button_raiseButtonRepeat__P189402(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12029,39 +12147,31 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = (s.arg0 | 0); - s.arg0 = (r0); - r0 = (s.arg0 < 10); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + r0 = s.arg0; + if (!checkSubtype(r0, controller_Button__C187120_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(globals._userEventsEnabled___189393); 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 = 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 = pxsim_numops.toString(s.arg0); - case 3: + r0 = undefined; return leave(s, r0) default: oops() } } } -info_formatDecimal__P189499.info = {"start":28426,"length":156,"line":916,"column":4,"endLine":922,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"formatDecimal","argumentNames":["val"]} +controller_Button_raiseButtonRepeat__P189402.info = {"start":2887,"length":211,"line":99,"column":8,"endLine":104,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"raiseButtonRepeat","argumentNames":["this"]} -function info_formatDecimal__P189499_mk(s) { +function controller_Button_raiseButtonRepeat__P189402_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_formatDecimal__P189499, depth: s.depth + 1, + parent: s, fn: controller_Button_raiseButtonRepeat__P189402, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, arg0: undefined, } } @@ -12069,7 +12179,44 @@ function info_formatDecimal__P189499_mk(s) { -function helpers_imagePrint__P186977(s) { +function controller_players__P187135(s) { +let r0 = s.r0, 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__P187134_mk(s); + s.callLocIdx = 192; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + s.tmp_0 = helpers_arrayFilter__P185325_mk(s); + s.tmp_0.arg0 = globals._players___189406; + s.tmp_0.arg1 = inline__P197310; + s.callLocIdx = 193; s.pc = 2; return s.tmp_0; + case 2: + r0 = s.retval; + return leave(s, r0) + default: oops() +} } } +controller_players__P187135.info = {"start":7040,"length":144,"line":220,"column":4,"endLine":223,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"players","argumentNames":[]} + +function controller_players__P187135_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_players__P187135, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, +} } + + + + + +function inline__P197310(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12079,460 +12226,215 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.x0___193610 = undefined; - s.cp___193612 = undefined; - s.mult___193613 = undefined; - s.dataW___193618 = undefined; - s.dataH___193624 = undefined; - s.byteHeight___193630 = undefined; - s.charSize___193636 = undefined; - s.dataSize___193640 = undefined; - s.fontdata___193644 = undefined; - s.lastchar___193647 = undefined; - s.imgBuf___193654 = undefined; - s.xOffset___193678 = undefined; - s.yOffset___193679 = undefined; - s.ch___193694 = undefined; - s.l___193713 = undefined; - s.r___193714 = undefined; - s.off___193716 = undefined; - s.guess___193717 = undefined; - s.m___193736 = undefined; - s.v___193745 = undefined; - s.i___193801 = undefined; - s.j___193806 = undefined; - s.mask___193807 = undefined; - s.c___193808 = undefined; - s.n___193825 = 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); + 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() +} } } +inline__P197310.info = {"start":7162,"length":14,"line":222,"column":31,"endLine":222,"endColumn":45,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["ctrl"]} + +function inline__P197310_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: inline__P197310, 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__player1__P187134(s) { +let r0 = s.r0, 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._players___189406); 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; } - s.tmp_2 = image_getFontForText__P186964_mk(s); - s.tmp_2.arg0 = s.arg1; - s.callLocIdx = 139; s.pc = 39; return s.tmp_2; - case 39: - r0 = s.retval; - s.arg5 = (r0); + r0 = s.tmp_0; + { step = 2; continue; } case 1: + r0 = pxsim_Array__getAt(globals._players___189406, 0); + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); case 2: - 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); + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); if (!r0) { step = 3; continue; } - s.arg4 = (1); - case 3: - case 4: - s.x0___193610 = (s.arg2); - s.cp___193612 = (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 = 140; 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 = 141; s.pc = 41; return s.tmp_2; } - } - case 41: - r0 = s.retval; - { step = 6; continue; } + r0 = pxsim_pxtcore_mkClassInstance(controller_Controller__C187140_VT); + s.tmp_5 = r0; + r0 = pxsim_Array__mk(); + s.tmp_6 = r0; + r0 = pxsim_Array__push(s.tmp_6, globals.left___187096); + r0 = pxsim_Array__push(s.tmp_6, globals.up___187097); + r0 = pxsim_Array__push(s.tmp_6, globals.right___187098); + r0 = pxsim_Array__push(s.tmp_6, globals.down___187099); + r0 = pxsim_Array__push(s.tmp_6, globals.A___187094); + r0 = pxsim_Array__push(s.tmp_6, globals.B___187095); + r0 = pxsim_Array__push(s.tmp_6, globals.menu___187100); + s.tmp_7 = controller_Controller_constructor__P187144_mk(s); + s.tmp_7.arg0 = s.tmp_5; + s.tmp_7.arg1 = 1; + s.tmp_7.arg2 = s.tmp_6; + s.callLocIdx = 191; s.pc = 5; return s.tmp_7; case 5: - r0 = 1; - case 6: - // jmp value (already in r0) - s.tmp_3 = r0; - s.mult___193613 = (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 = 142; 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___193613); - s.dataW___193618 = (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 = 143; 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___193613); - s.dataH___193624 = (r0); - r0 = (s.dataH___193624 + 7); - s.tmp_0 = r0; - r0 = (s.tmp_0 >> 3); - s.byteHeight___193630 = (r0); - r0 = (s.byteHeight___193630 * s.dataW___193618); - s.charSize___193636 = (r0); - r0 = (2 + s.charSize___193636); - s.dataSize___193640 = (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 = 144; s.pc = 44; return s.tmp_0; } + case 3: + case 4: + r0 = pxsim_Array__getAt(globals._players___189406, 0); + return leave(s, r0) + default: oops() +} } } +controller__player1__P187134.info = {"start":6776,"length":258,"line":214,"column":4,"endLine":218,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"_player1","argumentNames":[]} + +function controller__player1__P187134_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller__player1__P187134, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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, +} } + + + + + +function controller_Controller_constructor__P187144(s) { +let r0 = s.r0, 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.leftId___197357 = undefined; + s.i___197365 = undefined; + s.i___197383 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.lambdaArgs = null; } - case 44: - r0 = s.retval; - s.fontdata___193644 = (r0); - r0 = pxsim.BufferMethods.length(s.fontdata___193644); + r0 = s.arg0; + if (!checkSubtype(r0, controller_Controller__C187140_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim.control.allocateNotifyEvent(); s.tmp_1 = r0; - r0 = pxsim.Math_.idiv(s.tmp_1, s.dataSize___193640); + 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 = (s.tmp_0 - 1); - s.lastchar___193647 = (r0); - r0 = (s.mult___193613 == 1); + r0 = (1 + s.tmp_0); + s.leftId___197357 = (r0); + s.i___197365 = (0); + case 2: + r0 = (s.i___197365 < 7); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - r0 = (8 + s.charSize___193636); + if (!r0) { step = 3; continue; } + r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C187120_VT); s.tmp_1 = r0; - r0 = pxsim.control.createBuffer(s.tmp_1); - s.imgBuf___193654 = (r0); - r0 = pxsim.BufferMethods.setByte(s.imgBuf___193654, 0, 135); - r0 = pxsim.BufferMethods.setByte(s.imgBuf___193654, 1, 1); - r0 = pxsim.BufferMethods.setByte(s.imgBuf___193654, 2, s.dataW___193618); - r0 = pxsim.BufferMethods.setByte(s.imgBuf___193654, 4, s.dataH___193624); + s.tmp_2 = controller_Button_constructor__P187126_mk(s); + s.tmp_2.arg0 = s.tmp_1; + r0 = (s.leftId___197357 + s.i___197365); + s.tmp_2.arg1 = r0; + s.tmp_2.arg2 = -1; + s.callLocIdx = 197; s.pc = 7; return s.tmp_2; case 7: - case 8: - case 9: - s.tmp_1 = r0 = s.cp___193612; - r0 = pxsim_String_.length(s.arg1); + 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___197365 + 1); + s.i___197365 = (r0); + { step = 2; continue; } + case 3: + case 4: + s.i___197383 = (0); + case 5: + s.tmp_1 = r0 = s.i___197383; + 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 = 38; continue; } - s.xOffset___193678 = (0); - s.yOffset___193679 = (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___193612; - 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___193612); - 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 = 145; s.pc = 45; return s.tmp_4; } - } - case 45: - r0 = s.retval; - s.xOffset___193678 = (r0); - s.tmp_0 = if_yOffset_1_mk(s); - r0 = pxsim_Array__getAt(s.arg6, s.cp___193612); - 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 = 146; s.pc = 46; return s.tmp_0; } - } - case 46: - r0 = s.retval; - s.yOffset___193679 = (r0); - case 12: - case 13: - s.tmp_0 = r0 = s.cp___193612; - r0 = (s.tmp_0 + 1); - s.cp___193612 = (r0); - r0 = pxsim_String_.charCodeAt(s.arg1, s.tmp_0); - s.ch___193694 = (r0); - r0 = (s.ch___193694 == 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 = 147; 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___193610); - case 14: - case 15: - r0 = (s.ch___193694 < 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___193713 = (0); - s.r___193714 = (s.lastchar___193647); - s.off___193716 = (0); - r0 = (s.ch___193694 - 32); - s.tmp_0 = r0; - r0 = (s.tmp_0 * s.dataSize___193640); - s.guess___193717 = (r0); - r0 = pxsim.BufferMethods.getNumber(s.fontdata___193644, 4, s.guess___193717); - s.tmp_1 = r0; - r0 = (s.tmp_1 == s.ch___193694); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 18; continue; } - s.off___193716 = (s.guess___193717); - { step = 25; continue; } - case 18: - case 19: - r0 = (s.l___193713 <= s.r___193714); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 24; continue; } - s.tmp_1 = r0 = s.l___193713; - r0 = (s.r___193714 - s.l___193713); - s.tmp_3 = r0; - r0 = (s.tmp_3 >> 1); - s.tmp_2 = r0; - r0 = (s.tmp_1 + s.tmp_2); - s.m___193736 = (r0); - s.tmp_0 = r0 = s.fontdata___193644; - r0 = (s.m___193736 * s.dataSize___193640); - s.tmp_1 = r0; - r0 = pxsim.BufferMethods.getNumber(s.tmp_0, 4, s.tmp_1); - s.v___193745 = (r0); - r0 = (s.v___193745 == s.ch___193694); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 20; continue; } - r0 = (s.m___193736 * s.dataSize___193640); - s.off___193716 = (r0); - { step = 24; continue; } - case 20: - case 21: - r0 = (s.v___193745 < s.ch___193694); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 22; continue; } - r0 = (s.m___193736 + 1); - s.l___193713 = (r0); - { step = 23; continue; } - case 22: - r0 = (s.m___193736 - 1); - s.r___193714 = (r0); - case 23: - { step = 19; continue; } - case 24: - case 25: - r0 = (s.mult___193613 == 1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 26; continue; } - s.tmp_1 = r0 = s.imgBuf___193654; - s.tmp_3 = r0 = s.fontdata___193644; - r0 = (s.off___193716 + 2); - s.tmp_4 = r0; - r0 = pxsim.BufferMethods.slice(s.tmp_3, s.tmp_4, s.charSize___193636); - s.tmp_2 = r0; - r0 = pxsim.BufferMethods.write(s.tmp_1, 8, s.tmp_2); - s.tmp_0 = helpers_imageDrawIcon__P186944_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.imgBuf___193654; - r0 = (s.arg2 + s.xOffset___193678); - s.tmp_0.arg2 = r0; - r0 = (s.arg3 + s.yOffset___193679); - s.tmp_0.arg3 = r0; - s.tmp_0.arg4 = s.arg4; - s.callLocIdx = 148; 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 = 149; 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___193716 + 2); - s.off___193716 = (r0); - s.i___193801 = (0); - case 27: - r0 = (s.i___193801 < s.dataW___193618); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 36; continue; } - s.j___193806 = (0); - s.mask___193807 = (1); - s.tmp_0 = r0 = s.off___193716; - r0 = (s.tmp_0 + 1); - s.off___193716 = (r0); - r0 = pxsim.BufferMethods.getByte(s.fontdata___193644, s.tmp_0); - s.c___193808 = (r0); - case 28: - r0 = (s.j___193806 < s.dataH___193624); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 35; continue; } - r0 = (s.mask___193807 == 256); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 29; continue; } - s.tmp_2 = r0 = s.off___193716; - r0 = (s.tmp_2 + 1); - s.off___193716 = (r0); - r0 = pxsim.BufferMethods.getByte(s.fontdata___193644, s.tmp_2); - s.c___193808 = (r0); - s.mask___193807 = (1); - case 29: - case 30: - s.n___193825 = (0); - case 31: - r0 = (s.c___193808 & s.mask___193807); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 32; continue; } - r0 = (s.n___193825 + 1); - s.n___193825 = (r0); - r0 = (s.mask___193807 << 1); - s.mask___193807 = (r0); - { step = 31; continue; } - case 32: - r0 = pxsim_numops_toBoolDecr(s.n___193825); - if (!r0) { step = 33; continue; } - s.tmp_0 = helpers_imageFillRect__P186945_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_1 = r0 = s.arg2; - r0 = (s.xOffset___193678 * s.mult___193613); - 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___193806 + s.yOffset___193679); + if (!r0) { step = 6; continue; } + r0 = s.arg0.fields["buttons"]; s.tmp_5 = r0; - r0 = (s.tmp_5 * s.mult___193613); + r0 = pxsim_Array__getAt(s.tmp_5, s.i___197383); s.tmp_4 = r0; - r0 = (s.tmp_3 + s.tmp_4); - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = s.mult___193613; - r0 = (s.mult___193613 * s.n___193825); - s.tmp_0.arg4 = r0; - s.tmp_0.arg5 = s.arg4; - s.callLocIdx = 150; s.pc = 50; return s.tmp_0; - case 50: + r0 = (s.tmp_4).fields["_owner"] = (s.arg0); + r0 = (s.i___197383 + 1); + s.i___197383 = (r0); + { step = 5; continue; } + case 6: + s.tmp_0 = controller_addController__P189407_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 198; s.pc = 8; return s.tmp_0; + case 8: r0 = s.retval; - r0 = (s.j___193806 + s.n___193825); - s.j___193806 = (r0); - { step = 34; continue; } - case 33: - r0 = (s.mask___193807 << 1); - s.mask___193807 = (r0); - r0 = (s.j___193806 + 1); - s.j___193806 = (r0); - case 34: - { step = 28; continue; } - case 35: - r0 = (s.arg2 + s.mult___193613); - s.arg2 = (r0); - r0 = (s.i___193801 + 1); - s.i___193801 = (r0); - { step = 27; continue; } - case 36: - case 37: - { step = 9; continue; } - case 38: r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_imagePrint__P186977.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"]} +controller_Controller_constructor__P187144.info = {"start":7849,"length":696,"line":249,"column":8,"endLine":266,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["this","playerIndex","buttons"]} -function helpers_imagePrint__P186977_mk(s) { +function controller_Controller_constructor__P187144_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_imagePrint__P186977, depth: s.depth + 1, + parent: s, fn: controller_Controller_constructor__P187144, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -12540,45 +12442,19 @@ function helpers_imagePrint__P186977_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - x0___193610: undefined, - cp___193612: undefined, - mult___193613: undefined, - dataW___193618: undefined, - dataH___193624: undefined, - byteHeight___193630: undefined, - charSize___193636: undefined, - dataSize___193640: undefined, - fontdata___193644: undefined, - lastchar___193647: undefined, - imgBuf___193654: undefined, - xOffset___193678: undefined, - yOffset___193679: undefined, - ch___193694: undefined, - l___193713: undefined, - r___193714: undefined, - off___193716: undefined, - guess___193717: undefined, - m___193736: undefined, - v___193745: undefined, - i___193801: undefined, - j___193806: undefined, - mask___193807: undefined, - c___193808: undefined, - n___193825: undefined, + leftId___197357: undefined, + i___197365: undefined, + i___197383: undefined, arg0: undefined, arg1: undefined, arg2: undefined, - arg3: undefined, - arg4: undefined, - arg5: undefined, - arg6: undefined, } } -function image_getFontForText__P186964(s) { +function controller_addController__P189407(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12588,52 +12464,40 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.i___193904 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.i___193904 = (0); - case 1: - s.tmp_1 = r0 = s.i___193904; - r0 = pxsim_String_.length(s.arg0); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); + r0 = pxsim_numops_toBoolDecr(globals._players___189406); + 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_String_.charCodeAt(s.arg0, s.i___193904); - 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___186963; - { step = 5; continue; } + if (!r0) { step = 1; continue; } + r0 = pxsim_Array__mk(); + globals._players___189406 = (r0); + case 1: case 2: - case 3: - r0 = (s.i___193904 + 1); - s.i___193904 = (r0); - { step = 1; continue; } - case 4: - r0 = globals.font8___186962; - case 5: + s.tmp_0 = r0 = globals._players___189406; + 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() } } } -image_getFontForText__P186964.info = {"start":11713,"length":259,"line":136,"column":4,"endLine":143,"endColumn":5,"fileName":"pxt_modules/screen/text.ts","functionName":"getFontForText","argumentNames":["text"]} +controller_addController__P189407.info = {"start":6613,"length":157,"line":207,"column":4,"endLine":212,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"addController","argumentNames":["ctrl"]} -function image_getFontForText__P186964_mk(s) { +function controller_addController__P189407_mk(s) { checkStack(s.depth); return { - parent: s, fn: image_getFontForText__P186964, depth: s.depth + 1, + parent: s, fn: controller_addController__P189407, depth: s.depth + 1, pc: 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___193904: undefined, arg0: undefined, } } @@ -12641,7 +12505,7 @@ function image_getFontForText__P186964_mk(s) { -function helpers_imageDrawIcon__P186944(s) { +function helpers_arrayFilter__P185325(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12651,51 +12515,110 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.res___192766 = undefined; + s.len___192768 = undefined; + s.i___192771 = undefined; + s.v___192776 = 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 = r0 = s.arg0; - s.tmp_1 = r0 = s.arg1; - s.tmp_3 = helpers_pack__P189316_mk(s); - s.tmp_3.arg0 = s.arg2; - s.tmp_3.arg1 = s.arg3; - s.callLocIdx = 120; s.pc = 1; return s.tmp_3; + r0 = pxsim_Array__mk(); + s.res___192766 = (r0); + r0 = pxsim_Array__length(s.arg0); + s.len___192768 = (r0); + s.i___192771 = (0); case 1: + r0 = (s.i___192771 < s.len___192768); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + r0 = pxsim_Array__getAt(s.arg0, s.i___192771); + s.v___192776 = (r0); + s.tmp_1 = lambda_3_mk(s); + s.tmp_1.argL = s.arg1; + s.tmp_1.arg0 = s.v___192776; + s.tmp_1.arg1 = s.i___192771; + setupLambda(s.tmp_1, s.tmp_1.argL); + s.callLocIdx = 7; s.pc = 5; return s.tmp_1; + case 5: r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_ImageMethods._drawIcon(s.tmp_0, s.tmp_1, s.tmp_2, s.arg4); - r0 = undefined; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + r0 = pxsim_Array__push(s.res___192766, s.v___192776); + case 2: + case 3: + r0 = (s.i___192771 + 1); + s.i___192771 = (r0); + { step = 1; continue; } + case 4: + r0 = s.res___192766; return leave(s, r0) default: oops() } } } -helpers_imageDrawIcon__P186944.info = {"start":3500,"length":145,"line":128,"column":4,"endLine":130,"endColumn":5,"fileName":"pxt_modules/screen/image.ts","functionName":"imageDrawIcon","argumentNames":["img","icon","x","y","c"]} +helpers_arrayFilter__P185325.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_imageDrawIcon__P186944_mk(s) { +function helpers_arrayFilter__P185325_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_imageDrawIcon__P186944, depth: s.depth + 1, + parent: s, fn: helpers_arrayFilter__P185325, depth: s.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___192766: undefined, + len___192768: undefined, + i___192771: undefined, + v___192776: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, } } -function helpers_pack__P189316(s) { +function controller__moveSprites__P187139(s) { +let r0 = s.r0, 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__P185324_mk(s); + s.tmp_1 = controller_players__P187135_mk(s); + s.callLocIdx = 194; s.pc = 2; return s.tmp_1; + case 2: + r0 = s.retval; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = inline__P197105; + s.callLocIdx = 196; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +controller__moveSprites__P187139.info = {"start":7400,"length":182,"line":234,"column":4,"endLine":238,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"_moveSprites","argumentNames":[]} + +function controller__moveSprites__P187139_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller__moveSprites__P187139, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, +} } + + + + + +function inline__P197105(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12707,57 +12630,33 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_2 = Math_clamp__P185339_mk(s); - s.tmp_2.arg0 = -30000; - s.tmp_2.arg1 = 30000; - r0 = (s.arg0 | 0); - s.tmp_2.arg2 = r0; - s.callLocIdx = 118; s.pc = 1; return s.tmp_2; + s.tmp_0 = controller_Controller___preUpdate__P187164_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 195; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 65535); - s.tmp_0 = r0; - s.tmp_5 = Math_clamp__P185339_mk(s); - s.tmp_5.arg0 = -30000; - s.tmp_5.arg1 = 30000; - r0 = (s.arg1 | 0); - s.tmp_5.arg2 = r0; - s.callLocIdx = 119; s.pc = 2; return s.tmp_5; - case 2: - r0 = s.retval; - s.tmp_4 = r0; - r0 = (s.tmp_4 << 16); - s.tmp_3 = r0; - r0 = (s.tmp_0 | s.tmp_3); + r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_pack__P189316.info = {"start":3152,"length":145,"line":120,"column":4,"endLine":122,"endColumn":5,"fileName":"pxt_modules/screen/image.ts","functionName":"pack","argumentNames":["x","y"]} +inline__P197105.info = {"start":7548,"length":26,"line":237,"column":26,"endLine":237,"endColumn":52,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["ctrl"]} -function helpers_pack__P189316_mk(s) { +function inline__P197105_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_pack__P189316, depth: s.depth + 1, + parent: s, fn: inline__P197105, depth: s.depth + 1, pc: 0, retval: undefined, 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 info_InfoState_constructor__P189444(s) { +function controller_Controller___preUpdate__P187164(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12767,94 +12666,334 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.deadSprites___197112 = undefined; + s.svx___197113 = undefined; + s.svy___197114 = undefined; + s.svxInCricle___197149 = undefined; + s.svyInCircle___197151 = undefined; + s.sq___197153 = undefined; + s.scale___197168 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, info_InfoState__C189443_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__P189494_mk(s); - s.callLocIdx = 773; s.pc = 7; return s.tmp_2; - case 7: + if (!checkSubtype(r0, controller_Controller__C187140_VT)) failedCast(r0); + s.tmp_3 = controller_Controller__controlledSprites__P187145_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 214; 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 = (s.tmp_0).fields["heartImage"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim.image.ofBuffer(_hex194778); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["multiplierImage"] = (s.tmp_1); - r0 = pxsim_ImageMethods.isMono(globals.screen___187019); + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = 0; - { step = 2; continue; } + { step = 17; 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___187019); + r0 = pxsim_pxtrt.mklocRef(); + s.deadSprites___197112 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.deadSprites___197112, false); + r0 = pxsim_pxtrt.mklocRef(); + s.svx___197113 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.svx___197113, 0); + r0 = pxsim_pxtrt.mklocRef(); + s.svy___197114 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.svy___197114, 0); + r0 = s.arg0.fields["analog"]; 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 = s.svx___197113; + s.tmp_5 = controller_Button_pressureLevel__P187130_mk(s); + s.tmp_6 = controller_Controller_right__P187150_mk(s); + s.tmp_6.arg0 = s.arg0; + s.callLocIdx = 215; s.pc = 20; return s.tmp_6; + case 20: + r0 = s.retval; + s.tmp_5.arg0 = r0; + s.callLocIdx = 216; s.pc = 19; return s.tmp_5; + case 19: + r0 = s.retval; + s.tmp_4 = r0; + s.tmp_8 = controller_Button_pressureLevel__P187130_mk(s); + s.tmp_9 = controller_Controller_left__P187149_mk(s); + s.tmp_9.arg0 = s.arg0; + s.callLocIdx = 217; s.pc = 22; return s.tmp_9; + case 22: + r0 = s.retval; + s.tmp_8.arg0 = r0; + s.callLocIdx = 218; 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___197114; + s.tmp_4 = controller_Button_pressureLevel__P187130_mk(s); + s.tmp_5 = controller_Controller_down__P187152_mk(s); + s.tmp_5.arg0 = s.arg0; + s.callLocIdx = 219; s.pc = 24; return s.tmp_5; + case 24: + r0 = s.retval; + s.tmp_4.arg0 = r0; + s.callLocIdx = 220; s.pc = 23; return s.tmp_4; + case 23: + r0 = s.retval; + s.tmp_3 = r0; + s.tmp_7 = controller_Button_pressureLevel__P187130_mk(s); + s.tmp_8 = controller_Controller_up__P187151_mk(s); + s.tmp_8.arg0 = s.arg0; + s.callLocIdx = 221; s.pc = 26; return s.tmp_8; + case 26: + r0 = s.retval; + s.tmp_7.arg0 = r0; + s.callLocIdx = 222; s.pc = 25; return s.tmp_7; + case 25: + r0 = s.retval; + s.tmp_6 = r0; + r0 = (s.tmp_3 - s.tmp_6); + s.tmp_2 = r0; + r0 = (s.tmp_2 >> 1); s.tmp_1 = r0; - r0 = (s.arg0).fields["borderColor"] = (s.tmp_1); - r0 = pxsim_ImageMethods.isMono(globals.screen___187019); + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + { step = 12; continue; } + case 3: + s.tmp_1 = controller_Button__C187120_v0_1_mk(s); + s.tmp_2 = controller_Controller_right__P187150_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 223; 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__C187120_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 = 5; continue; } - r0 = 1; - { step = 6; continue; } + if (!r0) { step = 4; continue; } + r0 = 256; + { step = 5; continue; } + case 4: + r0 = 0; case 5: - r0 = 3; + // jmp value (already in r0) + s.tmp_3 = r0; + s.tmp_5 = controller_Button__C187120_v0_1_mk(s); + s.tmp_6 = controller_Controller_left__P187149_mk(s); + s.tmp_6.arg0 = s.arg0; + s.callLocIdx = 224; 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__C187120_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___197113; + 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__C187120_v0_1_mk(s); + s.tmp_2 = controller_Controller_down__P187152_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 225; 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__C187120_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__C187120_v0_1_mk(s); + s.tmp_6 = controller_Controller_up__P187151_mk(s); + s.tmp_6.arg0 = s.arg0; + s.callLocIdx = 226; 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__C187120_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___197114; + 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___197149 = (r0); + s.tmp_0 = r0 = s.svxInCricle___197149; + r0 = pxsim_pxtrt_ldlocRef(s.svx___197113); 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(); + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + r0 = pxsim_pxtrt.mklocRef(); + s.svyInCircle___197151 = (r0); + s.tmp_0 = r0 = s.svyInCircle___197151; + r0 = pxsim_pxtrt_ldlocRef(s.svy___197114); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["playerStates"] = (s.tmp_1); + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + r0 = pxsim_pxtrt_ldlocRef(s.svx___197113); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_ldlocRef(s.svx___197113); + s.tmp_2 = r0; + r0 = (s.tmp_1 * s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_ldlocRef(s.svy___197114); + s.tmp_4 = r0; + r0 = pxsim_pxtrt_ldlocRef(s.svy___197114); + s.tmp_5 = r0; + r0 = (s.tmp_4 * s.tmp_5); + s.tmp_3 = r0; + r0 = (s.tmp_0 + s.tmp_3); + s.sq___197153 = (r0); + r0 = (s.sq___197153 > 65536); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 13; continue; } + r0 = (65536 / s.sq___197153); + s.tmp_1 = r0; + r0 = pxsim.Math_.sqrt(s.tmp_1); + s.scale___197168 = (r0); + s.tmp_0 = r0 = s.svxInCricle___197149; + s.tmp_3 = r0 = s.scale___197168; + r0 = pxsim_pxtrt_ldlocRef(s.svx___197113); + 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___197151; + s.tmp_3 = r0 = s.scale___197168; + r0 = pxsim_pxtrt_ldlocRef(s.svy___197114); + 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, inline__P197186); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.deadSprites___197112); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.svx___197113); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.svy___197114); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 3, s.svxInCricle___197149); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 4, s.svyInCircle___197151); + s.tmp_1 = helpers_arrayForEach__P185324_mk(s); + s.tmp_2 = controller_Controller__controlledSprites__P187145_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 227; 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 = 235; s.pc = 35; return s.tmp_1; + case 35: + r0 = s.retval; + r0 = pxsim_pxtrt_ldlocRef(s.deadSprites___197112); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 15; continue; } + s.tmp_1 = controller_Controller__controlledSprites__P187146_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_2 = helpers_arrayFilter__P185325_mk(s); + s.tmp_3 = controller_Controller__controlledSprites__P187145_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 236; s.pc = 39; return s.tmp_3; + case 39: + r0 = s.retval; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = inline__P197243; + s.callLocIdx = 237; s.pc = 38; return s.tmp_2; + case 38: + r0 = s.retval; + s.tmp_1.arg1 = r0; + s.callLocIdx = 238; 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() } } } -info_InfoState_constructor__P189444.info = {"start":1045,"length":674,"line":43,"column":8,"endLine":61,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["this"]} +controller_Controller___preUpdate__P187164.info = {"start":14894,"length":2535,"line":466,"column":8,"endLine":530,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"__preUpdate","argumentNames":["this"]} -function info_InfoState_constructor__P189444_mk(s) { +function controller_Controller___preUpdate__P187164_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_InfoState_constructor__P189444, depth: s.depth + 1, + parent: s, fn: controller_Controller___preUpdate__P187164, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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___197112: undefined, + svx___197113: undefined, + svy___197114: undefined, + svxInCricle___197149: undefined, + svyInCircle___197151: undefined, + sq___197153: undefined, + scale___197168: undefined, arg0: undefined, } } -const _hex194778 = pxsim.BufferMethods.createBufferFromHex("87040500050000000100010010100000000100001010000001000100") -function info_defaultHeartImage__P189494(s) { +function inline__P197186(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12864,39 +13003,175 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_ImageMethods.isMono(globals.screen___187019); + s.s___197189 = undefined; + s.vx___197190 = undefined; + s.vy___197191 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + s.tmp_0 = if_s_1_mk(s); + s.tmp_1 = r0 = s.arg0; + s.tmp_0.arg0 = r0; + if (!s.tmp_0.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "s"); + } else { + s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["s"]; + if (s.tmp_0.fn == null) { s.retval = s.tmp_0.arg0.fields["s"]; } + else if (!s.tmp_0.fn.isGetter) { s.retval = bind(s.tmp_0); } + else { s.callLocIdx = 228; s.pc = 22; return s.tmp_0; } + } + case 22: + r0 = s.retval; + s.s___197189 = (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 = 229; s.pc = 23; return s.tmp_2; } + } + case 23: + r0 = s.retval; + s.vx___197190 = (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 = 230; s.pc = 24; return s.tmp_3; } + } + case 24: + r0 = s.retval; + s.vy___197191 = (r0); + r0 = s.s___197189.fields["flags"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 & 2); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = pxsim.image.ofBuffer(_hex194806); - { step = 2; continue; } + r0 = pxsim_pxtrt_stlocRef(s.caps[0], true); + { step = 21; continue; } case 1: - r0 = pxsim.image.ofBuffer(_hex194808); case 2: + r0 = s.arg0.fields["_inputLastFrame"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; continue; } + r0 = pxsim_numops_toBoolDecr(s.vx___197190); + if (!r0) { step = 3; continue; } + r0 = (s.s___197189).fields["_vx"] = (0); + case 3: + case 4: + r0 = pxsim_numops_toBoolDecr(s.vy___197191); + if (!r0) { step = 5; continue; } + r0 = (s.s___197189).fields["_vy"] = (0); + case 5: + case 6: + case 7: + case 8: + r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 9; continue; } + r0 = s.tmp_0; + { step = 10; continue; } + case 9: + r0 = pxsim_pxtrt_ldlocRef(s.caps[2]); + case 10: // jmp value (already in r0) s.tmp_1 = r0; - r0 = s.tmp_1; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 19; continue; } + s.tmp_2 = r0 = s.vx___197190; + r0 = pxsim_numops_toBool(s.tmp_2); + if (r0) { step = 11; continue; } + r0 = s.tmp_2; + { step = 12; continue; } + case 11: + r0 = s.vy___197191; + 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___197189; + r0 = pxsim_pxtrt_ldlocRef(s.caps[3]); + s.tmp_6 = r0; + r0 = pxsim.Math_.imul(s.tmp_6, s.vx___197190); + s.tmp_5 = r0; + r0 = (s.tmp_4).fields["_vx"] = (s.tmp_5); + s.tmp_0 = r0 = s.s___197189; + r0 = pxsim_pxtrt_ldlocRef(s.caps[4]); + s.tmp_2 = r0; + r0 = pxsim.Math_.imul(s.tmp_2, s.vy___197191); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_vy"] = (s.tmp_1); + { step = 18; continue; } + case 13: + r0 = pxsim_numops_toBoolDecr(s.vx___197190); + if (!r0) { step = 14; continue; } + s.tmp_0 = r0 = s.s___197189; + r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + s.tmp_2 = r0; + r0 = pxsim.Math_.imul(s.tmp_2, s.vx___197190); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_vx"] = (s.tmp_1); + { step = 17; continue; } + case 14: + r0 = pxsim_numops_toBoolDecr(s.vy___197191); + if (!r0) { step = 15; continue; } + s.tmp_0 = r0 = s.s___197189; + r0 = pxsim_pxtrt_ldlocRef(s.caps[2]); + s.tmp_2 = r0; + r0 = pxsim.Math_.imul(s.tmp_2, s.vy___197191); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_vy"] = (s.tmp_1); + case 15: + case 16: + case 17: + case 18: + r0 = (s.arg0).fields["_inputLastFrame"] = (true); + { step = 20; continue; } + case 19: + r0 = (s.arg0).fields["_inputLastFrame"] = (false); + case 20: + case 21: + r0 = undefined; return leave(s, r0) default: oops() } } } -info_defaultHeartImage__P189494.info = {"start":5080,"length":592,"line":162,"column":4,"endLine":183,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"defaultHeartImage","argumentNames":[]} +inline__P197186.info = {"start":16077,"length":1171,"line":497,"column":44,"endLine":525,"endColumn":13,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["controlledSprite"]} -function info_defaultHeartImage__P189494_mk(s) { +function inline__P197186_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_defaultHeartImage__P189494, depth: s.depth + 1, + parent: s, fn: inline__P197186, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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___197189: undefined, + vx___197190: undefined, + vy___197191: undefined, + arg0: undefined, } } -const _hex194806 = pxsim.BufferMethods.createBufferFromHex("87040800070000001011000001000100010010001000000101001000010001001011000000000000") -const _hex194808 = pxsim.BufferMethods.createBufferFromHex("8704080007000000c0cc00002c220c002222c2002222220c20222202222422004222020020220000") -function scene_Scene_millis__P187660(s) { +function inline__P197243(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12910,19 +13185,27 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, scene_Scene__C187636_VT)) failedCast(r0); - r0 = s.arg0.fields["_millis"]; + r0 = s.arg0.fields["s"]; + 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() } } } -scene_Scene_millis__P187660.info = {"start":6788,"length":61,"line":189,"column":8,"endLine":191,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"millis","argumentNames":["this"]} +inline__P197243.info = {"start":17375,"length":42,"line":529,"column":28,"endLine":529,"endColumn":70,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["s"]} -function scene_Scene_millis__P187660_mk(s) { +function inline__P197243_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_millis__P187660, depth: s.depth + 1, + parent: s, fn: inline__P197243, 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, } } @@ -12930,7 +13213,7 @@ function scene_Scene_millis__P187660_mk(s) { -function scene_createRenderable__P187600(s) { +function controller_Controller_down__P187152(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12940,60 +13223,38 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.renderable___194712 = 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__C187595_VT); + r0 = s.arg0; + if (!checkSubtype(r0, controller_Controller__C187140_VT)) failedCast(r0); + r0 = s.arg0.fields["buttons"]; 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 = inline__P194718; - case 2: - // jmp value (already in r0) - s.tmp_2 = r0; - s.tmp_3 = scene_Renderable_constructor__P187596_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 = 1015; s.pc = 3; return s.tmp_3; - case 3: - r0 = s.retval; - s.renderable___194712 = (s.tmp_0); - r0 = s.renderable___194712; - 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() } } } -scene_createRenderable__P187600.info = {"start":608,"length":339,"line":24,"column":4,"endLine":36,"endColumn":5,"fileName":"pxt_modules/game/renderable.ts","functionName":"createRenderable","argumentNames":["z","handler","shouldBeVisible"]} - -function scene_createRenderable__P187600_mk(s) { +controller_Controller_down__P187152.info = {"start":9528,"length":77,"line":312,"column":8,"endLine":314,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"down","argumentNames":["this"]} +controller_Controller_down__P187152.isGetter = true; + +function controller_Controller_down__P187152_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_createRenderable__P187600, depth: s.depth + 1, + parent: s, fn: controller_Controller_down__P187152, depth: s.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___194712: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function inline__P194718(s) { +function controller_Controller_button__P189408(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13003,24 +13264,39 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = true; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, controller_Controller__C187140_VT)) failedCast(r0); + r0 = s.arg0.fields["buttons"]; + s.tmp_0 = r0; + r0 = (s.arg1 - 1); + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); return leave(s, r0) default: oops() } } } -inline__P194718.info = {"start":875,"length":10,"line":31,"column":32,"endLine":31,"endColumn":42,"fileName":"pxt_modules/game/renderable.ts","functionName":"inline","argumentNames":[]} +controller_Controller_button__P189408.info = {"start":11484,"length":105,"line":373,"column":8,"endLine":375,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"button","argumentNames":["this","button"]} -function inline__P194718_mk(s) { +function controller_Controller_button__P189408_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P194718, depth: s.depth + 1, + parent: s, fn: controller_Controller_button__P189408, 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_Renderable_constructor__P187596(s) { +function controller_Controller_up__P187151(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13032,44 +13308,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, scene_Renderable__C187595_VT)) failedCast(r0); - r0 = (s.arg0).fields["handler"] = (s.arg1); - r0 = (s.arg0).fields["shouldBeVisible"] = (s.arg2); - s.tmp_0 = sprites_BaseSprite_constructor__P187077_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg3; - s.callLocIdx = 1012; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) + if (!checkSubtype(r0, controller_Controller__C187140_VT)) failedCast(r0); + r0 = s.arg0.fields["buttons"]; + s.tmp_0 = r0; + r0 = (2 - 1); + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); + return leaveAccessor(s, r0) default: oops() } } } -scene_Renderable_constructor__P187596.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"]} +controller_Controller_up__P187151.info = {"start":9376,"length":73,"line":304,"column":8,"endLine":306,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"up","argumentNames":["this"]} +controller_Controller_up__P187151.isGetter = true; -function scene_Renderable_constructor__P187596_mk(s) { +function controller_Controller_up__P187151_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Renderable_constructor__P187596, depth: s.depth + 1, + parent: s, fn: controller_Controller_up__P187151, 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 sprites_BaseSprite_constructor__P187077(s) { +function controller_Controller_right__P187150(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13081,49 +13349,36 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_BaseSprite__C187075_VT)) failedCast(r0); - s.tmp_0 = sprites_BaseSprite_z__P187080_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 170; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.tmp_0 = scene_Scene_addSprite__P187661_mk(s); - s.tmp_1 = game_currentScene__P187749_mk(s); - s.callLocIdx = 171; 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 = 172; s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) + if (!checkSubtype(r0, controller_Controller__C187140_VT)) failedCast(r0); + r0 = s.arg0.fields["buttons"]; + s.tmp_0 = r0; + r0 = (3 - 1); + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); + return leaveAccessor(s, r0) default: oops() } } } -sprites_BaseSprite_constructor__P187077.info = {"start":344,"length":170,"line":15,"column":8,"endLine":20,"endColumn":9,"fileName":"pxt_modules/game/basesprite.ts","functionName":"inline","argumentNames":["this","z"]} +controller_Controller_right__P187150.info = {"start":9220,"length":79,"line":296,"column":8,"endLine":298,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"right","argumentNames":["this"]} +controller_Controller_right__P187150.isGetter = true; -function sprites_BaseSprite_constructor__P187077_mk(s) { +function controller_Controller_right__P187150_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_BaseSprite_constructor__P187077, depth: s.depth + 1, + parent: s, fn: controller_Controller_right__P187150, 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_Scene_addSprite__P187661(s) { +function controller_Controller_left__P187149(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13135,48 +13390,75 @@ 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__C187636_VT)) failedCast(r0); - r0 = s.arg0.fields["allSprites"]; + if (!checkSubtype(r0, controller_Controller__C187140_VT)) failedCast(r0); + r0 = s.arg0.fields["buttons"]; 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 = (1 - 1); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["spriteNextId"] = (s.tmp_1); - s.tmp_3 = if_id_2_mk(s); - s.tmp_3.arg0 = s.arg1; - s.tmp_3.arg1 = s.tmp_2; - if (!s.tmp_3.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapSetByString(s.tmp_3.arg0, "id", s.tmp_3.arg1); - } else { - s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["set/id"]; - if (s.tmp_3.fn === null) { s.tmp_3.arg0.fields["id"] = s.tmp_3.arg1; } - else if (s.tmp_3.fn === undefined) { failedCast(s.tmp_3.arg0) } - else { s.callLocIdx = 1039; s.pc = 1; return s.tmp_3; } + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); + return leaveAccessor(s, r0) + default: oops() +} } } +controller_Controller_left__P187149.info = {"start":9063,"length":77,"line":288,"column":8,"endLine":290,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"left","argumentNames":["this"]} +controller_Controller_left__P187149.isGetter = true; + +function controller_Controller_left__P187149_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_Controller_left__P187149, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + arg0: undefined, +} } + + + + + +function controller_Controller__controlledSprites__P187146(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; } + r0 = s.arg0; + if (!checkSubtype(r0, controller_Controller__C187140_VT)) failedCast(r0); + s.tmp_1 = game_currentScene__P187749_mk(s); + s.callLocIdx = 200; s.pc = 1; return s.tmp_1; case 1: r0 = s.retval; + r0 = r0.fields["controlledSprites"]; + s.tmp_0 = r0; + r0 = s.arg0.fields["playerIndex"]; + s.tmp_2 = r0; + r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_2, s.arg1); r0 = undefined; return leave(s, r0) default: oops() } } } -scene_Scene_addSprite__P187661.info = {"start":6859,"length":128,"line":193,"column":8,"endLine":196,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"addSprite","argumentNames":["this","sprite"]} +controller_Controller__controlledSprites__P187146.info = {"start":8697,"length":134,"line":272,"column":8,"endLine":274,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"_controlledSprites","argumentNames":["this","cps"]} -function scene_Scene_addSprite__P187661_mk(s) { +function controller_Controller__controlledSprites__P187146_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_addSprite__P187661, depth: s.depth + 1, + parent: s, fn: controller_Controller__controlledSprites__P187146, depth: s.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, } } @@ -13185,7 +13467,7 @@ function scene_Scene_addSprite__P187661_mk(s) { -function sprites_BaseSprite_z__P187080(s) { +function controller_Controller__controlledSprites__P187145(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13197,54 +13479,114 @@ 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__C187075_VT)) failedCast(r0); - r0 = s.arg0.fields["_z"]; + if (!checkSubtype(r0, controller_Controller__C187140_VT)) failedCast(r0); + s.tmp_1 = game_currentScene__P187749_mk(s); + s.callLocIdx = 199; s.pc = 1; return s.tmp_1; + case 1: + r0 = s.retval; + r0 = r0.fields["controlledSprites"]; + s.tmp_0 = r0; + r0 = s.arg0.fields["playerIndex"]; + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_2); + return leaveAccessor(s, r0) + default: oops() +} } } +controller_Controller__controlledSprites__P187145.info = {"start":8555,"length":132,"line":268,"column":8,"endLine":270,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"_controlledSprites","argumentNames":["this"]} +controller_Controller__controlledSprites__P187145.isGetter = true; + +function controller_Controller__controlledSprites__P187145_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_Controller__controlledSprites__P187145, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + arg0: undefined, +} } + + + + + +function controller_Button_pressureLevel__P187130(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (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__C187120_VT)) failedCast(r0); + r0 = pxsim.control.deviceDalVersion(); s.tmp_1 = r0; - r0 = (s.tmp_1 !== s.arg1); + r0 = (s.tmp_1 == "sim"); 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__P187749_mk(s); - s.callLocIdx = 173; s.pc = 3; return s.tmp_1; - case 3: + if (!r0) { step = 3; continue; } + s.tmp_3 = controller_Button__C187120_v0_1_mk(s); + s.tmp_3.arg0 = s.arg0; + if (!checkSubtype(s.tmp_3.arg0, controller_Button__C187120_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_0 = r0; - r0 = s.tmp_0.fields["flags"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 | 1); s.tmp_2 = r0; - r0 = (s.tmp_0).fields["flags"] = (s.tmp_2); + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 1; continue; } + r0 = 512; + { step = 2; continue; } case 1: + r0 = 0; case 2: + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = s.tmp_4; + { step = 5; continue; } + { step = 4; continue; } + case 3: + r0 = s.arg0.fields["id"]; + s.tmp_5 = r0; + r0 = pxsim_pxtcore.pressureLevelByButtonId(s.tmp_5, -1); + { step = 5; continue; } + case 4: r0 = undefined; + case 5: return leave(s, r0) default: oops() } } } -sprites_BaseSprite_z__P187080.info = {"start":656,"length":174,"line":30,"column":8,"endLine":35,"endColumn":9,"fileName":"pxt_modules/game/basesprite.ts","functionName":"z","argumentNames":["this","v"]} +controller_Button_pressureLevel__P187130.info = {"start":4279,"length":311,"line":139,"column":8,"endLine":146,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"pressureLevel","argumentNames":["this"]} -function sprites_BaseSprite_z__P187080_mk(s) { +function controller_Button_pressureLevel__P187130_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_BaseSprite_z__P187080, depth: s.depth + 1, + parent: s, fn: controller_Button_pressureLevel__P187130, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, arg0: undefined, - arg1: undefined, } } -function sprites_BaseSprite_z__P187079(s) { +function controller_Button_isPressed__P187129(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13259,18 +13601,17 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_BaseSprite__C187075_VT)) failedCast(r0); - r0 = s.arg0.fields["_z"]; - return leaveAccessor(s, r0) + if (!checkSubtype(r0, controller_Button__C187120_VT)) failedCast(r0); + r0 = s.arg0.fields["_pressed"]; + return leave(s, r0) default: oops() } } } -sprites_BaseSprite_z__P187079.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__P187079.isGetter = true; +controller_Button_isPressed__P187129.info = {"start":4129,"length":57,"line":132,"column":8,"endLine":134,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"isPressed","argumentNames":["this"]} -function sprites_BaseSprite_z__P187079_mk(s) { +function controller_Button_isPressed__P187129_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_BaseSprite_z__P187079, depth: s.depth + 1, + parent: s, fn: controller_Button_isPressed__P187129, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, } } @@ -13279,7 +13620,7 @@ function sprites_BaseSprite_z__P187079_mk(s) { -function info_PlayerInfo_constructor__P187455(s) { +function Fx_imul__P185373(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13294,152 +13635,123 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, info_PlayerInfo__C187443_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["visilibity"] = (0); - r0 = (s.arg0).fields["showScore"] = (undefined); - r0 = (s.arg0).fields["showLife"] = (undefined); - r0 = (s.arg0).fields["showPlayer"] = (undefined); - 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; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = pxsim_ImageMethods.isMono(globals.screen___187019); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + r0 = pxsim.Math_.imul(s.arg0, s.arg1); + return leave(s, r0) + default: oops() +} } } +Fx_imul__P185373.info = {"start":1010,"length":130,"line":32,"column":4,"endLine":34,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"imul","argumentNames":["a","b"]} + +function Fx_imul__P185373_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Fx_imul__P185373, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, + arg1: undefined, +} } + + + + + +function power_checkDeepSleep__P186923(s) { +let r0 = s.r0, 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___196310 = undefined; + s.to___196313 = undefined; + s.tmp_0 = power_init__P189307_mk(s); + s.callLocIdx = 117; s.pc = 11; return s.tmp_0; + case 11: + r0 = s.retval; + s.tmp_0 = r0 = globals._poked___189305; + r0 = pxsim_numops_toBool(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = 0; + r0 = s.tmp_0; { step = 2; continue; } case 1: - r0 = 2; + r0 = 0; 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___187019); s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 4; continue; } + s.p___196310 = (s.tmp_1); + s.tmp_0 = r0 = globals._timeout___189306; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = s.tmp_0; + { step = 4; continue; } + case 3: 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_ImageMethods.width(globals.screen___187019); 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.to___196313 = (s.tmp_1); + r0 = (s.to___196313 > 0); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 9; continue; } - r0 = pxsim_ImageMethods.isMono(globals.screen___187019); + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 5; continue; } + r0 = s.tmp_0; + { step = 6; continue; } + case 5: + r0 = pxsim.control.millis(); + s.tmp_2 = r0; + r0 = (s.tmp_2 - s.p___196310); s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 7; continue; } - r0 = 0; + r0 = (s.tmp_1 > s.to___196313); + case 6: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBool(s.tmp_3); + if (r0) { step = 7; continue; } + r0 = s.tmp_3; { step = 8; continue; } case 7: - r0 = 4; + 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_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___187019); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["y"] = (s.tmp_1); - r0 = (s.arg0).fields["up"] = (true); - { step = 12; continue; } + s.tmp_6 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_6); + if (!r0) { step = 9; continue; } + r0 = pxsim_pxtcore.deepSleep(); case 9: - r0 = pxsim_ImageMethods.isMono(globals.screen___187019); - 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___187019); - 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___187019); - 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 = pxsim_numops_toBoolDecr(globals.players___189447); - 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 = pxsim_Array__mk(); - globals.players___189447 = (r0); - case 15: - case 16: - s.tmp_0 = r0 = globals.players___189447; - 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() } } } -info_PlayerInfo_constructor__P187455.info = {"start":15446,"length":1370,"line":515,"column":8,"endLine":552,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["this","player"]} +power_checkDeepSleep__P186923.info = {"start":1087,"length":298,"line":36,"column":4,"endLine":46,"endColumn":5,"fileName":"pxt_modules/power/power.ts","functionName":"checkDeepSleep","argumentNames":[]} -function info_PlayerInfo_constructor__P187455_mk(s) { +function power_checkDeepSleep__P186923_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_PlayerInfo_constructor__P187455, depth: s.depth + 1, + parent: s, fn: power_checkDeepSleep__P186923, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - arg0: undefined, - arg1: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + p___196310: undefined, + to___196313: undefined, } } -function info_PlayerInfo_drawLives__P187470(s) { +function power_init__P189307(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13449,316 +13761,54 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.state___193929 = undefined; - s.font___193935 = undefined; - s.i___193979 = undefined; - s.num___194001 = undefined; - s.textWidth___194008 = undefined; - s.mult___194061 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, info_PlayerInfo__C187443_VT)) failedCast(r0); - s.tmp_0 = info_PlayerInfo_getState__P187456_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 858; s.pc = 8; return s.tmp_0; - case 8: - r0 = s.retval; - s.state___193929 = (r0); - r0 = s.state___193929.fields["life"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 < 0); + r0 = (globals._timeout___189306 !== undefined); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } { step = 7; continue; } case 1: case 2: - s.font___193935 = (globals.font8___186962); - r0 = s.state___193929.fields["life"]; + r0 = pxsim_pxtcore.getConfig(212, -1); s.tmp_1 = r0; - r0 = (s.tmp_1 <= 4); + r0 = (s.tmp_1 * 1000); + globals._timeout___189306 = (r0); + r0 = (globals._timeout___189306 > 0); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - s.tmp_2 = helpers_imageFillRect__P186945_mk(s); - s.tmp_2.arg0 = globals.screen___187019; - s.tmp_2.arg1 = 0; - s.tmp_2.arg2 = 0; - r0 = s.state___193929.fields["life"]; - s.tmp_4 = r0; - r0 = globals.infoState___189446.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___189446.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___189446.fields["borderColor"]; - s.tmp_2.arg5 = r0; - s.callLocIdx = 859; s.pc = 9; return s.tmp_2; - case 9: - r0 = s.retval; - s.tmp_0 = helpers_imageFillRect__P186945_mk(s); - s.tmp_0.arg0 = globals.screen___187019; - s.tmp_0.arg1 = 0; - s.tmp_0.arg2 = 0; - r0 = s.state___193929.fields["life"]; - s.tmp_2 = r0; - r0 = globals.infoState___189446.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___189446.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___189446.fields["bgColor"]; - s.tmp_0.arg5 = r0; - s.callLocIdx = 860; s.pc = 10; return s.tmp_0; - case 10: - r0 = s.retval; - s.i___193979 = (0); + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 3; continue; } + r0 = s.tmp_0; + { step = 4; continue; } case 3: - r0 = s.state___193929.fields["life"]; - s.tmp_1 = r0; - r0 = (s.i___193979 < 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___187019; - r0 = globals.infoState___189446.fields["heartImage"]; - s.tmp_3 = r0; - s.tmp_6 = r0 = s.i___193979; - r0 = globals.infoState___189446.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___193979 + 1); - s.i___193979 = (r0); - { step = 3; continue; } + r0 = (globals._timeout___189306 < 300000); case 4: - { step = 6; continue; } - case 5: - r0 = s.state___193929.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_String_.mkEmpty(); - s.tmp_2 = r0; - r0 = pxsim_String__concat(s.tmp_0, s.tmp_2); - s.num___194001 = (r0); - r0 = pxsim_String_.length(s.num___194001); - s.tmp_1 = r0; - s.tmp_3 = if_charWidth_1_mk(s); - s.tmp_3.arg0 = s.font___193935; - 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 = 861; 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___194008 = (r0); - s.tmp_0 = helpers_imageFillRect__P186945_mk(s); - s.tmp_0.arg0 = globals.screen___187019; - s.tmp_0.arg1 = 0; - s.tmp_0.arg2 = 0; - r0 = globals.infoState___189446.fields["heartImage"]; - s.tmp_4 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_4); - s.tmp_3 = r0; - r0 = globals.infoState___189446.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___194008); - s.tmp_1 = r0; - r0 = (s.tmp_1 + 5); - s.tmp_0.arg3 = r0; - r0 = globals.infoState___189446.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___189446.fields["borderColor"]; - s.tmp_0.arg5 = r0; - s.callLocIdx = 862; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; - s.tmp_0 = helpers_imageFillRect__P186945_mk(s); - s.tmp_0.arg0 = globals.screen___187019; - s.tmp_0.arg1 = 0; - s.tmp_0.arg2 = 0; - r0 = globals.infoState___189446.fields["heartImage"]; - s.tmp_4 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_4); - s.tmp_3 = r0; - r0 = globals.infoState___189446.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___194008); - s.tmp_1 = r0; - r0 = (s.tmp_1 + 4); - s.tmp_0.arg3 = r0; - r0 = globals.infoState___189446.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___189446.fields["bgColor"]; - s.tmp_0.arg5 = r0; - s.callLocIdx = 863; s.pc = 14; return s.tmp_0; - case 14: - r0 = s.retval; - r0 = globals.infoState___189446.fields["heartImage"]; - s.tmp_0 = r0; - r0 = pxsim_ImageMethods.drawTransparentImage(globals.screen___187019, s.tmp_0, 1, 1); - r0 = globals.infoState___189446.fields["multiplierImage"]; - s.tmp_0 = r0; - r0 = pxsim_ImageMethods.clone(s.tmp_0); - s.mult___194061 = (r0); - r0 = globals.infoState___189446.fields["fontColor"]; - s.tmp_0 = r0; - r0 = pxsim_ImageMethods.replace(s.mult___194061, 1, s.tmp_0); - s.tmp_0 = r0 = globals.screen___187019; - s.tmp_1 = r0 = s.mult___194061; - r0 = globals.infoState___189446.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___193935; - 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 = 864; s.pc = 15; return s.tmp_8; } - } - case 15: - r0 = s.retval; - s.tmp_7 = r0; - r0 = globals.infoState___189446.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__P186977_mk(s); - s.tmp_0.arg0 = globals.screen___187019; - s.tmp_0.arg1 = s.num___194001; - r0 = globals.infoState___189446.fields["heartImage"]; - s.tmp_3 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_3); - s.tmp_2 = r0; - r0 = (s.tmp_2 + 3); + // jmp value (already in r0) s.tmp_1 = r0; - r0 = globals.infoState___189446.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___189446.fields["fontColor"]; - s.tmp_0.arg4 = r0; - s.tmp_0.arg5 = s.font___193935; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 865; s.pc = 16; return s.tmp_0; - case 16: - r0 = s.retval; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 5; continue; } + globals._timeout___189306 = (300000); + case 5: case 6: case 7: r0 = undefined; return leave(s, r0) default: oops() } } } -info_PlayerInfo_drawLives__P187470.info = {"start":25956,"length":2458,"line":847,"column":8,"endLine":913,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"drawLives","argumentNames":["this"]} +power_init__P189307.info = {"start":1610,"length":376,"line":57,"column":4,"endLine":66,"endColumn":5,"fileName":"pxt_modules/power/power.ts","functionName":"init","argumentNames":[]} -function info_PlayerInfo_drawLives__P187470_mk(s) { +function power_init__P189307_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_PlayerInfo_drawLives__P187470, depth: s.depth + 1, + parent: s, fn: power_init__P189307, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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, - state___193929: undefined, - font___193935: undefined, - i___193979: undefined, - num___194001: undefined, - textWidth___194008: undefined, - mult___194061: undefined, - arg0: undefined, } } -function info_PlayerInfo_getState__P187456(s) { +function power_poke__P186922(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13768,45 +13818,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, info_PlayerInfo__C187443_VT)) failedCast(r0); - s.tmp_0 = info_PlayerInfo_init__P189498_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 827; s.pc = 1; return s.tmp_0; + s.tmp_0 = power_init__P189307_mk(s); + s.callLocIdx = 116; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - r0 = globals.infoState___189446.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); + r0 = pxsim.control.millis(); + globals._poked___189305 = (r0); + r0 = undefined; return leave(s, r0) default: oops() } } } -info_PlayerInfo_getState__P187456.info = {"start":17088,"length":121,"line":562,"column":8,"endLine":565,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"getState","argumentNames":["this"]} +power_poke__P186922.info = {"start":795,"length":81,"line":26,"column":4,"endLine":29,"endColumn":5,"fileName":"pxt_modules/power/power.ts","functionName":"poke","argumentNames":[]} -function info_PlayerInfo_getState__P187456_mk(s) { +function power_poke__P186922_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_PlayerInfo_getState__P187456, depth: s.depth + 1, + parent: s, fn: power_poke__P186922, 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 info_PlayerInfo_init__P189498(s) { +function control_EventContext_deltaTime__P185606(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13821,70 +13857,22 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, info_PlayerInfo__C187443_VT)) failedCast(r0); - s.tmp_0 = info_initHUD__P189492_mk(s); - s.callLocIdx = 824; 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__P189493_mk(s); - s.callLocIdx = 825; s.pc = 6; return s.tmp_2; - case 6: - r0 = s.retval; - case 1: - case 2: - r0 = globals.infoState___189446.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); + if (!checkSubtype(r0, control_EventContext__C185601_VT)) failedCast(r0); + r0 = s.arg0.fields["deltaTimeMillis"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = pxsim_pxtcore_mkClassInstance(info_PlayerState__C187414_VT); - s.tmp_6 = r0; - r0 = undefined; - r0 = globals.infoState___189446.fields["playerStates"]; - s.tmp_7 = r0; - r0 = s.arg0.fields["_player"]; - s.tmp_9 = r0; - r0 = (s.tmp_9 - 1); - s.tmp_8 = r0; - r0 = pxsim_Array_.setAt(s.tmp_7, s.tmp_8, s.tmp_6); - case 3: - case 4: - r0 = undefined; - return leave(s, r0) + r0 = (s.tmp_0 / 1000); + return leaveAccessor(s, r0) default: oops() } } } -info_PlayerInfo_init__P189498.info = {"start":16826,"length":252,"line":554,"column":8,"endLine":560,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"init","argumentNames":["this"]} +control_EventContext_deltaTime__P185606.info = {"start":2097,"length":75,"line":70,"column":8,"endLine":72,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"deltaTime","argumentNames":["this"]} +control_EventContext_deltaTime__P185606.isGetter = true; -function info_PlayerInfo_init__P189498_mk(s) { +function control_EventContext_deltaTime__P185606_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_PlayerInfo_init__P189498, depth: s.depth + 1, + parent: s, fn: control_EventContext_deltaTime__P185606, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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, } } @@ -13892,7 +13880,7 @@ function info_PlayerInfo_init__P189498_mk(s) { -function info_initMultiHUD__P189493(s) { +function scene_Scene_constructor__P187657(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13902,71 +13890,114 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = globals.infoState___189446.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, scene_Scene__C187636_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__C187390_VT); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 5; continue; } + s.tmp_1 = ArcadePhysicsEngine_constructor__P187391_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 = 1016; s.pc = 1; return s.tmp_1; case 1: - case 2: - s.tmp_2 = r0 = globals.infoState___189446; - 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___189446.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); + r0 = s.retval; + r0 = (s.arg0).fields["physicsEngine"] = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(scene_Camera__C187577_VT); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_4 = r0 = globals.infoState___189446; - s.tmp_6 = info_defaultMultiplayerHeartImage__P189495_mk(s); - s.callLocIdx = 796; s.pc = 6; return s.tmp_6; - case 6: + s.tmp_1 = scene_Camera_constructor__P187581_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 1017; s.pc = 2; return s.tmp_1; + case 2: r0 = s.retval; - s.tmp_5 = r0; - r0 = (s.tmp_4).fields["heartImage"] = (s.tmp_5); + r0 = (s.arg0).fields["camera"] = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(scene_Background__C187482_VT); + s.tmp_0 = r0; + s.tmp_1 = scene_Background_constructor__P187486_mk(s); + s.tmp_1.arg0 = s.tmp_0; + r0 = s.arg0.fields["camera"]; + s.tmp_1.arg1 = r0; + s.callLocIdx = 1018; s.pc = 3; return s.tmp_1; case 3: - case 4: - s.tmp_0 = r0 = globals.infoState___189446; - r0 = pxsim.image.ofBuffer(_hex194155); + 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["multiplierImage"] = (s.tmp_1); - case 5: + 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_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() } } } -info_initMultiHUD__P189493.info = {"start":4681,"length":393,"line":149,"column":4,"endLine":160,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"initMultiHUD","argumentNames":[]} +scene_Scene_constructor__P187657.info = {"start":3365,"length":793,"line":102,"column":8,"endLine":120,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":["this","eventContext","previousScene"]} -function info_initMultiHUD__P189493_mk(s) { +function scene_Scene_constructor__P187657_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_initMultiHUD__P189493, depth: s.depth + 1, + parent: s, fn: scene_Scene_constructor__P187657, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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 _hex194155 = pxsim.BufferMethods.createBufferFromHex("8704030003000000010100001000000001010000") -function info_defaultMultiplayerHeartImage__P189495(s) { +function scene_Camera_constructor__P187581(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13976,39 +14007,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_ImageMethods.isMono(globals.screen___187019); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = pxsim.image.ofBuffer(_hex194159); - { step = 2; continue; } - case 1: - r0 = pxsim.image.ofBuffer(_hex194161); - case 2: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = s.tmp_1; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, scene_Camera__C187577_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() } } } -info_defaultMultiplayerHeartImage__P189495.info = {"start":5678,"length":503,"line":185,"column":4,"endLine":202,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"defaultMultiplayerHeartImage","argumentNames":[]} +scene_Camera_constructor__P187581.info = {"start":456,"length":156,"line":15,"column":8,"endLine":21,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"inline","argumentNames":["this"]} -function info_defaultMultiplayerHeartImage__P189495_mk(s) { +function scene_Camera_constructor__P187581_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_defaultMultiplayerHeartImage__P189495, depth: s.depth + 1, + parent: s, fn: scene_Camera_constructor__P187581, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, + arg0: undefined, } } -const _hex194159 = pxsim.BufferMethods.createBufferFromHex("870407000500000000000000100100000110000010000100011000001001000000000000") -const _hex194161 = pxsim.BufferMethods.createBufferFromHex("870407000500000000000000100100002112000010240100411200001001000000000000") -function info_PlayerState_constructor__P187418(s) { +function scene_Background_constructor__P187486(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14020,29 +14047,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, info_PlayerState__C187414_VT)) failedCast(r0); + if (!checkSubtype(r0, scene_Background__C187482_VT)) failedCast(r0); + r0 = (s.arg0).fields["color"] = (0); + r0 = (s.arg0).fields["camera"] = (s.arg1); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_layers"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -info_PlayerState_constructor__P187418.info = {"start":608,"length":17,"line":27,"column":8,"endLine":27,"endColumn":25,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["this"]} +scene_Background_constructor__P187486.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 info_PlayerState_constructor__P187418_mk(s) { +function scene_Background_constructor__P187486_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_PlayerState_constructor__P187418, depth: s.depth + 1, + parent: s, fn: scene_Background_constructor__P187486, 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_PlayerInfo_drawScore__P187469(s) { +function ArcadePhysicsEngine_constructor__P187391(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14052,161 +14089,115 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.s___194176 = undefined; - s.font___194180 = undefined; - s.offsetY___194181 = undefined; - s.num___194190 = undefined; - s.width___194194 = 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, info_PlayerInfo__C187443_VT)) failedCast(r0); - s.tmp_1 = info_PlayerInfo_score__P187458_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 851; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; - s.tmp_0 = r0; - r0 = (s.tmp_0 | 0); - s.s___194176 = (r0); - r0 = (s.s___194176 >= 1000000); + if (!checkSubtype(r0, ArcadePhysicsEngine__C187390_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__C187311_VT); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.offsetY___194181 = (2); - s.font___194180 = (globals.font5___186967); - { step = 2; continue; } + s.tmp_1 = sprites_SpriteMap_constructor__P187312_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 537; s.pc = 1; return s.tmp_1; case 1: - s.offsetY___194181 = (1); - s.font___194180 = (globals.font8___186962); + r0 = s.retval; + r0 = (s.arg0).fields["map"] = (s.tmp_0); + s.tmp_0 = ArcadePhysicsEngine_maxSpeed__P187393_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 538; s.pc = 2; return s.tmp_0; case 2: - r0 = pxsim_numops.toString(s.s___194176); - s.num___194190 = (r0); - r0 = pxsim_String_.length(s.num___194190); - s.tmp_0 = r0; - s.tmp_2 = if_charWidth_1_mk(s); - s.tmp_2.arg0 = s.font___194180; - 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 = 852; 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___194194 = (r0); - s.tmp_0 = helpers_imageFillRect__P186945_mk(s); - s.tmp_0.arg0 = globals.screen___187019; - r0 = pxsim_ImageMethods.width(globals.screen___187019); - s.tmp_2 = r0; - r0 = (s.tmp_2 - s.width___194194); - 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___187019); - s.tmp_0.arg3 = r0; - s.tmp_4 = if_charHeight_1_mk(s); - s.tmp_4.arg0 = globals.font8___186962; - 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 = 853; s.pc = 6; return s.tmp_4; } - } - case 6: + s.tmp_0 = ArcadePhysicsEngine_maxStep__P187397_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg3; + s.callLocIdx = 539; s.pc = 3; return s.tmp_0; + case 3: r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_3 + 3); - s.tmp_0.arg4 = r0; - r0 = globals.infoState___189446.fields["borderColor"]; - s.tmp_0.arg5 = r0; - s.callLocIdx = 854; s.pc = 5; return s.tmp_0; - case 5: + s.tmp_0 = ArcadePhysicsEngine_minStep__P187395_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg2; + s.callLocIdx = 540; s.pc = 4; return s.tmp_0; + case 4: r0 = s.retval; - s.tmp_0 = helpers_imageFillRect__P186945_mk(s); - s.tmp_0.arg0 = globals.screen___187019; - r0 = pxsim_ImageMethods.width(globals.screen___187019); - s.tmp_2 = r0; - r0 = (s.tmp_2 - s.width___194194); - 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___187019); - s.tmp_0.arg3 = r0; - s.tmp_4 = if_charHeight_1_mk(s); - s.tmp_4.arg0 = globals.font8___186962; - 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 = 855; s.pc = 8; return s.tmp_4; } + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +ArcadePhysicsEngine_constructor__P187391.info = {"start":1330,"length":277,"line":55,"column":4,"endLine":62,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["this","maxVelocity","minSingleStep","maxSingleStep"]} + +function ArcadePhysicsEngine_constructor__P187391_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: ArcadePhysicsEngine_constructor__P187391, 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__P187397(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (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; } - case 8: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_3 + 2); - s.tmp_0.arg4 = r0; - r0 = globals.infoState___189446.fields["bgColor"]; - s.tmp_0.arg5 = r0; - s.callLocIdx = 856; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - s.tmp_0 = helpers_imagePrint__P186977_mk(s); - s.tmp_0.arg0 = globals.screen___187019; - s.tmp_0.arg1 = s.num___194190; - r0 = pxsim_ImageMethods.width(globals.screen___187019); + r0 = s.arg0; + if (!checkSubtype(r0, ArcadePhysicsEngine__C187390_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg1 * 256); + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); s.tmp_1 = r0; - r0 = (s.tmp_1 - s.width___194194); - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = s.offsetY___194181; - r0 = globals.infoState___189446.fields["fontColor"]; - s.tmp_0.arg4 = r0; - s.tmp_0.arg5 = s.font___194180; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 857; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; + r0 = (s.tmp_0).fields["maxSingleStep"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -info_PlayerInfo_drawScore__P187469.info = {"start":24898,"length":1048,"line":807,"column":8,"endLine":845,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"drawScore","argumentNames":["this"]} +ArcadePhysicsEngine_maxStep__P187397.info = {"start":2058,"length":67,"line":85,"column":4,"endLine":87,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"maxStep","argumentNames":["this","v"]} -function info_PlayerInfo_drawScore__P187469_mk(s) { +function ArcadePhysicsEngine_maxStep__P187397_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_PlayerInfo_drawScore__P187469, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_maxStep__P187397, depth: s.depth + 1, pc: 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___194176: undefined, - font___194180: undefined, - offsetY___194181: undefined, - num___194190: undefined, - width___194194: undefined, arg0: undefined, + arg1: undefined, } } -function info_PlayerInfo_score__P187458(s) { +function ArcadePhysicsEngine_maxStep__P187396(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14216,68 +14207,118 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.state___194255 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, info_PlayerInfo__C187443_VT)) failedCast(r0); - r0 = s.arg0.fields["showScore"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 === undefined); + if (!checkSubtype(r0, ArcadePhysicsEngine__C187390_VT)) failedCast(r0); + r0 = s.arg0.fields["maxSingleStep"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = (s.arg0).fields["showScore"] = (true); - case 1: - case 2: - r0 = s.arg0.fields["showPlayer"]; + r0 = (s.tmp_0 + 128); s.tmp_1 = r0; - r0 = (s.tmp_1 === undefined); + r0 = (s.tmp_1 >> 8); + return leaveAccessor(s, r0) + default: oops() +} } } +ArcadePhysicsEngine_maxStep__P187396.info = {"start":1978,"length":74,"line":81,"column":4,"endLine":83,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"maxStep","argumentNames":["this"]} +ArcadePhysicsEngine_maxStep__P187396.isGetter = true; + +function ArcadePhysicsEngine_maxStep__P187396_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: ArcadePhysicsEngine_maxStep__P187396, 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__P185382(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (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 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = (s.arg0).fields["showPlayer"] = (true); - case 3: - case 4: - s.tmp_0 = info_PlayerInfo_getState__P187456_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 828; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - s.state___194255 = (r0); - r0 = s.state___194255.fields["score"]; + r0 = (s.tmp_0 >> 8); + return leave(s, r0) + default: oops() +} } } +Fx_toInt__P185382.info = {"start":2144,"length":86,"line":68,"column":4,"endLine":70,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"toInt","argumentNames":["v"]} + +function Fx_toInt__P185382_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Fx_toInt__P185382, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function ArcadePhysicsEngine_minStep__P187395(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (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__C187390_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg1 * 256); + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); s.tmp_1 = r0; - r0 = (s.tmp_1 == null); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - r0 = (s.state___194255).fields["score"] = (0); - case 5: - case 6: - r0 = s.state___194255.fields["score"]; + r0 = (s.tmp_0).fields["minSingleStep"] = (s.tmp_1); + r0 = undefined; return leave(s, r0) default: oops() } } } -info_PlayerInfo_score__P187458.info = {"start":17492,"length":314,"line":578,"column":8,"endLine":587,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"score","argumentNames":["this"]} +ArcadePhysicsEngine_minStep__P187395.info = {"start":1905,"length":67,"line":77,"column":4,"endLine":79,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"minStep","argumentNames":["this","v"]} -function info_PlayerInfo_score__P187458_mk(s) { +function ArcadePhysicsEngine_minStep__P187395_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_PlayerInfo_score__P187458, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_minStep__P187395, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - state___194255: undefined, + tmp_2: undefined, arg0: undefined, + arg1: undefined, } } -function info_PlayerInfo_drawPlayer__P187468(s) { +function ArcadePhysicsEngine_minStep__P187394(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14287,808 +14328,89 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.state___194390 = undefined; - s.font___194393 = undefined; - s.score___194395 = undefined; - s.life___194396 = undefined; - s.height___194397 = undefined; - s.scoreWidth___194398 = undefined; - s.lifeWidth___194399 = undefined; - s.offsetY___194402 = undefined; - s.showScore___194403 = undefined; - s.showLife___194411 = undefined; - s.width___194479 = undefined; - s.x___194489 = undefined; - s.y___194496 = undefined; - s.bump___194529 = undefined; - s.xLoc___194554 = undefined; - s.mult___194565 = undefined; - s.pNum___194627 = undefined; - s.iconWidth___194634 = undefined; - s.iconHeight___194642 = undefined; - s.iconX___194650 = undefined; - s.iconY___194662 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, info_PlayerInfo__C187443_VT)) failedCast(r0); - s.tmp_0 = info_PlayerInfo_getState__P187456_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 834; s.pc = 43; return s.tmp_0; - case 43: - r0 = s.retval; - s.state___194390 = (r0); - s.font___194393 = (globals.font5___186967); - s.height___194397 = (4); - s.scoreWidth___194398 = (0); - s.lifeWidth___194399 = (0); - s.offsetY___194402 = (2); - r0 = s.arg0.fields["showScore"]; + if (!checkSubtype(r0, ArcadePhysicsEngine__C187390_VT)) failedCast(r0); + r0 = s.arg0.fields["minSingleStep"]; 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___194390.fields["score"]; + r0 = (s.tmp_0 + 128); s.tmp_1 = r0; - r0 = (s.tmp_1 !== undefined); - case 2: - // jmp value (already in r0) + r0 = (s.tmp_1 >> 8); + return leaveAccessor(s, r0) + default: oops() +} } } +ArcadePhysicsEngine_minStep__P187394.info = {"start":1825,"length":74,"line":73,"column":4,"endLine":75,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"minStep","argumentNames":["this"]} +ArcadePhysicsEngine_minStep__P187394.isGetter = true; + +function ArcadePhysicsEngine_minStep__P187394_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: ArcadePhysicsEngine_minStep__P187394, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + arg0: undefined, +} } + + + + + +function ArcadePhysicsEngine_maxSpeed__P187393(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (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__C187390_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg1 * 256); s.tmp_2 = r0; - s.showScore___194403 = (s.tmp_2); - r0 = s.arg0.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___194390.fields["life"]; + r0 = (s.tmp_2 | 0); s.tmp_1 = r0; - r0 = (s.tmp_1 !== undefined); - case 4: - // jmp value (already in r0) - s.tmp_2 = r0; - s.showLife___194411 = (s.tmp_2); - r0 = pxsim_numops_toBoolDecr(s.showScore___194403); - if (!r0) { step = 5; continue; } - r0 = pxsim_String_.mkEmpty(); - s.tmp_0 = r0; - r0 = s.state___194390.fields["score"]; + r0 = (s.tmp_0).fields["maxVelocity"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["maxVelocity"]; 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; - s.tmp_1 = r0; - r0 = pxsim_String__concat(s.tmp_0, s.tmp_1); - s.score___194395 = (r0); - r0 = pxsim_String_.length(s.score___194395); + r0 = (0 - s.tmp_2); s.tmp_1 = r0; - s.tmp_3 = if_charWidth_1_mk(s); - s.tmp_3.arg0 = s.font___194393; - 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 = 835; 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; - r0 = (s.tmp_0 + 3); - s.scoreWidth___194398 = (r0); - s.tmp_0 = r0 = s.height___194397; - s.tmp_2 = if_charHeight_1_mk(s); - s.tmp_2.arg0 = s.font___194393; - 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 = 836; s.pc = 46; return s.tmp_2; } - } - case 46: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.height___194397 = (r0); - s.tmp_0 = r0 = s.offsetY___194402; - s.tmp_3 = if_charHeight_1_mk(s); - s.tmp_3.arg0 = s.font___194393; - 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 = 837; s.pc = 47; return s.tmp_3; } - } - case 47: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_2 + 1); - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.offsetY___194402 = (r0); - case 5: - case 6: - r0 = pxsim_numops_toBoolDecr(s.showLife___194411); - if (!r0) { step = 9; continue; } - r0 = s.state___194390.fields["life"]; - 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 = 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; - s.tmp_3 = r0; - r0 = pxsim_String__concat(s.tmp_2, s.tmp_3); - s.life___194396 = (r0); - r0 = globals.infoState___189446.fields["heartImage"]; - s.tmp_3 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_3); - s.tmp_2 = r0; - r0 = globals.infoState___189446.fields["multiplierImage"]; - s.tmp_5 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_5); - s.tmp_4 = r0; - r0 = (s.tmp_2 + s.tmp_4); - s.tmp_1 = r0; - r0 = pxsim_String_.length(s.life___194396); - s.tmp_7 = r0; - s.tmp_9 = if_charWidth_1_mk(s); - s.tmp_9.arg0 = s.font___194393; - 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 = 838; s.pc = 49; return s.tmp_9; } - } - case 49: - 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___194399 = (r0); - s.tmp_0 = r0 = s.height___194397; - r0 = globals.infoState___189446.fields["heartImage"]; - s.tmp_2 = r0; - r0 = pxsim_ImageMethods.height(s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.height___194397 = (r0); - case 9: - case 10: - s.tmp_0 = Math_max__P185342_mk(s); - s.tmp_0.arg0 = s.scoreWidth___194398; - s.tmp_0.arg1 = s.lifeWidth___194399; - s.callLocIdx = 839; s.pc = 50; return s.tmp_0; - case 50: - r0 = s.retval; - s.width___194479 = (r0); - s.tmp_0 = r0 = s.showScore___194403; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 11; continue; } - r0 = s.tmp_0; - { step = 12; continue; } - case 11: - r0 = s.showLife___194411; - 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___194397 + 1); - s.height___194397 = (r0); - case 13: - case 14: - r0 = s.arg0.fields["left"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 15; continue; } - r0 = s.width___194479; - { step = 16; continue; } - case 15: - r0 = 0; - case 16: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = s.arg0.fields["x"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 - s.tmp_1); - s.x___194489 = (r0); - r0 = s.arg0.fields["up"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 17; continue; } - r0 = s.height___194397; - { step = 18; continue; } - case 17: - r0 = 0; - case 18: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = s.arg0.fields["y"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 - s.tmp_1); - s.y___194496 = (r0); - s.tmp_0 = r0 = s.showScore___194403; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 19; continue; } - r0 = s.tmp_0; - { step = 20; continue; } - case 19: - r0 = s.showLife___194411; - 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__P186945_mk(s); - s.tmp_2.arg0 = globals.screen___187019; - s.tmp_2.arg1 = s.x___194489; - s.tmp_2.arg2 = s.y___194496; - s.tmp_2.arg3 = s.width___194479; - s.tmp_2.arg4 = s.height___194397; - r0 = s.arg0.fields["border"]; - s.tmp_2.arg5 = r0; - s.callLocIdx = 840; s.pc = 51; return s.tmp_2; - case 51: - r0 = s.retval; - s.tmp_0 = helpers_imageFillRect__P186945_mk(s); - s.tmp_0.arg0 = globals.screen___187019; - r0 = (s.x___194489 + 1); - s.tmp_0.arg1 = r0; - r0 = (s.y___194496 + 1); - s.tmp_0.arg2 = r0; - r0 = (s.width___194479 - 2); - s.tmp_0.arg3 = r0; - r0 = (s.height___194397 - 2); - s.tmp_0.arg4 = r0; - r0 = s.arg0.fields["bg"]; - s.tmp_0.arg5 = r0; - s.callLocIdx = 841; s.pc = 52; return s.tmp_0; - case 52: - r0 = s.retval; - case 21: - case 22: - r0 = pxsim_numops_toBoolDecr(s.showScore___194403); - if (!r0) { step = 25; continue; } - r0 = s.arg0.fields["left"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 23; continue; } - r0 = (s.width___194479 - s.scoreWidth___194398); - { step = 24; continue; } - case 23: - r0 = 0; - case 24: - // jmp value (already in r0) - s.tmp_1 = r0; - s.bump___194529 = (s.tmp_1); - s.tmp_0 = helpers_imagePrint__P186977_mk(s); - s.tmp_0.arg0 = globals.screen___187019; - s.tmp_0.arg1 = s.score___194395; - r0 = (s.x___194489 + 1); - s.tmp_2 = r0; - r0 = (s.tmp_2 + s.bump___194529); - s.tmp_1 = r0; - r0 = (s.tmp_1 + 1); - s.tmp_0.arg2 = r0; - r0 = (s.y___194496 + 2); - s.tmp_0.arg3 = r0; - r0 = s.arg0.fields["fc"]; - s.tmp_0.arg4 = r0; - s.tmp_0.arg5 = s.font___194393; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 842; s.pc = 53; return s.tmp_0; - case 53: - r0 = s.retval; - case 25: - case 26: - r0 = pxsim_numops_toBoolDecr(s.showLife___194411); - if (!r0) { step = 29; continue; } - r0 = s.arg0.fields["left"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 27; continue; } - r0 = (s.width___194479 - s.lifeWidth___194399); - { step = 28; continue; } - case 27: - r0 = 0; - case 28: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = (s.x___194489 + 1); - s.tmp_2 = r0; - r0 = (s.tmp_2 + s.tmp_1); - s.xLoc___194554 = (r0); - r0 = globals.infoState___189446.fields["multiplierImage"]; - s.tmp_0 = r0; - r0 = pxsim_ImageMethods.clone(s.tmp_0); - s.mult___194565 = (r0); - r0 = s.arg0.fields["fc"]; - s.tmp_0 = r0; - r0 = pxsim_ImageMethods.replace(s.mult___194565, 1, s.tmp_0); - s.tmp_0 = r0 = globals.screen___187019; - r0 = globals.infoState___189446.fields["heartImage"]; - s.tmp_1 = r0; - s.tmp_2 = r0 = s.xLoc___194554; - r0 = (s.y___194496 + s.offsetY___194402); - 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___187019; - s.tmp_1 = r0 = s.mult___194565; - s.tmp_3 = r0 = s.xLoc___194554; - r0 = globals.infoState___189446.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___194496 + s.offsetY___194402); - s.tmp_9 = r0; - s.tmp_11 = if_charHeight_1_mk(s); - s.tmp_11.arg0 = s.font___194393; - 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 = 843; 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___189446.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__P186977_mk(s); - s.tmp_0.arg0 = globals.screen___187019; - s.tmp_0.arg1 = s.life___194396; - s.tmp_3 = r0 = s.xLoc___194554; - r0 = globals.infoState___189446.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___189446.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___194496 + s.offsetY___194402); - s.tmp_0.arg3 = r0; - r0 = s.arg0.fields["fc"]; - s.tmp_0.arg4 = r0; - s.tmp_0.arg5 = s.font___194393; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 844; s.pc = 55; return s.tmp_0; - case 55: - r0 = s.retval; - case 29: - case 30: - r0 = s.arg0.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___194627 = (r0); - r0 = pxsim_String_.length(s.pNum___194627); - s.tmp_1 = r0; - s.tmp_3 = if_charWidth_1_mk(s); - s.tmp_3.arg0 = s.font___194393; - 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 = 845; 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___194634 = (r0); - s.tmp_0 = Math_max__P185342_mk(s); - s.tmp_0.arg0 = s.height___194397; - s.tmp_2 = if_charHeight_1_mk(s); - s.tmp_2.arg0 = s.font___194393; - 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 = 846; 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 = 847; s.pc = 58; return s.tmp_0; - case 58: - r0 = s.retval; - s.iconHeight___194642 = (r0); - r0 = s.arg0.fields["left"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 31; continue; } - r0 = (s.x___194489 - s.iconWidth___194634); - s.tmp_1 = r0; - r0 = (s.tmp_1 + 1); - { step = 32; continue; } - case 31: - r0 = (s.x___194489 + s.width___194479); - s.tmp_2 = r0; - r0 = (s.tmp_2 - 1); - case 32: - // jmp value (already in r0) - s.tmp_3 = r0; - s.iconX___194650 = (s.tmp_3); - s.iconY___194662 = (s.y___194496); - r0 = pxsim_numops_toBoolDecr(s.showScore___194403); - 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___194411); - 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["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___194650 + s.tmp_5); - s.iconX___194650 = (r0); - r0 = s.arg0.fields["up"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 37; continue; } - r0 = (s.iconY___194662 - 3); - s.iconY___194662 = (r0); - case 37: - case 38: - case 39: - case 40: - s.tmp_0 = helpers_imageFillRect__P186945_mk(s); - s.tmp_0.arg0 = globals.screen___187019; - s.tmp_0.arg1 = s.iconX___194650; - s.tmp_0.arg2 = s.iconY___194662; - s.tmp_0.arg3 = s.iconWidth___194634; - s.tmp_0.arg4 = s.iconHeight___194642; - r0 = s.arg0.fields["border"]; - s.tmp_0.arg5 = r0; - s.callLocIdx = 848; s.pc = 60; return s.tmp_0; - case 60: - r0 = s.retval; - s.tmp_0 = helpers_imagePrint__P186977_mk(s); - s.tmp_0.arg0 = globals.screen___187019; - s.tmp_0.arg1 = s.pNum___194627; - r0 = (s.iconX___194650 + 1); - s.tmp_0.arg2 = r0; - s.tmp_2 = r0 = s.iconY___194662; - r0 = (s.iconHeight___194642 >> 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___194393; - 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 = 849; 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["bg"]; - s.tmp_0.arg4 = r0; - s.tmp_0.arg5 = s.font___194393; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 850; s.pc = 61; return s.tmp_0; - case 61: - r0 = s.retval; - case 41: - case 42: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -info_PlayerInfo_drawPlayer__P187468.info = {"start":21253,"length":3635,"line":702,"column":8,"endLine":805,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"drawPlayer","argumentNames":["this"]} - -function info_PlayerInfo_drawPlayer__P187468_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: info_PlayerInfo_drawPlayer__P187468, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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___194390: undefined, - font___194393: undefined, - score___194395: undefined, - life___194396: undefined, - height___194397: undefined, - scoreWidth___194398: undefined, - lifeWidth___194399: undefined, - offsetY___194402: undefined, - showScore___194403: undefined, - showLife___194411: undefined, - width___194479: undefined, - x___194489: undefined, - y___194496: undefined, - bump___194529: undefined, - xLoc___194554: undefined, - mult___194565: undefined, - pNum___194627: undefined, - iconWidth___194634: undefined, - iconHeight___194642: undefined, - iconX___194650: undefined, - iconY___194662: undefined, - arg0: undefined, -} } - - - - - -function info_PlayerInfo_raiseLifeZero__P187467(s) { -let r0 = s.r0, 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.state___194368 = 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__C187443_VT)) failedCast(r0); - s.tmp_0 = info_PlayerInfo_getState__P187456_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 831; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; - s.state___194368 = (r0); - r0 = s.state___194368.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___194368.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___194368).fields["life"] = (null); - r0 = s.state___194368.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___194368; - if (!s.tmp_1.arg0.vtable.iface) { - setupLambda(s.tmp_1, pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "lifeZeroHandler"), 1); - s.callLocIdx = 832; 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 = 832; s.pc = 10; return s.tmp_1; } - else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 832; s.pc = 10; return s.tmp_1;; } - else { s.callLocIdx = 832; 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 = game_over__P187759_mk(s); - s.tmp_0.arg0 = false; - s.tmp_0.arg1 = undefined; - s.callLocIdx = 833; s.pc = 11; return s.tmp_0; - case 11: - r0 = s.retval; - case 4: - case 5: - case 6: - case 7: - case 8: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -info_PlayerInfo_raiseLifeZero__P187467.info = {"start":20869,"length":374,"line":690,"column":8,"endLine":700,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"raiseLifeZero","argumentNames":["this","gameOver"]} - -function info_PlayerInfo_raiseLifeZero__P187467_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: info_PlayerInfo_raiseLifeZero__P187467, depth: s.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___194368: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function info_PlayerInfo_hasLife__P187465(s) { -let r0 = s.r0, 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.state___194163 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, info_PlayerInfo__C187443_VT)) failedCast(r0); - s.tmp_0 = info_PlayerInfo_getState__P187456_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 830; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.state___194163 = (r0); - r0 = s.state___194163.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___194163.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.tmp_0).fields["maxNegativeVelocity"] = (s.tmp_1); + r0 = undefined; return leave(s, r0) default: oops() } } } -info_PlayerInfo_hasLife__P187465.info = {"start":20346,"length":141,"line":673,"column":8,"endLine":676,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"hasLife","argumentNames":["this"]} +ArcadePhysicsEngine_maxSpeed__P187393.info = {"start":1692,"length":127,"line":68,"column":4,"endLine":71,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"maxSpeed","argumentNames":["this","v"]} -function info_PlayerInfo_hasLife__P187465_mk(s) { +function ArcadePhysicsEngine_maxSpeed__P187393_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_PlayerInfo_hasLife__P187465, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_maxSpeed__P187393, depth: s.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___194163: undefined, arg0: undefined, + arg1: undefined, } } -function info_PlayerInfo_hasScore__P187461(s) { +function Fx_neg__P185367(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15098,34 +14420,21 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.state___194267 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, info_PlayerInfo__C187443_VT)) failedCast(r0); - s.tmp_0 = info_PlayerInfo_getState__P187456_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 829; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.state___194267 = (r0); - r0 = s.state___194267.fields["score"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 !== undefined); + r0 = (0 - s.arg0); return leave(s, r0) default: oops() } } } -info_PlayerInfo_hasScore__P187461.info = {"start":18619,"length":111,"line":616,"column":8,"endLine":619,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"hasScore","argumentNames":["this"]} +Fx_neg__P185367.info = {"start":311,"length":88,"line":14,"column":4,"endLine":16,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"neg","argumentNames":["a"]} -function info_PlayerInfo_hasScore__P187461_mk(s) { +function Fx_neg__P185367_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_PlayerInfo_hasScore__P187461, depth: s.depth + 1, + parent: s, fn: Fx_neg__P185367, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - state___194267: undefined, arg0: undefined, } } @@ -15133,7 +14442,7 @@ function info_PlayerInfo_hasScore__P187461_mk(s) { -function forever__P187064(s) { +function ArcadePhysicsEngine_maxSpeed__P187392(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15147,23 +14456,26 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = game_forever__P187762_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 169; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, ArcadePhysicsEngine__C187390_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) default: oops() } } } -forever__P187064.info = {"start":264,"length":62,"line":6,"column":0,"endLine":8,"endColumn":1,"fileName":"pxt_modules/game/gameoverrides.ts","functionName":"forever","argumentNames":["a"]} +ArcadePhysicsEngine_maxSpeed__P187392.info = {"start":1613,"length":73,"line":64,"column":4,"endLine":66,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"maxSpeed","argumentNames":["this"]} +ArcadePhysicsEngine_maxSpeed__P187392.isGetter = true; -function forever__P187064_mk(s) { +function ArcadePhysicsEngine_maxSpeed__P187392_mk(s) { checkStack(s.depth); return { - parent: s, fn: forever__P187064, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_maxSpeed__P187392, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, arg0: undefined, } } @@ -15171,7 +14483,7 @@ function forever__P187064_mk(s) { -function game_forever__P187762(s) { +function PhysicsEngine_constructor__P187377(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15185,46 +14497,19 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(globals.foreverRunning___189575); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - globals.foreverRunning___189575 = (true); - r0 = pxsim.control.runInParallel(inline__P194818); - case 1: - case 2: - r0 = pxsim_pxtcore_mkClassInstance(scene_GameForeverHandler__C187615_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_GameForeverHandler_constructor__P187617_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = s.arg0; - s.callLocIdx = 1215; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; - s.tmp_3 = game_currentScene__P187749_mk(s); - s.callLocIdx = 1214; s.pc = 4; return s.tmp_3; - case 4: - r0 = s.retval; - r0 = r0.fields["gameForeverHandlers"]; - s.tmp_2 = r0; - r0 = pxsim_Array__push(s.tmp_2, s.tmp_0); + r0 = s.arg0; + if (!checkSubtype(r0, PhysicsEngine__C187376_VT)) failedCast(r0); r0 = undefined; return leave(s, r0) default: oops() } } } -game_forever__P187762.info = {"start":8610,"length":820,"line":277,"column":4,"endLine":300,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"forever","argumentNames":["action"]} +PhysicsEngine_constructor__P187377.info = {"start":26,"length":21,"line":1,"column":4,"endLine":2,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["this"]} -function game_forever__P187762_mk(s) { +function PhysicsEngine_constructor__P187377_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_forever__P187762, depth: s.depth + 1, + parent: s, fn: PhysicsEngine_constructor__P187377, depth: s.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, } } @@ -15232,59 +14517,7 @@ function game_forever__P187762_mk(s) { -function inline__P194818(s) { -let r0 = s.r0, 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.handlers___194820 = undefined; - case 1: - r0 = pxsim_numops_toBoolDecr(1); - if (!r0) { step = 2; continue; } - s.tmp_0 = game_currentScene__P187749_mk(s); - s.callLocIdx = 1210; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - r0 = r0.fields["gameForeverHandlers"]; - s.handlers___194820 = (r0); - s.tmp_0 = helpers_arrayForEach__P185324_mk(s); - s.tmp_0.arg0 = s.handlers___194820; - s.tmp_0.arg1 = inline__P194826; - s.callLocIdx = 1212; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - s.tmp_0 = pause__P185619_mk(s); - s.tmp_0.arg0 = 20; - s.callLocIdx = 1213; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - { step = 1; continue; } - case 2: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -inline__P194818.info = {"start":8762,"length":535,"line":280,"column":34,"endLine":294,"endColumn":13,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":[]} - -function inline__P194818_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: inline__P194818, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - handlers___194820: undefined, -} } - - - - - -function inline__P194826(s) { +function sprites_SpriteMap_constructor__P187312(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15298,35 +14531,25 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0.fields["lock"]; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + r0 = s.arg0; + if (!checkSubtype(r0, sprites_SpriteMap__C187311_VT)) failedCast(r0); + 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_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = (s.arg0).fields["lock"] = (true); - r0 = pxsim_pxtcore_mkAction(1, inline__P194835); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - r0 = pxsim.control.runInParallel(s.tmp_0); - case 1: - case 2: + r0 = (s.tmp_0).fields["buckets"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P194826.info = {"start":8913,"length":319,"line":283,"column":37,"endLine":291,"endColumn":21,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":["h"]} +sprites_SpriteMap_constructor__P187312.info = {"start":237,"length":56,"line":8,"column":8,"endLine":10,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"inline","argumentNames":["this"]} -function inline__P194826_mk(s) { +function sprites_SpriteMap_constructor__P187312_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P194826, depth: s.depth + 1, + parent: s, fn: sprites_SpriteMap_constructor__P187312, 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, } } @@ -15334,49 +14557,7 @@ function inline__P194826_mk(s) { -function inline__P194835(s) { -let r0 = s.r0, 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 = if_handler_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, "handler"), 1); - s.callLocIdx = 1211; 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"], 1); s.callLocIdx = 1211; s.pc = 1; return s.tmp_0; } - else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 1211; s.pc = 1; return s.tmp_0;; } - else { s.callLocIdx = 1211; s.pc = 1; return s.tmp_0; } - } - case 1: - r0 = s.retval; - r0 = (s.caps[0]).fields["lock"] = (false); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -inline__P194835.info = {"start":9052,"length":130,"line":286,"column":50,"endLine":289,"endColumn":29,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":[]} - -function inline__P194835_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: inline__P194835, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, -} } - - - - - -function scene_GameForeverHandler_constructor__P187617(s) { +function music_Melody_constructor__P186818(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15392,18 +14573,18 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_GameForeverHandler__C187615_VT)) failedCast(r0); - r0 = (s.arg0).fields["handler"] = (s.arg1); + if (!checkSubtype(r0, music_Melody__C186815_VT)) failedCast(r0); + r0 = (s.arg0).fields["_text"] = (s.arg1); r0 = undefined; return leave(s, r0) default: oops() } } } -scene_GameForeverHandler_constructor__P187617.info = {"start":1340,"length":65,"line":47,"column":8,"endLine":49,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":["this","handler"]} +music_Melody_constructor__P186818.info = {"start":6328,"length":67,"line":199,"column":8,"endLine":201,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"inline","argumentNames":["this","text"]} -function scene_GameForeverHandler_constructor__P187617_mk(s) { +function music_Melody_constructor__P186818_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_GameForeverHandler_constructor__P187617, depth: s.depth + 1, + parent: s, fn: music_Melody_constructor__P186818, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, arg1: undefined, @@ -15413,7 +14594,7 @@ function scene_GameForeverHandler_constructor__P187617_mk(s) { -function start_game__P348233(s) { +function control_pushEventContext__P185615(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15423,108 +14604,63 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = info_startCountdown__P187430_mk(s); - s.tmp_0.arg0 = 5; - s.callLocIdx = 147; s.pc = 1; return s.tmp_0; + s.ctx___197514 = undefined; + s.n___197520 = undefined; + r0 = pxsim_numops_toBoolDecr(globals.eventContexts___189248); + 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___189248 = (r0); case 1: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -start_game__P348233.info = {"start":9001,"length":53,"line":229,"column":0,"endLine":231,"endColumn":1,"fileName":"main.ts","functionName":"start_game","argumentNames":[]} - -function start_game__P348233_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: start_game__P348233, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, -} } - - - - - -function create_minimap__P348237(s) { -let r0 = s.r0, 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 = sprites_create__P187191_mk(s); - s.tmp_1 = update_minimap__P348235_mk(s); - s.callLocIdx = 184; s.pc = 2; return s.tmp_1; case 2: + s.tmp_0 = control_eventContext__P185614_mk(s); + s.callLocIdx = 62; s.pc = 5; return s.tmp_0; + case 5: r0 = s.retval; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = globals.Map___348073; - s.callLocIdx = 185; s.pc = 1; return s.tmp_0; - case 1: + s.ctx___197514 = (r0); + r0 = pxsim_numops_toBoolDecr(s.ctx___197514); + if (!r0) { step = 3; continue; } + s.tmp_0 = control_EventContext_unregister__P185608_mk(s); + s.tmp_0.arg0 = s.ctx___197514; + s.callLocIdx = 63; s.pc = 6; return s.tmp_0; + case 6: r0 = s.retval; - globals.sprite_map___348294 = (r0); - s.tmp_0 = Sprite_bottom__P187286_mk(s); - s.tmp_0.arg0 = globals.sprite_map___348294; - r0 = pxsim_ImageMethods.height(globals.screen___187019); - s.tmp_1 = r0; - r0 = (s.tmp_1 - 2); - s.tmp_0.arg1 = r0; - s.callLocIdx = 187; s.pc = 3; return s.tmp_0; case 3: - r0 = s.retval; - s.tmp_0 = Sprite_x__P187243_mk(s); - s.tmp_0.arg0 = globals.sprite_map___348294; - r0 = pxsim_ImageMethods.width(globals.screen___187019); - s.tmp_1 = r0; - r0 = (s.tmp_1 / 2); - s.tmp_0.arg1 = r0; - s.callLocIdx = 189; s.pc = 4; return s.tmp_0; case 4: + r0 = pxsim_pxtcore_mkClassInstance(control_EventContext__C185601_VT); + s.tmp_0 = r0; + s.tmp_1 = control_EventContext_constructor__P185605_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 64; s.pc = 7; return s.tmp_1; + case 7: r0 = s.retval; - s.tmp_0 = if_z_2_mk(s); - s.tmp_0.arg0 = globals.sprite_map___348294; - s.tmp_0.arg1 = 50; - 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 = 190; s.pc = 5; return s.tmp_0; } - } - case 5: - r0 = s.retval; - s.tmp_0 = Sprite_setFlag__P187296_mk(s); - s.tmp_0.arg0 = globals.sprite_map___348294; - s.tmp_0.arg1 = 512; - s.tmp_0.arg2 = true; - s.callLocIdx = 191; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - r0 = undefined; + s.n___197520 = (s.tmp_0); + r0 = pxsim_Array__push(globals.eventContexts___189248, s.n___197520); + r0 = s.n___197520; return leave(s, r0) default: oops() } } } -create_minimap__P348237.info = {"start":19055,"length":268,"line":373,"column":0,"endLine":379,"endColumn":1,"fileName":"main.ts","functionName":"create_minimap","argumentNames":[]} +control_pushEventContext__P185615.info = {"start":7123,"length":340,"line":216,"column":4,"endLine":227,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"pushEventContext","argumentNames":[]} -function create_minimap__P348237_mk(s) { +function control_pushEventContext__P185615_mk(s) { checkStack(s.depth); return { - parent: s, fn: create_minimap__P348237, depth: s.depth + 1, + parent: s, fn: control_pushEventContext__P185615, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + ctx___197514: undefined, + n___197520: undefined, } } -function Sprite_setFlag__P187296(s) { +function control_eventContext__P185614(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15534,84 +14670,42 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(s.arg2); + r0 = pxsim_numops_toBoolDecr(globals.eventContexts___189248); if (!r0) { step = 1; continue; } - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["flags"]; + s.tmp_0 = r0 = globals.eventContexts___189248; + r0 = pxsim_Array__length(globals.eventContexts___189248); s.tmp_2 = r0; - r0 = (s.tmp_2 | s.arg1); + r0 = (s.tmp_2 - 1); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["flags"] = (s.tmp_1); + r0 = pxsim_Array__getAt(s.tmp_0, 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); + r0 = undefined; case 2: - r0 = (s.arg1 === 512); - 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["sayBubbleSprite"]; - 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 = Sprite_setFlag__P187296_mk(s); - r0 = s.arg0.fields["sayBubbleSprite"]; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = 512; - s.tmp_2.arg2 = s.arg2; - s.callLocIdx = 408; s.pc = 7; return s.tmp_2; - case 7: - r0 = s.retval; - case 5: - case 6: - r0 = undefined; + s.tmp_3 = r0; + r0 = s.tmp_3; return leave(s, r0) default: oops() } } } -Sprite_setFlag__P187296.info = {"start":23896,"length":292,"line":731,"column":4,"endLine":738,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"setFlag","argumentNames":["this","flag","on"]} +control_eventContext__P185614.info = {"start":6907,"length":136,"line":209,"column":4,"endLine":211,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"eventContext","argumentNames":[]} -function Sprite_setFlag__P187296_mk(s) { +function control_eventContext__P185614_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_setFlag__P187296, depth: s.depth + 1, + parent: s, fn: control_eventContext__P185614, depth: s.depth + 1, pc: 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_x__P187243(s) { +function control_EventContext_unregister__P185608(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15621,52 +14715,68 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.h___195135 = undefined; + s.unnamed8900___U1 = undefined; + s.unnamed8901___U2 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); - s.tmp_0 = Sprite_left__P187280_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_1 = r0 = s.arg1; - r0 = s.arg0.fields["_image"]; - s.tmp_4 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_4); - 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 = 274; s.pc = 1; return s.tmp_0; + if (!checkSubtype(r0, control_EventContext__C185601_VT)) failedCast(r0); + s.h___195135 = (undefined); + r0 = s.arg0.fields["handlers"]; + s.unnamed8900___U1 = (r0); + s.unnamed8901___U2 = (0); case 1: + s.tmp_0 = r0 = s.unnamed8901___U2; + r0 = pxsim_Array__length(s.unnamed8900___U1); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 2; continue; } + r0 = pxsim_Array__getAt(s.unnamed8900___U1, s.unnamed8901___U2); + s.h___195135 = (r0); + s.tmp_2 = control_EventHandler_unregister__P189242_mk(s); + s.tmp_2.arg0 = s.h___195135; + s.callLocIdx = 58; s.pc = 3; return s.tmp_2; + case 3: r0 = s.retval; + r0 = (s.unnamed8901___U2 + 1); + s.unnamed8901___U2 = (r0); + { step = 1; continue; } + case 2: + s.unnamed8900___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() } } } -Sprite_x__P187243.info = {"start":1673,"length":72,"line":75,"column":4,"endLine":77,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"x","argumentNames":["this","v"]} +control_EventContext_unregister__P185608.info = {"start":4534,"length":131,"line":137,"column":8,"endLine":141,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"unregister","argumentNames":["this"]} -function Sprite_x__P187243_mk(s) { +function control_EventContext_unregister__P185608_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_x__P187243, depth: s.depth + 1, + parent: s, fn: control_EventContext_unregister__P185608, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, + h___195135: undefined, + unnamed8900___U1: undefined, + unnamed8901___U2: undefined, arg0: undefined, - arg1: undefined, } } -function Sprite_left__P187280(s) { +function control_EventHandler_unregister__P189242(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15676,62 +14786,41 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.physics___198127 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); - s.tmp_0 = game_currentScene__P187749_mk(s); - s.callLocIdx = 321; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = r0.fields["physicsEngine"]; - s.physics___198127 = (r0); - s.tmp_0 = PhysicsEngine__C187376_v2_4_mk(s); - s.tmp_0.arg0 = s.physics___198127; - s.tmp_0.arg1 = s.arg0; - r0 = (s.arg1 * 256); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); + if (!checkSubtype(r0, control_EventHandler__C189240_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["_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__C187376_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.moveSprite; - s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; + r0 = s.arg0.fields["flags"]; + s.tmp_2 = r0; + r0 = pxsim.control.internalOnEvent(s.tmp_0, s.tmp_1, control_doNothing__P189244, s.tmp_2); r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_left__P187280.info = {"start":8929,"length":257,"line":325,"column":4,"endLine":335,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"left","argumentNames":["this","value"]} +control_EventHandler_unregister__P189242.info = {"start":1136,"length":106,"line":36,"column":8,"endLine":38,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"unregister","argumentNames":["this"]} -function Sprite_left__P187280_mk(s) { +function control_EventHandler_unregister__P189242_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_left__P187280, depth: s.depth + 1, + parent: s, fn: control_EventHandler_unregister__P189242, depth: s.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___198127: undefined, arg0: undefined, - arg1: undefined, } } -function PhysicsEngine_moveSprite__P187380(s) { +function control_doNothing__P189244(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15741,37 +14830,24 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, PhysicsEngine__C187376_VT)) failedCast(r0); r0 = undefined; return leave(s, r0) default: oops() } } } -PhysicsEngine_moveSprite__P187380.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"]} +control_doNothing__P189244.info = {"start":1254,"length":24,"line":41,"column":4,"endLine":41,"endColumn":28,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"doNothing","argumentNames":[]} -function PhysicsEngine_moveSprite__P187380_mk(s) { +function control_doNothing__P189244_mk(s) { checkStack(s.depth); return { - parent: s, fn: PhysicsEngine_moveSprite__P187380, depth: s.depth + 1, + parent: s, fn: control_doNothing__P189244, 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__P185371(s) { +function control_EventContext_constructor__P185605(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15783,29 +14859,50 @@ 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, control_EventContext__C185601_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___185603); + 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___185603 = (r0); + case 1: + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -Fx_sub__P185371.info = {"start":749,"length":118,"line":26,"column":4,"endLine":28,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"sub","argumentNames":["a","b"]} +control_EventContext_constructor__P185605.info = {"start":1740,"length":347,"line":58,"column":8,"endLine":68,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":["this"]} -function Fx_sub__P185371_mk(s) { +function control_EventContext_constructor__P185605_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_sub__P185371, depth: s.depth + 1, + parent: s, fn: control_EventContext_constructor__P185605, 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_left__P187279(s) { +function scene_Scene_millis__P187660(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15820,22 +14917,18 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); - r0 = s.arg0.fields["_x"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) + if (!checkSubtype(r0, scene_Scene__C187636_VT)) failedCast(r0); + r0 = s.arg0.fields["_millis"]; + return leave(s, r0) default: oops() } } } -Sprite_left__P187279.info = {"start":8785,"length":53,"line":320,"column":4,"endLine":322,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"left","argumentNames":["this"]} -Sprite_left__P187279.isGetter = true; +scene_Scene_millis__P187660.info = {"start":6788,"length":61,"line":189,"column":8,"endLine":191,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"millis","argumentNames":["this"]} -function Sprite_left__P187279_mk(s) { +function scene_Scene_millis__P187660_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_left__P187279, depth: s.depth + 1, + parent: s, fn: scene_Scene_millis__P187660, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, } } @@ -15843,7 +14936,7 @@ function Sprite_left__P187279_mk(s) { -function Sprite_bottom__P187286(s) { +function control_EventContext_registerFrameHandler__P185609(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15853,49 +14946,105 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.fn___192840 = undefined; + s.i___192849 = 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__C187233_VT)) failedCast(r0); - s.tmp_0 = Sprite_top__P187284_mk(s); + if (!checkSubtype(r0, control_EventContext__C185601_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__P189246_mk(s); s.tmp_0.arg0 = s.arg0; - s.tmp_1 = r0 = s.arg1; - r0 = s.arg0.fields["_image"]; + s.callLocIdx = 59; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + case 1: + case 2: + r0 = pxsim_pxtcore_mkClassInstance(control_FrameCallback__C185598_VT); + s.fn___192840 = (r0); + r0 = (s.fn___192840).fields["order"] = (s.arg1); + r0 = (s.fn___192840).fields["handler"] = (s.arg2); + s.i___192849 = (0); + case 3: + s.tmp_1 = r0 = s.i___192849; + r0 = s.arg0.fields["frameCallbacks"]; s.tmp_3 = r0; - r0 = pxsim_ImageMethods.height(s.tmp_3); + r0 = pxsim_Array__length(s.tmp_3); s.tmp_2 = r0; - r0 = (s.tmp_1 - s.tmp_2); - s.tmp_0.arg1 = r0; - s.callLocIdx = 335; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; + 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___192849); + 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___192849, s.fn___192840); + r0 = s.fn___192840; + { step = 7; continue; } + case 4: + case 5: + r0 = (s.i___192849 + 1); + s.i___192849 = (r0); + { step = 3; continue; } + case 6: + r0 = s.arg0.fields["frameCallbacks"]; + s.tmp_0 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.fn___192840); + r0 = s.fn___192840; + case 7: return leave(s, r0) default: oops() } } } -Sprite_bottom__P187286.info = {"start":10235,"length":73,"line":374,"column":4,"endLine":376,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"bottom","argumentNames":["this","value"]} +control_EventContext_registerFrameHandler__P185609.info = {"start":4675,"length":643,"line":143,"column":8,"endLine":160,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"registerFrameHandler","argumentNames":["this","order","handler"]} -function Sprite_bottom__P187286_mk(s) { +function control_EventContext_registerFrameHandler__P185609_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_bottom__P187286, depth: s.depth + 1, + parent: s, fn: control_EventContext_registerFrameHandler__P185609, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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___192840: undefined, + i___192849: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function Sprite_top__P187284(s) { +function control_EventContext_registerFrameCallbacks__P189246(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15905,62 +15054,55 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.physics___197923 = undefined; + s.worker___192883 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); - s.tmp_0 = game_currentScene__P187749_mk(s); - s.callLocIdx = 329; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = r0.fields["physicsEngine"]; - s.physics___197923 = (r0); - s.tmp_0 = PhysicsEngine__C187376_v2_4_mk(s); - s.tmp_0.arg0 = s.physics___197923; - s.tmp_0.arg1 = s.arg0; - s.tmp_0.arg2 = 0; - r0 = (s.arg1 * 256); + if (!checkSubtype(r0, control_EventContext__C185601_VT)) failedCast(r0); + r0 = s.arg0.fields["frameCallbacks"]; s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); + r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; - r0 = s.arg0.fields["_y"]; - s.tmp_3 = r0; - r0 = (s.tmp_1 - s.tmp_3); - s.tmp_0.arg3 = r0; - if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C187376_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 = 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.retval; + r0 = s.arg0.fields["frameWorker"]; + s.worker___192883 = (r0); + r0 = pxsim_pxtcore_mkAction(2, inline__P192889); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.worker___192883); + r0 = pxsim.control.runInParallel(s.tmp_0); + case 3: r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_top__P187284.info = {"start":9733,"length":256,"line":355,"column":4,"endLine":365,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"top","argumentNames":["this","value"]} +control_EventContext_registerFrameCallbacks__P189246.info = {"start":3481,"length":895,"line":105,"column":8,"endLine":129,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"registerFrameCallbacks","argumentNames":["this"]} -function Sprite_top__P187284_mk(s) { +function control_EventContext_registerFrameCallbacks__P189246_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_top__P187284, depth: s.depth + 1, + parent: s, fn: control_EventContext_registerFrameCallbacks__P189246, depth: s.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___197923: undefined, + worker___192883: undefined, arg0: undefined, - arg1: undefined, } } -function Sprite_top__P187283(s) { +function inline__P192889(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15970,35 +15112,73 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); - r0 = s.arg0.fields["_y"]; + s.delay___192919 = undefined; + r0 = s.caps[0].fields["runningCallbacks"]; 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_pxtcore_mkAction(1, inline__P192895); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.caps[0]); + s.tmp_2 = pauseUntil__P185573_mk(s); + s.tmp_2.arg0 = s.tmp_1; + s.tmp_2.arg1 = undefined; + s.callLocIdx = 53; 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__P189245_mk(s); + s.tmp_2.arg0 = s.caps[0]; + s.callLocIdx = 54; s.pc = 6; return s.tmp_2; + case 6: + r0 = s.retval; + s.delay___192919 = (r0); + s.tmp_0 = pause__P185619_mk(s); + s.tmp_0.arg0 = s.delay___192919; + s.callLocIdx = 55; 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() } } } -Sprite_top__P187283.info = {"start":9590,"length":53,"line":350,"column":4,"endLine":352,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"top","argumentNames":["this"]} -Sprite_top__P187283.isGetter = true; +inline__P192889.info = {"start":3642,"length":723,"line":109,"column":34,"endLine":128,"endColumn":13,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":[]} -function Sprite_top__P187283_mk(s) { +function inline__P192889_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_top__P187283, depth: s.depth + 1, + parent: s, fn: inline__P192889, 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, + delay___192919: undefined, } } -function Sprite_bottom__P187285(s) { +function inline__P192895(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16008,46 +15188,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, Sprite__C187233_VT)) failedCast(r0); - s.tmp_1 = Sprite_top__P187283_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 332; s.pc = 1; return s.tmp_1; - case 1: - r0 = s.retval; + r0 = s.caps[0].fields["runningCallbacks"]; + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); s.tmp_0 = r0; - r0 = s.arg0.fields["_image"]; - s.tmp_3 = r0; - r0 = pxsim_ImageMethods.height(s.tmp_3); - s.tmp_2 = r0; - r0 = (s.tmp_0 + s.tmp_2); - return leaveAccessor(s, r0) + r0 = pxsim_Boolean__bang(s.tmp_0); + return leave(s, r0) default: oops() } } } -Sprite_bottom__P187285.info = {"start":10083,"length":59,"line":369,"column":4,"endLine":371,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"bottom","argumentNames":["this"]} -Sprite_bottom__P187285.isGetter = true; +inline__P192895.info = {"start":3873,"length":28,"line":113,"column":31,"endLine":113,"endColumn":59,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":[]} -function Sprite_bottom__P187285_mk(s) { +function inline__P192895_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_bottom__P187285, depth: s.depth + 1, + parent: s, fn: inline__P192895, depth: s.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 sprites_create__P187191(s) { +function control_EventContext_runCallbacks__P189245(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16057,87 +15221,264 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___206575 = undefined; - s.sprite___206578 = undefined; + s.loopStart___192928 = undefined; + s.f___192941 = undefined; + s.unnamed8896___U2 = undefined; + s.unnamed8897___U3 = undefined; + s.runtime___192946 = undefined; + s.fps___192966 = undefined; + s.delay___193028 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = game_currentScene__P187749_mk(s); - s.callLocIdx = 265; s.pc = 1; return s.tmp_0; + r0 = s.arg0; + if (!checkSubtype(r0, control_EventContext__C185601_VT)) failedCast(r0); + r0 = pxsim.control.millis(); + s.loopStart___192928 = (r0); + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["prevTimeMillis"]; + s.tmp_2 = r0; + r0 = (s.loopStart___192928 - s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["deltaTimeMillis"] = (s.tmp_1); + r0 = (s.arg0).fields["prevTimeMillis"] = (s.loopStart___192928); + s.f___192941 = (undefined); + r0 = s.arg0.fields["frameCallbacks"]; + s.unnamed8896___U2 = (r0); + s.unnamed8897___U3 = (0); case 1: + s.tmp_0 = r0 = s.unnamed8897___U3; + r0 = pxsim_Array__length(s.unnamed8896___U2); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 2; continue; } + r0 = pxsim_Array__getAt(s.unnamed8896___U2, s.unnamed8897___U3); + s.f___192941 = (r0); + s.tmp_2 = if_handler_1_mk(s); + s.tmp_2.arg0 = s.f___192941; + if (!s.tmp_2.arg0.vtable.iface) { + setupLambda(s.tmp_2, pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "handler"), 1); + s.callLocIdx = 50; s.pc = 13; return s.tmp_2; + } else { + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["handler"]; + if (s.tmp_2.fn == null) { setupLambda(s.tmp_2, s.tmp_2.arg0.fields["handler"], 1); s.callLocIdx = 50; s.pc = 13; return s.tmp_2; } + else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 50; s.pc = 13; return s.tmp_2;; } + else { s.callLocIdx = 50; s.pc = 13; return s.tmp_2; } + } + case 13: r0 = s.retval; - s.scene___206575 = (r0); - r0 = pxsim_pxtcore_mkClassInstance(Sprite__C187233_VT); - s.tmp_0 = r0; - s.tmp_1 = Sprite_constructor__P187270_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = s.arg0; - s.callLocIdx = 266; s.pc = 2; return s.tmp_1; + r0 = (s.unnamed8897___U3 + 1); + s.unnamed8897___U3 = (r0); + { step = 1; continue; } case 2: - r0 = s.retval; - s.sprite___206578 = (s.tmp_0); - s.tmp_0 = Sprite_setKind__P187288_mk(s); - s.tmp_0.arg0 = s.sprite___206578; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 267; s.pc = 3; return s.tmp_0; + s.unnamed8896___U2 = (undefined); + r0 = pxsim.control.millis(); + s.tmp_0 = r0; + r0 = (s.tmp_0 - s.loopStart___192928); + s.runtime___192946 = (r0); + s.tmp_0 = r0 = s.arg0; + r0 = s.tmp_0.fields["timeInSample"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + s.runtime___192946); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["timeInSample"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = s.tmp_0.fields["framesInSample"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + 1); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["framesInSample"] = (s.tmp_1); + r0 = s.arg0.fields["timeInSample"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 > 1000); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = s.tmp_0; + { step = 4; continue; } case 3: - r0 = s.retval; - s.tmp_0 = PhysicsEngine__C187376_v0_2_mk(s); - r0 = s.scene___206575.fields["physicsEngine"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.sprite___206578; - if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C187376_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.addSprite; - s.pc = 4; return s.tmp_0; + r0 = s.arg0.fields["framesInSample"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 > 30); case 4: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 11; continue; } + r0 = s.arg0.fields["framesInSample"]; + s.tmp_4 = r0; + r0 = s.arg0.fields["timeInSample"]; + s.tmp_6 = r0; + r0 = (s.tmp_6 / 1000); + s.tmp_5 = r0; + r0 = (s.tmp_4 / s.tmp_5); + s.fps___192966 = (r0); + r0 = pxsim.Math_.round(s.fps___192966); + s.tmp_1 = r0; + if ((s.tmp_1) && (s.tmp_1).vtable) { + setupResume(s, 14); + pxsim_String__stringConv(s.tmp_1); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_1) + ""; } + case 14: r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, inline__P206593); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); - r0 = pxsim_pxtcore_mkAction(1, inline__P206599); + r0 = pxsim_String__concat("fps:", s.tmp_0); + globals.control_EventContext_lastStats___185603 = (r0); + r0 = (s.fps___192966 < 99); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + if ((globals.control_EventContext_lastStats___185603) && (globals.control_EventContext_lastStats___185603).vtable) { + setupResume(s, 15); + pxsim_String__stringConv(globals.control_EventContext_lastStats___185603); + checkResumeConsumed(); + return; + } else { s.retval = (globals.control_EventContext_lastStats___185603) + ""; } + case 15: + r0 = s.retval; s.tmp_1 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.sprite___206578); - s.tmp_2 = helpers_arrayForEach__P185324_mk(s); - s.tmp_3 = helpers_arrayFilter__P185325_mk(s); - r0 = s.scene___206575.fields["createdHandlers"]; - s.tmp_3.arg0 = r0; - s.tmp_3.arg1 = s.tmp_0; - s.callLocIdx = 268; s.pc = 6; return s.tmp_3; + r0 = (s.fps___192966 * 10); + s.tmp_7 = r0; + r0 = pxsim.Math_.round(s.tmp_7); + s.tmp_6 = r0; + r0 = (s.tmp_6 % 10); + s.tmp_5 = r0; + if ((s.tmp_5) && (s.tmp_5).vtable) { + setupResume(s, 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_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_3) + ""; } + case 17: + r0 = s.retval; + s.tmp_2 = r0; + r0 = pxsim_String__concat(s.tmp_1, s.tmp_2); + globals.control_EventContext_lastStats___185603 = (r0); + case 5: case 6: + s.tmp_2 = control_ramSize__P185552_mk(s); + s.callLocIdx = 51; s.pc = 18; return s.tmp_2; + case 18: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_1 > 2000000); + 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.control.profilingEnabled(); + 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_String_.mkEmpty(); + s.tmp_8 = r0; + r0 = (s.fps___192966 * 100); + s.tmp_11 = r0; + r0 = (s.tmp_11 | 0); + 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_8, s.tmp_9); + s.tmp_7 = r0; + r0 = pxsim_String__concat(s.tmp_7, "/100 fps - "); + s.tmp_6 = r0; + r0 = s.arg0.fields["framesInSample"]; + s.tmp_13 = r0; + if ((s.tmp_13) && (s.tmp_13).vtable) { + setupResume(s, 20); + pxsim_String__stringConv(s.tmp_13); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_13) + ""; } + case 20: r0 = s.retval; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = s.tmp_1; - s.callLocIdx = 270; s.pc = 5; return s.tmp_2; - case 5: + s.tmp_12 = r0; + r0 = pxsim_String__concat(s.tmp_6, s.tmp_12); + s.tmp_5 = r0; + r0 = pxsim_String__concat(s.tmp_5, " frames"); + s.tmp_4 = r0; + r0 = pxsim.control.dmesg(s.tmp_4); + r0 = pxsim.control.gc(); + r0 = pxsim_pxtcore.dumpPerfCounters(); + case 9: + case 10: + r0 = (s.arg0).fields["timeInSample"] = (0); + r0 = (s.arg0).fields["framesInSample"] = (0); + case 11: + case 12: + s.tmp_0 = Math_max__P185342_mk(s); + s.tmp_0.arg0 = 1; + r0 = (20 - s.runtime___192946); + s.tmp_0.arg1 = r0; + s.callLocIdx = 52; s.pc = 21; return s.tmp_0; + case 21: r0 = s.retval; - r0 = s.sprite___206578; + s.delay___193028 = (r0); + r0 = s.delay___193028; return leave(s, r0) default: oops() } } } -sprites_create__P187191.info = {"start":890,"length":400,"line":35,"column":4,"endLine":47,"endColumn":5,"fileName":"pxt_modules/game/sprites.ts","functionName":"create","argumentNames":["img","kind"]} +control_EventContext_runCallbacks__P189245.info = {"start":2182,"length":1246,"line":74,"column":8,"endLine":102,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"runCallbacks","argumentNames":["this"]} -function sprites_create__P187191_mk(s) { +function control_EventContext_runCallbacks__P189245_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_create__P187191, depth: s.depth + 1, + parent: s, fn: control_EventContext_runCallbacks__P189245, depth: s.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___206575: undefined, - sprite___206578: 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, + loopStart___192928: undefined, + f___192941: undefined, + unnamed8896___U2: undefined, + unnamed8897___U3: undefined, + runtime___192946: undefined, + fps___192966: undefined, + delay___193028: undefined, arg0: undefined, - arg1: undefined, } } -function inline__P206593(s) { +function pauseUntil__P185573(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16149,77 +15490,75 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0.fields["kind"]; + 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 == s.caps[0]); - return leave(s, r0) - default: oops() -} } } -inline__P206593.info = {"start":1195,"length":19,"line":43,"column":20,"endLine":43,"endColumn":39,"fileName":"pxt_modules/game/sprites.ts","functionName":"inline","argumentNames":["h"]} - -function inline__P206593_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: inline__P206593, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, -} } - - - - - -function inline__P206599(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (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 = 269; 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 = 269; s.pc = 1; return s.tmp_0; } - else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 269; s.pc = 1; return s.tmp_0;; } - else { s.callLocIdx = 269; s.pc = 1; return s.tmp_0; } - } + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: + s.tmp_2 = lambda_1_mk(s); + s.tmp_2.argL = s.arg0; + setupLambda(s.tmp_2, s.tmp_2.argL); + s.callLocIdx = 37; s.pc = 8; return s.tmp_2; + case 8: + r0 = s.retval; + case 2: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 3; continue; } + { step = 7; continue; } + case 3: + case 4: + r0 = pxsim_numops_toBoolDecr(s.arg1); + s.tmp_5 = r0; + r0 = pxsim_Boolean__bang(s.tmp_5); + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + if (!r0) { step = 5; continue; } + s.arg1 = (0); + case 5: + case 6: + s.tmp_0 = control___queuePollEvent__P185572_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = s.arg0; + s.tmp_0.arg2 = undefined; + s.callLocIdx = 38; s.pc = 9; return s.tmp_0; + case 9: r0 = s.retval; + case 7: r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P206599.info = {"start":1237,"length":22,"line":44,"column":21,"endLine":44,"endColumn":43,"fileName":"pxt_modules/game/sprites.ts","functionName":"inline","argumentNames":["h"]} +pauseUntil__P185573.info = {"start":2205,"length":227,"line":73,"column":0,"endLine":77,"endColumn":1,"fileName":"pxt_modules/base/poll.ts","functionName":"pauseUntil","argumentNames":["condition","timeOut"]} -function inline__P206599_mk(s) { +function pauseUntil__P185573_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P206599, depth: s.depth + 1, + parent: s, fn: pauseUntil__P185573, depth: s.depth + 1, pc: 0, retval: undefined, 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 PhysicsEngine_addSprite__P187378(s) { +function control___queuePollEvent__P185572(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16229,33 +15568,97 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.ev___193050 = 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__C187376_VT)) failedCast(r0); + r0 = pxsim_pxtcore_mkClassInstance(control_PollEvent__C189219_VT); + s.tmp_0 = r0; + s.tmp_1 = control_PollEvent_constructor__P189220_mk(s); + s.tmp_1.arg0 = s.tmp_0; + r0 = pxsim.control.allocateNotifyEvent(); + s.tmp_1.arg1 = r0; + s.tmp_1.arg2 = 1; + r0 = pxsim.control.millis(); + s.tmp_1.arg3 = r0; + s.tmp_1.arg4 = s.arg0; + s.tmp_1.arg5 = s.arg1; + r0 = pxsim_numops_toBoolDecr(s.arg2); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); + s.tmp_1.arg6 = r0; + s.callLocIdx = 35; s.pc = 5; return s.tmp_1; + case 5: + r0 = s.retval; + s.ev___193050 = (s.tmp_0); + r0 = pxsim_numops_toBoolDecr(globals._pollEventQueue___189222); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = pxsim_Array__mk(); + s.tmp_2 = r0; + r0 = pxsim_Array__push(s.tmp_2, s.ev___193050); + globals._pollEventQueue___189222 = (s.tmp_2); + r0 = pxsim.control.runInParallel(control_pollEvents__P189223); + { step = 2; continue; } + case 1: + r0 = pxsim_Array__push(globals._pollEventQueue___189222, s.ev___193050); + case 2: + r0 = pxsim_numops_toBoolDecr(s.arg2); + if (!r0) { step = 3; continue; } + s.tmp_0 = control_onEvent__P185597_mk(s); + r0 = s.ev___193050.fields["eid"]; + s.tmp_0.arg0 = r0; + r0 = s.ev___193050.fields["vid"]; + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = s.arg2; + s.tmp_0.arg3 = 16; + s.callLocIdx = 36; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + { step = 4; continue; } + case 3: + r0 = s.ev___193050.fields["eid"]; + s.tmp_0 = r0; + r0 = s.ev___193050.fields["vid"]; + s.tmp_1 = r0; + setupResume(s, 7); + pxsim.control.waitForEvent(s.tmp_0, s.tmp_1); + checkResumeConsumed(); + return; + case 7: + r0 = s.retval; + case 4: r0 = undefined; return leave(s, r0) default: oops() } } } -PhysicsEngine_addSprite__P187378.info = {"start":124,"length":29,"line":8,"column":4,"endLine":8,"endColumn":33,"fileName":"pxt_modules/game/physics.ts","functionName":"addSprite","argumentNames":["this","sprite"]} +control___queuePollEvent__P185572.info = {"start":1262,"length":739,"line":39,"column":4,"endLine":64,"endColumn":5,"fileName":"pxt_modules/base/poll.ts","functionName":"__queuePollEvent","argumentNames":["timeOut","condition","handler"]} -function PhysicsEngine_addSprite__P187378_mk(s) { +function control___queuePollEvent__P185572_mk(s) { checkStack(s.depth); return { - parent: s, fn: PhysicsEngine_addSprite__P187378, depth: s.depth + 1, + parent: s, fn: control___queuePollEvent__P185572, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + ev___193050: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function Sprite_constructor__P187270(s) { +function control_pollEvents__P189223(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16265,122 +15668,117 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); - s.tmp_0 = sprites_BaseSprite_constructor__P187077_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 291; s.pc = 1; return s.tmp_0; + s.now___193176 = undefined; + s.i___193179 = undefined; + s.ev___193185 = undefined; case 1: - r0 = s.retval; - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_ImageMethods.width(globals.screen___187019); - s.tmp_4 = r0; - r0 = pxsim_ImageMethods.width(s.arg1); - s.tmp_5 = r0; - r0 = (s.tmp_4 - s.tmp_5); - s.tmp_3 = r0; - r0 = (s.tmp_3 >> 1); - s.tmp_2 = r0; - r0 = (s.tmp_2 * 256); - s.tmp_6 = r0; - r0 = (s.tmp_6 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_x"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_ImageMethods.height(globals.screen___187019); - s.tmp_4 = r0; - r0 = pxsim_ImageMethods.height(s.arg1); - s.tmp_5 = r0; - r0 = (s.tmp_4 - s.tmp_5); - s.tmp_3 = r0; - r0 = (s.tmp_3 >> 1); - s.tmp_2 = r0; - r0 = (s.tmp_2 * 256); - s.tmp_6 = r0; - r0 = (s.tmp_6 | 0); + r0 = pxsim_Array__length(globals._pollEventQueue___189222); 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 > 0); s.tmp_0 = r0; - r0 = (s.arg0).fields["_lastY"] = (s.tmp_0); - s.tmp_0 = Sprite_vx__P187247_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 294; s.pc = 2; return s.tmp_0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 12; continue; } + r0 = pxsim.control.millis(); + s.now___193176 = (r0); + s.i___193179 = (0); case 2: + s.tmp_1 = r0 = s.i___193179; + r0 = pxsim_Array__length(globals._pollEventQueue___189222); + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 11; continue; } + r0 = pxsim_Array__getAt(globals._pollEventQueue___189222, s.i___193179); + s.ev___193185 = (r0); + s.tmp_1 = if_condition_1_mk(s); + s.tmp_1.arg0 = s.ev___193185; + if (!s.tmp_1.arg0.vtable.iface) { + setupLambda(s.tmp_1, pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "condition"), 1); + s.callLocIdx = 32; s.pc = 13; return s.tmp_1; + } else { + s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["condition"]; + if (s.tmp_1.fn == null) { setupLambda(s.tmp_1, s.tmp_1.arg0.fields["condition"], 1); s.callLocIdx = 32; s.pc = 13; return s.tmp_1; } + else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 32; s.pc = 13; return s.tmp_1;; } + else { s.callLocIdx = 32; s.pc = 13; return s.tmp_1; } + } + case 13: r0 = s.retval; - s.tmp_0 = Sprite_vy__P187249_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 295; s.pc = 3; return s.tmp_0; + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = s.tmp_0; + { step = 6; continue; } case 3: - r0 = s.retval; - s.tmp_0 = Sprite_ax__P187251_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 296; s.pc = 4; return s.tmp_0; + r0 = s.ev___193185.fields["timeOut"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 > 0); + s.tmp_2 = r0; + r0 = pxsim_numops_toBool(s.tmp_2); + if (r0) { step = 4; continue; } + r0 = s.tmp_2; + { step = 5; continue; } case 4: - r0 = s.retval; - s.tmp_0 = Sprite_ay__P187253_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 297; s.pc = 5; return s.tmp_0; + r0 = s.ev___193185.fields["start"]; + s.tmp_5 = r0; + r0 = (s.now___193176 - s.tmp_5); + s.tmp_4 = r0; + r0 = s.ev___193185.fields["timeOut"]; + s.tmp_6 = r0; + r0 = (s.tmp_4 > s.tmp_6); case 5: - r0 = s.retval; - s.tmp_0 = Sprite_fx__P187255_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 298; s.pc = 6; return s.tmp_0; + // jmp value (already in r0) + s.tmp_7 = r0; + r0 = s.tmp_7; case 6: + // jmp value (already in r0) + s.tmp_8 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_8); + if (!r0) { step = 9; continue; } + r0 = s.ev___193185.fields["eid"]; + s.tmp_9 = r0; + r0 = s.ev___193185.fields["vid"]; + s.tmp_10 = r0; + r0 = pxsim.control.raiseEvent(s.tmp_9, s.tmp_10); + r0 = s.ev___193185.fields["once"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; continue; } + s.tmp_1 = helpers_arraySplice__P185315_mk(s); + s.tmp_1.arg0 = globals._pollEventQueue___189222; + s.tmp_1.arg1 = s.i___193179; + s.tmp_1.arg2 = 1; + s.callLocIdx = 33; s.pc = 14; return s.tmp_1; + case 14: r0 = s.retval; - s.tmp_0 = Sprite_fy__P187257_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 299; s.pc = 7; return s.tmp_0; + r0 = (s.i___193179 - 1); + s.i___193179 = (r0); case 7: - r0 = s.retval; - r0 = (s.arg0).fields["flags"] = (0); - s.tmp_0 = Sprite_setImage__P187273_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 300; s.pc = 8; return s.tmp_0; case 8: - r0 = s.retval; - s.tmp_0 = Sprite_setKind__P187288_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = -1; - s.callLocIdx = 301; s.pc = 9; return s.tmp_0; case 9: + case 10: + r0 = (s.i___193179 + 1); + s.i___193179 = (r0); + { step = 2; continue; } + case 11: + s.tmp_0 = pause__P185619_mk(s); + s.tmp_0.arg0 = 50; + s.callLocIdx = 34; s.pc = 15; return s.tmp_0; + case 15: 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); + { step = 1; continue; } + case 12: + globals._pollEventQueue___189222 = (undefined); r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_constructor__P187270.info = {"start":5178,"length":618,"line":202,"column":4,"endLine":222,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["this","img"]} +control_pollEvents__P189223.info = {"start":618,"length":638,"line":20,"column":4,"endLine":37,"endColumn":5,"fileName":"pxt_modules/base/poll.ts","functionName":"pollEvents","argumentNames":[]} -function Sprite_constructor__P187270_mk(s) { +function control_pollEvents__P189223_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_constructor__P187270, depth: s.depth + 1, + parent: s, fn: control_pollEvents__P189223, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -16389,15 +15787,20 @@ function Sprite_constructor__P187270_mk(s) { tmp_4: undefined, tmp_5: undefined, tmp_6: undefined, - arg0: undefined, - arg1: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, + now___193176: undefined, + i___193179: undefined, + ev___193185: undefined, } } -function Sprite_fy__P187257(s) { +function helpers_arraySplice__P185315(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16407,89 +15810,55 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.i___193233 = 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__C187233_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - s.tmp_3 = Math_max__P185342_mk(s); - s.tmp_3.arg0 = 0; - s.tmp_3.arg1 = s.arg1; - s.callLocIdx = 289; s.pc = 1; return s.tmp_3; + r0 = (s.arg1 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + { step = 5; continue; } case 1: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_2 * 256); - s.tmp_4 = r0; - r0 = (s.tmp_4 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_fy"] = (s.tmp_1); + case 2: + s.i___193233 = (0); + case 3: + r0 = (s.i___193233 < s.arg2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + r0 = pxsim_Array_.removeAt(s.arg0, s.arg1); + r0 = (s.i___193233 + 1); + s.i___193233 = (r0); + { step = 3; continue; } + case 4: + case 5: r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_fy__P187257.info = {"start":4057,"length":64,"line":151,"column":4,"endLine":153,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"fy","argumentNames":["this","v"]} - -function Sprite_fy__P187257_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Sprite_fy__P187257, depth: s.depth + 1, - pc: 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_fy__P187256(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (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__C187233_VT)) failedCast(r0); - r0 = s.arg0.fields["_fy"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) - default: oops() -} } } -Sprite_fy__P187256.info = {"start":3895,"length":60,"line":146,"column":4,"endLine":148,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"fy","argumentNames":["this"]} -Sprite_fy__P187256.isGetter = true; +helpers_arraySplice__P185315.info = {"start":3642,"length":213,"line":137,"column":4,"endLine":144,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arraySplice","argumentNames":["arr","start","len"]} -function Sprite_fy__P187256_mk(s) { +function helpers_arraySplice__P185315_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_fy__P187256, depth: s.depth + 1, + parent: s, fn: helpers_arraySplice__P185315, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + i___193233: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function Sprite_fx__P187255(s) { +function control_PollEvent_constructor__P189220(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16502,48 +15871,46 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); + s.arg5 = (s.lambdaArgs[5]); + s.arg6 = (s.lambdaArgs[6]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - s.tmp_3 = Math_max__P185342_mk(s); - s.tmp_3.arg0 = 0; - s.tmp_3.arg1 = s.arg1; - s.callLocIdx = 286; 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); + if (!checkSubtype(r0, control_PollEvent__C189219_VT)) failedCast(r0); + r0 = (s.arg0).fields["eid"] = (s.arg1); + r0 = (s.arg0).fields["vid"] = (s.arg2); + r0 = (s.arg0).fields["start"] = (s.arg3); + r0 = (s.arg0).fields["timeOut"] = (s.arg4); + r0 = (s.arg0).fields["condition"] = (s.arg5); + r0 = (s.arg0).fields["once"] = (s.arg6); r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_fx__P187255.info = {"start":3714,"length":64,"line":141,"column":4,"endLine":143,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"fx","argumentNames":["this","v"]} +control_PollEvent_constructor__P189220.info = {"start":239,"length":316,"line":8,"column":8,"endLine":15,"endColumn":9,"fileName":"pxt_modules/base/poll.ts","functionName":"inline","argumentNames":["this","eid","vid","start","timeOut","condition","once"]} -function Sprite_fx__P187255_mk(s) { +function control_PollEvent_constructor__P189220_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_fx__P187255, depth: s.depth + 1, + parent: s, fn: control_PollEvent_constructor__P189220, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, + arg5: undefined, + arg6: undefined, } } -function Sprite_fx__P187254(s) { +function control_onEvent__P185597(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16553,35 +15920,63 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.ctx___193092 = 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__C187233_VT)) failedCast(r0); - r0 = s.arg0.fields["_fx"]; + s.tmp_0 = control_eventContext__P185614_mk(s); + s.callLocIdx = 47; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.ctx___193092 = (r0); + r0 = pxsim_numops_toBoolDecr(s.ctx___193092); + 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.control.internalOnEvent(s.arg0, s.arg1, s.arg2, s.arg3); + { step = 2; continue; } + case 1: + s.tmp_0 = control_EventContext_registerHandler__P185611_mk(s); + s.tmp_0.arg0 = s.ctx___193092; + s.tmp_0.arg1 = s.arg0; + s.tmp_0.arg2 = s.arg1; + s.tmp_0.arg3 = s.arg2; + s.tmp_0.arg4 = s.arg3; + s.callLocIdx = 48; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + case 2: + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_fx__P187254.info = {"start":3552,"length":60,"line":136,"column":4,"endLine":138,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"fx","argumentNames":["this"]} -Sprite_fx__P187254.isGetter = true; +control_onEvent__P185597.info = {"start":336,"length":325,"line":9,"column":4,"endLine":15,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"onEvent","argumentNames":["src","value","handler","flags"]} -function Sprite_fx__P187254_mk(s) { +function control_onEvent__P185597_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_fx__P187254, depth: s.depth + 1, + parent: s, fn: control_onEvent__P185597, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + ctx___193092: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function Sprite_ay__P187253(s) { +function control_EventContext_registerHandler__P185611(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16591,42 +15986,113 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.h___193115 = undefined; + s.unnamed8902___U1 = undefined; + s.unnamed8903___U2 = undefined; + s.hn___193138 = 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__C187233_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 * 256); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); + if (!checkSubtype(r0, control_EventContext__C185601_VT)) failedCast(r0); + s.h___193115 = (undefined); + r0 = s.arg0.fields["handlers"]; + s.unnamed8902___U1 = (r0); + s.unnamed8903___U2 = (0); + case 1: + s.tmp_0 = r0 = s.unnamed8903___U2; + r0 = pxsim_Array__length(s.unnamed8902___U1); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_ay"] = (s.tmp_1); + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 6; continue; } + r0 = pxsim_Array__getAt(s.unnamed8902___U1, s.unnamed8903___U2); + s.h___193115 = (r0); + r0 = s.h___193115.fields["src"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 == s.arg1); + s.tmp_2 = r0; + r0 = pxsim_numops_toBool(s.tmp_2); + if (r0) { step = 2; continue; } + r0 = s.tmp_2; + { step = 3; continue; } + case 2: + r0 = s.h___193115.fields["value"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 == s.arg2); + case 3: + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + if (!r0) { step = 4; continue; } + r0 = (s.h___193115).fields["flags"] = (s.arg4); + r0 = (s.h___193115).fields["handler"] = (s.arg3); + { step = 7; continue; } + case 4: + case 5: + r0 = (s.unnamed8903___U2 + 1); + s.unnamed8903___U2 = (r0); + { step = 1; continue; } + case 6: + s.unnamed8902___U1 = (undefined); + r0 = pxsim_pxtcore_mkClassInstance(control_EventHandler__C189240_VT); + s.tmp_0 = r0; + s.tmp_1 = control_EventHandler_constructor__P189243_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = s.arg1; + s.tmp_1.arg2 = s.arg2; + s.tmp_1.arg3 = s.arg3; + s.tmp_1.arg4 = s.arg4; + s.callLocIdx = 60; s.pc = 8; return s.tmp_1; + case 8: + r0 = s.retval; + s.hn___193138 = (s.tmp_0); + r0 = s.arg0.fields["handlers"]; + s.tmp_0 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.hn___193138); + s.tmp_0 = control_EventHandler_register__P189241_mk(s); + s.tmp_0.arg0 = s.hn___193138; + s.callLocIdx = 61; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; + case 7: r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_ay__P187253.info = {"start":3383,"length":51,"line":130,"column":4,"endLine":132,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"ay","argumentNames":["this","v"]} +control_EventContext_registerHandler__P185611.info = {"start":5573,"length":525,"line":169,"column":8,"endLine":182,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"registerHandler","argumentNames":["this","src","value","handler","flags"]} -function Sprite_ay__P187253_mk(s) { +function control_EventContext_registerHandler__P185611_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_ay__P187253, depth: s.depth + 1, + parent: s, fn: control_EventContext_registerHandler__P185611, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + h___193115: undefined, + unnamed8902___U1: undefined, + unnamed8903___U2: undefined, + hn___193138: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, } } -function Sprite_ay__P187252(s) { +function control_EventHandler_constructor__P189243(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16638,33 +16104,41 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); - r0 = s.arg0.fields["_ay"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) + if (!checkSubtype(r0, control_EventHandler__C189240_VT)) failedCast(r0); + r0 = (s.arg0).fields["src"] = (s.arg1); + r0 = (s.arg0).fields["value"] = (s.arg2); + r0 = (s.arg0).fields["handler"] = (s.arg3); + r0 = (s.arg0).fields["flags"] = (s.arg4); + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_ay__P187252.info = {"start":3217,"length":60,"line":125,"column":4,"endLine":127,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"ay","argumentNames":["this"]} -Sprite_ay__P187252.isGetter = true; +control_EventHandler_constructor__P189243.info = {"start":786,"length":165,"line":23,"column":8,"endLine":28,"endColumn":13,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":["this","src","value","handler","flags"]} -function Sprite_ay__P187252_mk(s) { +function control_EventHandler_constructor__P189243_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_ay__P187252, depth: s.depth + 1, + parent: s, fn: control_EventHandler_constructor__P189243, 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 Sprite_ax__P187251(s) { +function control_EventHandler_register__P189241(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16676,40 +16150,43 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 * 256); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); + if (!checkSubtype(r0, control_EventHandler__C189240_VT)) failedCast(r0); + r0 = pxsim_pxtcore_mkAction(1, inline__P193159); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + r0 = s.arg0.fields["src"]; s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_ax"] = (s.tmp_1); + r0 = s.arg0.fields["value"]; + s.tmp_2 = r0; + r0 = s.arg0.fields["flags"]; + s.tmp_3 = r0; + r0 = pxsim.control.internalOnEvent(s.tmp_1, s.tmp_2, s.tmp_0, s.tmp_3); r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_ax__P187251.info = {"start":3044,"length":51,"line":119,"column":4,"endLine":121,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"ax","argumentNames":["this","v"]} +control_EventHandler_register__P189241.info = {"start":961,"length":165,"line":30,"column":8,"endLine":34,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"register","argumentNames":["this"]} -function Sprite_ax__P187251_mk(s) { +function control_EventHandler_register__P189241_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_ax__P187251, depth: s.depth + 1, + parent: s, fn: control_EventHandler_register__P189241, depth: s.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_ax__P187250(s) { +function inline__P193159(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16719,35 +16196,45 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); - r0 = s.arg0.fields["_ax"]; + r0 = s.caps[0].fields["handler"]; 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_1 = if_handler_1_mk(s); + s.tmp_1.arg0 = s.caps[0]; + if (!s.tmp_1.arg0.vtable.iface) { + setupLambda(s.tmp_1, pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "handler"), 1); + s.callLocIdx = 49; s.pc = 3; return s.tmp_1; + } else { + s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["handler"]; + if (s.tmp_1.fn == null) { setupLambda(s.tmp_1, s.tmp_1.arg0.fields["handler"], 1); s.callLocIdx = 49; s.pc = 3; return s.tmp_1; } + else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 49; s.pc = 3; return s.tmp_1;; } + else { s.callLocIdx = 49; s.pc = 3; return s.tmp_1; } + } + case 3: + r0 = s.retval; + case 1: + case 2: + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_ax__P187250.info = {"start":2878,"length":60,"line":114,"column":4,"endLine":116,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"ax","argumentNames":["this"]} -Sprite_ax__P187250.isGetter = true; +inline__P193159.info = {"start":1032,"length":71,"line":31,"column":58,"endLine":33,"endColumn":13,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":[]} -function Sprite_ax__P187250_mk(s) { +function inline__P193159_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_ax__P187250, depth: s.depth + 1, + parent: s, fn: inline__P193159, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - arg0: undefined, + tmp_1: undefined, } } -function initilize_map__P348234(s) { +function tiles_locationOfSprite__P188992(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16757,366 +16244,59 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.index___348765 = undefined; - s.index___348805 = undefined; - s.location___348889 = undefined; - s.unnamed16550___U3 = undefined; - s.unnamed16551___U4 = undefined; - s.tmp_0 = scene_setBackgroundColor__P187674_mk(s); - s.tmp_0.arg0 = 9; - s.callLocIdx = 148; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - r0 = pxsim_Array__mk(); - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, globals.transparency16___189149); - r0 = pxsim_Array__push(s.tmp_0, globals.oceanSand6___188423); - r0 = pxsim_Array__push(s.tmp_0, globals.hazardWater___188592); - r0 = pxsim_Array__push(s.tmp_0, globals.coral0___188265); - r0 = pxsim_Array__push(s.tmp_0, globals.coral4___188269); - r0 = pxsim_Array__push(s.tmp_0, globals.coral5___188270); - r0 = pxsim_Array__push(s.tmp_0, globals.coral2___188267); - r0 = pxsim_Array__push(s.tmp_0, globals.coral1___188266); - r0 = pxsim_Array__push(s.tmp_0, globals.tile1___189150); - r0 = pxsim_Array__push(s.tmp_0, globals.tile2___189151); - r0 = pxsim_Array__push(s.tmp_0, globals.tile3___189152); - r0 = pxsim_Array__push(s.tmp_0, globals.tile4___189153); - r0 = pxsim_Array__push(s.tmp_0, globals.tile5___189154); - r0 = pxsim_Array__push(s.tmp_0, globals.tile6___189155); - r0 = pxsim_Array__push(s.tmp_0, globals.tile7___189156); - r0 = pxsim_Array__push(s.tmp_0, globals.tile8___189157); - r0 = pxsim_Array__push(s.tmp_0, globals.tile9___189158); - r0 = pxsim_Array__push(s.tmp_0, globals.tile10___189159); - r0 = pxsim_Array__push(s.tmp_0, globals.tile11___189160); - r0 = pxsim_Array__push(s.tmp_0, globals.tile14___189162); - r0 = pxsim_Array__push(s.tmp_0, globals.tile13___189163); - r0 = pxsim_Array__push(s.tmp_0, globals.tile15___189164); - r0 = pxsim_Array__push(s.tmp_0, globals.tile16___189165); - s.tmp_1 = tiles_setTilemap__P187558_mk(s); - s.tmp_2 = tiles_createTilemap__P187557_mk(s); - s.tmp_2.arg0 = _hex348737; - r0 = pxsim.image.ofBuffer(_hex348739); - s.tmp_2.arg1 = r0; - s.tmp_2.arg2 = s.tmp_0; - s.tmp_2.arg3 = 4; - s.callLocIdx = 149; s.pc = 9; return s.tmp_2; - case 9: - r0 = s.retval; - s.tmp_1.arg0 = r0; - s.callLocIdx = 150; s.pc = 8; return s.tmp_1; - case 8: - r0 = s.retval; - s.index___348765 = (0); - case 1: - s.tmp_1 = r0 = s.index___348765; - r0 = (globals.user_shark_count___348310 - 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 = 2; continue; } - s.tmp_3 = summon_shark__P348236_mk(s); - s.callLocIdx = 151; s.pc = 10; return s.tmp_3; - case 10: - r0 = s.retval; - s.tmp_0 = r0 = globals.loading___348087; - r0 = (1 / globals.user_shark_count___348310); - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - globals.loading___348087 = (r0); - r0 = (s.index___348765 + 1); - s.tmp_7 = r0; - if ((s.tmp_7) && (s.tmp_7).vtable) { - setupResume(s, 11); - pxsim_String__stringConv(s.tmp_7); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_7) + ""; } - case 11: - r0 = s.retval; - s.tmp_6 = r0; - r0 = pxsim_String__concat("(", s.tmp_6); - s.tmp_5 = r0; - if ((s.tmp_5) && (s.tmp_5).vtable) { - setupResume(s, 12); - pxsim_String__stringConv(s.tmp_5); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_5) + ""; } - case 12: - 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, 13); - pxsim_String__stringConv(s.tmp_3); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_3) + ""; } - case 13: - r0 = s.retval; - s.tmp_2 = r0; - if ((globals.user_shark_count___348310) && (globals.user_shark_count___348310).vtable) { - setupResume(s, 14); - pxsim_String__stringConv(globals.user_shark_count___348310); - checkResumeConsumed(); - return; - } else { s.retval = (globals.user_shark_count___348310) + ""; } - case 14: - r0 = s.retval; - s.tmp_8 = r0; - r0 = pxsim_String__concat(s.tmp_2, s.tmp_8); - s.tmp_1 = r0; - if ((s.tmp_1) && (s.tmp_1).vtable) { - setupResume(s, 15); - pxsim_String__stringConv(s.tmp_1); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_1) + ""; } - case 15: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_String__concat(s.tmp_0, ")"); - globals.message___348118 = (r0); - s.tmp_0 = pause__P185619_mk(s); - s.tmp_0.arg0 = 20; - s.callLocIdx = 152; s.pc = 16; return s.tmp_0; - case 16: - r0 = s.retval; - r0 = (s.index___348765 + 1); - s.index___348765 = (r0); - { step = 1; continue; } - case 2: - globals.loading___348087 = (1); - s.tmp_0 = pause__P185619_mk(s); - s.tmp_0.arg0 = 100; - s.callLocIdx = 153; s.pc = 17; return s.tmp_0; - case 17: - r0 = s.retval; - globals.loading___348087 = (0); - s.index___348805 = (0); - case 3: - s.tmp_1 = r0 = s.index___348805; - r0 = (globals.user_fish_count___348312 - 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 = 4; continue; } - s.tmp_3 = summon_fish__P348081_mk(s); - s.tmp_3.arg0 = true; - s.tmp_3.arg1 = true; - s.callLocIdx = 154; s.pc = 18; return s.tmp_3; - case 18: - r0 = s.retval; - s.tmp_0 = r0 = globals.loading___348087; - r0 = (globals.user_fish_count___348312 - 1); - s.tmp_2 = r0; - r0 = (1 / s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - globals.loading___348087 = (r0); - r0 = (s.index___348805 + 1); - s.tmp_7 = r0; - if ((s.tmp_7) && (s.tmp_7).vtable) { - setupResume(s, 19); - pxsim_String__stringConv(s.tmp_7); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_7) + ""; } - case 19: - r0 = s.retval; - s.tmp_6 = r0; - r0 = pxsim_String__concat("(", s.tmp_6); - 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_4, "/"); - s.tmp_3 = r0; - if ((s.tmp_3) && (s.tmp_3).vtable) { - setupResume(s, 21); - pxsim_String__stringConv(s.tmp_3); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_3) + ""; } - case 21: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (globals.user_fish_count___348312 - 1); - s.tmp_9 = r0; - if ((s.tmp_9) && (s.tmp_9).vtable) { - setupResume(s, 22); - pxsim_String__stringConv(s.tmp_9); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_9) + ""; } - case 22: - r0 = s.retval; - s.tmp_8 = r0; - r0 = pxsim_String__concat(s.tmp_2, s.tmp_8); - s.tmp_1 = r0; - if ((s.tmp_1) && (s.tmp_1).vtable) { - setupResume(s, 23); - pxsim_String__stringConv(s.tmp_1); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_1) + ""; } - case 23: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_String__concat(s.tmp_0, ")"); - globals.message___348118 = (r0); - s.tmp_0 = pause__P185619_mk(s); - s.tmp_0.arg0 = 20; - s.callLocIdx = 155; s.pc = 24; return s.tmp_0; - case 24: - r0 = s.retval; - r0 = (s.index___348805 + 1); - s.index___348805 = (r0); - { step = 3; continue; } - case 4: - globals.loading___348087 = (1); - s.tmp_0 = pause__P185619_mk(s); - s.tmp_0.arg0 = 100; - s.callLocIdx = 156; s.pc = 25; return s.tmp_0; - case 25: - r0 = s.retval; - r0 = pxsim_Array__mk(); - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, globals.transparency16___189149); - r0 = pxsim_Array__push(s.tmp_0, globals.oceanSand6___188423); - r0 = pxsim_Array__push(s.tmp_0, globals.hazardWater___188592); - r0 = pxsim_Array__push(s.tmp_0, globals.coral0___188265); - r0 = pxsim_Array__push(s.tmp_0, globals.coral4___188269); - r0 = pxsim_Array__push(s.tmp_0, globals.coral5___188270); - r0 = pxsim_Array__push(s.tmp_0, globals.coral2___188267); - r0 = pxsim_Array__push(s.tmp_0, globals.coral1___188266); - r0 = pxsim_Array__push(s.tmp_0, globals.tile1___189150); - r0 = pxsim_Array__push(s.tmp_0, globals.tile2___189151); - r0 = pxsim_Array__push(s.tmp_0, globals.tile3___189152); - r0 = pxsim_Array__push(s.tmp_0, globals.tile4___189153); - r0 = pxsim_Array__push(s.tmp_0, globals.tile5___189154); - r0 = pxsim_Array__push(s.tmp_0, globals.tile6___189155); - r0 = pxsim_Array__push(s.tmp_0, globals.tile7___189156); - r0 = pxsim_Array__push(s.tmp_0, globals.tile8___189157); - r0 = pxsim_Array__push(s.tmp_0, globals.tile9___189158); - r0 = pxsim_Array__push(s.tmp_0, globals.tile10___189159); - r0 = pxsim_Array__push(s.tmp_0, globals.tile11___189160); - r0 = pxsim_Array__push(s.tmp_0, globals.tile14___189162); - r0 = pxsim_Array__push(s.tmp_0, globals.tile13___189163); - r0 = pxsim_Array__push(s.tmp_0, globals.tile15___189164); - r0 = pxsim_Array__push(s.tmp_0, globals.tile12___189161); - s.tmp_1 = tiles_setTilemap__P187558_mk(s); - s.tmp_2 = tiles_createTilemap__P187557_mk(s); - s.tmp_2.arg0 = _hex348851; - r0 = pxsim.image.ofBuffer(_hex348853); - s.tmp_2.arg1 = r0; - s.tmp_2.arg2 = s.tmp_0; - s.tmp_2.arg3 = 4; - s.callLocIdx = 157; s.pc = 27; return s.tmp_2; - case 27: + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + s.tmp_0 = tiles_getTileLocation__P187561_mk(s); + s.tmp_1 = tiles_screenCoordinateToTile__P189014_mk(s); + s.tmp_2 = Sprite_x__P187242_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 2087; s.pc = 3; return s.tmp_2; + case 3: r0 = s.retval; s.tmp_1.arg0 = r0; - s.callLocIdx = 158; s.pc = 26; return s.tmp_1; - case 26: - r0 = s.retval; - s.tmp_0 = summon_fish__P348081_mk(s); - s.tmp_0.arg0 = false; - s.tmp_0.arg1 = false; - s.callLocIdx = 159; s.pc = 28; return s.tmp_0; - case 28: - r0 = s.retval; - globals.sprite_player_fish___348300 = (r0); - s.tmp_0 = Sprite_setKind__P187288_mk(s); - s.tmp_0.arg0 = globals.sprite_player_fish___348300; - s.tmp_0.arg1 = globals.Player___187345; - s.callLocIdx = 160; s.pc = 29; return s.tmp_0; - case 29: - r0 = s.retval; - s.tmp_0 = controller_moveSprite__P187169_mk(s); - s.tmp_0.arg0 = globals.sprite_player_fish___348300; - s.tmp_0.arg1 = 64; - s.tmp_0.arg2 = 64; - s.callLocIdx = 161; s.pc = 30; return s.tmp_0; - case 30: + s.callLocIdx = 2088; s.pc = 2; return s.tmp_1; + case 2: r0 = s.retval; - s.tmp_0 = scene_cameraFollowSprite__P187681_mk(s); - s.tmp_0.arg0 = globals.sprite_player_fish___348300; - s.callLocIdx = 162; s.pc = 31; return s.tmp_0; - case 31: + s.tmp_0.arg0 = r0; + s.tmp_3 = tiles_screenCoordinateToTile__P189014_mk(s); + s.tmp_4 = Sprite_y__P187244_mk(s); + s.tmp_4.arg0 = s.arg0; + s.callLocIdx = 2089; s.pc = 5; return s.tmp_4; + case 5: r0 = s.retval; - s.location___348889 = (undefined); - s.tmp_0 = tiles_getTilesByType__P187567_mk(s); - s.tmp_0.arg0 = globals.tile13___189163; - s.callLocIdx = 163; s.pc = 32; return s.tmp_0; - case 32: + s.tmp_3.arg0 = r0; + s.callLocIdx = 2090; s.pc = 4; return s.tmp_3; + case 4: r0 = s.retval; - s.unnamed16550___U3 = (r0); - s.unnamed16551___U4 = (0); - case 5: - s.tmp_0 = r0 = s.unnamed16551___U4; - r0 = pxsim_Array__length(s.unnamed16550___U3); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 6; continue; } - r0 = pxsim_Array__getAt(s.unnamed16550___U3, s.unnamed16551___U4); - s.location___348889 = (r0); - s.tmp_2 = tiles_setTileAt__P187559_mk(s); - s.tmp_2.arg0 = s.location___348889; - s.tmp_2.arg1 = globals.tile15___189164; - s.callLocIdx = 164; s.pc = 33; return s.tmp_2; - case 33: + s.tmp_0.arg1 = r0; + s.callLocIdx = 2091; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - r0 = (s.unnamed16551___U4 + 1); - s.unnamed16551___U4 = (r0); - { step = 5; continue; } - case 6: - s.unnamed16550___U3 = (undefined); - r0 = undefined; return leave(s, r0) default: oops() } } } -initilize_map__P348234.info = {"start":9055,"length":6754,"line":232,"column":0,"endLine":286,"endColumn":1,"fileName":"main.ts","functionName":"initilize_map","argumentNames":[]} +tiles_locationOfSprite__P188992.info = {"start":9471,"length":165,"line":260,"column":4,"endLine":262,"endColumn":5,"fileName":"pxt_modules/tilemaps/tilemap.ts","functionName":"locationOfSprite","argumentNames":["s"]} -function initilize_map__P348234_mk(s) { +function tiles_locationOfSprite__P188992_mk(s) { checkStack(s.depth); return { - parent: s, fn: initilize_map__P348234, depth: s.depth + 1, + parent: s, fn: tiles_locationOfSprite__P188992, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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, - index___348765: undefined, - index___348805: undefined, - location___348889: undefined, - unnamed16550___U3: undefined, - unnamed16551___U4: undefined, + arg0: undefined, } } -const _hex348737 = pxsim.BufferMethods.createBufferFromHex("40000c000202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020213131314141415151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515161616141414151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151616161414141515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151516161614141415151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515161616141414151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151616161414141515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151516161614141415151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515161616141414150f151515151515151515151515151515151515151515151515151515151515150f15151515151515151515151515151515151515151515150f1616161414140c1015151515151515150c151515151515151515151515151515150c15151515151015151515151515151515151515150c1515151515151515101616161414140d1103151515151515150d0809151515151515030405151515150b0e151515150312091515150b1515150706151515150d150a1515151503151116161601010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101") -const _hex348739 = pxsim.BufferMethods.createBufferFromHex("870440000c0000000200000000200000020000000020000002000000002000000200000000200000020000000020000002000000002200000200000000200000020000000020000002000000002000000200000000200000020000000020000002000000002000000200000000200000020000000020000002000000002200000200000000200000020000000020000002000000002000000200000000200000020000000020000002000000002000000200000000200000020000000022000002000000002200000200000000220000020000000020000002000000002000000200000000200000020000000020000002000000002000000200000000220000020000000020000002000000002000000200000000200000020000000020000002000000002200000200000000200000020000000020000002000000002000000200000000200000020000000020000002000000002000000200000000200000020000000020000002000000002000000200000000220000020000000022000002000000002000000200000000200000020000000020000002000000002000000200000000200000020000000020000002000000002200000200000000200000020000000020000002000000002000000200000000200000020000000022000002000000002000000200000000200000020000000020000002000000002000000200000000200000") -const _hex348851 = pxsim.BufferMethods.createBufferFromHex("40000c000202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020213131314141415151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515161616141414151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151616161414141515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151516161614141415151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515161616141414151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151616161414141515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151516161614141415151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515161616141414150f151515151515151515151515151515151515151515151515151515151515150f15151515151515151515151515151515151515151515150f1616161414140c1015151515151515150c151515151515151515151515151515150c15151515151015151515151515151515151515150c1515151515151515101616161414140d1103151515151515150d0809151515151515030405151515150b0e151515150312091515150b1515150706151515150d150a1515151503151116161601010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101") -const _hex348853 = pxsim.BufferMethods.createBufferFromHex("870440000c0000000200000000200000020000000020000002000000002000002222222222220000020000000020000002000000002200000200000000200000020000000020000002000000002000000200000000200000020000000020000002000000002000000200000000200000020000000020000002000000002200000200000000200000020000000020000002000000002000000200000000200000020000000020000002000000002000000200000000200000020000000022000002000000002200000200000000220000020000000020000002000000002000000200000000200000020000000020000002000000002000000200000000220000020000000020000002000000002000000200000000200000020000000020000002000000002200000200000000200000020000000020000002000000002000000200000000200000020000000020000002000000002000000200000000200000020000000020000002000000002000000200000000220000020000000022000002000000002000000200000000200000020000000020000002000000002000000200000000200000020000000020000002000000002200000200000000200000020000000020000002000000002000000200000000200000020000000022000002000000002000000200000000200000020000000020000002000000002000000200000000200000") -function tiles_setTileAt__P187559(s) { +function tiles_screenCoordinateToTile__P189014(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17126,120 +16306,55 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___206367 = undefined; - s.scale___206380 = undefined; - s.index___206384 = undefined; + s.tm___205923 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } s.tmp_0 = game_currentScene__P187749_mk(s); - s.callLocIdx = 970; s.pc = 8; return s.tmp_0; - case 8: + s.callLocIdx = 2108; s.pc = 4; return s.tmp_0; + case 4: r0 = s.retval; - s.scene___206367 = (r0); - r0 = pxsim_numops_toBoolDecr(s.arg0); + r0 = r0.fields["tileMap"]; + s.tm___205923 = (r0); + r0 = pxsim_numops_toBoolDecr(s.tm___205923); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + r0 = (s.arg0 >> 4); + { step = 3; continue; } case 1: - r0 = pxsim_numops_toBoolDecr(s.arg1); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); case 2: - // jmp value (already in r0) + s.tmp_2 = r0 = s.arg0; + r0 = s.tm___205923.fields["_scale"]; 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_2 >> s.tmp_3); case 3: - r0 = s.scene___206367.fields["tileMap"]; - 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_6 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_6); - if (!r0) { step = 5; continue; } - r0 = null; - { step = 7; continue; } - case 5: - case 6: - r0 = s.scene___206367.fields["tileMap"]; - s.tmp_7 = r0; - r0 = s.tmp_7.fields["_scale"]; - s.scale___206380 = (r0); - s.tmp_0 = tiles_TileMap_getImageType__P187549_mk(s); - r0 = s.scene___206367.fields["tileMap"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 972; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; - s.index___206384 = (r0); - s.tmp_0 = tiles_TileMap_setTileAt__P187548_mk(s); - r0 = s.scene___206367.fields["tileMap"]; - s.tmp_0.arg0 = r0; - s.tmp_2 = tiles_Location_x__P187510_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 973; s.pc = 11; return s.tmp_2; - case 11: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_1 >> s.scale___206380); - s.tmp_0.arg1 = r0; - s.tmp_4 = tiles_Location_y__P187511_mk(s); - s.tmp_4.arg0 = s.arg0; - s.callLocIdx = 974; s.pc = 12; return s.tmp_4; - case 12: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_3 >> s.scale___206380); - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = s.index___206384; - s.callLocIdx = 975; s.pc = 10; return s.tmp_0; - case 10: - r0 = s.retval; - case 7: - r0 = undefined; return leave(s, r0) default: oops() } } } -tiles_setTileAt__P187559.info = {"start":15058,"length":339,"line":482,"column":4,"endLine":488,"endColumn":5,"fileName":"pxt_modules/game/tilemap.ts","functionName":"setTileAt","argumentNames":["loc","tile"]} +tiles_screenCoordinateToTile__P189014.info = {"start":14355,"length":380,"line":413,"column":4,"endLine":420,"endColumn":5,"fileName":"pxt_modules/tilemaps/tilemap.ts","functionName":"screenCoordinateToTile","argumentNames":["value"]} -function tiles_setTileAt__P187559_mk(s) { +function tiles_screenCoordinateToTile__P189014_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_setTileAt__P187559, depth: s.depth + 1, + parent: s, fn: tiles_screenCoordinateToTile__P189014, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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___206367: undefined, - scale___206380: undefined, - index___206384: undefined, + tm___205923: undefined, arg0: undefined, - arg1: undefined, } } -function tiles_TileMap_getImageType__P187549(s) { +function scene_aStar__P188872(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17249,50 +16364,25 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tileset___206093 = undefined; - s.i___206098 = undefined; - s.newIndex___206112 = undefined; + s.tm___205953 = 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__C187534_VT)) failedCast(r0); - r0 = s.arg0.fields["_map"]; - s.tmp_0 = r0; - r0 = s.tmp_0.fields["tileset"]; - s.tileset___206093 = (r0); - s.i___206098 = (0); - case 1: - s.tmp_1 = r0 = s.i___206098; - r0 = pxsim_Array__length(s.tileset___206093); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - r0 = pxsim_Array__getAt(s.tileset___206093, s.i___206098); - s.tmp_4 = r0; - r0 = pxsim_ImageMethods.equals(s.tmp_4, s.arg1); - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 2; continue; } - r0 = s.i___206098; - { step = 7; continue; } - case 2: - case 3: - r0 = (s.i___206098 + 1); - s.i___206098 = (r0); - { step = 1; continue; } + s.tmp_0 = game_currentScene__P187749_mk(s); + s.callLocIdx = 1790; s.pc = 4; return s.tmp_0; case 4: - r0 = pxsim_Array__length(s.tileset___206093); - s.newIndex___206112 = (r0); - s.tmp_3 = tiles_TileMap_isInvalidIndex__P189509_mk(s); - s.tmp_3.arg0 = s.arg0; - s.tmp_3.arg1 = s.newIndex___206112; - s.callLocIdx = 907; s.pc = 8; return s.tmp_3; - case 8: + r0 = s.retval; + r0 = r0.fields["tileMap"]; + s.tm___205953 = (r0); + s.tmp_3 = scene_isWalkable__P191303_mk(s); + s.tmp_3.arg0 = s.arg1; + s.tmp_3.arg1 = s.arg2; + s.tmp_3.arg2 = s.tm___205953; + s.callLocIdx = 1791; s.pc = 5; return s.tmp_3; + case 5: r0 = s.retval; s.tmp_2 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_2); @@ -17300,41 +16390,55 @@ switch (step) { 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_Array__push(s.tileset___206093, s.arg1); - r0 = s.newIndex___206112; - { step = 7; continue; } - case 5: + if (!r0) { step = 1; continue; } + r0 = undefined; + { step = 3; continue; } + case 1: + case 2: + r0 = pxsim_pxtcore_mkAction(1, inline__P205968); + s.tmp_4 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_4, 0, s.arg1); + r0 = pxsim_pxtcore_mkAction(1, inline__P205973); + s.tmp_5 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_5, 0, s.arg1); + s.tmp_6 = scene_generalAStar__P188874_mk(s); + s.tmp_6.arg0 = s.tm___205953; + s.tmp_6.arg1 = s.arg0; + s.tmp_6.arg2 = s.arg2; + s.tmp_6.arg3 = s.tmp_4; + s.tmp_6.arg4 = s.tmp_5; + s.callLocIdx = 1797; s.pc = 6; return s.tmp_6; case 6: - r0 = -1; - case 7: + r0 = s.retval; + case 3: return leave(s, r0) default: oops() } } } -tiles_TileMap_getImageType__P187549.info = {"start":7714,"length":482,"line":282,"column":8,"endLine":295,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getImageType","argumentNames":["this","im"]} +scene_aStar__P188872.info = {"start":937,"length":377,"line":31,"column":4,"endLine":39,"endColumn":5,"fileName":"pxt_modules/arcade-tilemap-a-star/a-star.ts","functionName":"aStar","argumentNames":["start","end","onTilesOf"]} -function tiles_TileMap_getImageType__P187549_mk(s) { +function scene_aStar__P188872_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_getImageType__P187549, depth: s.depth + 1, + parent: s, fn: scene_aStar__P188872, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, - tileset___206093: undefined, - i___206098: undefined, - newIndex___206112: undefined, + tmp_5: undefined, + tmp_6: undefined, + tm___205953: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function tiles_TileMap_isInvalidIndex__P189509(s) { +function inline__P205968(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17346,44 +16450,110 @@ 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__C187534_VT)) failedCast(r0); - r0 = (s.arg1 < 0); + s.tmp_0 = scene_tileLocationHeuristic__P191299_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.caps[0]; + s.callLocIdx = 1792; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + return leave(s, r0) + default: oops() +} } } +inline__P205968.info = {"start":1221,"length":34,"line":37,"column":12,"endLine":37,"endColumn":46,"fileName":"pxt_modules/arcade-tilemap-a-star/a-star.ts","functionName":"inline","argumentNames":["t"]} + +function inline__P205968_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: inline__P205968, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function inline__P205973(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (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_2 = tiles_Location_x__P187510_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 1793; s.pc = 3; return s.tmp_2; + case 3: + r0 = s.retval; + s.tmp_1 = r0; + s.tmp_4 = tiles_Location_x__P187510_mk(s); + s.tmp_4.arg0 = s.caps[0]; + s.callLocIdx = 1794; 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; } + if (r0) { step = 1; continue; } r0 = s.tmp_0; { step = 2; continue; } case 1: - r0 = (s.arg1 > 255); + s.tmp_6 = tiles_Location_y__P187511_mk(s); + s.tmp_6.arg0 = s.arg0; + s.callLocIdx = 1795; s.pc = 5; return s.tmp_6; + case 5: + r0 = s.retval; + s.tmp_5 = r0; + s.tmp_8 = tiles_Location_y__P187511_mk(s); + s.tmp_8.arg0 = s.caps[0]; + s.callLocIdx = 1796; 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_1 = r0; - r0 = s.tmp_1; + s.tmp_9 = r0; + r0 = s.tmp_9; return leave(s, r0) default: oops() } } } -tiles_TileMap_isInvalidIndex__P189509.info = {"start":10071,"length":106,"line":343,"column":8,"endLine":345,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"isInvalidIndex","argumentNames":["this","index"]} +inline__P205973.info = {"start":1270,"length":35,"line":38,"column":12,"endLine":38,"endColumn":47,"fileName":"pxt_modules/arcade-tilemap-a-star/a-star.ts","functionName":"inline","argumentNames":["l"]} -function tiles_TileMap_isInvalidIndex__P189509_mk(s) { +function inline__P205973_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_isInvalidIndex__P189509, depth: s.depth + 1, + parent: s, fn: inline__P205973, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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 tiles_TileMapData_getTileset__P187529(s) { +function scene_isWalkable__P191303(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17393,31 +16563,81 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.img___204488 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMapData__C187521_VT)) failedCast(r0); - r0 = s.arg0.fields["tileset"]; + s.tmp_1 = scene_isWall__P191302_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_1.arg1 = s.arg2; + s.callLocIdx = 1843; s.pc = 6; return s.tmp_1; + case 6: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = false; + { step = 5; continue; } + case 1: + case 2: + 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); + if (!r0) { step = 3; continue; } + r0 = true; + { step = 5; continue; } + case 3: + case 4: + s.tmp_4 = tiles_TileMap_getTileImage__P187556_mk(s); + s.tmp_4.arg0 = s.arg2; + s.tmp_5 = tiles_TileMap_getTileIndex__P187547_mk(s); + s.tmp_5.arg0 = s.arg2; + r0 = s.arg0.fields["_col"]; + s.tmp_5.arg1 = r0; + r0 = s.arg0.fields["_row"]; + s.tmp_5.arg2 = r0; + s.callLocIdx = 1846; s.pc = 8; return s.tmp_5; + case 8: + r0 = s.retval; + s.tmp_4.arg1 = r0; + s.callLocIdx = 1847; s.pc = 7; return s.tmp_4; + case 7: + r0 = s.retval; + s.img___204488 = (r0); + r0 = pxsim_ImageMethods.equals(s.img___204488, s.arg1); + case 5: return leave(s, r0) default: oops() } } } -tiles_TileMapData_getTileset__P187529.info = {"start":4532,"length":57,"line":168,"column":8,"endLine":170,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTileset","argumentNames":["this"]} +scene_isWalkable__P191303.info = {"start":7750,"length":280,"line":226,"column":4,"endLine":231,"endColumn":5,"fileName":"pxt_modules/arcade-tilemap-a-star/a-star.ts","functionName":"isWalkable","argumentNames":["l","onTilesOf","tm"]} -function tiles_TileMapData_getTileset__P187529_mk(s) { +function scene_isWalkable__P191303_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMapData_getTileset__P187529, depth: s.depth + 1, + parent: s, fn: scene_isWalkable__P191303, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + img___204488: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function tiles_TileMap_setTileAt__P187548(s) { +function scene_isWall__P191302(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17427,90 +16647,94 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.r___204267 = undefined; + s.c___204271 = 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__C187534_VT)) failedCast(r0); - s.tmp_3 = tiles_TileMapData_isOutsideMap__P187533_mk(s); - r0 = s.arg0.fields["_map"]; - s.tmp_3.arg0 = r0; - s.tmp_3.arg1 = s.arg1; - s.tmp_3.arg2 = s.arg2; - s.callLocIdx = 903; s.pc = 5; return s.tmp_3; - case 5: - r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + s.tmp_0 = scene_locationRow__P191300_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1840; s.pc = 1; return s.tmp_0; case 1: - s.tmp_6 = tiles_TileMap_isInvalidIndex__P189509_mk(s); - s.tmp_6.arg0 = s.arg0; - s.tmp_6.arg1 = s.arg3; - s.callLocIdx = 904; s.pc = 6; return s.tmp_6; - case 6: 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); + s.r___204267 = (r0); + s.tmp_0 = scene_locationCol__P191301_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1841; s.pc = 2; return s.tmp_0; case 2: - // jmp value (already in r0) - s.tmp_7 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_7); - if (!r0) { step = 3; continue; } - s.tmp_8 = tiles_TileMapData_setTile__P187528_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.tmp_8.arg3 = s.arg3; - s.callLocIdx = 905; s.pc = 7; return s.tmp_8; - case 7: r0 = s.retval; + s.c___204271 = (r0); + s.tmp_0 = tiles_TileMap_isObstacle__P187553_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = s.c___204271; + s.tmp_0.arg2 = s.r___204267; + s.callLocIdx = 1842; s.pc = 3; return s.tmp_0; case 3: - case 4: - r0 = undefined; + r0 = s.retval; return leave(s, r0) default: oops() } } } -tiles_TileMap_setTileAt__P187548.info = {"start":7495,"length":209,"line":277,"column":8,"endLine":280,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"setTileAt","argumentNames":["this","col","row","index"]} +scene_isWall__P191302.info = {"start":7573,"length":169,"line":220,"column":4,"endLine":224,"endColumn":5,"fileName":"pxt_modules/arcade-tilemap-a-star/a-star.ts","functionName":"isWall","argumentNames":["l","tm"]} -function tiles_TileMap_setTileAt__P187548_mk(s) { +function scene_isWall__P191302_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: scene_isWall__P191302, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + r___204267: undefined, + c___204271: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function scene_locationCol__P191301(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (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 = tiles_Location_x__P187510_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 1839; s.pc = 1; return s.tmp_1; + case 1: + r0 = s.retval; + s.tmp_0 = r0; + r0 = (s.tmp_0 >> 4); + return leave(s, r0) + default: oops() +} } } +scene_locationCol__P191301.info = {"start":7483,"length":82,"line":216,"column":4,"endLine":218,"endColumn":5,"fileName":"pxt_modules/arcade-tilemap-a-star/a-star.ts","functionName":"locationCol","argumentNames":["l"]} + +function scene_locationCol__P191301_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_setTileAt__P187548, depth: s.depth + 1, + parent: s, fn: scene_locationCol__P191301, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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 tiles_TileMapData_setTile__P187528(s) { +function scene_locationRow__P191300(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17522,85 +16746,35 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMapData__C187521_VT)) failedCast(r0); - s.tmp_1 = tiles_TileMapData_isOutsideMap__P187533_mk(s); + s.tmp_1 = tiles_Location_y__P187511_mk(s); s.tmp_1.arg0 = s.arg0; - s.tmp_1.arg1 = s.arg1; - s.tmp_1.arg2 = s.arg2; - s.callLocIdx = 881; s.pc = 6; return s.tmp_1; - case 6: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 5; continue; } + s.callLocIdx = 1838; s.pc = 1; return s.tmp_1; case 1: - case 2: - r0 = s.arg0.fields["data"]; - s.tmp_3 = r0; - r0 = pxsim.BufferMethods.isReadOnly(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 3; continue; } - s.tmp_4 = r0 = s.arg0; - r0 = s.arg0.fields["data"]; - s.tmp_6 = r0; - r0 = pxsim.BufferMethods.slice(s.tmp_6, 0, -1); - s.tmp_5 = r0; - r0 = (s.tmp_4).fields["data"] = (s.tmp_5); - case 3: - case 4: - r0 = s.arg0.fields["data"]; + r0 = s.retval; s.tmp_0 = r0; - r0 = (s.arg1 | 0); - s.tmp_3 = r0; - r0 = (4 + s.tmp_3); - s.tmp_2 = r0; - r0 = (s.arg2 | 0); - s.tmp_5 = r0; - r0 = s.arg0.fields["_width"]; - s.tmp_6 = r0; - r0 = (s.tmp_5 * s.tmp_6); - s.tmp_4 = r0; - r0 = (s.tmp_2 + s.tmp_4); - s.tmp_1 = r0; - r0 = pxsim.BufferMethods.setUint8(s.tmp_0, s.tmp_1, s.arg3); - case 5: - r0 = undefined; + r0 = (s.tmp_0 >> 4); return leave(s, r0) default: oops() } } } -tiles_TileMapData_setTile__P187528.info = {"start":4207,"length":315,"line":158,"column":8,"endLine":166,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"setTile","argumentNames":["this","col","row","tile"]} +scene_locationRow__P191300.info = {"start":7393,"length":82,"line":212,"column":4,"endLine":214,"endColumn":5,"fileName":"pxt_modules/arcade-tilemap-a-star/a-star.ts","functionName":"locationRow","argumentNames":["l"]} -function tiles_TileMapData_setTile__P187528_mk(s) { +function scene_locationRow__P191300_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMapData_setTile__P187528, depth: s.depth + 1, + parent: s, fn: scene_locationRow__P191300, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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 tiles_getTilesByType__P187567(s) { +function tiles_TileMap_isObstacle__P187553(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17610,65 +16784,66 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___206016 = undefined; - s.index___206026 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - s.tmp_0 = game_currentScene__P187749_mk(s); - s.callLocIdx = 989; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.scene___206016 = (r0); - r0 = pxsim_numops_toBoolDecr(s.arg0); + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMap__C187534_VT)) failedCast(r0); + r0 = s.arg0.fields["_map"]; + s.tmp_6 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_6); + s.tmp_5 = r0; + r0 = pxsim_Boolean__bang(s.tmp_5); + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + s.tmp_3 = r0; + r0 = pxsim_Boolean__bang(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + r0 = false; + { step = 5; continue; } case 1: - r0 = s.scene___206016.fields["tileMap"]; - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); case 2: - // jmp value (already in r0) - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); + s.tmp_8 = tiles_TileMapData_isOutsideMap__P187533_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 = 944; 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 = pxsim_Array__mk(); + r0 = true; { step = 5; continue; } case 3: case 4: - s.tmp_5 = tiles_TileMap_getImageType__P187549_mk(s); - r0 = s.scene___206016.fields["tileMap"]; - s.tmp_5.arg0 = r0; - s.tmp_5.arg1 = s.arg0; - s.callLocIdx = 990; s.pc = 7; return s.tmp_5; - case 7: - r0 = s.retval; - s.index___206026 = (r0); - s.tmp_0 = tiles_TileMap_getTilesByType__P187551_mk(s); - r0 = s.scene___206016.fields["tileMap"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.index___206026; - s.callLocIdx = 991; s.pc = 8; return s.tmp_0; - case 8: - r0 = s.retval; + r0 = s.arg0.fields["_map"]; + s.tmp_9 = r0; + r0 = s.tmp_9.fields["layers"]; + s.tmp_11 = r0; + r0 = pxsim_ImageMethods.getPixel(s.tmp_11, s.arg1, s.arg2); + s.tmp_10 = r0; + r0 = (s.tmp_10 === 2); case 5: return leave(s, r0) default: oops() } } } -tiles_getTilesByType__P187567.info = {"start":19427,"length":262,"line":597,"column":4,"endLine":602,"endColumn":5,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTilesByType","argumentNames":["tile"]} +tiles_TileMap_isObstacle__P187553.info = {"start":12421,"length":211,"line":404,"column":8,"endLine":409,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"isObstacle","argumentNames":["this","col","row"]} -function tiles_getTilesByType__P187567_mk(s) { +function tiles_TileMap_isObstacle__P187553_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_getTilesByType__P187567, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_isObstacle__P187553, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -17676,16 +16851,22 @@ function tiles_getTilesByType__P187567_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - scene___206016: undefined, - index___206026: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, + tmp_11: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function tiles_TileMap_getTilesByType__P187551(s) { +function tiles_TileMapData_isOutsideMap__P187533(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17695,120 +16876,59 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.output___206045 = undefined; - s.col___206047 = undefined; - s.row___206054 = undefined; - s.currTile___206061 = 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__C187534_VT)) failedCast(r0); - s.tmp_1 = tiles_TileMap_isInvalidIndex__P189509_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_1.arg1 = s.arg1; - s.callLocIdx = 910; s.pc = 12; return s.tmp_1; - case 12: - r0 = s.retval; + if (!checkSubtype(r0, tiles_TileMapData__C187521_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.arg0.fields["_map"]; - 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); - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); + s.tmp_1 = r0 = s.arg1; + r0 = s.arg0.fields["_width"]; s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); + r0 = (s.tmp_1 >= s.tmp_2); case 2: // jmp value (already in r0) - s.tmp_8 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_8); + s.tmp_3 = r0; + r0 = pxsim_numops_toBool(s.tmp_3); if (!r0) { step = 3; continue; } - r0 = pxsim_Array__mk(); - { step = 11; continue; } + r0 = s.tmp_3; + { step = 4; continue; } case 3: + r0 = (s.arg2 < 0); case 4: - r0 = pxsim_Array__mk(); - s.output___206045 = (r0); - s.col___206047 = (0); + // 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_1 = r0 = s.col___206047; - r0 = s.arg0.fields["_map"]; - s.tmp_3 = r0; - r0 = s.tmp_3.fields["_width"]; - 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.row___206054 = (0); + s.tmp_5 = r0 = s.arg2; + r0 = s.arg0.fields["_height"]; + s.tmp_6 = r0; + r0 = (s.tmp_5 >= s.tmp_6); case 6: - s.tmp_1 = r0 = s.row___206054; - r0 = s.arg0.fields["_map"]; - s.tmp_3 = r0; - r0 = s.tmp_3.fields["_height"]; - 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; } - s.tmp_4 = tiles_TileMapData_getTile__P187527_mk(s); - r0 = s.arg0.fields["_map"]; - s.tmp_4.arg0 = r0; - s.tmp_4.arg1 = s.col___206047; - s.tmp_4.arg2 = s.row___206054; - s.callLocIdx = 914; s.pc = 13; return s.tmp_4; - case 13: - r0 = s.retval; - s.currTile___206061 = (r0); - r0 = (s.currTile___206061 === s.arg1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - r0 = pxsim_pxtcore_mkClassInstance(tiles_Location__C187506_VT); - s.tmp_1 = r0; - s.tmp_2 = tiles_Location_constructor__P187509_mk(s); - s.tmp_2.arg0 = s.tmp_1; - s.tmp_2.arg1 = s.col___206047; - s.tmp_2.arg2 = s.row___206054; - s.tmp_2.arg3 = s.arg0; - s.callLocIdx = 915; s.pc = 14; return s.tmp_2; - case 14: - r0 = s.retval; - r0 = pxsim_Array__push(s.output___206045, s.tmp_1); - case 7: - case 8: - r0 = (s.row___206054 + 1); - s.row___206054 = (r0); - { step = 6; continue; } - case 9: - r0 = (s.col___206047 + 1); - s.col___206047 = (r0); - { step = 5; continue; } - case 10: - r0 = s.output___206045; - case 11: + // jmp value (already in r0) + s.tmp_7 = r0; + r0 = s.tmp_7; return leave(s, r0) default: oops() } } } -tiles_TileMap_getTilesByType__P187551.info = {"start":8389,"length":561,"line":302,"column":8,"endLine":315,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTilesByType","argumentNames":["this","index"]} +tiles_TileMapData_isOutsideMap__P187533.info = {"start":5580,"length":132,"line":199,"column":8,"endLine":201,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"isOutsideMap","argumentNames":["this","col","row"]} -function tiles_TileMap_getTilesByType__P187551_mk(s) { +function tiles_TileMapData_isOutsideMap__P187533_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_getTilesByType__P187551, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_isOutsideMap__P187533, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -17818,20 +16938,16 @@ function tiles_TileMap_getTilesByType__P187551_mk(s) { tmp_5: undefined, tmp_6: undefined, tmp_7: undefined, - tmp_8: undefined, - output___206045: undefined, - col___206047: undefined, - row___206054: undefined, - currTile___206061: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function tiles_Location_constructor__P187509(s) { +function tiles_TileMapData_isWall__P187532(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17845,36 +16961,37 @@ 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_Location__C187506_VT)) failedCast(r0); - r0 = (s.arg0).fields["_col"] = (s.arg1); - r0 = (s.arg0).fields["_row"] = (s.arg2); - r0 = (s.arg0).fields["tileMap"] = (s.arg3); - r0 = undefined; + if (!checkSubtype(r0, tiles_TileMapData__C187521_VT)) failedCast(r0); + r0 = s.arg0.fields["layers"]; + s.tmp_1 = r0; + r0 = pxsim_ImageMethods.getPixel(s.tmp_1, s.arg1, s.arg2); + s.tmp_0 = r0; + r0 = (s.tmp_0 === 2); return leave(s, r0) default: oops() } } } -tiles_Location_constructor__P187509.info = {"start":528,"length":153,"line":27,"column":8,"endLine":31,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"inline","argumentNames":["this","col","row","map"]} +tiles_TileMapData_isWall__P187532.info = {"start":5463,"length":107,"line":195,"column":8,"endLine":197,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"isWall","argumentNames":["this","col","row"]} -function tiles_Location_constructor__P187509_mk(s) { +function tiles_TileMapData_isWall__P187532_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_Location_constructor__P187509, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_isWall__P187532, 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 controller_moveSprite__P187169(s) { +function tiles_TileMap_getTileImage__P187556(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17887,44 +17004,37 @@ 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 = controller_Controller_moveSprite__P187156_mk(s); - s.tmp_1 = controller__player1__P187134_mk(s); - s.callLocIdx = 244; s.pc = 2; return s.tmp_1; - case 2: - r0 = s.retval; + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMap__C187534_VT)) failedCast(r0); + s.tmp_0 = tiles_TileMapData_getTileImage__P187530_mk(s); + r0 = s.arg0.fields["_map"]; s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.arg0; - s.tmp_0.arg2 = s.arg1; - s.tmp_0.arg3 = s.arg2; - s.callLocIdx = 245; s.pc = 1; return s.tmp_0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 967; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - r0 = undefined; return leave(s, r0) default: oops() } } } -controller_moveSprite__P187169.info = {"start":18919,"length":133,"line":574,"column":4,"endLine":576,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"moveSprite","argumentNames":["sprite","vx","vy"]} +tiles_TileMap_getTileImage__P187556.info = {"start":13699,"length":96,"line":442,"column":8,"endLine":444,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTileImage","argumentNames":["this","index"]} -function controller_moveSprite__P187169_mk(s) { +function tiles_TileMap_getTileImage__P187556_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_moveSprite__P187169, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_getTileImage__P187556, 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 controller_Controller_moveSprite__P187156(s) { +function tiles_TileMap_data__P189508(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17934,164 +17044,129 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.cp___200812 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMap__C187534_VT)) failedCast(r0); + r0 = s.arg0.fields["_map"]; + return leaveAccessor(s, r0) + default: oops() +} } } +tiles_TileMap_data__P189508.info = {"start":6344,"length":75,"line":231,"column":8,"endLine":233,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"data","argumentNames":["this"]} +tiles_TileMap_data__P189508.isGetter = true; + +function tiles_TileMap_data__P189508_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: tiles_TileMap_data__P189508, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function tiles_TileMapData_getTileImage__P187530(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + s.size___200693 = undefined; + s.cachedImage___200697 = undefined; + s.originalImage___200704 = 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_Controller__C187140_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(s.arg1); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + if (!checkSubtype(r0, tiles_TileMapData__C187521_VT)) failedCast(r0); + r0 = s.arg0.fields["_scale"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 15; continue; } - case 1: - case 2: - s.tmp_5 = controller_Controller__controlledSprites__P187145_mk(s); - s.tmp_5.arg0 = s.arg0; - s.callLocIdx = 205; s.pc = 16; return s.tmp_5; - case 16: - r0 = s.retval; - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - s.tmp_3 = r0; - r0 = pxsim_Boolean__bang(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 3; continue; } - s.tmp_6 = controller_Controller__controlledSprites__P187146_mk(s); - s.tmp_6.arg0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_6.arg1 = r0; - s.callLocIdx = 206; s.pc = 17; return s.tmp_6; - case 17: - r0 = s.retval; - case 3: - case 4: - r0 = pxsim_pxtcore_mkAction(1, inline__P200815); + r0 = (1 << s.tmp_0); + s.size___200693 = (r0); + r0 = s.arg0.fields["cachedTileView"]; s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); - s.tmp_1 = helpers_arrayFind__P185326_mk(s); - s.tmp_2 = controller_Controller__controlledSprites__P187145_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 207; s.pc = 19; return s.tmp_2; - case 19: - r0 = s.retval; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 208; s.pc = 18; return s.tmp_1; - case 18: - r0 = s.retval; - s.cp___200812 = (r0); - r0 = pxsim_numops_toBoolDecr(s.cp___200812); + r0 = pxsim_Array__getAt(s.tmp_0, s.arg1); + s.cachedImage___200697 = (r0); + r0 = pxsim_numops_toBoolDecr(s.cachedImage___200697); 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_mkClassInstance(controller_ControlledSprite__C187136_VT); + if (!r0) { step = 7; continue; } + r0 = s.arg0.fields["tileset"]; s.tmp_2 = r0; - s.tmp_3 = controller_ControlledSprite_constructor__P187138_mk(s); - s.tmp_3.arg0 = s.tmp_2; - s.tmp_3.arg1 = s.arg1; - s.tmp_3.arg2 = s.arg2; - s.tmp_3.arg3 = s.arg3; - s.callLocIdx = 209; s.pc = 20; return s.tmp_3; - case 20: - r0 = s.retval; - s.cp___200812 = (s.tmp_2); - s.tmp_1 = controller_Controller__controlledSprites__P187145_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 210; s.pc = 21; return s.tmp_1; - case 21: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.cp___200812); - case 5: - case 6: - r0 = s.cp___200812.fields["vx"]; - 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.arg2 == 0); - case 8: - // jmp value (already in r0) + r0 = pxsim_Array__getAt(s.tmp_2, s.arg1); + s.originalImage___200704 = (r0); + r0 = pxsim_numops_toBoolDecr(s.originalImage___200704); + if (!r0) { step = 5; continue; } + r0 = pxsim_ImageMethods.width(s.originalImage___200704); s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 9; continue; } - s.tmp_2 = Sprite_vx__P187247_mk(s); - r0 = s.cp___200812.fields["s"]; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = 0; - s.callLocIdx = 211; s.pc = 22; return s.tmp_2; - case 22: - r0 = s.retval; - case 9: - case 10: - r0 = s.cp___200812.fields["vy"]; + r0 = (s.tmp_1 <= s.size___200693); s.tmp_0 = r0; r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 11; continue; } + if (r0) { step = 1; continue; } r0 = s.tmp_0; - { step = 12; continue; } - case 11: - r0 = (s.arg3 == 0); - case 12: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 13; continue; } - s.tmp_2 = Sprite_vy__P187249_mk(s); - r0 = s.cp___200812.fields["s"]; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = 0; - s.callLocIdx = 212; s.pc = 23; return s.tmp_2; - case 23: - r0 = s.retval; - case 13: - case 14: - r0 = (s.cp___200812).fields["vx"] = (s.arg2); - r0 = (s.cp___200812).fields["vy"] = (s.arg3); - case 15: - r0 = undefined; + { step = 2; continue; } + case 1: + r0 = pxsim_ImageMethods.height(s.originalImage___200704); + s.tmp_2 = r0; + r0 = (s.tmp_2 <= s.size___200693); + 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___200697 = (s.originalImage___200704); + { step = 4; continue; } + case 3: + r0 = pxsim.image.create(s.size___200693, s.size___200693); + s.cachedImage___200697 = (r0); + r0 = pxsim_ImageMethods.drawImage(s.cachedImage___200697, s.originalImage___200704, 0, 0); + case 4: + r0 = s.arg0.fields["cachedTileView"]; + s.tmp_0 = r0; + r0 = pxsim_Array_.setAt(s.tmp_0, s.arg1, s.cachedImage___200697); + case 5: + case 6: + case 7: + case 8: + r0 = s.cachedImage___200697; return leave(s, r0) default: oops() } } } -controller_Controller_moveSprite__P187156.info = {"start":10866,"length":608,"line":355,"column":8,"endLine":371,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"moveSprite","argumentNames":["this","sprite","vx","vy"]} +tiles_TileMapData_getTileImage__P187530.info = {"start":4599,"length":717,"line":172,"column":8,"endLine":189,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTileImage","argumentNames":["this","index"]} -function controller_Controller_moveSprite__P187156_mk(s) { +function tiles_TileMapData_getTileImage__P187530_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller_moveSprite__P187156, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_getTileImage__P187530, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - cp___200812: undefined, + size___200693: undefined, + cachedImage___200697: undefined, + originalImage___200704: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function inline__P200815(s) { +function tiles_TileMapData_scale__P187525(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18105,24 +17180,20 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0.fields["s"]; - r0 = r0.fields["id"]; - s.tmp_0 = r0; - r0 = s.caps[0].fields["id"]; - s.tmp_1 = r0; - r0 = (s.tmp_0 == s.tmp_1); - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMapData__C187521_VT)) failedCast(r0); + r0 = s.arg0.fields["_scale"]; + return leaveAccessor(s, r0) default: oops() } } } -inline__P200815.info = {"start":11086,"length":26,"line":358,"column":50,"endLine":358,"endColumn":76,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["cp"]} +tiles_TileMapData_scale__P187525.info = {"start":3809,"length":66,"line":143,"column":8,"endLine":145,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"scale","argumentNames":["this"]} +tiles_TileMapData_scale__P187525.isGetter = true; -function inline__P200815_mk(s) { +function tiles_TileMapData_scale__P187525_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P200815, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_scale__P187525, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, arg0: undefined, } } @@ -18130,7 +17201,7 @@ function inline__P200815_mk(s) { -function controller_Controller__controlledSprites__P187146(s) { +function tiles_TileMap_getTileIndex__P187547(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18143,42 +17214,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, controller_Controller__C187140_VT)) failedCast(r0); - s.tmp_1 = game_currentScene__P187749_mk(s); - s.callLocIdx = 200; s.pc = 1; return s.tmp_1; + if (!checkSubtype(r0, tiles_TileMap__C187534_VT)) failedCast(r0); + s.tmp_0 = tiles_TileMapData_getTile__P187527_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 = 902; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - r0 = r0.fields["controlledSprites"]; - s.tmp_0 = r0; - r0 = s.arg0.fields["playerIndex"]; - s.tmp_2 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_2, s.arg1); - r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Controller__controlledSprites__P187146.info = {"start":8697,"length":134,"line":272,"column":8,"endLine":274,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"_controlledSprites","argumentNames":["this","cps"]} +tiles_TileMap_getTileIndex__P187547.info = {"start":7380,"length":105,"line":273,"column":8,"endLine":275,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTileIndex","argumentNames":["this","col","row"]} -function controller_Controller__controlledSprites__P187146_mk(s) { +function tiles_TileMap_getTileIndex__P187547_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller__controlledSprites__P187146, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_getTileIndex__P187547, 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_Controller__controlledSprites__P187145(s) { +function tiles_TileMapData_getTile__P187527(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18190,41 +17259,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, controller_Controller__C187140_VT)) failedCast(r0); - s.tmp_1 = game_currentScene__P187749_mk(s); - s.callLocIdx = 199; s.pc = 1; return s.tmp_1; - case 1: + if (!checkSubtype(r0, tiles_TileMapData__C187521_VT)) failedCast(r0); + s.tmp_1 = tiles_TileMapData_isOutsideMap__P187533_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_1.arg1 = s.arg1; + s.tmp_1.arg2 = s.arg2; + s.callLocIdx = 879; s.pc = 4; return s.tmp_1; + case 4: r0 = s.retval; - r0 = r0.fields["controlledSprites"]; s.tmp_0 = r0; - r0 = s.arg0.fields["playerIndex"]; + 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 = pxsim_Array__getAt(s.tmp_0, s.tmp_2); - return leaveAccessor(s, 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() } } } -controller_Controller__controlledSprites__P187145.info = {"start":8555,"length":132,"line":268,"column":8,"endLine":270,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"_controlledSprites","argumentNames":["this"]} -controller_Controller__controlledSprites__P187145.isGetter = true; +tiles_TileMapData_getTile__P187527.info = {"start":3997,"length":200,"line":152,"column":8,"endLine":156,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTile","argumentNames":["this","col","row"]} -function controller_Controller__controlledSprites__P187145_mk(s) { +function tiles_TileMapData_getTile__P187527_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller__controlledSprites__P187145, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_getTile__P187527, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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 controller_ControlledSprite_constructor__P187138(s) { +function tiles_Location_row__P187508(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18236,38 +17335,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, controller_ControlledSprite__C187136_VT)) failedCast(r0); - r0 = (s.arg0).fields["s"] = (s.arg1); - r0 = (s.arg0).fields["vx"] = (s.arg2); - r0 = (s.arg0).fields["vy"] = (s.arg3); - r0 = undefined; - return leave(s, r0) + if (!checkSubtype(r0, tiles_Location__C187506_VT)) failedCast(r0); + r0 = s.arg0.fields["_row"]; + return leaveAccessor(s, r0) default: oops() } } } -controller_ControlledSprite_constructor__P187138.info = {"start":7271,"length":117,"line":227,"column":8,"endLine":231,"endColumn":13,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["this","s","vx","vy"]} +tiles_Location_row__P187508.info = {"start":467,"length":51,"line":23,"column":8,"endLine":25,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"row","argumentNames":["this"]} +tiles_Location_row__P187508.isGetter = true; -function controller_ControlledSprite_constructor__P187138_mk(s) { +function tiles_Location_row__P187508_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_ControlledSprite_constructor__P187138, depth: s.depth + 1, + parent: s, fn: tiles_Location_row__P187508, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function controller__player1__P187134(s) { +function tiles_Location_col__P187507(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18277,71 +17368,110 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals._players___189406); - 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.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, tiles_Location__C187506_VT)) failedCast(r0); + r0 = s.arg0.fields["_col"]; + return leaveAccessor(s, r0) + default: oops() +} } } +tiles_Location_col__P187507.info = {"start":406,"length":51,"line":19,"column":8,"endLine":21,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"col","argumentNames":["this"]} +tiles_Location_col__P187507.isGetter = true; + +function tiles_Location_col__P187507_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: tiles_Location_col__P187507, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function scene_tileLocationHeuristic__P191299(s) { +let r0 = s.r0, 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.startCol___205988 = undefined; + s.startRow___205992 = undefined; + s.endCol___205996 = undefined; + s.endRow___206000 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + s.tmp_0 = scene_locationCol__P191301_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1834; s.pc = 1; return s.tmp_0; case 1: - r0 = pxsim_Array__getAt(globals._players___189406, 0); - 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.startCol___205988 = (r0); + s.tmp_0 = scene_locationRow__P191300_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1835; s.pc = 2; return s.tmp_0; 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__C187140_VT); - s.tmp_5 = r0; - r0 = pxsim_Array__mk(); - s.tmp_6 = r0; - r0 = pxsim_Array__push(s.tmp_6, globals.left___187096); - r0 = pxsim_Array__push(s.tmp_6, globals.up___187097); - r0 = pxsim_Array__push(s.tmp_6, globals.right___187098); - r0 = pxsim_Array__push(s.tmp_6, globals.down___187099); - r0 = pxsim_Array__push(s.tmp_6, globals.A___187094); - r0 = pxsim_Array__push(s.tmp_6, globals.B___187095); - r0 = pxsim_Array__push(s.tmp_6, globals.menu___187100); - s.tmp_7 = controller_Controller_constructor__P187144_mk(s); - s.tmp_7.arg0 = s.tmp_5; - s.tmp_7.arg1 = 1; - s.tmp_7.arg2 = s.tmp_6; - s.callLocIdx = 191; s.pc = 5; return s.tmp_7; - case 5: r0 = s.retval; + s.startRow___205992 = (r0); + s.tmp_0 = scene_locationCol__P191301_mk(s); + s.tmp_0.arg0 = s.arg1; + s.callLocIdx = 1836; s.pc = 3; return s.tmp_0; case 3: + r0 = s.retval; + s.endCol___205996 = (r0); + s.tmp_0 = scene_locationRow__P191300_mk(s); + s.tmp_0.arg0 = s.arg1; + s.callLocIdx = 1837; s.pc = 4; return s.tmp_0; case 4: - r0 = pxsim_Array__getAt(globals._players___189406, 0); + r0 = s.retval; + s.endRow___206000 = (r0); + r0 = (s.startCol___205988 - s.endCol___205996); + s.tmp_1 = r0; + r0 = pxsim.Math_.pow(s.tmp_1, 2); + s.tmp_0 = r0; + r0 = (s.startRow___205992 - s.endRow___206000); + s.tmp_3 = r0; + r0 = pxsim.Math_.pow(s.tmp_3, 2); + s.tmp_2 = r0; + r0 = (s.tmp_0 + s.tmp_2); return leave(s, r0) default: oops() } } } -controller__player1__P187134.info = {"start":6776,"length":258,"line":214,"column":4,"endLine":218,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"_player1","argumentNames":[]} +scene_tileLocationHeuristic__P191299.info = {"start":6929,"length":350,"line":200,"column":4,"endLine":208,"endColumn":5,"fileName":"pxt_modules/arcade-tilemap-a-star/a-star.ts","functionName":"tileLocationHeuristic","argumentNames":["tile","target"]} -function controller__player1__P187134_mk(s) { +function scene_tileLocationHeuristic__P191299_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller__player1__P187134, depth: s.depth + 1, + parent: s, fn: scene_tileLocationHeuristic__P191299, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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, + startCol___205988: undefined, + startRow___205992: undefined, + endCol___205996: undefined, + endRow___206000: undefined, + arg0: undefined, + arg1: undefined, } } -function controller_Controller_constructor__P187144(s) { +function scene_generalAStar__P188874(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18351,336 +17481,619 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.leftId___197357 = undefined; - s.i___197365 = undefined; - s.i___197383 = undefined; + s.consideredTiles___203902 = undefined; + s.encountedLocations___203924 = undefined; + s.updateOrFillLocation___203927 = undefined; + s.end___203997 = undefined; + s.currLocation___204003 = undefined; + s.row___204014 = undefined; + s.col___204019 = undefined; + s.dataForCurrLocation___204024 = undefined; + s.neighbors___204036 = undefined; + s.corners___204038 = undefined; + s.left___204040 = undefined; + s.right___204046 = undefined; + s.top___204053 = undefined; + s.bottom___204059 = undefined; + s.leftIsWall___204066 = undefined; + s.rightIsWall___204073 = undefined; + s.topIsWall___204080 = undefined; + s.bottomIsWall___204087 = undefined; + s.topLeft___204102 = undefined; + s.bottomLeft___204120 = undefined; + s.topRight___204145 = undefined; + s.bottomRight___204164 = undefined; + s.neighborCost___204194 = undefined; + s.node___204200 = undefined; + s.unnamed8928___U24 = undefined; + s.unnamed8929___U25 = undefined; + s.cornerCost___204210 = undefined; + s.corner___204216 = undefined; + s.unnamed8930___U28 = undefined; + s.unnamed8931___U29 = undefined; + s.endCol___204222 = undefined; + s.endDataNode___204229 = undefined; + s.curr___204242 = undefined; + s.output___204244 = 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__C187140_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim.control.allocateNotifyEvent(); + s.tmp_3 = scene_isWalkable__P191303_mk(s); + s.tmp_3.arg0 = s.arg1; + s.tmp_3.arg1 = s.arg2; + s.tmp_3.arg2 = s.arg0; + s.callLocIdx = 1798; s.pc = 52; return s.tmp_3; + case 52: + r0 = s.retval; + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); 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); + 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["buttons"] = (s.arg2); - { step = 4; continue; } + r0 = undefined; + { step = 51; continue; } case 1: - s.tmp_0 = r0 = s.arg0; + case 2: + r0 = pxsim_pxtcore_mkClassInstance(Heap__C188863_VT); + s.tmp_4 = r0; + s.tmp_5 = Heap_constructor__P188864_mk(s); + s.tmp_5.arg0 = s.tmp_4; + s.tmp_5.arg1 = inline__P203905; + s.callLocIdx = 1799; s.pc = 53; return s.tmp_5; + case 53: + r0 = s.retval; + s.consideredTiles___203902 = (s.tmp_4); + r0 = pxsim_Array__mk(); + s.tmp_0 = r0; + r0 = pxsim_Array__mk(); + s.tmp_1 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); + s.encountedLocations___203924 = (s.tmp_0); + r0 = pxsim_pxtcore_mkAction(4, updateOrFillLocation__P203927); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.encountedLocations___203924); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.arg3); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 3, s.consideredTiles___203902); + s.updateOrFillLocation___203927 = (s.tmp_0); + s.tmp_1 = lambda_4_mk(s); + s.tmp_1.argL = s.updateOrFillLocation___203927; + s.tmp_1.arg0 = s.arg1; + s.tmp_1.arg1 = null; + s.tmp_1.arg2 = 0; + setupLambda(s.tmp_1, s.tmp_1.argL); + s.callLocIdx = 1807; s.pc = 54; return s.tmp_1; + case 54: + r0 = s.retval; + s.end___203997 = (null); + case 3: + r0 = s.consideredTiles___203902.fields["store"]; + s.tmp_2 = r0; + r0 = pxsim_Array__length(s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_1 !== 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 40; continue; } + s.tmp_3 = Heap_pop__P188866_mk(s); + s.tmp_3.arg0 = s.consideredTiles___203902; + s.callLocIdx = 1809; s.pc = 55; return s.tmp_3; + case 55: + r0 = s.retval; + s.currLocation___204003 = (r0); + s.tmp_1 = lambda_2_mk(s); + s.tmp_1.argL = s.arg4; + r0 = s.currLocation___204003.fields["loc"]; + s.tmp_1.arg0 = r0; + setupLambda(s.tmp_1, s.tmp_1.argL); + s.callLocIdx = 1810; s.pc = 56; return s.tmp_1; + case 56: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + r0 = s.currLocation___204003.fields["loc"]; + s.end___203997 = (r0); + { step = 40; continue; } + case 4: + case 5: + s.tmp_0 = scene_locationRow__P191300_mk(s); + r0 = s.currLocation___204003.fields["loc"]; + s.tmp_0.arg0 = r0; + s.callLocIdx = 1811; s.pc = 57; return s.tmp_0; + case 57: + r0 = s.retval; + s.row___204014 = (r0); + s.tmp_0 = scene_locationCol__P191301_mk(s); + r0 = s.currLocation___204003.fields["loc"]; + s.tmp_0.arg0 = r0; + s.callLocIdx = 1812; s.pc = 58; return s.tmp_0; + case 58: + r0 = s.retval; + s.col___204019 = (r0); + r0 = pxsim_Array__getAt(s.encountedLocations___203924, s.col___204019); + s.tmp_0 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.row___204014); + s.dataForCurrLocation___204024 = (r0); + s.tmp_0 = r0 = s.dataForCurrLocation___204024; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 6; continue; } + r0 = s.tmp_0; + { step = 7; continue; } + case 6: + r0 = s.dataForCurrLocation___204024.fields["visited"]; + case 7: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 8; continue; } + { step = 3; continue; } + case 8: + case 9: + r0 = (s.dataForCurrLocation___204024).fields["visited"] = (true); + r0 = pxsim_Array__mk(); + s.neighbors___204036 = (r0); r0 = pxsim_Array__mk(); + s.corners___204038 = (r0); + s.tmp_0 = tiles_getTileLocation__P187561_mk(s); + r0 = (s.col___204019 - 1); + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.row___204014; + s.callLocIdx = 1813; s.pc = 59; return s.tmp_0; + case 59: + r0 = s.retval; + s.left___204040 = (r0); + s.tmp_0 = tiles_getTileLocation__P187561_mk(s); + r0 = (s.col___204019 + 1); + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.row___204014; + s.callLocIdx = 1814; s.pc = 60; return s.tmp_0; + case 60: + r0 = s.retval; + s.right___204046 = (r0); + s.tmp_0 = tiles_getTileLocation__P187561_mk(s); + s.tmp_0.arg0 = s.col___204019; + r0 = (s.row___204014 - 1); + s.tmp_0.arg1 = r0; + s.callLocIdx = 1815; s.pc = 61; return s.tmp_0; + case 61: + r0 = s.retval; + s.top___204053 = (r0); + s.tmp_0 = tiles_getTileLocation__P187561_mk(s); + s.tmp_0.arg0 = s.col___204019; + r0 = (s.row___204014 + 1); + s.tmp_0.arg1 = r0; + s.callLocIdx = 1816; s.pc = 62; return s.tmp_0; + case 62: + r0 = s.retval; + s.bottom___204059 = (r0); + s.tmp_2 = scene_isWalkable__P191303_mk(s); + s.tmp_2.arg0 = s.left___204040; + s.tmp_2.arg1 = s.arg2; + s.tmp_2.arg2 = s.arg0; + s.callLocIdx = 1817; s.pc = 63; return s.tmp_2; + case 63: + r0 = s.retval; + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_Boolean__bang(s.tmp_0); + s.leftIsWall___204066 = (r0); + s.tmp_2 = scene_isWalkable__P191303_mk(s); + s.tmp_2.arg0 = s.right___204046; + s.tmp_2.arg1 = s.arg2; + s.tmp_2.arg2 = s.arg0; + s.callLocIdx = 1818; s.pc = 64; return s.tmp_2; + case 64: + r0 = s.retval; + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_Boolean__bang(s.tmp_0); + s.rightIsWall___204073 = (r0); + s.tmp_2 = scene_isWalkable__P191303_mk(s); + s.tmp_2.arg0 = s.top___204053; + s.tmp_2.arg1 = s.arg2; + s.tmp_2.arg2 = s.arg0; + s.callLocIdx = 1819; s.pc = 65; return s.tmp_2; + case 65: + r0 = s.retval; 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 = pxsim_numops_toBoolDecr(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_Boolean__bang(s.tmp_0); + s.topIsWall___204080 = (r0); + s.tmp_2 = scene_isWalkable__P191303_mk(s); + s.tmp_2.arg0 = s.bottom___204059; + s.tmp_2.arg1 = s.arg2; + s.tmp_2.arg2 = s.arg0; + s.callLocIdx = 1820; s.pc = 66; return s.tmp_2; + case 66: + r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_1 * 7); + r0 = pxsim_numops_toBoolDecr(s.tmp_1); s.tmp_0 = r0; - r0 = (1 + s.tmp_0); - s.leftId___197357 = (r0); - s.i___197365 = (0); - case 2: - r0 = (s.i___197365 < 7); + r0 = pxsim_Boolean__bang(s.tmp_0); + s.bottomIsWall___204087 = (r0); + r0 = pxsim_numops_toBoolDecr(s.leftIsWall___204066); + 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(controller_Button__C187120_VT); + if (!r0) { step = 18; continue; } + r0 = pxsim_Array__push(s.neighbors___204036, s.left___204040); + r0 = pxsim_numops_toBoolDecr(s.topIsWall___204080); s.tmp_1 = r0; - s.tmp_2 = controller_Button_constructor__P187126_mk(s); - s.tmp_2.arg0 = s.tmp_1; - r0 = (s.leftId___197357 + s.i___197365); + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 12; continue; } + s.tmp_2 = tiles_getTileLocation__P187561_mk(s); + r0 = (s.col___204019 - 1); + s.tmp_2.arg0 = r0; + r0 = (s.row___204014 - 1); s.tmp_2.arg1 = r0; - s.tmp_2.arg2 = -1; - s.callLocIdx = 197; s.pc = 7; return s.tmp_2; - case 7: + s.callLocIdx = 1821; s.pc = 67; return s.tmp_2; + case 67: + r0 = s.retval; + s.topLeft___204102 = (r0); + s.tmp_3 = scene_isWall__P191302_mk(s); + s.tmp_3.arg0 = s.topLeft___204102; + s.tmp_3.arg1 = s.arg0; + s.callLocIdx = 1822; s.pc = 68; return s.tmp_3; + case 68: 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___197365 + 1); - s.i___197365 = (r0); - { step = 2; continue; } - case 3: - case 4: - s.i___197383 = (0); - case 5: - s.tmp_1 = r0 = s.i___197383; - 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); + 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.arg0.fields["buttons"]; - s.tmp_5 = r0; - r0 = pxsim_Array__getAt(s.tmp_5, s.i___197383); - s.tmp_4 = r0; - r0 = (s.tmp_4).fields["_owner"] = (s.arg0); - r0 = (s.i___197383 + 1); - s.i___197383 = (r0); - { step = 5; continue; } - case 6: - s.tmp_0 = controller_addController__P189407_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 198; s.pc = 8; return s.tmp_0; - case 8: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -controller_Controller_constructor__P187144.info = {"start":7849,"length":696,"line":249,"column":8,"endLine":266,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["this","playerIndex","buttons"]} - -function controller_Controller_constructor__P187144_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: controller_Controller_constructor__P187144, depth: s.depth + 1, - pc: 0, retval: undefined, 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___197357: undefined, - i___197365: undefined, - i___197383: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, -} } - - - - - -function controller_addController__P189407(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (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._players___189406); + if (!r0) { step = 10; continue; } + r0 = pxsim_Array__push(s.corners___204038, s.topLeft___204102); + case 10: + case 11: + case 12: + case 13: + r0 = pxsim_numops_toBoolDecr(s.bottomIsWall___204087); 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___189406 = (r0); - case 1: - case 2: - s.tmp_0 = r0 = globals._players___189406; - r0 = s.arg0.fields["playerIndex"]; + if (!r0) { step = 16; continue; } + s.tmp_2 = tiles_getTileLocation__P187561_mk(s); + r0 = (s.col___204019 - 1); + s.tmp_2.arg0 = r0; + r0 = (s.row___204014 + 1); + s.tmp_2.arg1 = r0; + s.callLocIdx = 1823; s.pc = 69; return s.tmp_2; + case 69: + r0 = s.retval; + s.bottomLeft___204120 = (r0); + s.tmp_3 = scene_isWall__P191302_mk(s); + s.tmp_3.arg0 = s.bottomLeft___204120; + s.tmp_3.arg1 = s.arg0; + s.callLocIdx = 1824; s.pc = 70; return s.tmp_3; + case 70: + r0 = s.retval; s.tmp_2 = r0; - r0 = (s.tmp_2 - 1); + r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_1, s.arg0); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -controller_addController__P189407.info = {"start":6613,"length":157,"line":207,"column":4,"endLine":212,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"addController","argumentNames":["ctrl"]} - -function controller_addController__P189407_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: controller_addController__P189407, 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 summon_fish__P348081(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (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_Array__mk(); + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim.image.ofBuffer(_hex348902); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 14; continue; } + r0 = pxsim_Array__push(s.corners___204038, s.bottomLeft___204120); + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + r0 = pxsim_numops_toBoolDecr(s.rightIsWall___204073); s.tmp_1 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); - r0 = pxsim_Array__mk(); - s.tmp_2 = r0; - r0 = pxsim_Array__push(s.tmp_2, s.tmp_0); - r0 = pxsim_Array__mk(); - s.tmp_3 = r0; - r0 = pxsim.image.ofBuffer(_hex348905); - s.tmp_4 = r0; - r0 = pxsim_Array__push(s.tmp_3, s.tmp_4); - r0 = pxsim_Array__push(s.tmp_2, s.tmp_3); - globals.left_fish_animations___348308 = (s.tmp_2); - r0 = pxsim_Array__mk(); + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim.image.ofBuffer(_hex348910); - s.tmp_1 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); - r0 = pxsim_Array__mk(); - s.tmp_2 = r0; - r0 = pxsim_Array__push(s.tmp_2, s.tmp_0); - r0 = pxsim_Array__mk(); - s.tmp_3 = r0; - r0 = pxsim.image.ofBuffer(_hex348913); - s.tmp_4 = r0; - r0 = pxsim_Array__push(s.tmp_3, s.tmp_4); - r0 = pxsim_Array__push(s.tmp_2, s.tmp_3); - globals.right_fish_animations___348307 = (s.tmp_2); - r0 = pxsim.Math_.randomRange(0, 1); - globals.local_choice___348306 = (r0); - s.tmp_0 = sprites_create__P187191_mk(s); - r0 = pxsim_Array__getAt(globals.right_fish_animations___348307, globals.local_choice___348306); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 28; continue; } + r0 = pxsim_Array__push(s.neighbors___204036, s.right___204046); + r0 = pxsim_numops_toBoolDecr(s.topIsWall___204080); s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_1, 0); - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = globals.NPC___348070; - s.callLocIdx = 84; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - globals.sprite_fish___348304 = (r0); - s.tmp_0 = tiles_placeOnRandomTile__P187566_mk(s); - s.tmp_0.arg0 = globals.sprite_fish___348304; - s.tmp_0.arg1 = globals.tile13___189163; - s.callLocIdx = 85; s.pc = 4; return s.tmp_0; - case 4: + 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_2 = tiles_getTileLocation__P187561_mk(s); + r0 = (s.col___204019 + 1); + s.tmp_2.arg0 = r0; + r0 = (s.row___204014 - 1); + s.tmp_2.arg1 = r0; + s.callLocIdx = 1825; s.pc = 71; return s.tmp_2; + case 71: r0 = s.retval; - s.tmp_0 = tiles_setTileAt__P187559_mk(s); - s.tmp_1 = tiles_locationOfSprite__P188992_mk(s); - s.tmp_1.arg0 = globals.sprite_fish___348304; - s.callLocIdx = 86; s.pc = 6; return s.tmp_1; - case 6: + s.topRight___204145 = (r0); + s.tmp_3 = scene_isWall__P191302_mk(s); + s.tmp_3.arg0 = s.topRight___204145; + s.tmp_3.arg1 = s.arg0; + s.callLocIdx = 1826; s.pc = 72; return s.tmp_3; + case 72: r0 = s.retval; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = globals.tile15___189164; - s.callLocIdx = 87; s.pc = 5; return s.tmp_0; - case 5: + 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 = 20; continue; } + r0 = pxsim_Array__push(s.corners___204038, s.topRight___204145); + case 20: + case 21: + case 22: + case 23: + r0 = pxsim_numops_toBoolDecr(s.bottomIsWall___204087); + 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 = 26; continue; } + s.tmp_2 = tiles_getTileLocation__P187561_mk(s); + r0 = (s.col___204019 + 1); + s.tmp_2.arg0 = r0; + r0 = (s.row___204014 + 1); + s.tmp_2.arg1 = r0; + s.callLocIdx = 1827; s.pc = 73; return s.tmp_2; + case 73: r0 = s.retval; - s.tmp_0 = character_loopFrames__P188956_mk(s); - s.tmp_0.arg0 = globals.sprite_fish___348304; - r0 = pxsim_Array__getAt(globals.left_fish_animations___348308, globals.local_choice___348306); - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = 100; - s.tmp_1 = character_rule__P188962_mk(s); - s.tmp_1.arg0 = 512; - s.tmp_1.arg1 = undefined; - s.tmp_1.arg2 = undefined; - s.tmp_1.arg3 = undefined; - s.tmp_1.arg4 = undefined; - s.callLocIdx = 88; s.pc = 8; return s.tmp_1; - case 8: + s.bottomRight___204164 = (r0); + s.tmp_3 = scene_isWall__P191302_mk(s); + s.tmp_3.arg0 = s.bottomRight___204164; + s.tmp_3.arg1 = s.arg0; + s.callLocIdx = 1828; s.pc = 74; return s.tmp_3; + case 74: r0 = s.retval; - s.tmp_0.arg3 = r0; - s.callLocIdx = 89; s.pc = 7; return s.tmp_0; - case 7: + 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 = 24; continue; } + r0 = pxsim_Array__push(s.corners___204038, s.bottomRight___204164); + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + r0 = pxsim_numops_toBoolDecr(s.topIsWall___204080); + 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 = 30; continue; } + r0 = pxsim_Array__push(s.neighbors___204036, s.top___204053); + case 30: + case 31: + r0 = pxsim_numops_toBoolDecr(s.bottomIsWall___204087); + 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 = 32; continue; } + r0 = pxsim_Array__push(s.neighbors___204036, s.bottom___204059); + case 32: + case 33: + r0 = s.currLocation___204003.fields["cost"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 + 1); + s.neighborCost___204194 = (r0); + s.node___204200 = (undefined); + s.unnamed8928___U24 = (s.neighbors___204036); + s.unnamed8929___U25 = (0); + case 34: + s.tmp_0 = r0 = s.unnamed8929___U25; + r0 = pxsim_Array__length(s.unnamed8928___U24); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 35; continue; } + r0 = pxsim_Array__getAt(s.unnamed8928___U24, s.unnamed8929___U25); + s.node___204200 = (r0); + s.tmp_2 = lambda_4_mk(s); + s.tmp_2.argL = s.updateOrFillLocation___203927; + s.tmp_2.arg0 = s.node___204200; + s.tmp_2.arg1 = s.dataForCurrLocation___204024; + s.tmp_2.arg2 = s.neighborCost___204194; + setupLambda(s.tmp_2, s.tmp_2.argL); + s.callLocIdx = 1829; s.pc = 75; return s.tmp_2; + case 75: r0 = s.retval; - s.tmp_0 = character_loopFrames__P188956_mk(s); - s.tmp_0.arg0 = globals.sprite_fish___348304; - r0 = pxsim_Array__getAt(globals.right_fish_animations___348307, globals.local_choice___348306); - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = 100; - s.tmp_1 = character_rule__P188962_mk(s); - s.tmp_1.arg0 = 128; - s.tmp_1.arg1 = undefined; - s.tmp_1.arg2 = undefined; - s.tmp_1.arg3 = undefined; - s.tmp_1.arg4 = undefined; - s.callLocIdx = 90; s.pc = 10; return s.tmp_1; - case 10: + r0 = (s.unnamed8929___U25 + 1); + s.unnamed8929___U25 = (r0); + { step = 34; continue; } + case 35: + s.unnamed8928___U24 = (undefined); + r0 = pxsim_Array__length(s.corners___204038); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 38; continue; } + r0 = s.currLocation___204003.fields["cost"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 + 1.414213562373095); + s.cornerCost___204210 = (r0); + s.corner___204216 = (undefined); + s.unnamed8930___U28 = (s.corners___204038); + s.unnamed8931___U29 = (0); + case 36: + s.tmp_0 = r0 = s.unnamed8931___U29; + r0 = pxsim_Array__length(s.unnamed8930___U28); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 37; continue; } + r0 = pxsim_Array__getAt(s.unnamed8930___U28, s.unnamed8931___U29); + s.corner___204216 = (r0); + s.tmp_2 = lambda_4_mk(s); + s.tmp_2.argL = s.updateOrFillLocation___203927; + s.tmp_2.arg0 = s.corner___204216; + s.tmp_2.arg1 = s.dataForCurrLocation___204024; + s.tmp_2.arg2 = s.cornerCost___204210; + setupLambda(s.tmp_2, s.tmp_2.argL); + s.callLocIdx = 1830; s.pc = 76; return s.tmp_2; + case 76: r0 = s.retval; - s.tmp_0.arg3 = r0; - s.callLocIdx = 91; s.pc = 9; return s.tmp_0; - case 9: + r0 = (s.unnamed8931___U29 + 1); + s.unnamed8931___U29 = (r0); + { step = 36; continue; } + case 37: + s.unnamed8930___U28 = (undefined); + case 38: + case 39: + { step = 3; continue; } + case 40: + s.tmp_0 = r0 = s.end___203997; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 41; continue; } + r0 = s.tmp_0; + { step = 42; continue; } + case 41: + s.tmp_1 = r0 = s.encountedLocations___203924; + s.tmp_3 = scene_locationCol__P191301_mk(s); + s.tmp_3.arg0 = s.end___203997; + s.callLocIdx = 1831; s.pc = 77; return s.tmp_3; + case 77: r0 = s.retval; - r0 = pxsim_numops_toBoolDecr(s.arg1); - if (!r0) { step = 1; continue; } - s.tmp_0 = character_setCharacterState__P188960_mk(s); - s.tmp_0.arg0 = globals.sprite_fish___348304; - s.tmp_1 = character_rule__P188962_mk(s); - s.tmp_1.arg0 = 128; - s.tmp_1.arg1 = undefined; - s.tmp_1.arg2 = undefined; - s.tmp_1.arg3 = undefined; - s.tmp_1.arg4 = undefined; - s.callLocIdx = 92; s.pc = 12; return s.tmp_1; - case 12: + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_1, s.tmp_2); + case 42: + // jmp value (already in r0) + s.tmp_4 = r0; + s.endCol___204222 = (s.tmp_4); + s.tmp_0 = r0 = s.endCol___204222; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 43; continue; } + r0 = s.tmp_0; + { step = 44; continue; } + case 43: + s.tmp_1 = r0 = s.endCol___204222; + s.tmp_3 = scene_locationRow__P191300_mk(s); + s.tmp_3.arg0 = s.end___203997; + s.callLocIdx = 1832; s.pc = 78; return s.tmp_3; + case 78: r0 = s.retval; + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_1, s.tmp_2); + case 44: + // jmp value (already in r0) + s.tmp_4 = r0; + s.endDataNode___204229 = (s.tmp_4); + r0 = pxsim_numops_toBoolDecr(s.end___203997); + 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 = 45; continue; } + r0 = s.tmp_0; + { step = 46; continue; } + case 45: + r0 = pxsim_numops_toBoolDecr(s.endDataNode___204229); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); + case 46: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 47; continue; } + r0 = undefined; + { step = 51; continue; } + case 47: + case 48: + s.curr___204242 = (s.endDataNode___204229); + r0 = pxsim_Array__mk(); + s.output___204244 = (r0); + case 49: + r0 = pxsim_numops_toBoolDecr(s.curr___204242); + if (!r0) { step = 50; continue; } + s.tmp_0 = helpers_arrayUnshift__P185319_mk(s); + s.tmp_0.arg0 = s.output___204244; + r0 = s.curr___204242.fields["l"]; s.tmp_0.arg1 = r0; - s.callLocIdx = 93; s.pc = 11; return s.tmp_0; - case 11: - r0 = s.retval; - case 1: - case 2: - r0 = pxsim_pxtcore_mkAction(1, inline__P348960); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = timer_background__P188812_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 105; s.pc = 13; return s.tmp_1; - case 13: + s.callLocIdx = 1833; s.pc = 79; return s.tmp_0; + case 79: r0 = s.retval; - r0 = globals.sprite_fish___348304; + r0 = s.curr___204242.fields["parent"]; + s.curr___204242 = (r0); + { step = 49; continue; } + case 50: + r0 = s.output___204244; + case 51: return leave(s, r0) default: oops() } } } -summon_fish__P348081.info = {"start":216,"length":4176,"line":6,"column":0,"endLine":108,"endColumn":1,"fileName":"main.ts","functionName":"summon_fish","argumentNames":["ai","force_animate"]} +scene_generalAStar__P188874.info = {"start":1723,"length":5198,"line":53,"column":4,"endLine":198,"endColumn":5,"fileName":"pxt_modules/arcade-tilemap-a-star/a-star.ts","functionName":"generalAStar","argumentNames":["tm","start","onTilesOf","heuristic","isEnd"]} -function summon_fish__P348081_mk(s) { +function scene_generalAStar__P188874_mk(s) { checkStack(s.depth); return { - parent: s, fn: summon_fish__P348081, depth: s.depth + 1, + parent: s, fn: scene_generalAStar__P188874, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, + tmp_5: undefined, + consideredTiles___203902: undefined, + encountedLocations___203924: undefined, + updateOrFillLocation___203927: undefined, + end___203997: undefined, + currLocation___204003: undefined, + row___204014: undefined, + col___204019: undefined, + dataForCurrLocation___204024: undefined, + neighbors___204036: undefined, + corners___204038: undefined, + left___204040: undefined, + right___204046: undefined, + top___204053: undefined, + bottom___204059: undefined, + leftIsWall___204066: undefined, + rightIsWall___204073: undefined, + topIsWall___204080: undefined, + bottomIsWall___204087: undefined, + topLeft___204102: undefined, + bottomLeft___204120: undefined, + topRight___204145: undefined, + bottomRight___204164: undefined, + neighborCost___204194: undefined, + node___204200: undefined, + unnamed8928___U24: undefined, + unnamed8929___U25: undefined, + cornerCost___204210: undefined, + corner___204216: undefined, + unnamed8930___U28: undefined, + unnamed8931___U29: undefined, + endCol___204222: undefined, + endDataNode___204229: undefined, + curr___204242: undefined, + output___204244: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, } } -const _hex348902 = pxsim.BufferMethods.createBufferFromHex("87041000100000000000000000f00f000000000000dc0f0000000000c0dc0f00000000ccccddf1000000cc11dd1df10000c01b111111110f005c1b11c111110f005cbb1b1111110fc055bbbbbb11b1f5c0551b1111b1bbf5c055bb11b1bbbbf5c055b51111115bf5c055c5cc5bfb5ff5005cc5005b0bf0ff00c00cc055c50000000000c0cccc0000") -const _hex348905 = pxsim.BufferMethods.createBufferFromHex("870410001000000000000000ff0f0000000000c044f400000000004c44440f000000c04444440f0000004c44f444f40000c0dc444444fd0000cc44111111440f00cc4444c4c4440fc0cd4444c4444f0fc0cd444444ff4f0fc0cd4d444444c4cdc0dd1c4d44d4dccd00cccc1111fdbfcd000000ccf4ffcc0c0000c04444f400000000c0ccffff0000") -const _hex348910 = pxsim.BufferMethods.createBufferFromHex("8704100010000000000000c0cccc000000c00cc055c50000005cc5005b0bf0ffc055c5cc5bfb5ff5c055b51111115bf5c055bb11b1bbbbf5c0551b1111b1bbf5c055bbbbbb11b1f5005cbb1b1111110f005c1b11c111110f00c01b111111110f0000cc11dd1df100000000ccccddf10000000000c0dc0f000000000000dc0f000000000000f00f00") -const _hex348913 = pxsim.BufferMethods.createBufferFromHex("87041000100000000000c0ccffff00000000c04444f40000000000ccf4ffcc0c00cccc1111fdbfcdc0dd1c4d44d4dccdc0cd4d444444c4cdc0cd444444ff4f0fc0cd4444c4444f0f00cc4444c4c4440f00cc44111111440f00c0dc444444fd0000004c44f444f4000000c04444440f000000004c44440f00000000c044f4000000000000ff0f0000") -function inline__P348960(s) { +function inline__P203905(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18690,104 +18103,37 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(s.caps[0]); - if (!r0) { step = 1; continue; } - s.tmp_1 = tiles_getTilesByType__P187567_mk(s); - s.tmp_1.arg0 = globals.tile16___189165; - s.callLocIdx = 94; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0.fields["cost"]; + s.tmp_2 = r0; + r0 = pxsim.Math_.pow(s.tmp_2, 2); + s.tmp_1 = r0; + r0 = s.arg0.fields["extraCost"]; + s.tmp_3 = r0; + r0 = (s.tmp_1 + s.tmp_3); s.tmp_0 = r0; - s.tmp_6 = tiles_getTilesByType__P187567_mk(s); - s.tmp_6.arg0 = globals.tile16___189165; - s.callLocIdx = 95; s.pc = 4; return s.tmp_6; - case 4: - r0 = s.retval; + r0 = s.arg1.fields["cost"]; + s.tmp_6 = r0; + r0 = pxsim.Math_.pow(s.tmp_6, 2); s.tmp_5 = r0; - r0 = pxsim_Array__length(s.tmp_5); + r0 = s.arg1.fields["extraCost"]; + s.tmp_7 = r0; + r0 = (s.tmp_5 + s.tmp_7); s.tmp_4 = r0; - r0 = (s.tmp_4 - 1); - s.tmp_3 = r0; - r0 = pxsim.Math_.randomRange(0, s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_2); - globals.location___348302 = (r0); - s.tmp_0 = tiles_setTileAt__P187559_mk(s); - s.tmp_0.arg0 = globals.location___348302; - s.tmp_0.arg1 = globals.tile12___189161; - s.callLocIdx = 96; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - s.tmp_0 = r0 = globals.paths___348167; - s.tmp_2 = scene_aStar__P188872_mk(s); - s.tmp_3 = tiles_locationOfSprite__P188992_mk(s); - s.tmp_3.arg0 = globals.sprite_fish___348304; - s.callLocIdx = 97; s.pc = 7; return s.tmp_3; - case 7: - r0 = s.retval; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = globals.location___348302; - s.tmp_2.arg2 = null; - s.callLocIdx = 98; s.pc = 6; return s.tmp_2; - case 6: - r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); - s.tmp_0 = sprites_setDataNumber__P188836_mk(s); - s.tmp_0.arg0 = globals.sprite_fish___348304; - s.tmp_0.arg1 = "path_index"; - r0 = pxsim_Array__length(globals.paths___348167); - s.tmp_1 = r0; - r0 = (s.tmp_1 - 1); - s.tmp_0.arg2 = r0; - s.callLocIdx = 99; s.pc = 8; return s.tmp_0; - case 8: - r0 = s.retval; - s.tmp_0 = sprites_setDataNumber__P188836_mk(s); - s.tmp_0.arg0 = globals.sprite_fish___348304; - s.tmp_0.arg1 = "target_row"; - s.tmp_1 = tiles_locationXY__P189008_mk(s); - s.tmp_1.arg0 = globals.location___348302; - s.tmp_1.arg1 = 1; - s.callLocIdx = 100; s.pc = 10; return s.tmp_1; - case 10: - r0 = s.retval; - s.tmp_0.arg2 = r0; - s.callLocIdx = 101; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; - s.tmp_0 = sprites_setDataNumber__P188836_mk(s); - s.tmp_0.arg0 = globals.sprite_fish___348304; - s.tmp_0.arg1 = "target_col"; - s.tmp_1 = tiles_locationXY__P189008_mk(s); - s.tmp_1.arg0 = globals.location___348302; - s.tmp_1.arg1 = 0; - s.callLocIdx = 102; s.pc = 12; return s.tmp_1; - case 12: - r0 = s.retval; - s.tmp_0.arg2 = r0; - s.callLocIdx = 103; s.pc = 11; return s.tmp_0; - case 11: - r0 = s.retval; - s.tmp_0 = sprites_setDataBoolean__P188841_mk(s); - s.tmp_0.arg0 = globals.sprite_fish___348304; - s.tmp_0.arg1 = "running_away"; - s.tmp_0.arg2 = false; - s.callLocIdx = 104; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; - case 1: - case 2: - r0 = undefined; + r0 = (s.tmp_0 - s.tmp_4); return leave(s, r0) default: oops() } } } -inline__P348960.info = {"start":3702,"length":664,"line":96,"column":21,"endLine":106,"endColumn":5,"fileName":"main.ts","functionName":"inline","argumentNames":[]} +inline__P203905.info = {"start":2110,"length":67,"line":62,"column":12,"endLine":62,"endColumn":79,"fileName":"pxt_modules/arcade-tilemap-a-star/a-star.ts","functionName":"inline","argumentNames":["a","b"]} -function inline__P348960_mk(s) { +function inline__P203905_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P348960, depth: s.depth + 1, + parent: s, fn: inline__P203905, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -18796,13 +18142,16 @@ function inline__P348960_mk(s) { tmp_4: undefined, tmp_5: undefined, tmp_6: undefined, + tmp_7: undefined, + arg0: undefined, + arg1: undefined, } } -function tiles_locationXY__P189008(s) { +function updateOrFillLocation__P203927(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18812,302 +18161,154 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.row___203931 = undefined; + s.col___203935 = undefined; + s.colData___203943 = undefined; + s.lData___203953 = undefined; + s.h___203984 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = (s.arg1 === 1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_1 = tiles_screenCoordinateToTile__P189014_mk(s); - s.tmp_2 = tiles_Location_y__P187511_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 2092; s.pc = 14; return s.tmp_2; - case 14: + s.tmp_0 = scene_locationRow__P191300_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1800; s.pc = 12; return s.tmp_0; + case 12: r0 = s.retval; - s.tmp_1.arg0 = r0; - s.callLocIdx = 2093; s.pc = 13; return s.tmp_1; + s.row___203931 = (r0); + s.tmp_0 = scene_locationCol__P191301_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1801; s.pc = 13; return s.tmp_0; case 13: r0 = s.retval; - { step = 12; continue; } - { step = 4; continue; } - case 1: - r0 = (s.arg1 === 0); - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 2; continue; } - s.tmp_4 = tiles_screenCoordinateToTile__P189014_mk(s); - s.tmp_5 = tiles_Location_x__P187510_mk(s); - s.tmp_5.arg0 = s.arg0; - s.callLocIdx = 2094; s.pc = 16; return s.tmp_5; - case 16: - r0 = s.retval; - s.tmp_4.arg0 = r0; - s.callLocIdx = 2095; s.pc = 15; return s.tmp_4; - case 15: + s.col___203935 = (r0); + s.tmp_1 = tiles_TileMap_isObstacle__P187553_mk(s); + s.tmp_1.arg0 = s.caps[0]; + s.tmp_1.arg1 = s.col___203935; + s.tmp_1.arg2 = s.row___203931; + s.callLocIdx = 1802; s.pc = 14; return s.tmp_1; + case 14: r0 = s.retval; - { step = 12; continue; } + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + { step = 11; continue; } + case 1: case 2: + r0 = pxsim_Array__getAt(s.caps[1], s.col___203935); + s.tmp_2 = r0; + r0 = pxsim_numops_toBool(s.tmp_2); + if (!r0) { step = 3; continue; } + r0 = s.tmp_2; + { step = 4; continue; } case 3: + s.tmp_3 = r0 = s.caps[1]; + s.tmp_4 = r0 = s.col___203935; + r0 = pxsim_Array__mk(); + s.tmp_5 = r0; + r0 = pxsim_Array_.setAt(s.tmp_3, s.tmp_4, s.tmp_5); + r0 = s.tmp_5; case 4: - s.tmp_6 = r0 = s.arg1; - r0 = pxsim_pxtcore.switch_eq(2, s.tmp_6); - if (r0) { step = 5; continue; } - r0 = pxsim_pxtcore.switch_eq(3, s.tmp_6); - if (r0) { step = 6; continue; } - r0 = pxsim_pxtcore.switch_eq(5, s.tmp_6); - if (r0) { step = 7; continue; } - r0 = pxsim_pxtcore.switch_eq(6, s.tmp_6); - if (r0) { step = 8; continue; } - r0 = pxsim_pxtcore.switch_eq(4, s.tmp_6); - if (r0) { step = 9; continue; } - r0 = pxsim_pxtcore.switch_eq(7, s.tmp_6); - if (r0) { step = 10; continue; } - r0 = s.tmp_6; - { step = 11; continue; } - case 5: - s.tmp_7 = tiles_Location_x__P187510_mk(s); - s.tmp_7.arg0 = s.arg0; - s.callLocIdx = 2096; s.pc = 17; return s.tmp_7; - case 17: - r0 = s.retval; - { step = 12; continue; } - case 6: - s.tmp_8 = tiles_Location_y__P187511_mk(s); - s.tmp_8.arg0 = s.arg0; - s.callLocIdx = 2097; s.pc = 18; return s.tmp_8; - case 18: - r0 = s.retval; - { step = 12; continue; } - case 7: - s.tmp_10 = tiles_Location_x__P187510_mk(s); - s.tmp_10.arg0 = s.arg0; - s.callLocIdx = 2098; s.pc = 19; return s.tmp_10; - case 19: - r0 = s.retval; - s.tmp_9 = r0; - s.tmp_13 = tiles_tileWidth__P189011_mk(s); - s.callLocIdx = 2099; s.pc = 20; return s.tmp_13; - case 20: - r0 = s.retval; - s.tmp_12 = r0; - r0 = (s.tmp_12 / 2); - s.tmp_11 = r0; - r0 = (s.tmp_9 - s.tmp_11); - { step = 12; continue; } - case 8: - s.tmp_15 = tiles_Location_x__P187510_mk(s); - s.tmp_15.arg0 = s.arg0; - s.callLocIdx = 2100; s.pc = 21; return s.tmp_15; - case 21: - r0 = s.retval; - s.tmp_14 = r0; - s.tmp_18 = tiles_tileWidth__P189011_mk(s); - s.callLocIdx = 2101; s.pc = 22; return s.tmp_18; - case 22: - r0 = s.retval; - s.tmp_17 = r0; - r0 = (s.tmp_17 / 2); - s.tmp_16 = r0; - r0 = (s.tmp_14 + s.tmp_16); - { step = 12; continue; } - case 9: - s.tmp_20 = tiles_Location_y__P187511_mk(s); - s.tmp_20.arg0 = s.arg0; - s.callLocIdx = 2102; s.pc = 23; return s.tmp_20; - case 23: - r0 = s.retval; - s.tmp_19 = r0; - s.tmp_23 = tiles_tileWidth__P189011_mk(s); - s.callLocIdx = 2103; s.pc = 24; return s.tmp_23; - case 24: - r0 = s.retval; - s.tmp_22 = r0; - r0 = (s.tmp_22 / 2); - s.tmp_21 = r0; - r0 = (s.tmp_19 - s.tmp_21); - { step = 12; continue; } - case 10: - s.tmp_25 = tiles_Location_y__P187511_mk(s); - s.tmp_25.arg0 = s.arg0; - s.callLocIdx = 2104; s.pc = 25; return s.tmp_25; - case 25: - r0 = s.retval; - s.tmp_24 = r0; - s.tmp_28 = tiles_tileWidth__P189011_mk(s); - s.callLocIdx = 2105; s.pc = 26; return s.tmp_28; - case 26: - r0 = s.retval; - s.tmp_27 = r0; - r0 = (s.tmp_27 / 2); - s.tmp_26 = r0; - r0 = (s.tmp_24 + s.tmp_26); - { step = 12; continue; } - case 11: - r0 = undefined; - case 12: - return leave(s, r0) - default: oops() -} } } -tiles_locationXY__P189008.info = {"start":11480,"length":745,"line":324,"column":4,"endLine":345,"endColumn":5,"fileName":"pxt_modules/tilemaps/tilemap.ts","functionName":"locationXY","argumentNames":["location","xy"]} - -function tiles_locationXY__P189008_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_locationXY__P189008, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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, - arg0: undefined, - arg1: undefined, -} } - - - - - -function tiles_tileWidth__P189011(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.tm___205912 = undefined; - s.tmp_0 = game_currentScene__P187749_mk(s); - s.callLocIdx = 2106; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - r0 = r0.fields["tileMap"]; - s.tm___205912 = (r0); - r0 = pxsim_numops_toBoolDecr(s.tm___205912); + // jmp value (already in r0) + s.tmp_6 = r0; + s.colData___203943 = (s.tmp_6); + r0 = pxsim_Array__getAt(s.colData___203943, s.row___203931); + s.lData___203953 = (r0); + r0 = pxsim_numops_toBoolDecr(s.lData___203953); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = 0; - { step = 3; continue; } - case 1: - case 2: - r0 = s.tm___205912.fields["_scale"]; + if (!r0) { step = 5; continue; } + r0 = pxsim_pxtcore_mkClassInstance(scene_LocationNode__C191297_VT); s.tmp_2 = r0; - r0 = (1 << s.tmp_2); - case 3: - return leave(s, r0) - default: oops() -} } } -tiles_tileWidth__P189011.info = {"start":13283,"length":154,"line":376,"column":4,"endLine":381,"endColumn":5,"fileName":"pxt_modules/tilemaps/tilemap.ts","functionName":"tileWidth","argumentNames":[]} - -function tiles_tileWidth__P189011_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_tileWidth__P189011, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tm___205912: undefined, -} } - - - - - -function sprites_setDataNumber__P188836(s) { -let r0 = s.r0, 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___205943 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.lambdaArgs = null; - } - r0 = pxsim_numops_toBoolDecr(s.arg0); + s.tmp_3 = scene_LocationNode_constructor__P191298_mk(s); + s.tmp_3.arg0 = s.tmp_2; + s.tmp_3.arg1 = s.arg0; + s.tmp_3.arg2 = s.arg1; + s.tmp_3.arg3 = s.arg2; + s.callLocIdx = 1803; s.pc = 15; return s.tmp_3; + case 15: + r0 = s.retval; + r0 = pxsim_Array_.setAt(s.colData___203943, s.row___203931, s.tmp_2); + { step = 10; continue; } + case 5: + r0 = s.lData___203953.fields["visited"]; + 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; } + if (r0) { step = 6; 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 = 5; continue; } - case 3: - case 4: - s.tmp_4 = Sprite_data__P187258_mk(s); - s.tmp_4.arg0 = s.arg0; - s.callLocIdx = 1765; s.pc = 6; return s.tmp_4; + { step = 7; continue; } case 6: + r0 = s.lData___203953.fields["lastCost"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 > s.arg2); + case 7: + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + if (!r0) { step = 8; continue; } + r0 = (s.lData___203953).fields["lastCost"] = (s.arg2); + r0 = (s.lData___203953).fields["parent"] = (s.arg1); + { step = 9; continue; } + case 8: + { step = 11; continue; } + case 9: + case 10: + s.tmp_0 = lambda_2_mk(s); + s.tmp_0.argL = s.caps[2]; + s.tmp_0.arg0 = s.arg0; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 1804; s.pc = 16; return s.tmp_0; + case 16: + r0 = s.retval; + s.h___203984 = (r0); + r0 = pxsim_pxtcore_mkClassInstance(scene_PrioritizedLocation__C191295_VT); + s.tmp_0 = r0; + s.tmp_1 = scene_PrioritizedLocation_constructor__P191296_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = s.arg0; + s.tmp_1.arg2 = s.arg2; + s.tmp_1.arg3 = s.h___203984; + s.callLocIdx = 1805; s.pc = 17; return s.tmp_1; + case 17: + r0 = s.retval; + s.tmp_2 = Heap_push__P188865_mk(s); + s.tmp_2.arg0 = s.caps[3]; + s.tmp_2.arg1 = s.tmp_0; + s.callLocIdx = 1806; s.pc = 18; return s.tmp_2; + case 18: r0 = s.retval; - s.d___205943 = (r0); - r0 = pxsim_pxtrt.mapSetGeneric(s.d___205943, s.arg1, s.arg2); - case 5: + case 11: r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_setDataNumber__P188836.info = {"start":241,"length":176,"line":8,"column":4,"endLine":12,"endColumn":5,"fileName":"pxt_modules/arcade-sprite-data/main.ts","functionName":"setDataNumber","argumentNames":["sprite","name","value"]} +updateOrFillLocation__P203927.info = {"start":2261,"length":1162,"line":66,"column":8,"endLine":103,"endColumn":9,"fileName":"pxt_modules/arcade-tilemap-a-star/a-star.ts","functionName":"updateOrFillLocation","argumentNames":["l","parent","cost"]} -function sprites_setDataNumber__P188836_mk(s) { +function updateOrFillLocation__P203927_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_setDataNumber__P188836, depth: s.depth + 1, + parent: s, fn: updateOrFillLocation__P203927, depth: s.depth + 1, pc: 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___205943: undefined, + tmp_5: undefined, + tmp_6: undefined, + row___203931: undefined, + col___203935: undefined, + colData___203943: undefined, + lData___203953: undefined, + h___203984: undefined, arg0: undefined, arg1: undefined, arg2: undefined, @@ -19117,7 +18318,7 @@ function sprites_setDataNumber__P188836_mk(s) { -function timer_background__P188812(s) { +function scene_LocationNode_constructor__P191298(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19129,33 +18330,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; } - s.tmp_0 = control_runInBackground__P185496_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1741; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; + r0 = s.arg0; + if (!checkSubtype(r0, scene_LocationNode__C191297_VT)) failedCast(r0); + r0 = (s.arg0).fields["l"] = (s.arg1); + r0 = (s.arg0).fields["parent"] = (s.arg2); + r0 = (s.arg0).fields["lastCost"] = (s.arg3); + r0 = (s.arg0).fields["visited"] = (false); r0 = undefined; return leave(s, r0) default: oops() } } } -timer_background__P188812.info = {"start":665,"length":90,"line":22,"column":4,"endLine":24,"endColumn":5,"fileName":"pxt_modules/Timers/timers.ts","functionName":"background","argumentNames":["then"]} +scene_LocationNode_constructor__P191298.info = {"start":317,"length":189,"line":13,"column":8,"endLine":19,"endColumn":9,"fileName":"pxt_modules/arcade-tilemap-a-star/a-star.ts","functionName":"inline","argumentNames":["this","l","parent","lastCost"]} -function timer_background__P188812_mk(s) { +function scene_LocationNode_constructor__P191298_mk(s) { checkStack(s.depth); return { - parent: s, fn: timer_background__P188812, depth: s.depth + 1, + parent: s, fn: scene_LocationNode_constructor__P191298, 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 control_runInBackground__P185496(s) { +function scene_PrioritizedLocation_constructor__P191296(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19167,28 +18374,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; } - r0 = pxsim.control.runInParallel(s.arg0); + r0 = s.arg0; + if (!checkSubtype(r0, scene_PrioritizedLocation__C191295_VT)) failedCast(r0); + r0 = (s.arg0).fields["loc"] = (s.arg1); + r0 = (s.arg0).fields["cost"] = (s.arg2); + r0 = (s.arg0).fields["extraCost"] = (s.arg3); r0 = undefined; return leave(s, r0) default: oops() } } } -control_runInBackground__P185496.info = {"start":384,"length":88,"line":10,"column":4,"endLine":12,"endColumn":5,"fileName":"pxt_modules/base/control.ts","functionName":"runInBackground","argumentNames":["a"]} +scene_PrioritizedLocation_constructor__P191296.info = {"start":60,"length":176,"line":2,"column":8,"endLine":7,"endColumn":13,"fileName":"pxt_modules/arcade-tilemap-a-star/a-star.ts","functionName":"inline","argumentNames":["this","loc","cost","extraCost"]} -function control_runInBackground__P185496_mk(s) { +function scene_PrioritizedLocation_constructor__P191296_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_runInBackground__P185496, depth: s.depth + 1, + parent: s, fn: scene_PrioritizedLocation_constructor__P191296, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function character_setCharacterState__P188960(s) { +function Heap_length__P188868(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19198,47 +18415,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.state___206138 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = character_getStateForSprite__P191371_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = true; - s.callLocIdx = 2084; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.state___206138 = (r0); - s.tmp_0 = character_CharacterState_setManualFlags__P191364_mk(s); - s.tmp_0.arg0 = s.state___206138; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 2085; s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, Heap__C188863_VT)) failedCast(r0); + r0 = s.arg0.fields["store"]; + s.tmp_0 = r0; + r0 = pxsim_Array__length(s.tmp_0); + return leaveAccessor(s, r0) default: oops() } } } -character_setCharacterState__P188960.info = {"start":18284,"length":160,"line":529,"column":4,"endLine":532,"endColumn":5,"fileName":"pxt_modules/character-animations/main.ts","functionName":"setCharacterState","argumentNames":["sprite","rule"]} +Heap_length__P188868.info = {"start":1832,"length":54,"line":77,"column":4,"endLine":79,"endColumn":5,"fileName":"pxt_modules/pxt-heap/heap.ts","functionName":"length","argumentNames":["this"]} +Heap_length__P188868.isGetter = true; -function character_setCharacterState__P188960_mk(s) { +function Heap_length__P188868_mk(s) { checkStack(s.depth); return { - parent: s, fn: character_setCharacterState__P188960, depth: s.depth + 1, + parent: s, fn: Heap_length__P188868, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - state___206138: undefined, arg0: undefined, - arg1: undefined, } } -function character_getStateForSprite__P191371(s) { +function Heap_pop__P188866(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19248,114 +18453,66 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sceneState___201408 = undefined; - s.state___201415 = undefined; - s.unnamed8946___U2 = undefined; - s.unnamed8947___U3 = undefined; - s.newState___201426 = undefined; + s.output___204280 = undefined; + s.nextRoot___204285 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = character_init__P191368_mk(s); - s.callLocIdx = 2076; s.pc = 10; return s.tmp_0; - case 10: - r0 = s.retval; - r0 = pxsim_numops_toBoolDecr(s.arg0); + r0 = s.arg0; + if (!checkSubtype(r0, Heap__C188863_VT)) failedCast(r0); + r0 = s.arg0.fields["store"]; + s.tmp_0 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, 0); + s.output___204280 = (r0); + r0 = s.arg0.fields["store"]; + s.tmp_0 = r0; + r0 = pxsim_Array_.pop(s.tmp_0); + s.nextRoot___204285 = (r0); + r0 = s.arg0.fields["store"]; + s.tmp_2 = r0; + r0 = pxsim_Array__length(s.tmp_2); 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 = undefined; - { step = 9; continue; } - case 1: - case 2: - s.tmp_2 = r0 = globals.sceneStack___191351; - r0 = pxsim_Array__length(globals.sceneStack___191351); - s.tmp_4 = r0; - r0 = (s.tmp_4 - 1); + r0 = s.arg0.fields["store"]; s.tmp_3 = r0; - r0 = pxsim_Array__getAt(s.tmp_2, s.tmp_3); - s.sceneState___201408 = (r0); - s.state___201415 = (undefined); - r0 = s.sceneState___201408.fields["characters"]; - s.unnamed8946___U2 = (r0); - s.unnamed8947___U3 = (0); + r0 = pxsim_Array_.setAt(s.tmp_3, 0, s.nextRoot___204285); + s.tmp_0 = Heap_percolateDown__P191290_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 1789; s.pc = 3; return s.tmp_0; case 3: - s.tmp_0 = r0 = s.unnamed8947___U3; - r0 = pxsim_Array__length(s.unnamed8946___U2); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 6; continue; } - r0 = pxsim_Array__getAt(s.unnamed8946___U2, s.unnamed8947___U3); - s.state___201415 = (r0); - r0 = s.state___201415.fields["sprite"]; - 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; } - r0 = s.state___201415; - { step = 9; continue; } - case 4: - case 5: - r0 = (s.unnamed8947___U3 + 1); - s.unnamed8947___U3 = (r0); - { step = 3; continue; } - case 6: - s.unnamed8946___U2 = (undefined); - r0 = pxsim_numops_toBoolDecr(s.arg1); - if (!r0) { step = 7; continue; } - r0 = pxsim_pxtcore_mkClassInstance(character_CharacterState__C191357_VT); - s.tmp_4 = r0; - s.tmp_5 = character_CharacterState_constructor__P191367_mk(s); - s.tmp_5.arg0 = s.tmp_4; - s.tmp_5.arg1 = s.arg0; - s.callLocIdx = 2077; s.pc = 11; return s.tmp_5; - case 11: r0 = s.retval; - s.newState___201426 = (s.tmp_4); - r0 = s.sceneState___201408.fields["characters"]; - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.newState___201426); - r0 = s.newState___201426; - { step = 9; continue; } - case 7: - case 8: - r0 = undefined; - case 9: + case 1: + case 2: + r0 = s.output___204280; return leave(s, r0) default: oops() } } } -character_getStateForSprite__P191371.info = {"start":11331,"length":551,"line":352,"column":4,"endLine":370,"endColumn":5,"fileName":"pxt_modules/character-animations/main.ts","functionName":"getStateForSprite","argumentNames":["sprite","createIfNotFound"]} +Heap_pop__P188866.info = {"start":1536,"length":236,"line":61,"column":4,"endLine":71,"endColumn":5,"fileName":"pxt_modules/pxt-heap/heap.ts","functionName":"pop","argumentNames":["this"]} -function character_getStateForSprite__P191371_mk(s) { +function Heap_pop__P188866_mk(s) { checkStack(s.depth); return { - parent: s, fn: character_getStateForSprite__P191371, depth: s.depth + 1, + parent: s, fn: Heap_pop__P188866, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - sceneState___201408: undefined, - state___201415: undefined, - unnamed8946___U2: undefined, - unnamed8947___U3: undefined, - newState___201426: undefined, + output___204280: undefined, + nextRoot___204285: undefined, arg0: undefined, - arg1: undefined, } } -function character_init__P191368(s) { +function Heap_percolateDown__P191290(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19365,64 +18522,151 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.sceneStack___191351); - if (!r0) { step = 3; continue; } - r0 = pxsim_Array__length(globals.sceneStack___191351); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + s.data___204300 = undefined; + s.max___204303 = undefined; + s.left___204311 = undefined; + s.right___204315 = undefined; + s.curr___204319 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Heap__C188863_VT)) failedCast(r0); + r0 = s.arg0.fields["store"]; + s.data___204300 = (r0); + r0 = s.arg0.fields["store"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_3 = character_initScene__P191369_mk(s); - s.callLocIdx = 2069; s.pc = 6; return s.tmp_3; - case 6: - r0 = s.retval; + r0 = pxsim_Array__length(s.tmp_0); + s.max___204303 = (r0); case 1: + r0 = (s.arg1 < s.max___204303); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 12; continue; } + r0 = (s.arg1 << 1); + s.tmp_1 = r0; + r0 = (s.tmp_1 + 1); + s.left___204311 = (r0); + r0 = (s.arg1 << 1); + s.tmp_0 = r0; + r0 = (s.tmp_0 + 2); + s.right___204315 = (r0); + s.curr___204319 = (s.arg1); + r0 = (s.left___204311 < s.max___204303); + 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: - { step = 5; continue; } + s.tmp_2 = if_comparator_3_mk(s); + s.tmp_2.arg0 = s.arg0; + r0 = pxsim_Array__getAt(s.data___204300, s.curr___204319); + s.tmp_2.arg1 = r0; + r0 = pxsim_Array__getAt(s.data___204300, s.left___204311); + s.tmp_2.arg2 = r0; + if (!s.tmp_2.arg0.vtable.iface) { + setupLambda(s.tmp_2, pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "comparator"), 3); + s.callLocIdx = 1783; s.pc = 13; return s.tmp_2; + } else { + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["comparator"]; + if (s.tmp_2.fn == null) { setupLambda(s.tmp_2, s.tmp_2.arg0.fields["comparator"], 3); s.callLocIdx = 1783; s.pc = 13; return s.tmp_2; } + else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 1783; s.pc = 13; return s.tmp_2;; } + else { s.callLocIdx = 1783; s.pc = 13; return s.tmp_2; } + } + case 13: + r0 = s.retval; + 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 = 4; continue; } + s.curr___204319 = (s.left___204311); case 4: - r0 = pxsim_Array__mk(); - globals.sceneStack___191351 = (r0); - s.tmp_0 = game_addScenePushHandler__P187766_mk(s); - s.tmp_0.arg0 = character_initScene__P191369; - s.callLocIdx = 2070; s.pc = 7; return s.tmp_0; - case 7: + case 5: + r0 = (s.right___204315 < s.max___204303); + 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_2 = if_comparator_3_mk(s); + s.tmp_2.arg0 = s.arg0; + r0 = pxsim_Array__getAt(s.data___204300, s.curr___204319); + s.tmp_2.arg1 = r0; + r0 = pxsim_Array__getAt(s.data___204300, s.right___204315); + s.tmp_2.arg2 = r0; + if (!s.tmp_2.arg0.vtable.iface) { + setupLambda(s.tmp_2, pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "comparator"), 3); + s.callLocIdx = 1784; s.pc = 14; return s.tmp_2; + } else { + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["comparator"]; + if (s.tmp_2.fn == null) { setupLambda(s.tmp_2, s.tmp_2.arg0.fields["comparator"], 3); s.callLocIdx = 1784; s.pc = 14; return s.tmp_2; } + else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 1784; s.pc = 14; return s.tmp_2;; } + else { s.callLocIdx = 1784; s.pc = 14; return s.tmp_2; } + } + case 14: r0 = s.retval; - s.tmp_0 = game_addScenePopHandler__P187768_mk(s); - s.tmp_0.arg0 = inline__P201480; - s.callLocIdx = 2071; s.pc = 8; return s.tmp_0; + s.tmp_1 = r0; + r0 = (s.tmp_1 > 0); + case 7: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 8; continue; } + s.curr___204319 = (s.right___204315); case 8: - r0 = s.retval; - s.tmp_0 = character_initScene__P191369_mk(s); - s.callLocIdx = 2072; s.pc = 9; return s.tmp_0; case 9: - r0 = s.retval; - case 5: + r0 = (s.curr___204319 == s.arg1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 10; continue; } + { step = 12; continue; } + case 10: + case 11: + r0 = pxsim_Array__getAt(s.data___204300, s.arg1); + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.data___204300, s.curr___204319); + s.tmp_2 = r0; + r0 = pxsim_Array_.setAt(s.data___204300, s.curr___204319, s.tmp_1); + r0 = pxsim_Array_.setAt(s.data___204300, s.arg1, s.tmp_2); + s.arg1 = (s.curr___204319); + { step = 1; continue; } + case 12: r0 = undefined; return leave(s, r0) default: oops() } } } -character_init__P191368.info = {"start":10391,"length":376,"line":310,"column":5,"endLine":326,"endColumn":6,"fileName":"pxt_modules/character-animations/main.ts","functionName":"init","argumentNames":[]} +Heap_percolateDown__P191290.info = {"start":367,"length":645,"line":13,"column":4,"endLine":36,"endColumn":5,"fileName":"pxt_modules/pxt-heap/heap.ts","functionName":"percolateDown","argumentNames":["this","i"]} -function character_init__P191368_mk(s) { +function Heap_percolateDown__P191290_mk(s) { checkStack(s.depth); return { - parent: s, fn: character_init__P191368, depth: s.depth + 1, + parent: s, fn: Heap_percolateDown__P191290, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, + data___204300: undefined, + max___204303: undefined, + left___204311: undefined, + right___204315: undefined, + curr___204319: undefined, + arg0: undefined, + arg1: undefined, } } -function inline__P201480(s) { +function Heap_rightChild__P191294(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19434,28 +18678,34 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_Array_.pop(globals.sceneStack___191351); - r0 = undefined; + r0 = s.arg0; + if (!checkSubtype(r0, Heap__C188863_VT)) failedCast(r0); + r0 = (s.arg1 << 1); + s.tmp_0 = r0; + r0 = (s.tmp_0 + 2); return leave(s, r0) default: oops() } } } -inline__P201480.info = {"start":10659,"length":76,"line":321,"column":33,"endLine":323,"endColumn":10,"fileName":"pxt_modules/character-animations/main.ts","functionName":"inline","argumentNames":["oldScene"]} +Heap_rightChild__P191294.info = {"start":2435,"length":68,"line":110,"column":4,"endLine":112,"endColumn":5,"fileName":"pxt_modules/pxt-heap/heap.ts","functionName":"rightChild","argumentNames":["this","i"]} -function inline__P201480_mk(s) { +function Heap_rightChild__P191294_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P201480, depth: s.depth + 1, + parent: s, fn: Heap_rightChild__P191294, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, + arg1: undefined, } } -function character_initScene__P191369(s) { +function Heap_leftChild__P191293(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19465,52 +18715,36 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sceneState___201491 = undefined; - r0 = pxsim_pxtcore_mkClassInstance(character_CharacterAnimationSceneState__C191352_VT); - s.tmp_0 = r0; - s.tmp_1 = character_CharacterAnimationSceneState_constructor__P191354_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 2073; s.pc = 1; return s.tmp_1; - case 1: - r0 = s.retval; - r0 = pxsim_Array__push(globals.sceneStack___191351, s.tmp_0); - s.tmp_0 = r0 = globals.sceneStack___191351; - r0 = pxsim_Array__length(globals.sceneStack___191351); - s.tmp_2 = r0; - r0 = (s.tmp_2 - 1); - s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); - s.sceneState___201491 = (r0); - r0 = pxsim_pxtcore_mkAction(1, inline__P201498); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Heap__C188863_VT)) failedCast(r0); + r0 = (s.arg1 << 1); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.sceneState___201491); - s.tmp_1 = game_onUpdate__P187760_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 2075; s.pc = 2; return s.tmp_1; - case 2: - r0 = s.retval; - r0 = undefined; + r0 = (s.tmp_0 + 1); return leave(s, r0) default: oops() } } } -character_initScene__P191369.info = {"start":10774,"length":287,"line":328,"column":5,"endLine":336,"endColumn":6,"fileName":"pxt_modules/character-animations/main.ts","functionName":"initScene","argumentNames":[]} +Heap_leftChild__P191293.info = {"start":2362,"length":67,"line":106,"column":4,"endLine":108,"endColumn":5,"fileName":"pxt_modules/pxt-heap/heap.ts","functionName":"leftChild","argumentNames":["this","i"]} -function character_initScene__P191369_mk(s) { +function Heap_leftChild__P191293_mk(s) { checkStack(s.depth); return { - parent: s, fn: character_initScene__P191369, depth: s.depth + 1, + parent: s, fn: Heap_leftChild__P191293, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - sceneState___201491: undefined, + arg0: undefined, + arg1: undefined, } } -function inline__P201498(s) { +function Heap_push__P188865(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19520,34 +18754,42 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(s.caps[0]); - if (!r0) { step = 1; continue; } - s.tmp_0 = character_CharacterAnimationSceneState_update__P191353_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.callLocIdx = 2074; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Heap__C188863_VT)) failedCast(r0); + r0 = s.arg0.fields["store"]; + s.tmp_0 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.arg1); + s.tmp_0 = Heap_percolateUp__P191291_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1787; s.pc = 1; return s.tmp_0; case 1: - case 2: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P201498.info = {"start":10945,"length":108,"line":331,"column":23,"endLine":335,"endColumn":10,"fileName":"pxt_modules/character-animations/main.ts","functionName":"inline","argumentNames":[]} +Heap_push__P188865.info = {"start":1456,"length":74,"line":56,"column":4,"endLine":59,"endColumn":5,"fileName":"pxt_modules/pxt-heap/heap.ts","functionName":"push","argumentNames":["this","v"]} -function inline__P201498_mk(s) { +function Heap_push__P188865_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P201498, depth: s.depth + 1, + parent: s, fn: Heap_push__P188865, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + arg0: undefined, + arg1: undefined, } } -function character_CharacterAnimationSceneState_constructor__P191354(s) { +function Heap_percolateUp__P191291(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19557,29 +18799,90 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.i___204394 = undefined; + s.curr___204402 = undefined; + s.parentIndex___204407 = undefined; + s.parent___204411 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, character_CharacterAnimationSceneState__C191352_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); + if (!checkSubtype(r0, Heap__C188863_VT)) failedCast(r0); + r0 = s.arg0.fields["store"]; s.tmp_1 = r0; - r0 = (s.tmp_0).fields["characters"] = (s.tmp_1); + r0 = pxsim_Array__length(s.tmp_1); + s.tmp_0 = r0; + r0 = (s.tmp_0 - 1); + s.i___204394 = (r0); + case 1: + r0 = (s.i___204394 > 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + r0 = s.arg0.fields["store"]; + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_1, s.i___204394); + s.curr___204402 = (r0); + r0 = (s.i___204394 - 1); + s.tmp_0 = r0; + r0 = (s.tmp_0 >> 1); + s.parentIndex___204407 = (r0); + r0 = s.arg0.fields["store"]; + s.tmp_0 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.parentIndex___204407); + s.parent___204411 = (r0); + s.tmp_2 = if_comparator_3_mk(s); + s.tmp_2.arg0 = s.arg0; + s.tmp_2.arg1 = s.parent___204411; + s.tmp_2.arg2 = s.curr___204402; + if (!s.tmp_2.arg0.vtable.iface) { + setupLambda(s.tmp_2, pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "comparator"), 3); + s.callLocIdx = 1786; s.pc = 5; return s.tmp_2; + } else { + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["comparator"]; + if (s.tmp_2.fn == null) { setupLambda(s.tmp_2, s.tmp_2.arg0.fields["comparator"], 3); s.callLocIdx = 1786; s.pc = 5; return s.tmp_2; } + else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 1786; s.pc = 5; return s.tmp_2;; } + else { s.callLocIdx = 1786; s.pc = 5; return s.tmp_2; } + } + case 5: + 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 = 2; continue; } + { step = 4; continue; } + case 2: + case 3: + r0 = s.arg0.fields["store"]; + s.tmp_3 = r0; + r0 = pxsim_Array_.setAt(s.tmp_3, s.i___204394, s.parent___204411); + r0 = s.arg0.fields["store"]; + s.tmp_0 = r0; + r0 = pxsim_Array_.setAt(s.tmp_0, s.parentIndex___204407, s.curr___204402); + s.i___204394 = (s.parentIndex___204407); + { step = 1; continue; } + case 4: r0 = undefined; return leave(s, r0) default: oops() } } } -character_CharacterAnimationSceneState_constructor__P191354.info = {"start":1525,"length":59,"line":52,"column":8,"endLine":54,"endColumn":9,"fileName":"pxt_modules/character-animations/main.ts","functionName":"inline","argumentNames":["this"]} +Heap_percolateUp__P191291.info = {"start":1018,"length":432,"line":38,"column":4,"endLine":54,"endColumn":5,"fileName":"pxt_modules/pxt-heap/heap.ts","functionName":"percolateUp","argumentNames":["this"]} -function character_CharacterAnimationSceneState_constructor__P191354_mk(s) { +function Heap_percolateUp__P191291_mk(s) { checkStack(s.depth); return { - parent: s, fn: character_CharacterAnimationSceneState_constructor__P191354, depth: s.depth + 1, + parent: s, fn: Heap_percolateUp__P191291, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + i___204394: undefined, + curr___204402: undefined, + parentIndex___204407: undefined, + parent___204411: undefined, arg0: undefined, } } @@ -19587,7 +18890,7 @@ function character_CharacterAnimationSceneState_constructor__P191354_mk(s) { -function character_CharacterAnimationSceneState_update__P191353(s) { +function Heap_parent__P191292(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19597,100 +18900,36 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.dt___201503 = undefined; - s.cleanup___201508 = undefined; - s.character___201510 = undefined; - s.unnamed8940___U3 = undefined; - s.unnamed8941___U4 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, character_CharacterAnimationSceneState__C191352_VT)) failedCast(r0); - s.tmp_0 = game_currentScene__P187749_mk(s); - s.callLocIdx = 2035; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - r0 = r0.fields["eventContext"]; - r0 = r0.fields["deltaTimeMillis"]; - s.dt___201503 = (r0); - s.cleanup___201508 = (false); - s.character___201510 = (undefined); - r0 = s.arg0.fields["characters"]; - s.unnamed8940___U3 = (r0); - s.unnamed8941___U4 = (0); - case 1: - s.tmp_0 = r0 = s.unnamed8941___U4; - r0 = pxsim_Array__length(s.unnamed8940___U3); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 4; continue; } - r0 = pxsim_Array__getAt(s.unnamed8940___U3, s.unnamed8941___U4); - s.character___201510 = (r0); - r0 = s.character___201510.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___201508 = (true); - case 2: - case 3: - s.tmp_0 = character_CharacterState_update__P191361_mk(s); - s.tmp_0.arg0 = s.character___201510; - s.tmp_0.arg1 = s.dt___201503; - s.callLocIdx = 2036; s.pc = 8; return s.tmp_0; - case 8: - r0 = s.retval; - r0 = (s.unnamed8941___U4 + 1); - s.unnamed8941___U4 = (r0); - { step = 1; continue; } - case 4: - s.unnamed8940___U3 = (undefined); - r0 = pxsim_numops_toBoolDecr(s.cleanup___201508); - if (!r0) { step = 5; continue; } - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = helpers_arrayFilter__P185325_mk(s); - r0 = s.arg0.fields["characters"]; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = inline__P201528; - s.callLocIdx = 2037; s.pc = 9; return s.tmp_2; - case 9: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["characters"] = (s.tmp_1); - case 5: - case 6: - r0 = undefined; + if (!checkSubtype(r0, Heap__C188863_VT)) failedCast(r0); + r0 = (s.arg1 - 1); + s.tmp_0 = r0; + r0 = (s.tmp_0 >> 1); return leave(s, r0) default: oops() } } } -character_CharacterAnimationSceneState_update__P191353.info = {"start":1594,"length":483,"line":56,"column":8,"endLine":68,"endColumn":9,"fileName":"pxt_modules/character-animations/main.ts","functionName":"update","argumentNames":["this"]} +Heap_parent__P191292.info = {"start":2292,"length":64,"line":102,"column":4,"endLine":104,"endColumn":5,"fileName":"pxt_modules/pxt-heap/heap.ts","functionName":"parent","argumentNames":["this","i"]} -function character_CharacterAnimationSceneState_update__P191353_mk(s) { +function Heap_parent__P191292_mk(s) { checkStack(s.depth); return { - parent: s, fn: character_CharacterAnimationSceneState_update__P191353, depth: s.depth + 1, + parent: s, fn: Heap_parent__P191292, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - dt___201503: undefined, - cleanup___201508: undefined, - character___201510: undefined, - unnamed8940___U3: undefined, - unnamed8941___U4: undefined, arg0: undefined, + arg1: undefined, } } -function inline__P201528(s) { +function Heap_constructor__P188864(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19702,37 +18941,38 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0.fields["sprite"]; - r0 = r0.fields["flags"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 & 2); + r0 = s.arg0; + if (!checkSubtype(r0, Heap__C188863_VT)) failedCast(r0); + r0 = (s.arg0).fields["comparator"] = (s.arg1); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); + r0 = (s.tmp_0).fields["store"] = (s.tmp_1); + r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P201528.info = {"start":1989,"length":63,"line":66,"column":57,"endLine":66,"endColumn":120,"fileName":"pxt_modules/character-animations/main.ts","functionName":"inline","argumentNames":["character"]} +Heap_constructor__P188864.info = {"start":257,"length":104,"line":7,"column":4,"endLine":11,"endColumn":5,"fileName":"pxt_modules/pxt-heap/heap.ts","functionName":"inline","argumentNames":["this","comparator"]} -function inline__P201528_mk(s) { +function Heap_constructor__P188864_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P201528, depth: s.depth + 1, + parent: s, fn: Heap_constructor__P188864, 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 character_CharacterState_update__P191361(s) { +function helpers_arrayUnshift__P185319(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19742,659 +18982,348 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.state___201539 = undefined; - s.newAnimation___201765 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, character_CharacterState__C191357_VT)) failedCast(r0); - s.state___201539 = (0); - s.tmp_2 = Sprite_vx__P187246_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 2042; s.pc = 66; return s.tmp_2; - case 66: - r0 = s.retval; - s.tmp_1 = r0; - s.tmp_4 = Sprite_vy__P187248_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_4.arg0 = r0; - s.callLocIdx = 2043; 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___201539 | 2); - s.state___201539 = (r0); - s.tmp_2 = Sprite_vx__P187246_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 2044; 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___201539; - 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___201539 = (r0); - { step = 4; continue; } - case 1: - s.tmp_2 = Sprite_vx__P187246_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 2045; s.pc = 69; return s.tmp_2; - case 69: - 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 = 2; continue; } - s.tmp_3 = r0 = s.state___201539; - 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___201539 = (r0); - case 2: - case 3: - case 4: - s.tmp_2 = Sprite_vy__P187248_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 2046; 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 = 5; continue; } - s.tmp_3 = r0 = s.state___201539; - 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___201539 = (r0); - { step = 8; continue; } - case 5: - s.tmp_2 = Sprite_vy__P187248_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 2047; s.pc = 71; return s.tmp_2; - case 71: - 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 = 6; continue; } - s.tmp_3 = r0 = s.state___201539; - 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___201539 = (r0); - case 6: - case 7: - case 8: - r0 = (s.state___201539 & 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___201539; - 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___201539 = (r0); - case 9: - case 10: - { step = 26; continue; } - case 11: - s.tmp_2 = Sprite_x__P187242_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 2048; 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__P187244_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_5.arg0 = r0; - s.callLocIdx = 2049; 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___201539 | 2); - s.state___201539 = (r0); - s.tmp_2 = Sprite_x__P187242_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 2050; 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___201539; - 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___201539 = (r0); - { step = 17; continue; } - case 14: - s.tmp_2 = Sprite_x__P187242_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 2051; 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___201539; - 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___201539 = (r0); - case 15: - case 16: - case 17: - s.tmp_2 = Sprite_y__P187244_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 2052; 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___201539; - 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___201539 = (r0); - { step = 21; continue; } - case 18: - s.tmp_2 = Sprite_y__P187244_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 2053; 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___201539; - 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___201539 = (r0); - case 19: - case 20: - case 21: - r0 = (s.state___201539 & 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___201539; - 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___201539 = (r0); - case 22: - case 23: - { step = 25; continue; } - case 24: - r0 = (s.state___201539 | 1); - s.state___201539 = (r0); - s.tmp_0 = r0 = s.state___201539; - 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___201539 = (r0); - case 25: - case 26: - s.tmp_1 = Sprite_isHittingTile__P187298_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 3; - s.callLocIdx = 2054; 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___201539 | 4096); - s.state___201539 = (r0); - case 27: - case 28: - s.tmp_1 = Sprite_isHittingTile__P187298_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 1; - s.callLocIdx = 2055; 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___201539 | 1024); - s.state___201539 = (r0); - case 29: - case 30: - s.tmp_1 = Sprite_isHittingTile__P187298_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 2; - s.callLocIdx = 2056; 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___201539 | 2048); - s.state___201539 = (r0); - case 31: - case 32: - s.tmp_1 = Sprite_isHittingTile__P187298_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 0; - s.callLocIdx = 2057; 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___201539 | 8192); - s.state___201539 = (r0); - case 33: - case 34: - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = Sprite_x__P187242_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 2058; 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__P187244_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 2059; 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"]; + r0 = pxsim_Array_.insertAt(s.arg0, 0, s.arg1); + r0 = pxsim_Array__length(s.arg0); + return leave(s, r0) + default: oops() +} } } +helpers_arrayUnshift__P185319.info = {"start":4898,"length":126,"line":180,"column":4,"endLine":183,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arrayUnshift","argumentNames":["arr","value"]} + +function helpers_arrayUnshift__P185319_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: helpers_arrayUnshift__P185319, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, + arg1: undefined, +} } + + + + + +function tiles_Location_y__P187511(s) { +let r0 = s.r0, 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.scale___204864 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, tiles_Location__C187506_VT)) failedCast(r0); + r0 = s.arg0.fields["tileMap"]; 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___201539; - case 36: - // jmp value (already in r0) - s.tmp_1 = r0; - s.tmp_2 = character_CharacterState_pickRule__P191366_mk(s); - s.tmp_2.arg0 = s.arg0; - s.tmp_2.arg1 = s.tmp_1; - s.callLocIdx = 2060; s.pc = 84; return s.tmp_2; - case 84: - r0 = s.retval; - s.newAnimation___201765 = (r0); - r0 = s.arg0.fields["current"]; + r0 = s.tmp_0.fields["_scale"]; + s.scale___204864 = (r0); + r0 = s.arg0.fields["_row"]; s.tmp_1 = r0; - r0 = (s.newAnimation___201765 !== s.tmp_1); + r0 = (s.tmp_1 << s.scale___204864); 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___201765; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 37; continue; } - r0 = s.tmp_0; - { step = 38; continue; } - case 37: - r0 = s.newAnimation___201765.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); + r0 = (s.scale___204864 - 1); s.tmp_3 = r0; - r0 = (s.tmp_2).fields["runningStartFrames"] = (s.tmp_3); - r0 = (s.arg0).fields["current"] = (s.newAnimation___201765); - 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"]; + r0 = (1 << s.tmp_3); s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 41; continue; } - s.tmp_3 = Sprite_setImage__P187273_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 = 2061; s.pc = 85; return s.tmp_3; - case 85: - r0 = s.retval; - { step = 42; continue; } - case 41: - s.tmp_0 = Sprite_setImage__P187273_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_0.arg0 = r0; - r0 = s.arg0.fields["current"]; - r0 = r0.fields["loopFrames"]; + r0 = (s.tmp_0 + s.tmp_2); + return leaveAccessor(s, r0) + default: oops() +} } } +tiles_Location_y__P187511.info = {"start":836,"length":135,"line":38,"column":8,"endLine":41,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"y","argumentNames":["this"]} +tiles_Location_y__P187511.isGetter = true; + +function tiles_Location_y__P187511_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: tiles_Location_y__P187511, depth: s.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___204864: undefined, + arg0: undefined, +} } + + + + + +function tiles_Location_x__P187510(s) { +let r0 = s.r0, 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.scale___204882 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, tiles_Location__C187506_VT)) failedCast(r0); + r0 = s.arg0.fields["tileMap"]; + s.tmp_0 = r0; + r0 = s.tmp_0.fields["_scale"]; + s.scale___204882 = (r0); + r0 = s.arg0.fields["_col"]; s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_1, 0); - s.tmp_0.arg1 = r0; - s.callLocIdx = 2062; 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"]; + r0 = (s.tmp_1 << s.scale___204882); + s.tmp_0 = r0; + r0 = (s.scale___204882 - 1); + s.tmp_3 = r0; + r0 = (1 << s.tmp_3); s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + r0 = (s.tmp_0 + s.tmp_2); + return leaveAccessor(s, r0) + default: oops() +} } } +tiles_Location_x__P187510.info = {"start":691,"length":135,"line":33,"column":8,"endLine":36,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"x","argumentNames":["this"]} +tiles_Location_x__P187510.isGetter = true; + +function tiles_Location_x__P187510_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: tiles_Location_x__P187510, depth: s.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___204882: undefined, + arg0: undefined, +} } + + + + + +function sprites_setDataBoolean__P188841(s) { +let r0 = s.r0, 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___205852 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.lambdaArgs = null; + } + r0 = pxsim_numops_toBoolDecr(s.arg0); 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; } + if (!r0) { step = 1; continue; } r0 = s.tmp_0; - { step = 48; continue; } - case 47: - r0 = s.arg0.fields["enabled"]; + { 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 = 5; continue; } + case 3: + case 4: + s.tmp_4 = Sprite_data__P187258_mk(s); + s.tmp_4.arg0 = s.arg0; + s.callLocIdx = 1768; s.pc = 6; return s.tmp_4; + case 6: + r0 = s.retval; + s.d___205852 = (r0); + s.tmp_0 = r0 = s.d___205852; + s.tmp_1 = r0 = s.arg1; + r0 = pxsim_numops_toBoolDecr(s.arg2); + 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); - 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 = 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.tmp_0.fields["frame"]; + r0 = pxsim_pxtrt.mapSetGeneric(s.tmp_0, s.tmp_1, s.tmp_2); + case 5: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +sprites_setDataBoolean__P188841.info = {"start":2275,"length":180,"line":73,"column":4,"endLine":77,"endColumn":5,"fileName":"pxt_modules/arcade-sprite-data/main.ts","functionName":"setDataBoolean","argumentNames":["sprite","name","value"]} + +function sprites_setDataBoolean__P188841_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: sprites_setDataBoolean__P188841, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + d___205852: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, +} } + + + + + +function Sprite_data__P187258(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (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__C187233_VT)) failedCast(r0); + r0 = s.arg0.fields["_data"]; s.tmp_2 = r0; - r0 = (s.tmp_2 + 1); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["frame"] = (s.tmp_1); - r0 = s.arg0.fields["frame"]; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); 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"]; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 54; continue; } - s.tmp_1 = Sprite_setImage__P187273_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 = 2063; 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__P187273_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_0.arg0 = r0; - r0 = s.arg0.fields["current"]; - r0 = r0.fields["startFrames"]; + if (!r0) { step = 1; continue; } + s.tmp_3 = r0 = s.arg0; + r0 = pxsim_pxtrt.mkMap(); + s.tmp_4 = r0; + r0 = (s.tmp_3).fields["_data"] = (s.tmp_4); + case 1: + case 2: + r0 = s.arg0.fields["_data"]; + return leaveAccessor(s, r0) + default: oops() +} } } +Sprite_data__P187258.info = {"start":4194,"length":92,"line":160,"column":4,"endLine":163,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"data","argumentNames":["this"]} +Sprite_data__P187258.isGetter = true; + +function Sprite_data__P187258_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Sprite_data__P187258, depth: s.depth + 1, + pc: 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 spriteutils_angleFrom__P188850(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (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_numops_toBoolDecr(s.arg0); 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 = 2064; 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"]; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 62; continue; } - case 60: - r0 = s.arg0.fields["timer"]; + 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 = 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["frame"]; + r0 = pxsim_Boolean__bang(s.tmp_2); + case 2: + // jmp value (already in r0) s.tmp_3 = r0; - r0 = (s.tmp_3 + 1); - s.tmp_2 = r0; - r0 = s.arg0.fields["current"]; - r0 = r0.fields["loopFrames"]; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 3; continue; } + r0 = 0; + { step = 5; continue; } + case 3: + case 4: + s.tmp_6 = Sprite_y__P187244_mk(s); + s.tmp_6.arg0 = s.arg1; + s.callLocIdx = 1774; s.pc = 6; return s.tmp_6; + case 6: + r0 = s.retval; s.tmp_5 = r0; - r0 = pxsim_Array__length(s.tmp_5); + s.tmp_8 = Sprite_y__P187244_mk(s); + s.tmp_8.arg0 = s.arg0; + s.callLocIdx = 1775; s.pc = 7; return s.tmp_8; + case 7: + r0 = s.retval; + s.tmp_7 = r0; + r0 = (s.tmp_5 - s.tmp_7); s.tmp_4 = r0; - r0 = (s.tmp_2 % s.tmp_4); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["frame"] = (s.tmp_1); - s.tmp_0 = Sprite_setImage__P187273_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 = 2065; s.pc = 89; return s.tmp_0; - case 89: + s.tmp_11 = Sprite_x__P187242_mk(s); + s.tmp_11.arg0 = s.arg1; + s.callLocIdx = 1776; s.pc = 8; return s.tmp_11; + case 8: r0 = s.retval; - { step = 60; continue; } - case 61: - case 62: - case 63: - case 64: - case 65: - r0 = undefined; + s.tmp_10 = r0; + s.tmp_13 = Sprite_x__P187242_mk(s); + s.tmp_13.arg0 = s.arg0; + s.callLocIdx = 1777; s.pc = 9; return s.tmp_13; + case 9: + r0 = s.retval; + s.tmp_12 = r0; + r0 = (s.tmp_10 - s.tmp_12); + s.tmp_9 = r0; + r0 = pxsim.Math_.atan2(s.tmp_4, s.tmp_9); + case 5: return leave(s, r0) default: oops() } } } -character_CharacterState_update__P191361.info = {"start":4439,"length":4624,"line":148,"column":8,"endLine":263,"endColumn":9,"fileName":"pxt_modules/character-animations/main.ts","functionName":"update","argumentNames":["this","dt"]} +spriteutils_angleFrom__P188850.info = {"start":1673,"length":178,"line":54,"column":4,"endLine":60,"endColumn":5,"fileName":"pxt_modules/arcade-sprite-util/spriteutils.ts","functionName":"angleFrom","argumentNames":["a","b"]} -function character_CharacterState_update__P191361_mk(s) { +function spriteutils_angleFrom__P188850_mk(s) { checkStack(s.depth); return { - parent: s, fn: character_CharacterState_update__P191361, depth: s.depth + 1, + parent: s, fn: spriteutils_angleFrom__P188850, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -20405,8 +19334,11 @@ function character_CharacterState_update__P191361_mk(s) { tmp_6: undefined, tmp_7: undefined, tmp_8: undefined, - state___201539: undefined, - newAnimation___201765: undefined, + tmp_9: undefined, + tmp_10: undefined, + tmp_11: undefined, + tmp_12: undefined, + tmp_13: undefined, arg0: undefined, arg1: undefined, } } @@ -20415,7 +19347,7 @@ function character_CharacterState_update__P191361_mk(s) { -function character_CharacterState_pickRule__P191366(s) { +function spriteutils_setVelocityAtAngle__P188852(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20425,120 +19357,61 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.best___201923 = undefined; - s.bestScore___201926 = undefined; - s.currentScore___201935 = undefined; - s.animation___201937 = undefined; - s.unnamed8944___U4 = undefined; - s.unnamed8945___U5 = 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, character_CharacterState__C191357_VT)) failedCast(r0); - r0 = (s.arg0).fields["lastState"] = (s.arg1); - r0 = s.arg0.fields["current"]; - s.best___201923 = (r0); - r0 = s.arg0.fields["current"]; + r0 = pxsim_numops_toBoolDecr(s.arg0); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + { step = 3; continue; } case 1: - s.tmp_1 = character_score__P191370_mk(s); - s.tmp_1.arg0 = s.arg1; - r0 = s.best___201923.fields["rule"]; - s.tmp_1.arg1 = r0; - s.callLocIdx = 2067; 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___201926 = (s.tmp_2); - s.animation___201937 = (undefined); - r0 = s.arg0.fields["animations"]; - s.unnamed8944___U4 = (r0); - s.unnamed8945___U5 = (0); - case 3: - s.tmp_0 = r0 = s.unnamed8945___U5; - r0 = pxsim_Array__length(s.unnamed8944___U4); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 6; continue; } - r0 = pxsim_Array__getAt(s.unnamed8944___U4, s.unnamed8945___U5); - s.animation___201937 = (r0); - s.tmp_2 = character_score__P191370_mk(s); - s.tmp_2.arg0 = s.arg1; - r0 = s.animation___201937.fields["rule"]; + s.tmp_2 = Sprite_setVelocity__P187290_mk(s); + s.tmp_2.arg0 = s.arg0; + r0 = pxsim.Math_.cos(s.arg1); + s.tmp_3 = r0; + r0 = (s.tmp_3 * s.arg2); s.tmp_2.arg1 = r0; - s.callLocIdx = 2068; s.pc = 13; return s.tmp_2; - case 13: - r0 = s.retval; - s.currentScore___201935 = (r0); - r0 = (s.currentScore___201935 > s.bestScore___201926); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - s.bestScore___201926 = (s.currentScore___201935); - s.best___201923 = (s.animation___201937); + r0 = pxsim.Math_.sin(s.arg1); + s.tmp_4 = r0; + r0 = (s.tmp_4 * s.arg2); + s.tmp_2.arg2 = r0; + s.callLocIdx = 1778; s.pc = 4; return s.tmp_2; case 4: - case 5: - r0 = (s.unnamed8945___U5 + 1); - s.unnamed8945___U5 = (r0); - { step = 3; continue; } - case 6: - s.unnamed8944___U4 = (undefined); - r0 = (s.bestScore___201926 === 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___201926 == 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___201923; - case 11: + r0 = s.retval; + case 3: + r0 = undefined; return leave(s, r0) default: oops() } } } -character_CharacterState_pickRule__P191366.info = {"start":9567,"length":811,"line":286,"column":8,"endLine":307,"endColumn":9,"fileName":"pxt_modules/character-animations/main.ts","functionName":"pickRule","argumentNames":["this","state"]} +spriteutils_setVelocityAtAngle__P188852.info = {"start":3148,"length":270,"line":95,"column":4,"endLine":103,"endColumn":5,"fileName":"pxt_modules/arcade-sprite-util/spriteutils.ts","functionName":"setVelocityAtAngle","argumentNames":["target","angleInRadians","speed"]} -function character_CharacterState_pickRule__P191366_mk(s) { +function spriteutils_setVelocityAtAngle__P188852_mk(s) { checkStack(s.depth); return { - parent: s, fn: character_CharacterState_pickRule__P191366, depth: s.depth + 1, + parent: s, fn: spriteutils_setVelocityAtAngle__P188852, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - best___201923: undefined, - bestScore___201926: undefined, - currentScore___201935: undefined, - animation___201937: undefined, - unnamed8944___U4: undefined, - unnamed8945___U5: undefined, + tmp_3: undefined, + tmp_4: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function character_score__P191370(s) { +function Sprite_setVelocity__P187290(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20548,66 +19421,48 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.res___201962 = undefined; - s.check___201963 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - s.res___201962 = (0); - s.check___201963 = (s.arg0); - r0 = (s.arg0 & s.arg1); - s.tmp_1 = r0; - r0 = (s.tmp_1 ^ s.arg1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = 0; - { step = 7; continue; } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); + s.tmp_0 = Sprite_vx__P187247_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 346; s.pc = 1; return s.tmp_0; case 1: + r0 = s.retval; + s.tmp_0 = Sprite_vy__P187249_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg2; + s.callLocIdx = 347; s.pc = 2; return s.tmp_0; case 2: - case 3: - r0 = pxsim_numops_toBoolDecr(s.check___201963); - if (!r0) { step = 6; continue; } - r0 = (s.check___201963 & 1); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 4; continue; } - r0 = (s.res___201962 + 1); - s.res___201962 = (r0); - case 4: - case 5: - r0 = (s.check___201963 >> 1); - s.check___201963 = (r0); - { step = 3; continue; } - case 6: - r0 = s.res___201962; - case 7: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -character_score__P191370.info = {"start":11067,"length":258,"line":338,"column":4,"endLine":350,"endColumn":5,"fileName":"pxt_modules/character-animations/main.ts","functionName":"score","argumentNames":["state","rule"]} +Sprite_setVelocity__P187290.info = {"start":12526,"length":93,"line":450,"column":4,"endLine":453,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"setVelocity","argumentNames":["this","vx","vy"]} -function character_score__P191370_mk(s) { +function Sprite_setVelocity__P187290_mk(s) { checkStack(s.depth); return { - parent: s, fn: character_score__P191370, depth: s.depth + 1, + parent: s, fn: Sprite_setVelocity__P187290, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - res___201962: undefined, - check___201963: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function Sprite_isHittingTile__P187298(s) { +function Sprite_vy__P187249(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20624,45 +19479,26 @@ switch (step) { } r0 = s.arg0; if (!checkSubtype(r0, Sprite__C187233_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 = pxsim_Boolean__bang(s.tmp_3); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg1 * 256); s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + r0 = (s.tmp_2 | 0); s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - case 2: - // jmp value (already in r0) - s.tmp_6 = r0; - r0 = s.tmp_6; + r0 = (s.tmp_0).fields["_vy"] = (s.tmp_1); + r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_isHittingTile__P187298.info = {"start":25208,"length":125,"line":765,"column":4,"endLine":767,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"isHittingTile","argumentNames":["this","direction"]} +Sprite_vy__P187249.info = {"start":2705,"length":51,"line":108,"column":4,"endLine":110,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"vy","argumentNames":["this","v"]} -function Sprite_isHittingTile__P187298_mk(s) { +function Sprite_vy__P187249_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_isHittingTile__P187298, depth: s.depth + 1, + parent: s, fn: Sprite_vy__P187249, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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, } } @@ -20671,7 +19507,7 @@ function Sprite_isHittingTile__P187298_mk(s) { -function game_onUpdate__P187760(s) { +function Sprite_vy__P187248(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20685,47 +19521,23 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = game_init__P189572_mk(s); - s.tmp_0.arg0 = undefined; - s.callLocIdx = 1201; 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 = s.arg0; + if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); + r0 = s.arg0.fields["_vy"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 3; continue; } - case 1: - case 2: - s.tmp_2 = control_EventContext_registerFrameHandler__P185609_mk(s); - s.tmp_3 = game_eventContext__P187752_mk(s); - s.callLocIdx = 1202; s.pc = 6; return s.tmp_3; - case 6: - r0 = s.retval; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = 20; - s.tmp_2.arg2 = s.arg0; - s.callLocIdx = 1203; s.pc = 5; return s.tmp_2; - case 5: - r0 = s.retval; - case 3: - r0 = undefined; - return leave(s, r0) + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -game_onUpdate__P187760.info = {"start":7427,"length":169,"line":242,"column":4,"endLine":246,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"onUpdate","argumentNames":["a"]} +Sprite_vy__P187248.info = {"start":2543,"length":60,"line":103,"column":4,"endLine":105,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"vy","argumentNames":["this"]} +Sprite_vy__P187248.isGetter = true; -function game_onUpdate__P187760_mk(s) { +function Sprite_vy__P187248_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_onUpdate__P187760, depth: s.depth + 1, + parent: s, fn: Sprite_vy__P187248, depth: s.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, } } @@ -20733,7 +19545,7 @@ function game_onUpdate__P187760_mk(s) { -function game_init__P189572(s) { +function Sprite_vx__P187247(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20745,105 +19557,40 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(globals._scene___189564); - 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; - case 2: - // jmp value (already in r0) + if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg1 * 256); s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 3; continue; } - r0 = pxsim_pxtcore_mkClassInstance(scene_Scene__C187636_VT); - s.tmp_3 = r0; - s.tmp_4 = scene_Scene_constructor__P187657_mk(s); - s.tmp_4.arg0 = s.tmp_3; - s.tmp_5 = control_pushEventContext__P185615_mk(s); - s.callLocIdx = 1147; s.pc = 14; return s.tmp_5; - case 14: - r0 = s.retval; - s.tmp_4.arg1 = r0; - s.tmp_4.arg2 = globals._scene___189564; - s.callLocIdx = 1148; s.pc = 13; return s.tmp_4; - case 13: - r0 = s.retval; - globals._scene___189564 = (s.tmp_3); - case 3: - case 4: - s.tmp_0 = scene_Scene_init__P187658_mk(s); - s.tmp_0.arg0 = globals._scene___189564; - s.callLocIdx = 1149; s.pc = 15; return s.tmp_0; - case 15: - r0 = s.retval; - r0 = pxsim_numops_toBoolDecr(globals.winEffect___187747); - 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; } - globals.winEffect___187747 = (globals.confetti___188018); - case 5: - case 6: - r0 = pxsim_numops_toBoolDecr(globals.loseEffect___187748); - 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; } - globals.loseEffect___187748 = (globals.melt___188039); - case 7: - case 8: - r0 = pxsim_numops_toBoolDecr(globals.winSound___189563); - 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; } - globals.winSound___189563 = (globals.powerUp___186835); - case 9: - case 10: - r0 = pxsim_numops_toBoolDecr(globals.loseSound___189561); + r0 = (s.tmp_2 | 0); s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 11; continue; } - globals.loseSound___189561 = (globals.wawawawaa___186832); - case 11: - case 12: + r0 = (s.tmp_0).fields["_vx"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -game_init__P189572.info = {"start":1202,"length":452,"line":45,"column":4,"endLine":60,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"init","argumentNames":["forceNewScene"]} +Sprite_vx__P187247.info = {"start":2374,"length":51,"line":97,"column":4,"endLine":99,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"vx","argumentNames":["this","v"]} -function game_init__P189572_mk(s) { +function Sprite_vx__P187247_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_init__P189572, depth: s.depth + 1, + parent: s, fn: Sprite_vx__P187247, depth: s.depth + 1, pc: 0, retval: undefined, 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 inline__P195328(s) { +function Sprite_vx__P187246(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20853,96 +19600,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.rounds___195331 = undefined; - s.j___195339 = undefined; - s.x___195344 = undefined; - s.y___195350 = undefined; - s.c___195356 = 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___195331 = (r0); - s.j___195339 = (0); - case 1: - r0 = (s.j___195339 < s.rounds___195331); + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); + r0 = s.arg0.fields["_vx"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.tmp_1 = Math_FastRandom_randomRange__P187807_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 = 53; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; - s.x___195344 = (r0); - s.tmp_0 = Math_FastRandom_randomRange__P187807_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 = 54; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - s.y___195350 = (r0); - r0 = pxsim_ImageMethods.getPixel(s.arg0, s.x___195344, s.y___195350); - s.c___195356 = (r0); - s.tmp_0 = r0 = s.arg0; - s.tmp_1 = r0 = s.x___195344; - r0 = (s.y___195350 + 1); - s.tmp_2 = r0; - r0 = pxsim_ImageMethods.setPixel(s.tmp_0, s.tmp_1, s.tmp_2, s.c___195356); - s.tmp_0 = r0 = s.arg0; - s.tmp_1 = r0 = s.x___195344; - r0 = (s.y___195350 + 2); - s.tmp_2 = r0; - r0 = pxsim_ImageMethods.setPixel(s.tmp_0, s.tmp_1, s.tmp_2, s.c___195356); - r0 = (s.j___195339 + 1); - s.j___195339 = (r0); - { step = 1; continue; } - case 2: - r0 = undefined; - return leave(s, r0) + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -inline__P195328.info = {"start":2652,"length":386,"line":72,"column":45,"endLine":81,"endColumn":5,"fileName":"pxt_modules/game/effects.ts","functionName":"inline","argumentNames":["input","r"]} +Sprite_vx__P187246.info = {"start":2212,"length":60,"line":92,"column":4,"endLine":94,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"vx","argumentNames":["this"]} +Sprite_vx__P187246.isGetter = true; -function inline__P195328_mk(s) { +function Sprite_vx__P187246_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P195328, depth: s.depth + 1, + parent: s, fn: Sprite_vx__P187246, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - rounds___195331: undefined, - j___195339: undefined, - x___195344: undefined, - y___195350: undefined, - c___195356: undefined, arg0: undefined, - arg1: undefined, } } -function Math_FastRandom_randomRange__P187807(s) { +function sprites_readDataBoolean__P188842(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20952,62 +19638,74 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.d___192519 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Math_FastRandom__C187803_VT)) failedCast(r0); - r0 = (s.arg2 > 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); + r0 = pxsim_numops_toBool(s.tmp_0); if (!r0) { step = 1; continue; } - s.tmp_2 = Math_FastRandom_next__P187806_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 1337; s.pc = 3; return s.tmp_2; - case 3: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.arg2 - s.arg1); - s.tmp_4 = r0; - r0 = (s.tmp_4 + 1); - s.tmp_3 = r0; - r0 = (s.tmp_1 % s.tmp_3); + 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_5 = r0; - r0 = (s.arg1 + s.tmp_5); + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 3; continue; } + r0 = false; + { step = 5; continue; } + case 3: + case 4: + s.tmp_4 = Sprite_data__P187258_mk(s); + s.tmp_4.arg0 = s.arg0; + s.callLocIdx = 1769; s.pc = 6; return s.tmp_4; + case 6: + r0 = s.retval; + s.d___192519 = (r0); + r0 = pxsim_pxtrt.mapGetGeneric(s.d___192519, 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); + s.tmp_0 = r0; + r0 = pxsim_Boolean__bang(s.tmp_0); + case 5: return leave(s, r0) default: oops() } } } -Math_FastRandom_randomRange__P187807.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"]} +sprites_readDataBoolean__P188842.info = {"start":2670,"length":179,"line":86,"column":4,"endLine":90,"endColumn":5,"fileName":"pxt_modules/arcade-sprite-data/main.ts","functionName":"readDataBoolean","argumentNames":["sprite","name"]} -function Math_FastRandom_randomRange__P187807_mk(s) { +function sprites_readDataBoolean__P188842_mk(s) { checkStack(s.depth); return { - parent: s, fn: Math_FastRandom_randomRange__P187807, depth: s.depth + 1, + parent: s, fn: sprites_readDataBoolean__P188842, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, - tmp_5: undefined, + d___192519: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function Math_FastRandom_next__P187806(s) { +function Sprite_follow__P187306(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21017,55 +19715,172 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.sc___192542 = undefined; + s.lastTime___192551 = undefined; + s.fs___192694 = 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, Math_FastRandom__C187803_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["lfsr"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 >> 1); + if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); + r0 = (s.arg1 === s.arg0); + 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_1 = game_currentScene__P187749_mk(s); + s.callLocIdx = 443; s.pc = 14; return s.tmp_1; + case 14: + r0 = s.retval; + s.sc___192542 = (r0); + r0 = s.sc___192542.fields["followingSprites"]; 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); + 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.sc___192542; + r0 = pxsim_Array__mk(); s.tmp_4 = r0; - r0 = (s.tmp_2 ^ s.tmp_4); + r0 = (s.tmp_3).fields["followingSprites"] = (s.tmp_4); + r0 = pxsim_pxtrt.mklocRef(); + s.lastTime___192551 = (r0); + s.tmp_0 = r0 = s.lastTime___192551; + s.tmp_2 = game_runtime__P187765_mk(s); + s.callLocIdx = 444; s.pc = 15; return s.tmp_2; + case 15: + r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_0).fields["lfsr"] = (s.tmp_1); - r0 = s.tmp_1; + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + r0 = pxsim_pxtcore_mkAction(2, inline__P192557); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.lastTime___192551); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.sc___192542); + s.tmp_1 = control_EventContext_registerFrameHandler__P185609_mk(s); + r0 = s.sc___192542.fields["eventContext"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 14; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 470; s.pc = 16; return s.tmp_1; + case 16: + r0 = s.retval; + case 3: + case 4: + r0 = pxsim_pxtcore_mkAction(1, inline__P192696); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = helpers_arrayFind__P185326_mk(s); + r0 = s.sc___192542.fields["followingSprites"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 471; s.pc = 17; return s.tmp_1; + case 17: + r0 = s.retval; + s.fs___192694 = (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 = 5; continue; } + r0 = s.tmp_0; + { step = 6; continue; } + case 5: + r0 = pxsim_numops_toBoolDecr(s.arg2); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); + case 6: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 9; continue; } + r0 = pxsim_numops_toBoolDecr(s.fs___192694); + if (!r0) { step = 7; continue; } + r0 = s.sc___192542.fields["followingSprites"]; + s.tmp_4 = r0; + r0 = pxsim_Array_.removeElement(s.tmp_4, s.fs___192694); + s.tmp_0 = Sprite_vx__P187247_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 472; s.pc = 18; return s.tmp_0; + case 18: + r0 = s.retval; + s.tmp_0 = Sprite_vy__P187249_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 473; s.pc = 19; return s.tmp_0; + case 19: + r0 = s.retval; + case 7: + case 8: + { step = 12; continue; } + case 9: + r0 = pxsim_numops_toBoolDecr(s.fs___192694); + 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 = 10; continue; } + r0 = pxsim_pxtcore_mkClassInstance(sprites_FollowingSprite__C187189_VT); + s.tmp_2 = r0; + s.tmp_3 = sprites_FollowingSprite_constructor__P187190_mk(s); + s.tmp_3.arg0 = s.tmp_2; + s.tmp_3.arg1 = s.arg0; + s.tmp_3.arg2 = s.arg1; + s.tmp_3.arg3 = s.arg2; + s.tmp_3.arg4 = s.arg3; + s.callLocIdx = 474; s.pc = 20; return s.tmp_3; + case 20: + r0 = s.retval; + r0 = s.sc___192542.fields["followingSprites"]; + s.tmp_4 = r0; + r0 = pxsim_Array__push(s.tmp_4, s.tmp_2); + { step = 11; continue; } + case 10: + r0 = (s.fs___192694).fields["target"] = (s.arg1); + r0 = (s.fs___192694).fields["rate"] = (s.arg2); + r0 = (s.fs___192694).fields["turnRate"] = (s.arg3); + case 11: + case 12: + case 13: + r0 = undefined; return leave(s, r0) default: oops() } } } -Math_FastRandom_next__P187806.info = {"start":1713,"length":107,"line":53,"column":8,"endLine":55,"endColumn":9,"fileName":"pxt_modules/game/mathUtil.ts","functionName":"next","argumentNames":["this"]} +Sprite_follow__P187306.info = {"start":30060,"length":3128,"line":899,"column":4,"endLine":978,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"follow","argumentNames":["this","target","speed","turnRate"]} -function Math_FastRandom_next__P187806_mk(s) { +function Sprite_follow__P187306_mk(s) { checkStack(s.depth); return { - parent: s, fn: Math_FastRandom_next__P187806, depth: s.depth + 1, + parent: s, fn: Sprite_follow__P187306, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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, + sc___192542: undefined, + lastTime___192551: undefined, + fs___192694: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function effects_ImageEffect_constructor__P188034(s) { +function inline__P192557(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21075,49 +19890,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.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, effects_ImageEffect__C188033_VT)) failedCast(r0); - r0 = (s.arg0).fields["effect"] = (s.arg2); - r0 = pxsim_pxtcore_mkClassInstance(Math_FastRandom__C187803_VT); + s.currTime___192558 = undefined; + s.timeDiff___192561 = undefined; + s.destroyedSprites___192567 = undefined; + s.tmp_0 = game_runtime__P187765_mk(s); + s.callLocIdx = 445; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.currTime___192558 = (r0); + s.tmp_1 = r0 = s.currTime___192558; + r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); + s.tmp_2 = r0; + r0 = (s.tmp_1 - s.tmp_2); s.tmp_0 = r0; - s.tmp_1 = Math_FastRandom_constructor__P187805_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = undefined; - s.callLocIdx = 1643; s.pc = 1; return s.tmp_1; - case 1: + r0 = (s.tmp_0 / 1000); + s.timeDiff___192561 = (r0); + r0 = pxsim_pxtrt.mklocRef(); + s.destroyedSprites___192567 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.destroyedSprites___192567, false); + r0 = pxsim_pxtcore_mkAction(2, inline__P192571); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.destroyedSprites___192567); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.timeDiff___192561); + s.tmp_1 = helpers_arrayForEach__P185324_mk(s); + r0 = s.caps[1].fields["followingSprites"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 468; s.pc = 4; return s.tmp_1; + case 4: r0 = s.retval; - r0 = (s.arg0).fields["fastRandom"] = (s.tmp_0); - r0 = (s.arg0).fields["preferredDelay"] = (s.arg1); - r0 = (s.arg0).fields["times"] = (undefined); + r0 = pxsim_pxtrt_stlocRef(s.caps[0], s.currTime___192558); + r0 = pxsim_pxtrt_ldlocRef(s.destroyedSprites___192567); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_1 = r0 = s.caps[1]; + s.tmp_3 = helpers_arrayFilter__P185325_mk(s); + r0 = s.caps[1].fields["followingSprites"]; + s.tmp_3.arg0 = r0; + s.tmp_3.arg1 = inline__P192678; + s.callLocIdx = 469; s.pc = 5; return s.tmp_3; + case 5: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_1).fields["followingSprites"] = (s.tmp_2); + case 1: + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -effects_ImageEffect_constructor__P188034.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"]} +inline__P192557.info = {"start":30389,"length":2197,"line":907,"column":79,"endLine":955,"endColumn":13,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":[]} -function effects_ImageEffect_constructor__P188034_mk(s) { +function inline__P192557_mk(s) { checkStack(s.depth); return { - parent: s, fn: effects_ImageEffect_constructor__P188034, depth: s.depth + 1, + parent: s, fn: inline__P192557, 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, + tmp_3: undefined, + currTime___192558: undefined, + timeDiff___192561: undefined, + destroyedSprites___192567: undefined, } } -function inline__P195436(s) { +function inline__P192571(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21127,81 +19970,260 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.factory___195439 = undefined; + s.target___192574 = undefined; + s.self___192575 = undefined; + s.turnRate___192576 = undefined; + s.rate___192577 = undefined; + s.dx___192591 = undefined; + s.dy___192597 = undefined; + s.maxMomentumDiff___192616 = undefined; + s.angleToTarget___192623 = undefined; + s.targetTrajectoryVx___192628 = undefined; + s.targetTrajectoryVy___192634 = undefined; + s.diffVx___192640 = undefined; + s.diffVy___192645 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_pxtcore_mkClassInstance(particles_ConfettiFactory__C187962_VT); - s.tmp_0 = r0; - s.tmp_2 = if_width_1_mk(s); - s.tmp_2.arg0 = s.arg0; + s.tmp_0 = if_target_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, "target"); + } else { + s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["target"]; + if (s.tmp_0.fn == null) { s.retval = s.tmp_0.arg0.fields["target"]; } + else if (!s.tmp_0.fn.isGetter) { s.retval = bind(s.tmp_0); } + else { s.callLocIdx = 446; s.pc = 8; return s.tmp_0; } + } + case 8: + r0 = s.retval; + s.target___192574 = (r0); + s.tmp_2 = if_self_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, "width"); + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "self"); } 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"]; } + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["self"]; + if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["self"]; } else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } - else { s.callLocIdx = 41; s.pc = 3; return s.tmp_2; } + else { s.callLocIdx = 447; s.pc = 9; return s.tmp_2; } } - case 3: + case 9: 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; + s.self___192575 = (r0); + s.tmp_3 = if_turnRate_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, "width"); + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "turnRate"); } 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"]; } + s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["turnRate"]; + if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["turnRate"]; } else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } - else { s.callLocIdx = 42; s.pc = 4; return s.tmp_3; } + else { s.callLocIdx = 448; s.pc = 10; return s.tmp_3; } } - case 4: + case 10: r0 = s.retval; - { step = 2; continue; } + s.turnRate___192576 = (r0); + s.tmp_4 = if_rate_1_mk(s); + s.tmp_4.arg0 = s.tmp_1; + if (!s.tmp_4.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_4.arg0, "rate"); + } else { + s.tmp_4.fn = s.tmp_4.arg0.vtable.iface["rate"]; + if (s.tmp_4.fn == null) { s.retval = s.tmp_4.arg0.fields["rate"]; } + else if (!s.tmp_4.fn.isGetter) { s.retval = bind(s.tmp_4); } + else { s.callLocIdx = 449; s.pc = 11; return s.tmp_4; } + } + case 11: + r0 = s.retval; + s.rate___192577 = (r0); + r0 = s.self___192575.fields["flags"]; + s.tmp_2 = r0; + r0 = s.target___192574.fields["flags"]; + s.tmp_3 = r0; + r0 = (s.tmp_2 | s.tmp_3); + 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; } + s.tmp_4 = Sprite_vx__P187247_mk(s); + s.tmp_4.arg0 = s.self___192575; + s.tmp_4.arg1 = 0; + s.callLocIdx = 450; s.pc = 12; return s.tmp_4; + case 12: + r0 = s.retval; + s.tmp_0 = Sprite_vy__P187249_mk(s); + s.tmp_0.arg0 = s.self___192575; + s.tmp_0.arg1 = 0; + s.callLocIdx = 451; s.pc = 13; return s.tmp_0; + case 13: + r0 = s.retval; + r0 = pxsim_pxtrt_stlocRef(s.caps[0], true); + { step = 7; continue; } case 1: - r0 = 16; case 2: - // jmp value (already in r0) - s.tmp_4 = r0; - s.tmp_5 = particles_ConfettiFactory_constructor__P187963_mk(s); - s.tmp_5.arg0 = s.tmp_0; - s.tmp_5.arg1 = s.tmp_4; - s.tmp_5.arg2 = 16; - s.callLocIdx = 43; s.pc = 5; return s.tmp_5; - case 5: + s.tmp_1 = Sprite_x__P187242_mk(s); + s.tmp_1.arg0 = s.target___192574; + s.callLocIdx = 452; s.pc = 14; return s.tmp_1; + case 14: r0 = s.retval; - s.factory___195439 = (s.tmp_0); - s.tmp_0 = particles_SprayFactory_setSpeed__P187939_mk(s); - s.tmp_0.arg0 = s.factory___195439; - s.tmp_0.arg1 = 30; - s.callLocIdx = 44; s.pc = 6; return s.tmp_0; - case 6: + s.tmp_0 = r0; + s.tmp_3 = Sprite_x__P187242_mk(s); + s.tmp_3.arg0 = s.self___192575; + s.callLocIdx = 453; s.pc = 15; return s.tmp_3; + case 15: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_0 - s.tmp_2); + s.dx___192591 = (r0); + s.tmp_1 = Sprite_y__P187244_mk(s); + s.tmp_1.arg0 = s.target___192574; + s.callLocIdx = 454; s.pc = 16; return s.tmp_1; + case 16: r0 = s.retval; - r0 = pxsim_pxtcore_mkClassInstance(particles_ParticleSource__C187895_VT); s.tmp_0 = r0; - s.tmp_1 = particles_ParticleSource_constructor__P187900_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___195439; - s.callLocIdx = 45; s.pc = 7; return s.tmp_1; - case 7: + s.tmp_3 = Sprite_y__P187244_mk(s); + s.tmp_3.arg0 = s.self___192575; + s.callLocIdx = 455; s.pc = 17; return s.tmp_3; + case 17: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_0 - s.tmp_2); + s.dy___192597 = (r0); + s.tmp_2 = Math_abs__P185340_mk(s); + s.tmp_2.arg0 = s.dx___192591; + s.callLocIdx = 456; s.pc = 18; return s.tmp_2; + case 18: r0 = s.retval; + 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: + s.tmp_4 = Math_abs__P185340_mk(s); + s.tmp_4.arg0 = s.dy___192597; + s.callLocIdx = 457; s.pc = 19; return s.tmp_4; + case 19: + r0 = s.retval; + s.tmp_3 = r0; + r0 = (s.tmp_3 < 2); + 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 = Sprite_vx__P187247_mk(s); + s.tmp_6.arg0 = s.self___192575; + s.tmp_6.arg1 = 0; + s.callLocIdx = 458; s.pc = 20; return s.tmp_6; + case 20: + r0 = s.retval; + s.tmp_0 = Sprite_vy__P187249_mk(s); + s.tmp_0.arg0 = s.self___192575; + s.tmp_0.arg1 = 0; + s.callLocIdx = 459; s.pc = 21; return s.tmp_0; + case 21: + r0 = s.retval; + { step = 7; continue; } + case 5: + case 6: + r0 = (s.caps[1] * s.turnRate___192576); + s.tmp_0 = r0; + r0 = (s.rate___192577 / 50); + s.tmp_1 = r0; + r0 = (s.tmp_0 * s.tmp_1); + s.maxMomentumDiff___192616 = (r0); + r0 = pxsim.Math_.atan2(s.dy___192597, s.dx___192591); + s.angleToTarget___192623 = (r0); + r0 = pxsim.Math_.cos(s.angleToTarget___192623); + s.tmp_0 = r0; + r0 = (s.tmp_0 * s.rate___192577); + s.targetTrajectoryVx___192628 = (r0); + r0 = pxsim.Math_.sin(s.angleToTarget___192623); + s.tmp_0 = r0; + r0 = (s.tmp_0 * s.rate___192577); + s.targetTrajectoryVy___192634 = (r0); + s.tmp_0 = r0 = s.targetTrajectoryVx___192628; + s.tmp_2 = Sprite_vx__P187246_mk(s); + s.tmp_2.arg0 = s.self___192575; + s.callLocIdx = 460; s.pc = 22; return s.tmp_2; + case 22: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0 - s.tmp_1); + s.diffVx___192640 = (r0); + s.tmp_0 = r0 = s.targetTrajectoryVy___192634; + s.tmp_2 = Sprite_vy__P187248_mk(s); + s.tmp_2.arg0 = s.self___192575; + s.callLocIdx = 461; s.pc = 23; return s.tmp_2; + case 23: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0 - s.tmp_1); + s.diffVy___192645 = (r0); + s.tmp_0 = Sprite_vx__P187247_mk(s); + s.tmp_1 = r0 = s.self___192575; + s.tmp_0.arg0 = r0; + s.tmp_3 = Sprite_vx__P187246_mk(s); + s.tmp_3.arg0 = s.tmp_1; + s.callLocIdx = 463; s.pc = 25; return s.tmp_3; + case 25: + r0 = s.retval; + s.tmp_2 = r0; + s.tmp_5 = Math_clamp__P185339_mk(s); + r0 = (0 - s.maxMomentumDiff___192616); + s.tmp_5.arg0 = r0; + s.tmp_5.arg1 = s.maxMomentumDiff___192616; + s.tmp_5.arg2 = s.diffVx___192640; + s.callLocIdx = 462; s.pc = 26; return s.tmp_5; + case 26: + r0 = s.retval; + s.tmp_4 = r0; + r0 = (s.tmp_2 + s.tmp_4); + s.tmp_0.arg1 = r0; + s.callLocIdx = 464; s.pc = 24; return s.tmp_0; + case 24: + r0 = s.retval; + s.tmp_0 = Sprite_vy__P187249_mk(s); + s.tmp_1 = r0 = s.self___192575; + s.tmp_0.arg0 = r0; + s.tmp_3 = Sprite_vy__P187248_mk(s); + s.tmp_3.arg0 = s.tmp_1; + s.callLocIdx = 466; s.pc = 28; return s.tmp_3; + case 28: + r0 = s.retval; + s.tmp_2 = r0; + s.tmp_5 = Math_clamp__P185339_mk(s); + r0 = (0 - s.maxMomentumDiff___192616); + s.tmp_5.arg0 = r0; + s.tmp_5.arg1 = s.maxMomentumDiff___192616; + s.tmp_5.arg2 = s.diffVy___192645; + s.callLocIdx = 465; s.pc = 29; return s.tmp_5; + case 29: + r0 = s.retval; + s.tmp_4 = r0; + r0 = (s.tmp_2 + s.tmp_4); + s.tmp_0.arg1 = r0; + s.callLocIdx = 467; s.pc = 27; return s.tmp_0; + case 27: + r0 = s.retval; + case 7: + r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P195436.info = {"start":7534,"length":284,"line":191,"column":59,"endLine":195,"endColumn":5,"fileName":"pxt_modules/game/particleeffects.ts","functionName":"inline","argumentNames":["anchor","particlesPerSecond"]} +inline__P192571.info = {"start":30600,"length":1635,"line":912,"column":44,"endLine":946,"endColumn":17,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["fs"]} -function inline__P195436_mk(s) { +function inline__P192571_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P195436, depth: s.depth + 1, + parent: s, fn: inline__P192571, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -21209,16 +20231,27 @@ function inline__P195436_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - factory___195439: undefined, + tmp_6: undefined, + target___192574: undefined, + self___192575: undefined, + turnRate___192576: undefined, + rate___192577: undefined, + dx___192591: undefined, + dy___192597: undefined, + maxMomentumDiff___192616: undefined, + angleToTarget___192623: undefined, + targetTrajectoryVx___192628: undefined, + targetTrajectoryVy___192634: undefined, + diffVx___192640: undefined, + diffVy___192645: undefined, arg0: undefined, - arg1: undefined, } } -function particles_ParticleSource_constructor__P187900(s) { +function inline__P192678(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21228,166 +20261,46 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sources___195460 = undefined; - s.removedSource___195469 = 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__C187895_VT)) failedCast(r0); - s.tmp_0 = sprites_BaseSprite_constructor__P187077_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 1506; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - s.tmp_0 = particles_init__P189922_mk(s); - s.callLocIdx = 1507; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.tmp_0 = particles_particleSources__P189928_mk(s); - s.callLocIdx = 1508; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - s.sources___195460 = (r0); - r0 = pxsim_Array__length(s.sources___195460); + r0 = s.arg0.fields["self"]; + r0 = r0.fields["flags"]; + s.tmp_3 = r0; + r0 = s.arg0.fields["target"]; + r0 = r0.fields["flags"]; + 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.tmp_1 >= globals.MAX_SOURCES___189899); + 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_2 = particles_sortSources__P189925_mk(s); - s.tmp_2.arg0 = s.sources___195460; - s.callLocIdx = 1509; s.pc = 8; return s.tmp_2; - case 8: - r0 = s.retval; - r0 = pxsim_Array_.removeAt(s.sources___195460, 0); - s.removedSource___195469 = (r0); - s.tmp_0 = particles_ParticleSource_clear__P187910_mk(s); - s.tmp_0.arg0 = s.removedSource___195469; - s.callLocIdx = 1511; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; - s.tmp_0 = particles_ParticleSource_destroy__P187909_mk(s); - s.tmp_0.arg0 = s.removedSource___195469; - s.callLocIdx = 1512; s.pc = 10; return s.tmp_0; - case 10: - r0 = s.retval; - case 1: - case 2: - r0 = (s.arg0).fields["pFlags"] = (0); - s.tmp_0 = particles_ParticleSource_setRate__P187912_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg2; - s.callLocIdx = 1513; s.pc = 11; return s.tmp_0; - case 11: - r0 = s.retval; - s.tmp_0 = particles_ParticleSource_setAcceleration__P187904_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.tmp_0.arg2 = 0; - s.callLocIdx = 1514; s.pc = 12; return s.tmp_0; - case 12: - r0 = s.retval; - s.tmp_0 = particles_ParticleSource_setAnchor__P187911_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 1515; 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___187915; - case 4: - // jmp value (already in r0) - s.tmp_1 = r0; - s.tmp_2 = particles_ParticleSource_setFactory__P187914_mk(s); - s.tmp_2.arg0 = s.arg0; - s.tmp_2.arg1 = s.tmp_1; - s.callLocIdx = 1516; s.pc = 14; return s.tmp_2; - case 14: - r0 = s.retval; - r0 = pxsim_Array__push(s.sources___195460, s.arg0); - s.tmp_0 = particles_ParticleSource_enabled__P187908_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = true; - s.callLocIdx = 1517; s.pc = 15; return s.tmp_0; - case 15: - r0 = s.retval; - r0 = undefined; + r0 = pxsim_Boolean__bang(s.tmp_0); return leave(s, r0) default: oops() } } } -particles_ParticleSource_constructor__P187900.info = {"start":2290,"length":899,"line":86,"column":8,"endLine":109,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["this","anchor","particlesPerSecond","factory"]} +inline__P192678.info = {"start":32485,"length":67,"line":953,"column":32,"endLine":953,"endColumn":99,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["fs"]} -function particles_ParticleSource_constructor__P187900_mk(s) { +function inline__P192678_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_constructor__P187900, depth: s.depth + 1, + parent: s, fn: inline__P192678, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - sources___195460: undefined, - removedSource___195469: undefined, + tmp_3: undefined, + tmp_4: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, -} } - - - - - -function particles_particleSources__P189928(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.sources___195099 = undefined; - s.tmp_0 = game_currentScene__P187749_mk(s); - s.callLocIdx = 1568; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = r0.fields["particleSources"]; - s.sources___195099 = (r0); - r0 = s.sources___195099; - return leave(s, r0) - default: oops() -} } } -particles_particleSources__P189928.info = {"start":12831,"length":119,"line":420,"column":4,"endLine":423,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"particleSources","argumentNames":[]} - -function particles_particleSources__P189928_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: particles_particleSources__P189928, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - sources___195099: undefined, } } -function particles_sortSources__P189925(s) { +function inline__P192696(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21401,24 +20314,24 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = helpers_arraySort__P185320_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = inline__P195671; - s.callLocIdx = 1555; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; + r0 = s.arg0.fields["self"]; + r0 = r0.fields["id"]; + s.tmp_0 = r0; + r0 = s.caps[0].fields["id"]; + s.tmp_1 = r0; + r0 = (s.tmp_0 == s.tmp_1); return leave(s, r0) default: oops() } } } -particles_sortSources__P189925.info = {"start":10009,"length":129,"line":331,"column":4,"endLine":333,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"sortSources","argumentNames":["sources"]} +inline__P192696.info = {"start":32644,"length":27,"line":958,"column":44,"endLine":958,"endColumn":71,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["fs"]} -function particles_sortSources__P189925_mk(s) { +function inline__P192696_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_sortSources__P189925, depth: s.depth + 1, + parent: s, fn: inline__P192696, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, arg0: undefined, } } @@ -21426,7 +20339,7 @@ function particles_sortSources__P189925_mk(s) { -function inline__P195671(s) { +function sprites_FollowingSprite_constructor__P187190(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21439,53 +20352,40 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); s.lambdaArgs = null; } - r0 = s.arg0.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 = s.arg0; + if (!checkSubtype(r0, sprites_FollowingSprite__C187189_VT)) failedCast(r0); + r0 = (s.arg0).fields["self"] = (s.arg1); + r0 = (s.arg0).fields["target"] = (s.arg2); + r0 = (s.arg0).fields["rate"] = (s.arg3); + r0 = (s.arg0).fields["turnRate"] = (s.arg4); + r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P195671.info = {"start":10080,"length":50,"line":332,"column":21,"endLine":332,"endColumn":71,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["a","b"]} +sprites_FollowingSprite_constructor__P187190.info = {"start":401,"length":163,"line":18,"column":8,"endLine":23,"endColumn":13,"fileName":"pxt_modules/game/sprites.ts","functionName":"inline","argumentNames":["this","self","target","rate","turnRate"]} -function inline__P195671_mk(s) { +function sprites_FollowingSprite_constructor__P187190_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P195671, depth: s.depth + 1, + parent: s, fn: sprites_FollowingSprite_constructor__P187190, depth: s.depth + 1, pc: 0, retval: undefined, 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, } } -function helpers_arraySort__P185320(s) { +function helpers_arrayFind__P185326(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21495,51 +20395,60 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.len___192745 = undefined; + s.i___192748 = undefined; + s.v___192753 = 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 = pxsim_Array__length(s.arg0); - s.tmp_2 = r0; - r0 = (s.tmp_2 > 1); + s.len___192745 = (r0); + s.i___192748 = (0); + case 1: + r0 = (s.i___192748 < s.len___192745); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + r0 = pxsim_Array__getAt(s.arg0, s.i___192748); + s.v___192753 = (r0); + s.tmp_1 = lambda_3_mk(s); + s.tmp_1.argL = s.arg1; + s.tmp_1.arg0 = s.v___192753; + s.tmp_1.arg1 = s.i___192748; + 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___192753; + { step = 5; continue; } case 2: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 3; continue; } - s.arg1 = (inline__P195694); case 3: + r0 = (s.i___192748 + 1); + s.i___192748 = (r0); + { step = 1; continue; } case 4: - s.tmp_0 = helpers_sortHelper__P189174_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 3; s.pc = 5; return s.tmp_0; + r0 = undefined; case 5: - r0 = s.retval; return leave(s, r0) default: oops() } } } -helpers_arraySort__P185320.info = {"start":5663,"length":859,"line":207,"column":4,"endLine":227,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arraySort","argumentNames":["arr","callbackfn"]} +helpers_arrayFind__P185326.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 helpers_arraySort__P185320_mk(s) { +function helpers_arrayFind__P185326_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arraySort__P185320, depth: s.depth + 1, + parent: s, fn: helpers_arrayFind__P185326, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, + len___192745: undefined, + i___192748: undefined, + v___192753: undefined, arg0: undefined, arg1: undefined, } } @@ -21548,7 +20457,7 @@ function helpers_arraySort__P185320_mk(s) { -function inline__P195694(s) { +function Sprite_kind__P187287(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21558,142 +20467,31 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.aIsUndef___195697 = undefined; - s.bIsUndef___195701 = undefined; - s.aIsNull___195712 = undefined; - s.bIsNull___195716 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg0 === undefined); - s.aIsUndef___195697 = (r0); - r0 = (s.arg1 === undefined); - s.bIsUndef___195701 = (r0); - s.tmp_0 = r0 = s.aIsUndef___195697; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } - case 1: - r0 = s.bIsUndef___195701; - 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___195697); - if (!r0) { step = 4; continue; } - r0 = 1; - { step = 17; continue; } - { step = 7; continue; } - case 4: - r0 = pxsim_numops_toBoolDecr(s.bIsUndef___195701); - if (!r0) { step = 5; continue; } - r0 = -1; - { step = 17; continue; } - case 5: - case 6: - case 7: - case 8: - r0 = (s.arg0 === null); - s.aIsNull___195712 = (r0); - r0 = (s.arg1 === null); - s.bIsNull___195716 = (r0); - s.tmp_0 = r0 = s.aIsNull___195712; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 9; continue; } - r0 = s.tmp_0; - { step = 10; continue; } - case 9: - r0 = s.bIsNull___195716; - 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___195712); - if (!r0) { step = 12; continue; } - r0 = 1; - { step = 17; continue; } - { step = 15; continue; } - case 12: - r0 = pxsim_numops_toBoolDecr(s.bIsNull___195716); - 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: + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); + r0 = s.arg0.fields["_kind"]; return leave(s, r0) default: oops() } } } -inline__P195694.info = {"start":5826,"length":636,"line":209,"column":25,"endLine":224,"endColumn":13,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"inline","argumentNames":["a","b"]} +Sprite_kind__P187287.info = {"start":10604,"length":41,"line":387,"column":4,"endLine":389,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"kind","argumentNames":["this"]} -function inline__P195694_mk(s) { +function Sprite_kind__P187287_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P195694, depth: s.depth + 1, + parent: s, fn: Sprite_kind__P187287, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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___195697: undefined, - bIsUndef___195701: undefined, - aIsNull___195712: undefined, - bIsNull___195716: undefined, arg0: undefined, - arg1: undefined, } } -function helpers_sortHelper__P189174(s) { +function spriteutils_distanceBetween__P188849(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21703,17 +20501,14 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.len___195751 = undefined; - s.i___195754 = undefined; - s.j___195760 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_Array__length(s.arg0); + r0 = pxsim_numops_toBoolDecr(s.arg0); s.tmp_1 = r0; - r0 = (s.tmp_1 <= 0); + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBool(s.tmp_0); if (!r0) { step = 1; continue; } @@ -21728,138 +20523,82 @@ switch (step) { s.tmp_3 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_3); if (!r0) { step = 3; continue; } - r0 = s.arg0; - { step = 11; continue; } + r0 = 0; + { step = 5; continue; } case 3: case 4: - r0 = pxsim_Array__length(s.arg0); - s.len___195751 = (r0); - s.i___195754 = (0); - case 5: - s.tmp_1 = r0 = s.i___195754; - r0 = (s.len___195751 - 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___195754 + 1); - s.j___195760 = (r0); + s.tmp_8 = Sprite_x__P187242_mk(s); + s.tmp_8.arg0 = s.arg0; + s.callLocIdx = 1770; s.pc = 6; return s.tmp_8; case 6: - r0 = (s.j___195760 < s.len___195751); - 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___195754); - s.tmp_3.arg0 = r0; - r0 = pxsim_Array__getAt(s.arg0, s.j___195760); - 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__P189173_mk(s); - s.tmp_4.arg0 = s.arg0; - s.tmp_4.arg1 = s.i___195754; - s.tmp_4.arg2 = s.j___195760; - s.callLocIdx = 2; s.pc = 13; return s.tmp_4; - case 13: r0 = s.retval; + s.tmp_7 = r0; + s.tmp_10 = Sprite_x__P187242_mk(s); + s.tmp_10.arg0 = s.arg1; + s.callLocIdx = 1771; s.pc = 7; return s.tmp_10; case 7: + r0 = s.retval; + s.tmp_9 = r0; + r0 = (s.tmp_7 - s.tmp_9); + s.tmp_6 = r0; + r0 = pxsim.Math_.pow(s.tmp_6, 2); + s.tmp_5 = r0; + s.tmp_14 = Sprite_y__P187244_mk(s); + s.tmp_14.arg0 = s.arg0; + s.callLocIdx = 1772; s.pc = 8; return s.tmp_14; case 8: - r0 = (s.j___195760 + 1); - s.j___195760 = (r0); - { step = 6; continue; } - case 9: - r0 = (s.i___195754 + 1); - s.i___195754 = (r0); - { step = 5; continue; } - case 10: - r0 = s.arg0; - case 11: + r0 = s.retval; + s.tmp_13 = r0; + s.tmp_16 = Sprite_y__P187244_mk(s); + s.tmp_16.arg0 = s.arg1; + s.callLocIdx = 1773; s.pc = 9; return s.tmp_16; + case 9: + r0 = s.retval; + s.tmp_15 = r0; + r0 = (s.tmp_13 - s.tmp_15); + s.tmp_12 = r0; + r0 = pxsim.Math_.pow(s.tmp_12, 2); + s.tmp_11 = r0; + r0 = (s.tmp_5 + s.tmp_11); + s.tmp_4 = r0; + r0 = pxsim.Math_.sqrt(s.tmp_4); + case 5: return leave(s, r0) default: oops() } } } -helpers_sortHelper__P189174.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"]} +spriteutils_distanceBetween__P188849.info = {"start":1088,"length":168,"line":36,"column":4,"endLine":39,"endColumn":5,"fileName":"pxt_modules/arcade-sprite-util/spriteutils.ts","functionName":"distanceBetween","argumentNames":["a","b"]} -function helpers_sortHelper__P189174_mk(s) { +function spriteutils_distanceBetween__P188849_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_sortHelper__P189174, depth: s.depth + 1, + parent: s, fn: spriteutils_distanceBetween__P188849, depth: s.depth + 1, pc: 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___195751: undefined, - i___195754: undefined, - j___195760: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function helpers_swap__P189173(s) { -let r0 = s.r0, 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.temp___195789 = 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___195789 = (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___195789); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -helpers_swap__P189173.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__P189173_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: helpers_swap__P189173, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - temp___195789: 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, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function particles_init__P189922(s) { +function update_minimap__P395137(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21869,59 +20608,148 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___195801 = undefined; - s.tmp_0 = game_currentScene__P187749_mk(s); - s.callLocIdx = 1545; s.pc = 4; return s.tmp_0; - case 4: + s.sprite___395144 = undefined; + s.unnamed19240___U1 = undefined; + s.unnamed19241___U2 = undefined; + s.sprite___395153 = undefined; + s.unnamed19242___U4 = undefined; + s.unnamed19243___U5 = undefined; + s.sprite___395162 = undefined; + s.unnamed19244___U7 = undefined; + s.unnamed19245___U8 = undefined; + s.tmp_0 = minimap_minimap__P188832_mk(s); + s.tmp_0.arg0 = 3; + s.tmp_0.arg1 = 2; + s.tmp_0.arg2 = 11; + s.callLocIdx = 175; s.pc = 7; return s.tmp_0; + case 7: r0 = s.retval; - s.scene___195801 = (r0); - r0 = s.scene___195801.fields["particleSources"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 3; continue; } + globals.map___395139 = (r0); + s.sprite___395144 = (undefined); + s.tmp_0 = sprites_allOfKind__P187192_mk(s); + s.tmp_0.arg0 = globals.NPC___394652; + s.callLocIdx = 176; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + s.unnamed19240___U1 = (r0); + s.unnamed19241___U2 = (0); case 1: + s.tmp_0 = r0 = s.unnamed19241___U2; + r0 = pxsim_Array__length(s.unnamed19240___U1); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 2; continue; } + r0 = pxsim_Array__getAt(s.unnamed19240___U1, s.unnamed19241___U2); + s.sprite___395144 = (r0); + s.tmp_2 = minimap_includeSprite__P188834_mk(s); + s.tmp_2.arg0 = globals.map___395139; + s.tmp_2.arg1 = s.sprite___395144; + s.tmp_2.arg2 = 0; + s.callLocIdx = 177; s.pc = 9; return s.tmp_2; + case 9: + r0 = s.retval; + r0 = (s.unnamed19241___U2 + 1); + s.unnamed19241___U2 = (r0); + { step = 1; continue; } case 2: - s.tmp_1 = r0 = s.scene___195801; - r0 = pxsim_Array__mk(); - s.tmp_2 = r0; - r0 = (s.tmp_1).fields["particleSources"] = (s.tmp_2); - r0 = pxsim.control.millis(); - globals.lastUpdate___189917 = (r0); - s.tmp_0 = game_onUpdate__P187760_mk(s); - s.tmp_0.arg0 = particles_updateParticles__P189923; - s.callLocIdx = 1546; s.pc = 5; return s.tmp_0; + s.unnamed19240___U1 = (undefined); + s.sprite___395153 = (undefined); + s.tmp_0 = sprites_allOfKind__P187192_mk(s); + s.tmp_0.arg0 = globals.SurvivedNPC___394661; + s.callLocIdx = 178; s.pc = 10; return s.tmp_0; + case 10: + r0 = s.retval; + s.unnamed19242___U4 = (r0); + s.unnamed19243___U5 = (0); + case 3: + s.tmp_0 = r0 = s.unnamed19243___U5; + r0 = pxsim_Array__length(s.unnamed19242___U4); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 4; continue; } + r0 = pxsim_Array__getAt(s.unnamed19242___U4, s.unnamed19243___U5); + s.sprite___395153 = (r0); + s.tmp_2 = minimap_includeSprite__P188834_mk(s); + s.tmp_2.arg0 = globals.map___395139; + s.tmp_2.arg1 = s.sprite___395153; + s.tmp_2.arg2 = 0; + s.callLocIdx = 179; s.pc = 11; return s.tmp_2; + case 11: + r0 = s.retval; + r0 = (s.unnamed19243___U5 + 1); + s.unnamed19243___U5 = (r0); + { step = 3; continue; } + case 4: + s.unnamed19242___U4 = (undefined); + s.sprite___395162 = (undefined); + s.tmp_0 = sprites_allOfKind__P187192_mk(s); + s.tmp_0.arg0 = globals.Enemy___187348; + s.callLocIdx = 180; s.pc = 12; return s.tmp_0; + case 12: + r0 = s.retval; + s.unnamed19244___U7 = (r0); + s.unnamed19245___U8 = (0); case 5: + s.tmp_0 = r0 = s.unnamed19245___U8; + r0 = pxsim_Array__length(s.unnamed19244___U7); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 6; continue; } + r0 = pxsim_Array__getAt(s.unnamed19244___U7, s.unnamed19245___U8); + s.sprite___395162 = (r0); + s.tmp_2 = minimap_includeSprite__P188834_mk(s); + s.tmp_2.arg0 = globals.map___395139; + s.tmp_2.arg1 = s.sprite___395162; + s.tmp_2.arg2 = 0; + s.callLocIdx = 181; s.pc = 13; return s.tmp_2; + case 13: r0 = s.retval; - s.tmp_0 = game_onUpdateInterval__P187761_mk(s); - s.tmp_0.arg0 = 250; - s.tmp_0.arg1 = particles_pruneParticles__P189924; - s.callLocIdx = 1547; s.pc = 6; return s.tmp_0; + r0 = (s.unnamed19245___U8 + 1); + s.unnamed19245___U8 = (r0); + { step = 5; continue; } case 6: + s.unnamed19244___U7 = (undefined); + s.tmp_0 = minimap_includeSprite__P188834_mk(s); + s.tmp_0.arg0 = globals.map___395139; + s.tmp_0.arg1 = globals.sprite_player_fish___395118; + s.tmp_0.arg2 = 0; + s.callLocIdx = 182; s.pc = 14; return s.tmp_0; + case 14: + r0 = s.retval; + s.tmp_0 = minimap_getImage__P188833_mk(s); + s.tmp_0.arg0 = globals.map___395139; + s.callLocIdx = 183; s.pc = 15; return s.tmp_0; + case 15: r0 = s.retval; - case 3: - r0 = undefined; return leave(s, r0) default: oops() } } } -particles_init__P189922.info = {"start":9219,"length":276,"line":303,"column":4,"endLine":310,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"init","argumentNames":[]} +update_minimap__P395137.info = {"start":16268,"length":637,"line":303,"column":0,"endLine":316,"endColumn":1,"fileName":"main.ts","functionName":"update_minimap","argumentNames":[]} -function particles_init__P189922_mk(s) { +function update_minimap__P395137_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_init__P189922, depth: s.depth + 1, + parent: s, fn: update_minimap__P395137, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - scene___195801: undefined, + sprite___395144: undefined, + unnamed19240___U1: undefined, + unnamed19241___U2: undefined, + sprite___395153: undefined, + unnamed19242___U4: undefined, + unnamed19243___U5: undefined, + sprite___395162: undefined, + unnamed19244___U7: undefined, + unnamed19245___U8: undefined, } } -function particles_pruneParticles__P189924(s) { +function minimap_getImage__P188833(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21931,51 +20759,41 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sources___194936 = undefined; - s.tmp_0 = particles_particleSources__P189928_mk(s); - s.callLocIdx = 1551; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.sources___194936 = (r0); - r0 = pxsim_numops_toBoolDecr(s.sources___194936); - if (!r0) { step = 1; continue; } - s.tmp_0 = helpers_arrayForEach__P185324_mk(s); - s.tmp_1 = helpers_arraySlice__P185329_mk(s); - s.tmp_1.arg0 = s.sources___194936; - s.tmp_1.arg1 = 0; - r0 = pxsim_Array__length(s.sources___194936); - s.tmp_1.arg2 = r0; - s.callLocIdx = 1552; s.pc = 5; return s.tmp_1; - case 5: - r0 = s.retval; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = inline__P194945; - s.callLocIdx = 1554; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + s.tmp_0 = if_image_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, "image"); + } else { + s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["image"]; + if (s.tmp_0.fn == null) { s.retval = s.tmp_0.arg0.fields["image"]; } + else if (!s.tmp_0.fn.isGetter) { s.retval = bind(s.tmp_0); } + else { s.callLocIdx = 1751; s.pc = 1; return s.tmp_0; } + } case 1: - case 2: - r0 = undefined; + r0 = s.retval; return leave(s, r0) default: oops() } } } -particles_pruneParticles__P189924.info = {"start":9847,"length":156,"line":326,"column":4,"endLine":329,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"pruneParticles","argumentNames":[]} +minimap_getImage__P188833.info = {"start":2905,"length":86,"line":92,"column":4,"endLine":94,"endColumn":5,"fileName":"pxt_modules/arcade-minimap/minimap.ts","functionName":"getImage","argumentNames":["minimap"]} -function particles_pruneParticles__P189924_mk(s) { +function minimap_getImage__P188833_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_pruneParticles__P189924, depth: s.depth + 1, + parent: s, fn: minimap_getImage__P188833, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - sources___194936: undefined, + arg0: undefined, } } -function inline__P194945(s) { +function minimap_includeSprite__P188834(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21985,35 +20803,186 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.scale___200466 = undefined; + s.x___200473 = undefined; + s.y___200490 = 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 = particles_ParticleSource__prune__P187903_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1553; s.pc = 1; return s.tmp_0; + s.tmp_0 = Math_max__P185342_mk(s); + s.tmp_2 = if_scale_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, "scale"); + } else { + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["scale"]; + if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["scale"]; } + else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } + else { s.callLocIdx = 1752; s.pc = 2; return s.tmp_2; } + } + case 2: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_1 - s.arg2); + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 1753; s.pc = 1; return s.tmp_0; case 1: + r0 = s.retval; + s.scale___200466 = (r0); + s.tmp_3 = Sprite_x__P187242_mk(s); + s.tmp_3.arg0 = s.arg1; + s.callLocIdx = 1754; s.pc = 3; return s.tmp_3; + case 3: + r0 = s.retval; + s.tmp_2 = r0; + s.tmp_5 = if_scale_1_mk(s); + s.tmp_5.arg0 = s.arg0; + if (!s.tmp_5.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "scale"); + } else { + s.tmp_5.fn = s.tmp_5.arg0.vtable.iface["scale"]; + if (s.tmp_5.fn == null) { s.retval = s.tmp_5.arg0.fields["scale"]; } + else if (!s.tmp_5.fn.isGetter) { s.retval = bind(s.tmp_5); } + else { s.callLocIdx = 1755; s.pc = 4; return s.tmp_5; } + } + case 4: + r0 = s.retval; + s.tmp_4 = r0; + r0 = (s.tmp_2 >> s.tmp_4); + s.tmp_1 = r0; + r0 = s.arg1.fields["_image"]; + s.tmp_9 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_9); + s.tmp_8 = r0; + r0 = (s.tmp_8 / 2); + s.tmp_7 = r0; + r0 = (s.tmp_7 >> s.scale___200466); + s.tmp_6 = r0; + r0 = (s.tmp_1 - s.tmp_6); + s.tmp_0 = r0; + s.tmp_11 = if_borderWidth_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, "borderWidth"); + } else { + s.tmp_11.fn = s.tmp_11.arg0.vtable.iface["borderWidth"]; + if (s.tmp_11.fn == null) { s.retval = s.tmp_11.arg0.fields["borderWidth"]; } + else if (!s.tmp_11.fn.isGetter) { s.retval = bind(s.tmp_11); } + else { s.callLocIdx = 1757; s.pc = 5; return s.tmp_11; } + } + case 5: + r0 = s.retval; + s.tmp_10 = r0; + r0 = (s.tmp_0 + s.tmp_10); + s.x___200473 = (r0); + s.tmp_3 = Sprite_y__P187244_mk(s); + s.tmp_3.arg0 = s.arg1; + s.callLocIdx = 1758; s.pc = 6; return s.tmp_3; + case 6: + r0 = s.retval; + s.tmp_2 = r0; + s.tmp_5 = if_scale_1_mk(s); + s.tmp_5.arg0 = s.arg0; + if (!s.tmp_5.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "scale"); + } else { + s.tmp_5.fn = s.tmp_5.arg0.vtable.iface["scale"]; + if (s.tmp_5.fn == null) { s.retval = s.tmp_5.arg0.fields["scale"]; } + else if (!s.tmp_5.fn.isGetter) { s.retval = bind(s.tmp_5); } + else { s.callLocIdx = 1759; s.pc = 7; return s.tmp_5; } + } + case 7: + r0 = s.retval; + s.tmp_4 = r0; + r0 = (s.tmp_2 >> s.tmp_4); + s.tmp_1 = r0; + r0 = s.arg1.fields["_image"]; + s.tmp_9 = r0; + r0 = pxsim_ImageMethods.height(s.tmp_9); + s.tmp_8 = r0; + r0 = (s.tmp_8 / 2); + s.tmp_7 = r0; + r0 = (s.tmp_7 >> s.scale___200466); + s.tmp_6 = r0; + r0 = (s.tmp_1 - s.tmp_6); + s.tmp_0 = r0; + s.tmp_11 = if_borderWidth_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, "borderWidth"); + } else { + s.tmp_11.fn = s.tmp_11.arg0.vtable.iface["borderWidth"]; + if (s.tmp_11.fn == null) { s.retval = s.tmp_11.arg0.fields["borderWidth"]; } + else if (!s.tmp_11.fn.isGetter) { s.retval = bind(s.tmp_11); } + else { s.callLocIdx = 1761; s.pc = 8; return s.tmp_11; } + } + case 8: + r0 = s.retval; + s.tmp_10 = r0; + r0 = (s.tmp_0 + s.tmp_10); + s.y___200490 = (r0); + s.tmp_0 = minimap_renderScaledImage__P191289_mk(s); + r0 = s.arg1.fields["_image"]; + s.tmp_0.arg0 = r0; + s.tmp_1 = if_image_1_mk(s); + s.tmp_1.arg0 = s.arg0; + if (!s.tmp_1.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "image"); + } else { + s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["image"]; + if (s.tmp_1.fn == null) { s.retval = s.tmp_1.arg0.fields["image"]; } + else if (!s.tmp_1.fn.isGetter) { s.retval = bind(s.tmp_1); } + else { s.callLocIdx = 1763; s.pc = 10; return s.tmp_1; } + } + case 10: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = s.x___200473; + s.tmp_0.arg3 = s.y___200490; + s.tmp_0.arg4 = s.scale___200466; + s.callLocIdx = 1764; s.pc = 9; return s.tmp_0; + case 9: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P194945.info = {"start":9980,"length":15,"line":328,"column":62,"endLine":328,"endColumn":77,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["s"]} +minimap_includeSprite__P188834.info = {"start":3241,"length":451,"line":102,"column":4,"endLine":107,"endColumn":5,"fileName":"pxt_modules/arcade-minimap/minimap.ts","functionName":"includeSprite","argumentNames":["minimap","sprite","spriteScale"]} -function inline__P194945_mk(s) { +function minimap_includeSprite__P188834_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P194945, depth: s.depth + 1, + parent: s, fn: minimap_includeSprite__P188834, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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, + scale___200466: undefined, + x___200473: undefined, + y___200490: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function particles_ParticleSource__prune__P187903(s) { +function minimap_renderScaledImage__P191289(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22023,137 +20992,82 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___194975 = undefined; - s.sources___194983 = undefined; - s.current___194997 = undefined; + s.tile___200520 = undefined; + s.i___200522 = undefined; + s.j___200528 = 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_ParticleSource__C187895_VT)) failedCast(r0); + s.tile___200520 = (s.arg0); + s.i___200522 = (0); case 1: - r0 = s.arg0.fields["head"]; + s.tmp_1 = r0 = s.i___200522; + r0 = pxsim_ImageMethods.width(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 = 2; continue; } - r0 = s.tmp_0; - { step = 3; continue; } + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 6; continue; } + s.j___200528 = (0); 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_1 = r0 = s.j___200528; + r0 = pxsim_ImageMethods.height(s.arg0); 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); + r0 = (s.tmp_1 < s.tmp_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"]; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + r0 = pxsim_ImageMethods.getPixel(s.arg0, s.i___200522, s.j___200528); + s.tmp_4 = r0; + r0 = (s.tmp_4 != 0); 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__P187749_mk(s); - s.callLocIdx = 1526; s.pc = 21; return s.tmp_5; - case 21: - r0 = s.retval; - s.scene___194975 = (r0); - r0 = pxsim_numops_toBoolDecr(s.scene___194975); - if (!r0) { step = 7; continue; } - r0 = s.scene___194975.fields["allSprites"]; - s.tmp_0 = r0; - r0 = pxsim_Array_.removeElement(s.tmp_0, s.arg0); - case 7: - case 8: - s.tmp_0 = particles_particleSources__P189928_mk(s); - s.callLocIdx = 1527; s.pc = 22; return s.tmp_0; - case 22: - r0 = s.retval; - s.sources___194983 = (r0); - s.tmp_0 = r0 = s.sources___194983; - 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___194983); - case 10: - // jmp value (already in r0) + if (!r0) { step = 3; continue; } + s.tmp_5 = r0 = s.arg1; + s.tmp_7 = r0 = s.arg2; + r0 = (s.i___200522 >> s.arg4); + s.tmp_8 = r0; + r0 = (s.tmp_7 + s.tmp_8); + s.tmp_6 = r0; + s.tmp_10 = r0 = s.arg3; + r0 = (s.j___200528 >> s.arg4); + s.tmp_11 = r0; + r0 = (s.tmp_10 + s.tmp_11); + s.tmp_9 = r0; + r0 = pxsim_ImageMethods.getPixel(s.arg0, s.i___200522, s.j___200528); + s.tmp_12 = r0; + r0 = pxsim_ImageMethods.setPixel(s.tmp_5, s.tmp_6, s.tmp_9, s.tmp_12); + case 3: + case 4: + s.tmp_0 = r0 = s.j___200528; + r0 = (1 << s.arg4); s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 11; continue; } - r0 = pxsim_Array_.removeElement(s.sources___194983, 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___194997 = (r0); - case 15: - s.tmp_0 = r0 = s.current___194997; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 16; continue; } - r0 = s.tmp_0; - { step = 17; continue; } - case 16: - r0 = s.current___194997.fields["next"]; - case 17: - // jmp value (already in r0) + r0 = (s.tmp_0 + s.tmp_1); + s.j___200528 = (r0); + { step = 2; continue; } + case 5: + s.tmp_0 = r0 = s.i___200522; + r0 = (1 << s.arg4); s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 20; continue; } - r0 = s.current___194997.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___194997.fields["next"]; - r0 = r0.fields["next"]; - s.tmp_4 = r0; - r0 = (s.current___194997).fields["next"] = (s.tmp_4); - { step = 19; continue; } - case 18: - r0 = s.current___194997.fields["next"]; - s.current___194997 = (r0); - case 19: - { step = 15; continue; } - case 20: + r0 = (s.tmp_0 + s.tmp_1); + s.i___200522 = (r0); + { step = 1; continue; } + case 6: r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ParticleSource__prune__P187903.info = {"start":5087,"length":830,"line":165,"column":8,"endLine":188,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"_prune","argumentNames":["this"]} +minimap_renderScaledImage__P191289.info = {"start":544,"length":459,"line":26,"column":4,"endLine":35,"endColumn":5,"fileName":"pxt_modules/arcade-minimap/minimap.ts","functionName":"renderScaledImage","argumentNames":["source","destination","x","y","scale"]} -function particles_ParticleSource__prune__P187903_mk(s) { +function minimap_renderScaledImage__P191289_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource__prune__P187903, depth: s.depth + 1, + parent: s, fn: minimap_renderScaledImage__P191289, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -22161,17 +21075,28 @@ function particles_ParticleSource__prune__P187903_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - scene___194975: undefined, - sources___194983: undefined, - current___194997: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, + tmp_11: undefined, + tmp_12: undefined, + tile___200520: undefined, + i___200522: undefined, + j___200528: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, } } -function helpers_arraySlice__P185329(s) { +function Sprite_height__P187278(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22181,114 +21106,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.res___195020 = undefined; - s.len___195022 = undefined; - s.i___195056 = 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___195020 = (r0); - r0 = pxsim_Array__length(s.arg0); - s.len___195022 = (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__P185342_mk(s); - r0 = (s.len___195022 + 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___195022); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - r0 = s.res___195020; - { 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___195022); - { 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___195022 + s.arg2); - s.arg2 = (r0); - case 8: - case 9: - case 10: - r0 = (s.arg2 > s.len___195022); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 11; continue; } - s.arg2 = (s.len___195022); - case 11: - case 12: - s.i___195056 = (s.arg1); - case 13: - r0 = (s.i___195056 < s.arg2); + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); + r0 = s.arg0.fields["_image"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 14; continue; } - s.tmp_1 = r0 = s.res___195020; - r0 = pxsim_Array__getAt(s.arg0, s.i___195056); - s.tmp_2 = r0; - r0 = pxsim_Array__push(s.tmp_1, s.tmp_2); - r0 = (s.i___195056 + 1); - s.i___195056 = (r0); - { step = 13; continue; } - case 14: - r0 = s.res___195020; - case 15: - return leave(s, r0) + r0 = pxsim_ImageMethods.height(s.tmp_0); + return leaveAccessor(s, r0) default: oops() } } } -helpers_arraySlice__P185329.info = {"start":8909,"length":690,"line":299,"column":4,"endLine":324,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arraySlice","argumentNames":["arr","start","end"]} +Sprite_height__P187278.info = {"start":8639,"length":54,"line":314,"column":4,"endLine":316,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"height","argumentNames":["this"]} +Sprite_height__P187278.isGetter = true; -function helpers_arraySlice__P185329_mk(s) { +function Sprite_height__P187278_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arraySlice__P185329, depth: s.depth + 1, + parent: s, fn: Sprite_height__P187278, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - res___195020: undefined, - len___195022: undefined, - i___195056: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function particles_updateParticles__P189923(s) { +function Sprite_width__P187277(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22298,81 +21144,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sources___195842 = undefined; - s.time___195849 = undefined; - s.dt___195852 = undefined; - s.i___195858 = undefined; - s.tmp_0 = particles_particleSources__P189928_mk(s); - s.callLocIdx = 1548; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.sources___195842 = (r0); - r0 = pxsim_numops_toBoolDecr(s.sources___195842); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 5; continue; } - case 1: - case 2: - s.tmp_2 = particles_sortSources__P189925_mk(s); - s.tmp_2.arg0 = s.sources___195842; - s.callLocIdx = 1549; s.pc = 7; return s.tmp_2; - case 7: - r0 = s.retval; - r0 = pxsim.control.millis(); - s.time___195849 = (r0); - r0 = (s.time___195849 - globals.lastUpdate___189917); - s.dt___195852 = (r0); - globals.lastUpdate___189917 = (s.time___195849); - s.i___195858 = (0); - case 3: - s.tmp_1 = r0 = s.i___195858; - r0 = pxsim_Array__length(s.sources___195842); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); + r0 = s.arg0.fields["_image"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - s.tmp_3 = particles_ParticleSource__update__P187902_mk(s); - r0 = pxsim_Array__getAt(s.sources___195842, s.i___195858); - s.tmp_3.arg0 = r0; - s.tmp_3.arg1 = s.dt___195852; - s.callLocIdx = 1550; s.pc = 8; return s.tmp_3; - case 8: - r0 = s.retval; - r0 = (s.i___195858 + 1); - s.i___195858 = (r0); - { step = 3; continue; } - case 4: - case 5: - r0 = undefined; - return leave(s, r0) + r0 = pxsim_ImageMethods.width(s.tmp_0); + return leaveAccessor(s, r0) default: oops() } } } -particles_updateParticles__P189923.info = {"start":9501,"length":340,"line":312,"column":4,"endLine":324,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"updateParticles","argumentNames":[]} +Sprite_width__P187277.info = {"start":8494,"length":52,"line":309,"column":4,"endLine":311,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"width","argumentNames":["this"]} +Sprite_width__P187277.isGetter = true; -function particles_updateParticles__P189923_mk(s) { +function Sprite_width__P187277_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_updateParticles__P189923, depth: s.depth + 1, + parent: s, fn: Sprite_width__P187277, depth: s.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___195842: undefined, - time___195849: undefined, - dt___195852: undefined, - i___195858: undefined, + arg0: undefined, } } -function particles_ParticleSource__update__P187902(s) { +function minimap_minimap__P188832(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22382,245 +21182,169 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.p___195921 = undefined; - s.current___195940 = undefined; - s.fixedDt___195948 = undefined; + s.tilemap___200575 = undefined; + s.numRows___200586 = undefined; + s.numCols___200593 = undefined; + s.tileWidth___200600 = undefined; + s.minimap___200605 = undefined; + s.r___200632 = undefined; + s.c___200637 = undefined; + s.idx___200642 = undefined; + s.tile___200648 = undefined; + s.nx___200653 = undefined; + s.ny___200662 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C187895_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_0 = game_currentScene__P187749_mk(s); + s.callLocIdx = 1742; s.pc = 10; return s.tmp_0; + case 10: + r0 = s.retval; + r0 = r0.fields["tileMap"]; + s.tilemap___200575 = (r0); + r0 = pxsim_numops_toBoolDecr(s.tilemap___200575); 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 = (s.arg0).fields["lifespan"] = (undefined); - s.tmp_0 = particles_ParticleSource_destroy__P187909_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1521; s.pc = 28; return s.tmp_0; - case 28: - r0 = s.retval; + r0 = pxsim_pxtrt.mkMap(); + s.tmp_2 = r0; + r0 = pxsim.image.create(1, 1); + s.tmp_3 = r0; + r0 = pxsim_pxtrt.mapSetByString(s.tmp_2, "image", s.tmp_3); + r0 = pxsim_pxtrt.mapSetByString(s.tmp_2, "scale", s.arg0); + r0 = pxsim_pxtrt.mapSetByString(s.tmp_2, "borderWidth", s.arg1); + r0 = pxsim_pxtrt.mapSetByString(s.tmp_2, "borderColor", s.arg2); + r0 = s.tmp_2; + { step = 9; continue; } case 1: case 2: - { step = 10; continue; } - case 3: - r0 = s.arg0.fields["anchor"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 4; continue; } - r0 = s.tmp_0; - { step = 5; continue; } - case 4: - s.tmp_2 = if_flags_1_mk(s); - r0 = s.arg0.fields["anchor"]; - s.tmp_2.arg0 = r0; - if (!s.tmp_2.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "flags"); - } else { - s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["flags"]; - if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["flags"]; } - else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } - else { s.callLocIdx = 1522; 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 = 1523; s.pc = 30; return s.tmp_5; } - } - case 30: + s.tmp_5 = tiles_TileMap_areaHeight__P187541_mk(s); + s.tmp_5.arg0 = s.tilemap___200575; + s.callLocIdx = 1743; s.pc = 11; return s.tmp_5; + case 11: r0 = s.retval; s.tmp_4 = r0; - r0 = (s.tmp_4 & 2); - case 7: - // jmp value (already in r0) + r0 = s.tilemap___200575.fields["_scale"]; 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; } + r0 = (s.tmp_4 >> s.tmp_6); + s.numRows___200586 = (r0); + s.tmp_1 = tiles_TileMap_areaWidth__P187540_mk(s); + s.tmp_1.arg0 = s.tilemap___200575; + s.callLocIdx = 1745; s.pc = 12; return s.tmp_1; case 12: - s.tmp_2 = particles_ParticleSource_enabled__P187907_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 1524; 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__C187931_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__C187931_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___195921 = (r0); - r0 = pxsim_numops_toBoolDecr(s.p___195921); - 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___195921).fields["next"] = (s.tmp_2); - r0 = (s.arg0).fields["head"] = (s.p___195921); - { step = 11; continue; } - case 16: - r0 = s.arg0.fields["head"]; + r0 = s.tilemap___200575.fields["_scale"]; 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_0 >> s.tmp_2); + s.numCols___200593 = (r0); + r0 = s.tilemap___200575.fields["_scale"]; 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___195940 = (r0); - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["_dt"]; + r0 = (1 << s.tmp_0); + s.tileWidth___200600 = (r0); + r0 = (s.numCols___200593 * s.tileWidth___200600); s.tmp_2 = r0; - r0 = (s.tmp_2 + s.arg1); + r0 = (s.tmp_2 >> s.arg0); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_dt"] = (s.tmp_1); - r0 = s.arg0.fields["_dt"]; + r0 = (s.arg1 * 2); + s.tmp_3 = r0; + r0 = (s.tmp_1 + s.tmp_3); s.tmp_0 = r0; - r0 = (s.tmp_0 * 256); - s.tmp_1 = r0; - r0 = (s.tmp_1 | 0); - s.fixedDt___195948 = (r0); - r0 = pxsim_numops_toBoolDecr(s.fixedDt___195948); - if (!r0) { step = 23; continue; } - case 19: - r0 = s.current___195940.fields["lifespan"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 > 0); + r0 = (s.numRows___200586 * s.tileWidth___200600); + s.tmp_6 = r0; + r0 = (s.tmp_6 >> s.arg0); + s.tmp_5 = r0; + r0 = (s.arg1 * 2); + s.tmp_7 = r0; + r0 = (s.tmp_5 + s.tmp_7); + s.tmp_4 = r0; + r0 = pxsim.image.create(s.tmp_0, s.tmp_4); + s.minimap___200605 = (r0); + r0 = (s.arg1 > 0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 20; continue; } - s.tmp_2 = r0 = s.current___195940; - 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__C187895_v4_3_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.current___195940; - s.tmp_0.arg2 = s.fixedDt___195948; - if (!checkSubtype(s.tmp_0.arg0, particles_ParticleSource__C187895_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___195940.fields["next"]; + if (!r0) { step = 3; continue; } + r0 = pxsim_ImageMethods.fill(s.minimap___200605, s.arg2); + case 3: + case 4: + s.r___200632 = (0); + case 5: + r0 = (s.r___200632 < s.numRows___200586); s.tmp_0 = r0; - s.current___195940 = (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___195940; - r0 = s.tmp_0.fields["lifespan"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 - s.arg1); + if (!r0) { step = 8; continue; } + s.c___200637 = (0); + case 6: + r0 = (s.c___200637 < s.numCols___200593); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; continue; } + s.tmp_1 = tiles_TileMap_getTileIndex__P187547_mk(s); + s.tmp_1.arg0 = s.tilemap___200575; + s.tmp_1.arg1 = s.c___200637; + s.tmp_1.arg2 = s.r___200632; + s.callLocIdx = 1748; s.pc = 13; return s.tmp_1; + case 13: + r0 = s.retval; + s.idx___200642 = (r0); + s.tmp_0 = tiles_TileMap_getTileImage__P187556_mk(s); + s.tmp_0.arg0 = s.tilemap___200575; + s.tmp_0.arg1 = s.idx___200642; + s.callLocIdx = 1749; s.pc = 14; return s.tmp_0; + case 14: + r0 = s.retval; + s.tile___200648 = (r0); + r0 = (s.c___200637 * s.tileWidth___200600); + s.tmp_1 = r0; + r0 = (s.tmp_1 >> s.arg0); + s.tmp_0 = r0; + r0 = (s.tmp_0 + s.arg1); + s.nx___200653 = (r0); + r0 = (s.r___200632 * s.tileWidth___200600); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["lifespan"] = (s.tmp_1); - r0 = s.current___195940.fields["next"]; + r0 = (s.tmp_1 >> s.arg0); s.tmp_0 = r0; - s.current___195940 = (r0); - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 25; continue; } - { step = 24; continue; } - case 25: - case 26: - case 27: - r0 = undefined; + r0 = (s.tmp_0 + s.arg1); + s.ny___200662 = (r0); + s.tmp_0 = minimap_renderScaledImage__P191289_mk(s); + s.tmp_0.arg0 = s.tile___200648; + s.tmp_0.arg1 = s.minimap___200605; + s.tmp_0.arg2 = s.nx___200653; + s.tmp_0.arg3 = s.ny___200662; + s.tmp_0.arg4 = s.arg0; + s.callLocIdx = 1750; s.pc = 15; return s.tmp_0; + case 15: + r0 = s.retval; + r0 = (s.c___200637 + 1); + s.c___200637 = (r0); + { step = 6; continue; } + case 7: + r0 = (s.r___200632 + 1); + s.r___200632 = (r0); + { step = 5; continue; } + case 8: + r0 = pxsim_pxtrt.mkMap(); + s.tmp_0 = r0; + r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "image", s.minimap___200605); + r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "scale", s.arg0); + r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "borderWidth", s.arg1); + r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "borderColor", s.arg2); + r0 = s.tmp_0; + case 9: return leave(s, r0) default: oops() } } } -particles_ParticleSource__update__P187902.info = {"start":3677,"length":1400,"line":123,"column":8,"endLine":163,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"_update","argumentNames":["this","dt"]} +minimap_minimap__P188832.info = {"start":1349,"length":1436,"line":45,"column":4,"endLine":87,"endColumn":5,"fileName":"pxt_modules/arcade-minimap/minimap.ts","functionName":"minimap","argumentNames":["scale","borderWidth","borderColor"]} -function particles_ParticleSource__update__P187902_mk(s) { +function minimap_minimap__P188832_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource__update__P187902, depth: s.depth + 1, + parent: s, fn: minimap_minimap__P188832, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -22630,18 +21354,27 @@ function particles_ParticleSource__update__P187902_mk(s) { tmp_5: undefined, tmp_6: undefined, tmp_7: undefined, - p___195921: undefined, - current___195940: undefined, - fixedDt___195948: undefined, + tilemap___200575: undefined, + numRows___200586: undefined, + numCols___200593: undefined, + tileWidth___200600: undefined, + minimap___200605: undefined, + r___200632: undefined, + c___200637: undefined, + idx___200642: undefined, + tile___200648: undefined, + nx___200653: undefined, + ny___200662: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function particles_ParticleSource_updateParticle__P189919(s) { +function forever__P187064(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22653,89 +21386,33 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C187895_VT)) failedCast(r0); - r0 = (s.arg2 >> 10); - s.arg2 = (r0); - s.tmp_0 = r0 = s.arg1; - r0 = s.arg1.fields["vx"]; - s.tmp_2 = r0; - r0 = s.arg0.fields["ax"]; - s.tmp_4 = r0; - r0 = pxsim.Math_.imul(s.tmp_4, s.arg2); - s.tmp_5 = r0; - r0 = (s.tmp_5 >> 8); - s.tmp_3 = r0; - r0 = (s.tmp_2 + s.tmp_3); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["vx"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg1; - r0 = s.arg1.fields["vy"]; - s.tmp_2 = r0; - r0 = s.arg0.fields["ay"]; - s.tmp_4 = r0; - r0 = pxsim.Math_.imul(s.tmp_4, s.arg2); - s.tmp_5 = r0; - r0 = (s.tmp_5 >> 8); - s.tmp_3 = r0; - r0 = (s.tmp_2 + s.tmp_3); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["vy"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg1; - r0 = s.arg1.fields["_x"]; - s.tmp_2 = r0; - r0 = s.arg1.fields["vx"]; - s.tmp_4 = r0; - r0 = pxsim.Math_.imul(s.tmp_4, s.arg2); - s.tmp_5 = r0; - r0 = (s.tmp_5 >> 8); - s.tmp_3 = r0; - r0 = (s.tmp_2 + s.tmp_3); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_x"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg1; - r0 = s.arg1.fields["_y"]; - s.tmp_2 = r0; - r0 = s.arg1.fields["vy"]; - s.tmp_4 = r0; - r0 = pxsim.Math_.imul(s.tmp_4, s.arg2); - s.tmp_5 = r0; - r0 = (s.tmp_5 >> 8); - s.tmp_3 = r0; - r0 = (s.tmp_2 + s.tmp_3); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_y"] = (s.tmp_1); + s.tmp_0 = game_forever__P187762_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 169; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ParticleSource_updateParticle__P189919.info = {"start":8231,"length":357,"line":276,"column":8,"endLine":284,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"updateParticle","argumentNames":["this","p","fixedDt"]} +forever__P187064.info = {"start":264,"length":62,"line":6,"column":0,"endLine":8,"endColumn":1,"fileName":"pxt_modules/game/gameoverrides.ts","functionName":"forever","argumentNames":["a"]} -function particles_ParticleSource_updateParticle__P189919_mk(s) { +function forever__P187064_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_updateParticle__P189919, depth: s.depth + 1, + parent: s, fn: forever__P187064, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function Fx_rightShift__P185381(s) { +function game_forever__P187762(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22747,29 +21424,108 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg0 >> s.arg1); + r0 = pxsim_numops_toBoolDecr(globals.foreverRunning___189575); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + globals.foreverRunning___189575 = (true); + r0 = pxsim.control.runInParallel(inline__P194818); + case 1: + case 2: + r0 = pxsim_pxtcore_mkClassInstance(scene_GameForeverHandler__C187615_VT); + s.tmp_0 = r0; + s.tmp_1 = scene_GameForeverHandler_constructor__P187617_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = s.arg0; + s.callLocIdx = 1215; s.pc = 3; return s.tmp_1; + case 3: + r0 = s.retval; + s.tmp_3 = game_currentScene__P187749_mk(s); + s.callLocIdx = 1214; s.pc = 4; return s.tmp_3; + case 4: + r0 = s.retval; + r0 = r0.fields["gameForeverHandlers"]; + s.tmp_2 = r0; + r0 = pxsim_Array__push(s.tmp_2, s.tmp_0); + r0 = undefined; return leave(s, r0) default: oops() } } } -Fx_rightShift__P185381.info = {"start":2031,"length":108,"line":65,"column":4,"endLine":67,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"rightShift","argumentNames":["a","n"]} +game_forever__P187762.info = {"start":8610,"length":820,"line":277,"column":4,"endLine":300,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"forever","argumentNames":["action"]} -function Fx_rightShift__P185381_mk(s) { +function game_forever__P187762_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_rightShift__P185381, depth: s.depth + 1, + parent: s, fn: game_forever__P187762, depth: s.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_mul__P185372(s) { +function inline__P194818(s) { +let r0 = s.r0, 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.handlers___194820 = undefined; + case 1: + r0 = pxsim_numops_toBoolDecr(1); + if (!r0) { step = 2; continue; } + s.tmp_0 = game_currentScene__P187749_mk(s); + s.callLocIdx = 1210; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + r0 = r0.fields["gameForeverHandlers"]; + s.handlers___194820 = (r0); + s.tmp_0 = helpers_arrayForEach__P185324_mk(s); + s.tmp_0.arg0 = s.handlers___194820; + s.tmp_0.arg1 = inline__P194826; + s.callLocIdx = 1212; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + s.tmp_0 = pause__P185619_mk(s); + s.tmp_0.arg0 = 20; + s.callLocIdx = 1213; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + { step = 1; continue; } + case 2: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +inline__P194818.info = {"start":8762,"length":535,"line":280,"column":34,"endLine":294,"endColumn":13,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":[]} + +function inline__P194818_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: inline__P194818, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + handlers___194820: undefined, +} } + + + + + +function inline__P194826(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22781,32 +21537,45 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim.Math_.imul(s.arg0, s.arg1); + r0 = s.arg0.fields["lock"]; + 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 >> 8); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = (s.arg0).fields["lock"] = (true); + r0 = pxsim_pxtcore_mkAction(1, inline__P194835); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + r0 = pxsim.control.runInParallel(s.tmp_0); + case 1: + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -Fx_mul__P185372.info = {"start":872,"length":133,"line":29,"column":4,"endLine":31,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"mul","argumentNames":["a","b"]} +inline__P194826.info = {"start":8913,"length":319,"line":283,"column":37,"endLine":291,"endColumn":21,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":["h"]} -function Fx_mul__P185372_mk(s) { +function inline__P194826_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_mul__P185372, depth: s.depth + 1, + parent: s, fn: inline__P194826, 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_add__P185369(s) { +function inline__P194835(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22816,31 +21585,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 = if_handler_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, "handler"), 1); + s.callLocIdx = 1211; 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"], 1); s.callLocIdx = 1211; s.pc = 1; return s.tmp_0; } + else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 1211; s.pc = 1; return s.tmp_0;; } + else { s.callLocIdx = 1211; s.pc = 1; return s.tmp_0; } } - r0 = (s.arg0 + s.arg1); + case 1: + r0 = s.retval; + r0 = (s.caps[0]).fields["lock"] = (false); + r0 = undefined; return leave(s, r0) default: oops() } } } -Fx_add__P185369.info = {"start":511,"length":118,"line":20,"column":4,"endLine":22,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"add","argumentNames":["a","b"]} +inline__P194835.info = {"start":9052,"length":130,"line":286,"column":50,"endLine":289,"endColumn":29,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":[]} -function Fx_add__P185369_mk(s) { +function inline__P194835_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_add__P185369, depth: s.depth + 1, + parent: s, fn: inline__P194835, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, - arg1: undefined, + tmp_0: undefined, } } -function particles_ParticleFactory_createParticle__P187933(s) { +function scene_GameForeverHandler_constructor__P187617(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22850,83 +21627,67 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.p___196045 = 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__C187931_VT)) failedCast(r0); - r0 = pxsim_pxtcore_mkClassInstance(particles_Particle__C187876_VT); - s.p___196045 = (r0); - s.tmp_0 = r0 = s.p___196045; - 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 = 1575; s.pc = 1; return s.tmp_3; } - } + if (!checkSubtype(r0, scene_GameForeverHandler__C187615_VT)) failedCast(r0); + r0 = (s.arg0).fields["handler"] = (s.arg1); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +scene_GameForeverHandler_constructor__P187617.info = {"start":1340,"length":65,"line":47,"column":8,"endLine":49,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":["this","handler"]} + +function scene_GameForeverHandler_constructor__P187617_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: scene_GameForeverHandler_constructor__P187617, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, + arg1: undefined, +} } + + + + + +function start_game__P394963(s) { +let r0 = s.r0, 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 = info_startCountdown__P187430_mk(s); + s.tmp_0.arg0 = 5; + s.callLocIdx = 156; 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___196045; - 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 = 1577; 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___196045).fields["vx"] = (0); - r0 = (s.p___196045).fields["vy"] = (0); - r0 = (s.p___196045).fields["lifespan"] = (500); - r0 = s.p___196045; + r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ParticleFactory_createParticle__P187933.info = {"start":1822,"length":282,"line":67,"column":8,"endLine":77,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"createParticle","argumentNames":["this","anchor"]} +start_game__P394963.info = {"start":9436,"length":53,"line":244,"column":0,"endLine":246,"endColumn":1,"fileName":"main.ts","functionName":"start_game","argumentNames":[]} -function particles_ParticleFactory_createParticle__P187933_mk(s) { +function start_game__P394963_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleFactory_createParticle__P187933, depth: s.depth + 1, + parent: s, fn: start_game__P394963, depth: s.depth + 1, pc: 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___196045: undefined, - arg0: undefined, - arg1: undefined, } } -function game_onUpdateInterval__P187761(s) { +function create_minimap__P395221(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22936,79 +21697,75 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.timer___195825 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - s.tmp_0 = game_init__P189572_mk(s); - s.tmp_0.arg0 = undefined; - s.callLocIdx = 1204; s.pc = 6; return s.tmp_0; - case 6: + s.tmp_0 = sprites_create__P187191_mk(s); + s.tmp_1 = update_minimap__P395137_mk(s); + s.callLocIdx = 194; s.pc = 2; return s.tmp_1; + case 2: r0 = s.retval; - 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; } + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = globals.Map___394655; + s.callLocIdx = 195; s.pc = 1; return s.tmp_0; 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; } + r0 = s.retval; + globals.sprite_map___395223 = (r0); + s.tmp_0 = Sprite_bottom__P187286_mk(s); + s.tmp_0.arg0 = globals.sprite_map___395223; + r0 = pxsim_ImageMethods.height(globals.screen___187019); + s.tmp_1 = r0; + r0 = (s.tmp_1 - 2); + s.tmp_0.arg1 = r0; + s.callLocIdx = 197; s.pc = 3; return s.tmp_0; case 3: - case 4: - r0 = pxsim_pxtrt.mklocRef(); - s.timer___195825 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.timer___195825, 0); - r0 = pxsim_pxtcore_mkAction(3, inline__P195829); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.timer___195825); - 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__P185609_mk(s); - s.tmp_2 = game_eventContext__P187752_mk(s); - s.callLocIdx = 1205; s.pc = 8; return s.tmp_2; - case 8: r0 = s.retval; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 19; - s.tmp_1.arg2 = s.tmp_0; - s.callLocIdx = 1209; s.pc = 7; return s.tmp_1; - case 7: + s.tmp_0 = Sprite_x__P187243_mk(s); + s.tmp_0.arg0 = globals.sprite_map___395223; + r0 = pxsim_ImageMethods.width(globals.screen___187019); + s.tmp_1 = r0; + r0 = (s.tmp_1 / 2); + s.tmp_0.arg1 = r0; + s.callLocIdx = 199; s.pc = 4; return s.tmp_0; + case 4: r0 = s.retval; + s.tmp_0 = if_z_2_mk(s); + s.tmp_0.arg0 = globals.sprite_map___395223; + s.tmp_0.arg1 = 50; + 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 = 200; s.pc = 5; return s.tmp_0; } + } case 5: + r0 = s.retval; + s.tmp_0 = Sprite_setFlag__P187296_mk(s); + s.tmp_0.arg0 = globals.sprite_map___395223; + s.tmp_0.arg1 = 512; + s.tmp_0.arg2 = true; + s.callLocIdx = 201; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -game_onUpdateInterval__P187761.info = {"start":7929,"length":417,"line":256,"column":4,"endLine":267,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"onUpdateInterval","argumentNames":["period","a"]} +create_minimap__P395221.info = {"start":19513,"length":268,"line":389,"column":0,"endLine":395,"endColumn":1,"fileName":"main.ts","functionName":"create_minimap","argumentNames":[]} -function game_onUpdateInterval__P187761_mk(s) { +function create_minimap__P395221_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_onUpdateInterval__P187761, depth: s.depth + 1, + parent: s, fn: create_minimap__P395221, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - timer___195825: undefined, - arg0: undefined, - arg1: undefined, } } -function inline__P195829(s) { +function Sprite_setFlag__P187296(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23018,55 +21775,84 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.time___195830 = undefined; - s.tmp_1 = game_currentScene__P187749_mk(s); - s.callLocIdx = 1206; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; - s.tmp_0 = r0; - r0 = s.tmp_0.fields["_millis"]; - s.time___195830 = (r0); - r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); - s.tmp_1 = r0; - r0 = (s.tmp_1 <= s.time___195830); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(s.arg2); if (!r0) { step = 1; continue; } - s.tmp_2 = r0 = s.caps[0]; - r0 = (s.time___195830 + s.caps[1]); + 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 = 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 = 1208; s.pc = 4; return s.tmp_0; + 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 = (s.arg1 === 512); + 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["sayBubbleSprite"]; 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 = Sprite_setFlag__P187296_mk(s); + r0 = s.arg0.fields["sayBubbleSprite"]; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = 512; + s.tmp_2.arg2 = s.arg2; + s.callLocIdx = 408; s.pc = 7; return s.tmp_2; + case 7: r0 = s.retval; - case 1: - case 2: + case 5: + case 6: r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P195829.info = {"start":8159,"length":179,"line":260,"column":81,"endLine":266,"endColumn":9,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":[]} +Sprite_setFlag__P187296.info = {"start":23896,"length":292,"line":731,"column":4,"endLine":738,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"setFlag","argumentNames":["this","flag","on"]} -function inline__P195829_mk(s) { +function Sprite_setFlag__P187296_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P195829, depth: s.depth + 1, + parent: s, fn: Sprite_setFlag__P187296, depth: s.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___195830: undefined, + tmp_4: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function particles_SprayFactory_constructor__P187936(s) { +function Sprite_x__P187243(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23079,53 +21865,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.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_SprayFactory__C187935_VT)) failedCast(r0); - r0 = undefined; - s.tmp_0 = particles_initTrig__P189943_mk(s); - s.callLocIdx = 1582; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.tmp_0 = particles_SprayFactory_setSpeed__P187939_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 1583; s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; - s.tmp_0 = particles_SprayFactory_setDirection__P187940_mk(s); + if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); + s.tmp_0 = Sprite_left__P187280_mk(s); s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg2; - s.tmp_0.arg2 = s.arg3; - s.callLocIdx = 1584; s.pc = 3; return s.tmp_0; - case 3: + s.tmp_1 = r0 = s.arg1; + r0 = s.arg0.fields["_image"]; + s.tmp_4 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_4); + 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 = 274; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -particles_SprayFactory_constructor__P187936.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"]} +Sprite_x__P187243.info = {"start":1673,"length":72,"line":75,"column":4,"endLine":77,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"x","argumentNames":["this","v"]} -function particles_SprayFactory_constructor__P187936_mk(s) { +function Sprite_x__P187243_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_SprayFactory_constructor__P187936, depth: s.depth + 1, + parent: s, fn: Sprite_x__P187243, depth: s.depth + 1, pc: 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_initTrig__P189943(s) { +function Sprite_left__P187280(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23135,47 +21917,62 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.cachedSin___189929); - 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__P187929_mk(s); - s.tmp_2.arg0 = 100; - s.callLocIdx = 1570; s.pc = 3; return s.tmp_2; - case 3: - r0 = s.retval; - globals.cachedSin___189929 = (r0); - s.tmp_0 = particles_cacheCos__P187930_mk(s); - s.tmp_0.arg0 = 100; - s.callLocIdx = 1571; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - globals.cachedCos___189930 = (r0); + s.physics___198127 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); + s.tmp_0 = game_currentScene__P187749_mk(s); + s.callLocIdx = 321; s.pc = 1; return s.tmp_0; case 1: + r0 = s.retval; + r0 = r0.fields["physicsEngine"]; + s.physics___198127 = (r0); + s.tmp_0 = PhysicsEngine__C187376_v2_4_mk(s); + s.tmp_0.arg0 = s.physics___198127; + s.tmp_0.arg1 = s.arg0; + r0 = (s.arg1 * 256); + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); + s.tmp_1 = r0; + r0 = s.arg0.fields["_x"]; + s.tmp_3 = r0; + r0 = (s.tmp_1 - s.tmp_3); + s.tmp_0.arg2 = r0; + s.tmp_0.arg3 = 0; + if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C187376_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() } } } -particles_initTrig__P189943.info = {"start":291,"length":155,"line":11,"column":4,"endLine":16,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"initTrig","argumentNames":[]} +Sprite_left__P187280.info = {"start":8929,"length":257,"line":325,"column":4,"endLine":335,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"left","argumentNames":["this","value"]} -function particles_initTrig__P189943_mk(s) { +function Sprite_left__P187280_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_initTrig__P189943, depth: s.depth + 1, + parent: s, fn: Sprite_left__P187280, depth: s.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___198127: undefined, + arg0: undefined, + arg1: undefined, } } -function particles_cacheCos__P187930(s) { +function PhysicsEngine_moveSprite__P187380(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23185,65 +21982,37 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.cos___195563 = undefined; - s.anglePerSlice___195565 = undefined; - s.i___195571 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } - r0 = pxsim_Array__mk(); - s.cos___195563 = (r0); - r0 = (6.283185307179586 / s.arg0); - s.anglePerSlice___195565 = (r0); - s.i___195571 = (0); - case 1: - r0 = (s.i___195571 < s.arg0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.tmp_1 = r0 = s.cos___195563; - r0 = (s.i___195571 * s.anglePerSlice___195565); - 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___195571 + 1); - s.i___195571 = (r0); - { step = 1; continue; } - case 2: - r0 = s.cos___195563; + r0 = s.arg0; + if (!checkSubtype(r0, PhysicsEngine__C187376_VT)) failedCast(r0); + r0 = undefined; return leave(s, r0) default: oops() } } } -particles_cacheCos__P187930.info = {"start":1005,"length":263,"line":35,"column":4,"endLine":42,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"cacheCos","argumentNames":["slices"]} +PhysicsEngine_moveSprite__P187380.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 particles_cacheCos__P187930_mk(s) { +function PhysicsEngine_moveSprite__P187380_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_cacheCos__P187930, depth: s.depth + 1, + parent: s, fn: PhysicsEngine_moveSprite__P187380, depth: s.depth + 1, pc: 0, retval: undefined, 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___195563: undefined, - anglePerSlice___195565: undefined, - i___195571: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function particles_cacheSin__P187929(s) { +function Fx_sub__P185371(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23253,65 +22022,31 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sin___195589 = undefined; - s.anglePerSlice___195591 = undefined; - s.i___195597 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_Array__mk(); - s.sin___195589 = (r0); - r0 = (6.283185307179586 / s.arg0); - s.anglePerSlice___195591 = (r0); - s.i___195597 = (0); - case 1: - r0 = (s.i___195597 < s.arg0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.tmp_1 = r0 = s.sin___195589; - r0 = (s.i___195597 * s.anglePerSlice___195591); - 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___195597 + 1); - s.i___195597 = (r0); - { step = 1; continue; } - case 2: - r0 = s.sin___195589; + r0 = (s.arg0 - s.arg1); return leave(s, r0) default: oops() } } } -particles_cacheSin__P187929.info = {"start":594,"length":263,"line":22,"column":4,"endLine":29,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"cacheSin","argumentNames":["slices"]} +Fx_sub__P185371.info = {"start":749,"length":118,"line":26,"column":4,"endLine":28,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"sub","argumentNames":["a","b"]} -function particles_cacheSin__P187929_mk(s) { +function Fx_sub__P185371_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_cacheSin__P187929, depth: s.depth + 1, + parent: s, fn: Fx_sub__P185371, depth: s.depth + 1, pc: 0, retval: undefined, 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___195589: undefined, - anglePerSlice___195591: undefined, - i___195597: undefined, arg0: undefined, + arg1: undefined, } } -function particles_SprayFactory_setDirection__P187940(s) { +function Sprite_left__P187279(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23323,68 +22058,33 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_SprayFactory__C187935_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - s.tmp_4 = particles_toRadians__P189948_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 = 1592; s.pc = 1; return s.tmp_4; - case 1: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_3 / globals.angleSlice___189942); - 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__P189948_mk(s); - s.tmp_4.arg0 = s.arg2; - s.callLocIdx = 1593; s.pc = 2; return s.tmp_4; - case 2: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_3 / globals.angleSlice___189942); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["spread"] = (s.tmp_1); - r0 = undefined; - return leave(s, r0) + if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); + r0 = s.arg0.fields["_x"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -particles_SprayFactory_setDirection__P187940.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"]} +Sprite_left__P187279.info = {"start":8785,"length":53,"line":320,"column":4,"endLine":322,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"left","argumentNames":["this"]} +Sprite_left__P187279.isGetter = true; -function particles_SprayFactory_setDirection__P187940_mk(s) { +function Sprite_left__P187279_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_SprayFactory_setDirection__P187940, depth: s.depth + 1, + parent: s, fn: Sprite_left__P187279, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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 particles_toRadians__P189948(s) { +function Sprite_bottom__P187286(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23396,50 +22096,47 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg0 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_3 = Math_abs__P185340_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 1574; s.pc = 3; return s.tmp_3; - case 3: - r0 = s.retval; + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); + s.tmp_0 = Sprite_top__P187284_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = r0 = s.arg1; + r0 = s.arg0.fields["_image"]; + s.tmp_3 = r0; + r0 = pxsim_ImageMethods.height(s.tmp_3); s.tmp_2 = r0; - r0 = (s.tmp_2 % 360); - s.tmp_1 = r0; - r0 = (360 - s.tmp_1); - s.arg0 = (r0); - { step = 2; continue; } + r0 = (s.tmp_1 - s.tmp_2); + s.tmp_0.arg1 = r0; + s.callLocIdx = 335; s.pc = 1; return s.tmp_0; case 1: - r0 = (s.arg0 % 360); - s.arg0 = (r0); - case 2: - r0 = (s.arg0 * 0.017453292519943295); + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -particles_toRadians__P189948.info = {"start":1307,"length":206,"line":45,"column":4,"endLine":52,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"toRadians","argumentNames":["degrees"]} +Sprite_bottom__P187286.info = {"start":10235,"length":73,"line":374,"column":4,"endLine":376,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"bottom","argumentNames":["this","value"]} -function particles_toRadians__P189948_mk(s) { +function Sprite_bottom__P187286_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_toRadians__P189948, depth: s.depth + 1, + parent: s, fn: Sprite_bottom__P187286, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, arg0: undefined, + arg1: undefined, } } -function particles_ParticleFactory_constructor__P187932(s) { +function Sprite_top__P187284(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23449,31 +22146,62 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.physics___197923 = 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__C187931_VT)) failedCast(r0); + if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); + s.tmp_0 = game_currentScene__P187749_mk(s); + s.callLocIdx = 329; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = r0.fields["physicsEngine"]; + s.physics___197923 = (r0); + s.tmp_0 = PhysicsEngine__C187376_v2_4_mk(s); + s.tmp_0.arg0 = s.physics___197923; + s.tmp_0.arg1 = s.arg0; + s.tmp_0.arg2 = 0; + r0 = (s.arg1 * 256); + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); + s.tmp_1 = r0; + r0 = s.arg0.fields["_y"]; + s.tmp_3 = r0; + r0 = (s.tmp_1 - s.tmp_3); + s.tmp_0.arg3 = r0; + if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C187376_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() } } } -particles_ParticleFactory_constructor__P187932.info = {"start":1617,"length":78,"line":59,"column":8,"endLine":61,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"inline","argumentNames":["this"]} +Sprite_top__P187284.info = {"start":9733,"length":256,"line":355,"column":4,"endLine":365,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"top","argumentNames":["this","value"]} -function particles_ParticleFactory_constructor__P187932_mk(s) { +function Sprite_top__P187284_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleFactory_constructor__P187932, depth: s.depth + 1, + parent: s, fn: Sprite_top__P187284, depth: s.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___197923: undefined, arg0: undefined, + arg1: undefined, } } -function particles_ParticleSource_setFactory__P187914(s) { +function Sprite_top__P187283(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23485,36 +22213,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, particles_ParticleSource__C187895_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(s.arg1); - if (!r0) { step = 1; continue; } - r0 = (s.arg0).fields["_factory"] = (s.arg1); - case 1: - case 2: - r0 = undefined; - return leave(s, r0) + if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); + r0 = s.arg0.fields["_y"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -particles_ParticleSource_setFactory__P187914.info = {"start":8107,"length":114,"line":271,"column":8,"endLine":274,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"setFactory","argumentNames":["this","factory"]} +Sprite_top__P187283.info = {"start":9590,"length":53,"line":350,"column":4,"endLine":352,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"top","argumentNames":["this"]} +Sprite_top__P187283.isGetter = true; -function particles_ParticleSource_setFactory__P187914_mk(s) { +function Sprite_top__P187283_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_setFactory__P187914, depth: s.depth + 1, + parent: s, fn: Sprite_top__P187283, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, - arg1: undefined, } } -function particles_ParticleSource_setRate__P187912(s) { +function Sprite_bottom__P187285(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23526,41 +22251,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, particles_ParticleSource__C187895_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = (1000 / s.arg1); + if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); + s.tmp_1 = Sprite_top__P187283_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 332; s.pc = 1; return s.tmp_1; + case 1: + r0 = s.retval; + s.tmp_0 = r0; + r0 = s.arg0.fields["_image"]; + s.tmp_3 = r0; + r0 = pxsim_ImageMethods.height(s.tmp_3); s.tmp_2 = r0; - r0 = pxsim.Math_.ceil(s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["period"] = (s.tmp_1); - r0 = (s.arg0).fields["timer"] = (0); - r0 = undefined; - return leave(s, r0) + r0 = (s.tmp_0 + s.tmp_2); + return leaveAccessor(s, r0) default: oops() } } } -particles_ParticleSource_setRate__P187912.info = {"start":7785,"length":139,"line":258,"column":8,"endLine":261,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"setRate","argumentNames":["this","particlesPerSecond"]} +Sprite_bottom__P187285.info = {"start":10083,"length":59,"line":369,"column":4,"endLine":371,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"bottom","argumentNames":["this"]} +Sprite_bottom__P187285.isGetter = true; -function particles_ParticleSource_setRate__P187912_mk(s) { +function Sprite_bottom__P187285_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_setRate__P187912, depth: s.depth + 1, + parent: s, fn: Sprite_bottom__P187285, depth: s.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_ParticleSource_setAnchor__P187911(s) { +function sprites_create__P187191(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23570,25 +22298,78 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.scene___206575 = undefined; + s.sprite___206578 = 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__C187895_VT)) failedCast(r0); - r0 = (s.arg0).fields["anchor"] = (s.arg1); - r0 = undefined; + s.tmp_0 = game_currentScene__P187749_mk(s); + s.callLocIdx = 265; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + s.scene___206575 = (r0); + r0 = pxsim_pxtcore_mkClassInstance(Sprite__C187233_VT); + s.tmp_0 = r0; + s.tmp_1 = Sprite_constructor__P187270_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = s.arg0; + s.callLocIdx = 266; s.pc = 2; return s.tmp_1; + case 2: + r0 = s.retval; + s.sprite___206578 = (s.tmp_0); + s.tmp_0 = Sprite_setKind__P187288_mk(s); + s.tmp_0.arg0 = s.sprite___206578; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 267; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.tmp_0 = PhysicsEngine__C187376_v0_2_mk(s); + r0 = s.scene___206575.fields["physicsEngine"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.sprite___206578; + if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C187376_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, inline__P206593); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); + r0 = pxsim_pxtcore_mkAction(1, inline__P206599); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.sprite___206578); + s.tmp_2 = helpers_arrayForEach__P185324_mk(s); + s.tmp_3 = helpers_arrayFilter__P185325_mk(s); + r0 = s.scene___206575.fields["createdHandlers"]; + s.tmp_3.arg0 = r0; + s.tmp_3.arg1 = s.tmp_0; + s.callLocIdx = 268; 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 = 270; s.pc = 5; return s.tmp_2; + case 5: + r0 = s.retval; + r0 = s.sprite___206578; return leave(s, r0) default: oops() } } } -particles_ParticleSource_setAnchor__P187911.info = {"start":7577,"length":79,"line":250,"column":8,"endLine":252,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"setAnchor","argumentNames":["this","anchor"]} +sprites_create__P187191.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 particles_ParticleSource_setAnchor__P187911_mk(s) { +function sprites_create__P187191_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_setAnchor__P187911, depth: s.depth + 1, + parent: s, fn: sprites_create__P187191, depth: s.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___206575: undefined, + sprite___206578: undefined, arg0: undefined, arg1: undefined, } } @@ -23597,7 +22378,7 @@ function particles_ParticleSource_setAnchor__P187911_mk(s) { -function particles_ParticleSource_clear__P187910(s) { +function inline__P206593(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23608,23 +22389,23 @@ switch (step) { case 0: if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C187895_VT)) failedCast(r0); - r0 = (s.arg0).fields["head"] = (undefined); - r0 = undefined; + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0.fields["kind"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 == s.caps[0]); return leave(s, r0) default: oops() } } } -particles_ParticleSource_clear__P187910.info = {"start":7407,"length":54,"line":242,"column":8,"endLine":244,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"clear","argumentNames":["this"]} +inline__P206593.info = {"start":1195,"length":19,"line":43,"column":20,"endLine":43,"endColumn":39,"fileName":"pxt_modules/game/sprites.ts","functionName":"inline","argumentNames":["h"]} -function particles_ParticleSource_clear__P187910_mk(s) { +function inline__P206593_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_clear__P187910, depth: s.depth + 1, + parent: s, fn: inline__P206593, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, } } @@ -23632,7 +22413,7 @@ function particles_ParticleSource_clear__P187910_mk(s) { -function particles_ParticleSource_destroy__P187909(s) { +function inline__P206599(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23646,39 +22427,32 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C187895_VT)) failedCast(r0); - s.tmp_0 = particles_ParticleSource_enabled__P187908_mk(s); + s.tmp_0 = if_handler_2_mk(s); s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = false; - s.callLocIdx = 1531; s.pc = 1; return s.tmp_0; + 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 = 269; 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 = 269; s.pc = 1; return s.tmp_0; } + else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 269; s.pc = 1; return s.tmp_0;; } + else { s.callLocIdx = 269; 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__P187903_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1532; s.pc = 2; return s.tmp_0; - case 2: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ParticleSource_destroy__P187909.info = {"start":7077,"length":240,"line":232,"column":8,"endLine":237,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"destroy","argumentNames":["this"]} +inline__P206599.info = {"start":1237,"length":22,"line":44,"column":21,"endLine":44,"endColumn":43,"fileName":"pxt_modules/game/sprites.ts","functionName":"inline","argumentNames":["h"]} -function particles_ParticleSource_destroy__P187909_mk(s) { +function inline__P206599_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_destroy__P187909, depth: s.depth + 1, + parent: s, fn: inline__P206599, 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, } } @@ -23686,7 +22460,7 @@ function particles_ParticleSource_destroy__P187909_mk(s) { -function particles_ParticleSource_enabled__P187908(s) { +function PhysicsEngine_addSprite__P187378(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23702,53 +22476,18 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C187895_VT)) failedCast(r0); - s.tmp_1 = r0 = s.arg1; - s.tmp_3 = particles_ParticleSource_enabled__P187907_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 1530; 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: + if (!checkSubtype(r0, PhysicsEngine__C187376_VT)) failedCast(r0); r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ParticleSource_enabled__P187908.info = {"start":6799,"length":214,"line":222,"column":8,"endLine":227,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"enabled","argumentNames":["this","v"]} +PhysicsEngine_addSprite__P187378.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 particles_ParticleSource_enabled__P187908_mk(s) { +function PhysicsEngine_addSprite__P187378_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_enabled__P187908, depth: s.depth + 1, + parent: s, fn: PhysicsEngine_addSprite__P187378, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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, } } @@ -23757,7 +22496,7 @@ function particles_ParticleSource_enabled__P187908_mk(s) { -function particles_ParticleSource_enabled__P187907(s) { +function Sprite_constructor__P187270(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23769,45 +22508,137 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C187895_VT)) failedCast(r0); - r0 = s.arg0.fields["pFlags"]; + if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); + s.tmp_0 = sprites_BaseSprite_constructor__P187077_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 291; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_ImageMethods.width(globals.screen___187019); s.tmp_4 = r0; - r0 = (s.tmp_4 & 1); + r0 = pxsim_ImageMethods.width(s.arg1); + s.tmp_5 = r0; + r0 = (s.tmp_4 - s.tmp_5); s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); + r0 = (s.tmp_3 >> 1); s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); + r0 = (s.tmp_2 * 256); + s.tmp_6 = r0; + r0 = (s.tmp_6 | 0); s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); + r0 = (s.tmp_0).fields["_x"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_ImageMethods.height(globals.screen___187019); + s.tmp_4 = r0; + r0 = pxsim_ImageMethods.height(s.arg1); + s.tmp_5 = r0; + r0 = (s.tmp_4 - s.tmp_5); + s.tmp_3 = r0; + r0 = (s.tmp_3 >> 1); + s.tmp_2 = r0; + r0 = (s.tmp_2 * 256); + s.tmp_6 = r0; + r0 = (s.tmp_6 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_y"] = (s.tmp_1); + r0 = s.arg0.fields["_x"]; s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); - return leaveAccessor(s, 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__P187247_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 294; s.pc = 2; return s.tmp_0; + case 2: + r0 = s.retval; + s.tmp_0 = Sprite_vy__P187249_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 295; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.tmp_0 = Sprite_ax__P187251_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 296; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + s.tmp_0 = Sprite_ay__P187253_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 297; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.tmp_0 = Sprite_fx__P187255_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 298; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + s.tmp_0 = Sprite_fy__P187257_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 299; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + r0 = (s.arg0).fields["flags"] = (0); + s.tmp_0 = Sprite_setImage__P187273_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 300; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + s.tmp_0 = Sprite_setKind__P187288_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = -1; + s.callLocIdx = 301; 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() } } } -particles_ParticleSource_enabled__P187907.info = {"start":6605,"length":76,"line":215,"column":8,"endLine":217,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"enabled","argumentNames":["this"]} -particles_ParticleSource_enabled__P187907.isGetter = true; +Sprite_constructor__P187270.info = {"start":5178,"length":618,"line":202,"column":4,"endLine":222,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["this","img"]} -function particles_ParticleSource_enabled__P187907_mk(s) { +function Sprite_constructor__P187270_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_enabled__P187907, depth: s.depth + 1, + parent: s, fn: Sprite_constructor__P187270, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, arg0: undefined, + arg1: undefined, } } -function particles_ParticleSource_setAcceleration__P187904(s) { +function Sprite_fy__P187257(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23820,47 +22651,48 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C187895_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 * 256); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["ax"] = (s.tmp_1); + if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); s.tmp_0 = r0 = s.arg0; - r0 = (s.arg2 * 256); + s.tmp_3 = Math_max__P185342_mk(s); + s.tmp_3.arg0 = 0; + s.tmp_3.arg1 = s.arg1; + s.callLocIdx = 289; s.pc = 1; return s.tmp_3; + case 1: + r0 = s.retval; s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); + r0 = (s.tmp_2 * 256); + s.tmp_4 = r0; + r0 = (s.tmp_4 | 0); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["ay"] = (s.tmp_1); + r0 = (s.tmp_0).fields["_fy"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ParticleSource_setAcceleration__P187904.info = {"start":6009,"length":113,"line":193,"column":8,"endLine":196,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"setAcceleration","argumentNames":["this","ax","ay"]} +Sprite_fy__P187257.info = {"start":4057,"length":64,"line":151,"column":4,"endLine":153,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"fy","argumentNames":["this","v"]} -function particles_ParticleSource_setAcceleration__P187904_mk(s) { +function Sprite_fy__P187257_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_setAcceleration__P187904, depth: s.depth + 1, + parent: s, fn: Sprite_fy__P187257, depth: s.depth + 1, pc: 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 helpers_arrayShift__P185317(s) { +function Sprite_fy__P187256(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23874,17 +22706,23 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = pxsim_Array_.removeAt(s.arg0, 0); - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); + r0 = s.arg0.fields["_fy"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -helpers_arrayShift__P185317.info = {"start":4045,"length":82,"line":153,"column":4,"endLine":155,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arrayShift","argumentNames":["arr"]} +Sprite_fy__P187256.info = {"start":3895,"length":60,"line":146,"column":4,"endLine":148,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"fy","argumentNames":["this"]} +Sprite_fy__P187256.isGetter = true; -function helpers_arrayShift__P185317_mk(s) { +function Sprite_fy__P187256_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arrayShift__P185317, depth: s.depth + 1, + parent: s, fn: Sprite_fy__P187256, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, } } @@ -23892,7 +22730,7 @@ function helpers_arrayShift__P185317_mk(s) { -function particles_SprayFactory_setSpeed__P187939(s) { +function Sprite_fx__P187255(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23908,27 +22746,36 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_SprayFactory__C187935_VT)) failedCast(r0); + if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 * 256); + s.tmp_3 = Math_max__P185342_mk(s); + s.tmp_3.arg0 = 0; + s.tmp_3.arg1 = s.arg1; + s.callLocIdx = 286; s.pc = 1; return s.tmp_3; + case 1: + r0 = s.retval; s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); + r0 = (s.tmp_2 * 256); + s.tmp_4 = r0; + r0 = (s.tmp_4 | 0); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["speed"] = (s.tmp_1); + r0 = (s.tmp_0).fields["_fx"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -particles_SprayFactory_setSpeed__P187939.info = {"start":3322,"length":92,"line":119,"column":8,"endLine":121,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"setSpeed","argumentNames":["this","pixelsPerSecond"]} +Sprite_fx__P187255.info = {"start":3714,"length":64,"line":141,"column":4,"endLine":143,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"fx","argumentNames":["this","v"]} -function particles_SprayFactory_setSpeed__P187939_mk(s) { +function Sprite_fx__P187255_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_SprayFactory_setSpeed__P187939, depth: s.depth + 1, + parent: s, fn: Sprite_fx__P187255, depth: s.depth + 1, pc: 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, } } @@ -23937,7 +22784,7 @@ function particles_SprayFactory_setSpeed__P187939_mk(s) { -function particles_ConfettiFactory_constructor__P187963(s) { +function Sprite_fx__P187254(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23947,99 +22794,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.confetti___196077 = undefined; - s.i___196093 = 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__C187962_VT)) failedCast(r0); - r0 = pxsim_Array__mk(); - s.tmp_0 = r0; - r0 = pxsim.image.ofBuffer(_hex196080); - s.tmp_1 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); - r0 = pxsim.image.ofBuffer(_hex196082); - s.tmp_2 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_2); - r0 = pxsim.image.ofBuffer(_hex196084); - s.tmp_3 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_3); - r0 = pxsim.image.ofBuffer(_hex196086); - s.tmp_4 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_4); - r0 = pxsim.image.ofBuffer(_hex196088); - s.tmp_5 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_5); - s.confetti___196077 = (s.tmp_0); - s.tmp_0 = particles_ShapeFactory_constructor__P187958_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___196077, 0); - s.tmp_0.arg3 = r0; - s.callLocIdx = 1616; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.i___196093 = (1); - case 1: - s.tmp_1 = r0 = s.i___196093; - r0 = pxsim_Array__length(s.confetti___196077); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); + if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); + r0 = s.arg0.fields["_fx"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.tmp_3 = particles_ShapeFactory_addShape__P187959_mk(s); - s.tmp_3.arg0 = s.arg0; - r0 = pxsim_Array__getAt(s.confetti___196077, s.i___196093); - s.tmp_3.arg1 = r0; - s.callLocIdx = 1617; s.pc = 4; return s.tmp_3; - case 4: - r0 = s.retval; - r0 = (s.i___196093 + 1); - s.i___196093 = (r0); - { step = 1; continue; } - case 2: - r0 = (s.arg0).fields["minLifespan"] = (1000); - r0 = (s.arg0).fields["maxLifespan"] = (4500); - r0 = undefined; - return leave(s, r0) + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -particles_ConfettiFactory_constructor__P187963.info = {"start":7755,"length":706,"line":247,"column":8,"endLine":274,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"inline","argumentNames":["this","xRange","yRange"]} +Sprite_fx__P187254.info = {"start":3552,"length":60,"line":136,"column":4,"endLine":138,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"fx","argumentNames":["this"]} +Sprite_fx__P187254.isGetter = true; -function particles_ConfettiFactory_constructor__P187963_mk(s) { +function Sprite_fx__P187254_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ConfettiFactory_constructor__P187963, depth: s.depth + 1, + parent: s, fn: Sprite_fx__P187254, depth: s.depth + 1, pc: 0, retval: undefined, 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___196077: undefined, - i___196093: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -const _hex196080 = pxsim.BufferMethods.createBufferFromHex("87040100010000000f000000") -const _hex196082 = pxsim.BufferMethods.createBufferFromHex("8704010002000000ff000000") -const _hex196084 = pxsim.BufferMethods.createBufferFromHex("87040200010000000f0000000f000000") -const _hex196086 = pxsim.BufferMethods.createBufferFromHex("8704020002000000ff0000000f000000") -const _hex196088 = pxsim.BufferMethods.createBufferFromHex("87040200020000000f000000ff000000") -function particles_ShapeFactory_addShape__P187959(s) { +function Sprite_ay__P187253(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24055,26 +22838,27 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ShapeFactory__C187957_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(s.arg1); - if (!r0) { step = 1; continue; } - r0 = s.arg0.fields["sources"]; - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.arg1); - case 1: - case 2: + if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg1 * 256); + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_ay"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ShapeFactory_addShape__P187959.info = {"start":7079,"length":83,"line":225,"column":8,"endLine":227,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"addShape","argumentNames":["this","shape"]} +Sprite_ay__P187253.info = {"start":3383,"length":51,"line":130,"column":4,"endLine":132,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"ay","argumentNames":["this","v"]} -function particles_ShapeFactory_addShape__P187959_mk(s) { +function Sprite_ay__P187253_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ShapeFactory_addShape__P187959, depth: s.depth + 1, + parent: s, fn: Sprite_ay__P187253, 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, } } @@ -24083,7 +22867,7 @@ function particles_ShapeFactory_addShape__P187959_mk(s) { -function particles_ShapeFactory_constructor__P187958(s) { +function Sprite_ay__P187252(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24095,156 +22879,78 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ShapeFactory__C187957_VT)) failedCast(r0); - s.tmp_0 = particles_AreaFactory_constructor__P187946_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 = 1606; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = pxsim_Array__mk(); + if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); + r0 = s.arg0.fields["_ay"]; 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) + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -particles_ShapeFactory_constructor__P187958.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"]} +Sprite_ay__P187252.info = {"start":3217,"length":60,"line":125,"column":4,"endLine":127,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"ay","argumentNames":["this"]} +Sprite_ay__P187252.isGetter = true; -function particles_ShapeFactory_constructor__P187958_mk(s) { +function Sprite_ay__P187252_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ShapeFactory_constructor__P187958, depth: s.depth + 1, + parent: s, fn: Sprite_ay__P187252, depth: s.depth + 1, pc: 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__P187946(s) { +function Sprite_ax__P187251(s) { let r0 = s.r0, step = s.pc; s.pc = -1; - - -while (true) { -if (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__C187941_VT)) failedCast(r0); - s.tmp_0 = particles_SprayFactory_constructor__P187936_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 = 1594; 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__C187803_VT); - s.tmp_0 = r0; - s.tmp_1 = Math_FastRandom_constructor__P187805_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = undefined; - s.callLocIdx = 1595; s.pc = 6; return s.tmp_1; - case 6: - r0 = s.retval; - r0 = (s.arg0).fields["galois"] = (s.tmp_0); + + +while (true) { +if (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__C187233_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg1 * 256); + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_ax"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -particles_AreaFactory_constructor__P187946.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"]} +Sprite_ax__P187251.info = {"start":3044,"length":51,"line":119,"column":4,"endLine":121,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"ax","argumentNames":["this","v"]} -function particles_AreaFactory_constructor__P187946_mk(s) { +function Sprite_ax__P187251_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_AreaFactory_constructor__P187946, depth: s.depth + 1, + parent: s, fn: Sprite_ax__P187251, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, } } -function effects_ScreenEffect_constructor__P188011(s) { +function Sprite_ax__P187250(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24256,47 +22962,407 @@ 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__C188010_VT)) failedCast(r0); - s.tmp_0 = effects_ParticleEffect_constructor__P188007_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 = 1626; s.pc = 1; return s.tmp_0; + if (!checkSubtype(r0, Sprite__C187233_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__P187250.info = {"start":2878,"length":60,"line":114,"column":4,"endLine":116,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"ax","argumentNames":["this"]} +Sprite_ax__P187250.isGetter = true; + +function Sprite_ax__P187250_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Sprite_ax__P187250, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function initilize_map__P394965(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + s.index___394998 = undefined; + s.index___395041 = undefined; + s.location___395129 = undefined; + s.unnamed19238___U3 = undefined; + s.unnamed19239___U4 = undefined; + s.tmp_0 = scene_setBackgroundColor__P187674_mk(s); + s.tmp_0.arg0 = 9; + s.callLocIdx = 157; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + r0 = pxsim_Array__mk(); + s.tmp_0 = r0; + r0 = pxsim_Array__push(s.tmp_0, globals.transparency16___189149); + r0 = pxsim_Array__push(s.tmp_0, globals.oceanSand6___188423); + r0 = pxsim_Array__push(s.tmp_0, globals.hazardWater___188592); + r0 = pxsim_Array__push(s.tmp_0, globals.coral0___188265); + r0 = pxsim_Array__push(s.tmp_0, globals.coral4___188269); + r0 = pxsim_Array__push(s.tmp_0, globals.coral5___188270); + r0 = pxsim_Array__push(s.tmp_0, globals.coral2___188267); + r0 = pxsim_Array__push(s.tmp_0, globals.coral1___188266); + r0 = pxsim_Array__push(s.tmp_0, globals.tile1___189150); + r0 = pxsim_Array__push(s.tmp_0, globals.tile2___189151); + r0 = pxsim_Array__push(s.tmp_0, globals.tile3___189152); + r0 = pxsim_Array__push(s.tmp_0, globals.tile4___189153); + r0 = pxsim_Array__push(s.tmp_0, globals.tile5___189154); + r0 = pxsim_Array__push(s.tmp_0, globals.tile6___189155); + r0 = pxsim_Array__push(s.tmp_0, globals.tile7___189156); + r0 = pxsim_Array__push(s.tmp_0, globals.tile8___189157); + r0 = pxsim_Array__push(s.tmp_0, globals.tile9___189158); + r0 = pxsim_Array__push(s.tmp_0, globals.tile10___189159); + r0 = pxsim_Array__push(s.tmp_0, globals.tile11___189160); + r0 = pxsim_Array__push(s.tmp_0, globals.tile14___189162); + r0 = pxsim_Array__push(s.tmp_0, globals.tile13___189163); + r0 = pxsim_Array__push(s.tmp_0, globals.tile15___189164); + r0 = pxsim_Array__push(s.tmp_0, globals.tile16___189165); + s.tmp_1 = tiles_setTilemap__P187558_mk(s); + s.tmp_2 = tiles_createTilemap__P187557_mk(s); + s.tmp_2.arg0 = _hex394970; + r0 = pxsim.image.ofBuffer(_hex394972); + s.tmp_2.arg1 = r0; + s.tmp_2.arg2 = s.tmp_0; + s.tmp_2.arg3 = 4; + s.callLocIdx = 158; s.pc = 9; return s.tmp_2; + case 9: + r0 = s.retval; + s.tmp_1.arg0 = r0; + s.callLocIdx = 159; s.pc = 8; return s.tmp_1; + case 8: + r0 = s.retval; + s.index___394998 = (0); case 1: + s.tmp_1 = r0 = s.index___394998; + r0 = (globals.user_shark_count___395004 - 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 = 2; continue; } + s.tmp_3 = summon_shark__P395007_mk(s); + s.callLocIdx = 160; s.pc = 10; return s.tmp_3; + case 10: + r0 = s.retval; + s.tmp_0 = r0 = globals.loading___394782; + r0 = (1 / globals.user_shark_count___395004); + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); + globals.loading___394782 = (r0); + r0 = (s.index___394998 + 1); + s.tmp_7 = r0; + if ((s.tmp_7) && (s.tmp_7).vtable) { + setupResume(s, 11); + pxsim_String__stringConv(s.tmp_7); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_7) + ""; } + case 11: + r0 = s.retval; + s.tmp_6 = r0; + r0 = pxsim_String__concat("(", s.tmp_6); + s.tmp_5 = r0; + if ((s.tmp_5) && (s.tmp_5).vtable) { + setupResume(s, 12); + pxsim_String__stringConv(s.tmp_5); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_5) + ""; } + case 12: + 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, 13); + pxsim_String__stringConv(s.tmp_3); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_3) + ""; } + case 13: + r0 = s.retval; + s.tmp_2 = r0; + if ((globals.user_shark_count___395004) && (globals.user_shark_count___395004).vtable) { + setupResume(s, 14); + pxsim_String__stringConv(globals.user_shark_count___395004); + checkResumeConsumed(); + return; + } else { s.retval = (globals.user_shark_count___395004) + ""; } + case 14: + r0 = s.retval; + s.tmp_8 = r0; + r0 = pxsim_String__concat(s.tmp_2, s.tmp_8); + s.tmp_1 = r0; + if ((s.tmp_1) && (s.tmp_1).vtable) { + setupResume(s, 15); + pxsim_String__stringConv(s.tmp_1); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_1) + ""; } + case 15: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_String__concat(s.tmp_0, ")"); + globals.message___394813 = (r0); + s.tmp_0 = pause__P185619_mk(s); + s.tmp_0.arg0 = 20; + s.callLocIdx = 161; s.pc = 16; return s.tmp_0; + case 16: + r0 = s.retval; + r0 = (s.index___394998 + 1); + s.index___394998 = (r0); + { step = 1; continue; } + case 2: + globals.loading___394782 = (1); + s.tmp_0 = pause__P185619_mk(s); + s.tmp_0.arg0 = 100; + s.callLocIdx = 162; s.pc = 17; return s.tmp_0; + case 17: + r0 = s.retval; + globals.loading___394782 = (0); + s.index___395041 = (0); + case 3: + s.tmp_1 = r0 = s.index___395041; + r0 = (globals.user_fish_count___395047 - 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 = 4; continue; } + s.tmp_3 = summon_fish__P394663_mk(s); + s.tmp_3.arg0 = true; + s.tmp_3.arg1 = true; + s.callLocIdx = 163; s.pc = 18; return s.tmp_3; + case 18: + r0 = s.retval; + s.tmp_0 = r0 = globals.loading___394782; + r0 = (globals.user_fish_count___395047 - 1); + s.tmp_2 = r0; + r0 = (1 / s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); + globals.loading___394782 = (r0); + r0 = (s.index___395041 + 1); + s.tmp_7 = r0; + if ((s.tmp_7) && (s.tmp_7).vtable) { + setupResume(s, 19); + pxsim_String__stringConv(s.tmp_7); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_7) + ""; } + case 19: + r0 = s.retval; + s.tmp_6 = r0; + r0 = pxsim_String__concat("(", s.tmp_6); + 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_4, "/"); + s.tmp_3 = r0; + if ((s.tmp_3) && (s.tmp_3).vtable) { + setupResume(s, 21); + pxsim_String__stringConv(s.tmp_3); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_3) + ""; } + case 21: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (globals.user_fish_count___395047 - 1); + s.tmp_9 = r0; + if ((s.tmp_9) && (s.tmp_9).vtable) { + setupResume(s, 22); + pxsim_String__stringConv(s.tmp_9); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_9) + ""; } + case 22: + r0 = s.retval; + s.tmp_8 = r0; + r0 = pxsim_String__concat(s.tmp_2, s.tmp_8); + s.tmp_1 = r0; + if ((s.tmp_1) && (s.tmp_1).vtable) { + setupResume(s, 23); + pxsim_String__stringConv(s.tmp_1); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_1) + ""; } + case 23: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_String__concat(s.tmp_0, ")"); + globals.message___394813 = (r0); + s.tmp_0 = pause__P185619_mk(s); + s.tmp_0.arg0 = 20; + s.callLocIdx = 164; s.pc = 24; return s.tmp_0; + case 24: + r0 = s.retval; + r0 = (s.index___395041 + 1); + s.index___395041 = (r0); + { step = 3; continue; } + case 4: + globals.loading___394782 = (1); + s.tmp_0 = pause__P185619_mk(s); + s.tmp_0.arg0 = 100; + s.callLocIdx = 165; s.pc = 25; return s.tmp_0; + case 25: + r0 = s.retval; + r0 = pxsim_Array__mk(); + s.tmp_0 = r0; + r0 = pxsim_Array__push(s.tmp_0, globals.transparency16___189149); + r0 = pxsim_Array__push(s.tmp_0, globals.oceanSand6___188423); + r0 = pxsim_Array__push(s.tmp_0, globals.hazardWater___188592); + r0 = pxsim_Array__push(s.tmp_0, globals.coral0___188265); + r0 = pxsim_Array__push(s.tmp_0, globals.coral4___188269); + r0 = pxsim_Array__push(s.tmp_0, globals.coral5___188270); + r0 = pxsim_Array__push(s.tmp_0, globals.coral2___188267); + r0 = pxsim_Array__push(s.tmp_0, globals.coral1___188266); + r0 = pxsim_Array__push(s.tmp_0, globals.tile1___189150); + r0 = pxsim_Array__push(s.tmp_0, globals.tile2___189151); + r0 = pxsim_Array__push(s.tmp_0, globals.tile3___189152); + r0 = pxsim_Array__push(s.tmp_0, globals.tile4___189153); + r0 = pxsim_Array__push(s.tmp_0, globals.tile5___189154); + r0 = pxsim_Array__push(s.tmp_0, globals.tile6___189155); + r0 = pxsim_Array__push(s.tmp_0, globals.tile7___189156); + r0 = pxsim_Array__push(s.tmp_0, globals.tile8___189157); + r0 = pxsim_Array__push(s.tmp_0, globals.tile9___189158); + r0 = pxsim_Array__push(s.tmp_0, globals.tile10___189159); + r0 = pxsim_Array__push(s.tmp_0, globals.tile11___189160); + r0 = pxsim_Array__push(s.tmp_0, globals.tile14___189162); + r0 = pxsim_Array__push(s.tmp_0, globals.tile13___189163); + r0 = pxsim_Array__push(s.tmp_0, globals.tile15___189164); + r0 = pxsim_Array__push(s.tmp_0, globals.tile12___189161); + s.tmp_1 = tiles_setTilemap__P187558_mk(s); + s.tmp_2 = tiles_createTilemap__P187557_mk(s); + s.tmp_2.arg0 = _hex395089; + r0 = pxsim.image.ofBuffer(_hex395091); + s.tmp_2.arg1 = r0; + s.tmp_2.arg2 = s.tmp_0; + s.tmp_2.arg3 = 4; + s.callLocIdx = 166; s.pc = 27; return s.tmp_2; + case 27: + r0 = s.retval; + s.tmp_1.arg0 = r0; + s.callLocIdx = 167; s.pc = 26; return s.tmp_1; + case 26: + r0 = s.retval; + s.tmp_0 = summon_fish__P394663_mk(s); + s.tmp_0.arg0 = false; + s.tmp_0.arg1 = false; + s.callLocIdx = 168; s.pc = 28; return s.tmp_0; + case 28: + r0 = s.retval; + globals.sprite_player_fish___395118 = (r0); + s.tmp_0 = Sprite_setKind__P187288_mk(s); + s.tmp_0.arg0 = globals.sprite_player_fish___395118; + s.tmp_0.arg1 = globals.Player___187345; + s.callLocIdx = 169; s.pc = 29; return s.tmp_0; + case 29: + r0 = s.retval; + s.tmp_0 = controller_moveSprite__P187169_mk(s); + s.tmp_0.arg0 = globals.sprite_player_fish___395118; + s.tmp_0.arg1 = 64; + s.tmp_0.arg2 = 64; + s.callLocIdx = 170; s.pc = 30; return s.tmp_0; + case 30: + r0 = s.retval; + s.tmp_0 = scene_cameraFollowSprite__P187681_mk(s); + s.tmp_0.arg0 = globals.sprite_player_fish___395118; + s.callLocIdx = 171; s.pc = 31; return s.tmp_0; + case 31: + r0 = s.retval; + s.location___395129 = (undefined); + s.tmp_0 = tiles_getTilesByType__P187567_mk(s); + s.tmp_0.arg0 = globals.tile13___189163; + s.callLocIdx = 172; s.pc = 32; return s.tmp_0; + case 32: + r0 = s.retval; + s.unnamed19238___U3 = (r0); + s.unnamed19239___U4 = (0); + case 5: + s.tmp_0 = r0 = s.unnamed19239___U4; + r0 = pxsim_Array__length(s.unnamed19238___U3); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 6; continue; } + r0 = pxsim_Array__getAt(s.unnamed19238___U3, s.unnamed19239___U4); + s.location___395129 = (r0); + s.tmp_2 = tiles_setTileAt__P187559_mk(s); + s.tmp_2.arg0 = s.location___395129; + s.tmp_2.arg1 = globals.tile15___189164; + s.callLocIdx = 173; s.pc = 33; return s.tmp_2; + case 33: + r0 = s.retval; + r0 = (s.unnamed19239___U4 + 1); + s.unnamed19239___U4 = (r0); + { step = 5; continue; } + case 6: + s.unnamed19238___U3 = (undefined); + s.tmp_0 = info_setScore__P187423_mk(s); + s.tmp_0.arg0 = 600; + s.callLocIdx = 174; s.pc = 34; return s.tmp_0; + case 34: r0 = s.retval; - r0 = (s.arg0).fields["sceneDefaultRate"] = (s.arg2); r0 = undefined; return leave(s, r0) default: oops() } } } -effects_ScreenEffect_constructor__P188011.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"]} +initilize_map__P394965.info = {"start":9490,"length":6777,"line":247,"column":0,"endLine":302,"endColumn":1,"fileName":"main.ts","functionName":"initilize_map","argumentNames":[]} -function effects_ScreenEffect_constructor__P188011_mk(s) { +function initilize_map__P394965_mk(s) { checkStack(s.depth); return { - parent: s, fn: effects_ScreenEffect_constructor__P188011, depth: s.depth + 1, + parent: s, fn: initilize_map__P394965, 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, + 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, + index___394998: undefined, + index___395041: undefined, + location___395129: undefined, + unnamed19238___U3: undefined, + unnamed19239___U4: undefined, } } +const _hex394970 = pxsim.BufferMethods.createBufferFromHex("40000c000202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020213131314141415151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515161616141414151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151616161414141515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151516161614141415151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515161616141414151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151616161414141515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151516161614141415151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515161616141414150f151515151515151515151515151515151515151515151515151515151515150f15151515151515151515151515151515151515151515150f1616161414140c1015151515151515150c151515151515151515151515151515150c15151515151015151515151515151515151515150c1515151515151515101616161414140d1103151515151515150d0809151515151515030405151515150b0e151515150312091515150b1515150706151515150d150a1515151503151116161601010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101") +const _hex394972 = pxsim.BufferMethods.createBufferFromHex("870440000c0000000200000000200000020000000020000002000000002000000200000000200000020000000020000002000000002200000200000000200000020000000020000002000000002000000200000000200000020000000020000002000000002000000200000000200000020000000020000002000000002200000200000000200000020000000020000002000000002000000200000000200000020000000020000002000000002000000200000000200000020000000022000002000000002200000200000000220000020000000020000002000000002000000200000000200000020000000020000002000000002000000200000000220000020000000020000002000000002000000200000000200000020000000020000002000000002200000200000000200000020000000020000002000000002000000200000000200000020000000020000002000000002000000200000000200000020000000020000002000000002000000200000000220000020000000022000002000000002000000200000000200000020000000020000002000000002000000200000000200000020000000020000002000000002200000200000000200000020000000020000002000000002000000200000000200000020000000022000002000000002000000200000000200000020000000020000002000000002000000200000000200000") +const _hex395089 = pxsim.BufferMethods.createBufferFromHex("40000c000202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020213131314141415151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515161616141414151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151616161414141515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151516161614141415151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515161616141414151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151616161414141515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151516161614141415151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515161616141414150f151515151515151515151515151515151515151515151515151515151515150f15151515151515151515151515151515151515151515150f1616161414140c1015151515151515150c151515151515151515151515151515150c15151515151015151515151515151515151515150c1515151515151515101616161414140d1103151515151515150d0809151515151515030405151515150b0e151515150312091515150b1515150706151515150d150a1515151503151116161601010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101") +const _hex395091 = pxsim.BufferMethods.createBufferFromHex("870440000c0000000200000000200000020000000020000002000000002000002222222222220000020000000020000002000000002200000200000000200000020000000020000002000000002000000200000000200000020000000020000002000000002000000200000000200000020000000020000002000000002200000200000000200000020000000020000002000000002000000200000000200000020000000020000002000000002000000200000000200000020000000022000002000000002200000200000000220000020000000020000002000000002000000200000000200000020000000020000002000000002000000200000000220000020000000020000002000000002000000200000000200000020000000020000002000000002200000200000000200000020000000020000002000000002000000200000000200000020000000020000002000000002000000200000000200000020000000020000002000000002000000200000000220000020000000022000002000000002000000200000000200000020000000020000002000000002000000200000000200000020000000020000002000000002200000200000000200000020000000020000002000000002000000200000000200000020000000022000002000000002000000200000000200000020000000020000002000000002000000200000000200000") -function effects_ParticleEffect_constructor__P188007(s) { +function info_setScore__P187423(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24308,38 +23374,34 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, effects_ParticleEffect__C188006_VT)) failedCast(r0); - r0 = (s.arg0).fields["sourceFactory"] = (s.arg3); - r0 = (s.arg0).fields["defaultRate"] = (s.arg1); - r0 = (s.arg0).fields["defaultLifespan"] = (s.arg2); + s.tmp_0 = info_PlayerInfo_setScore__P187459_mk(s); + s.tmp_0.arg0 = globals.player1___187474; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 24; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -effects_ParticleEffect_constructor__P188007.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"]} +info_setScore__P187423.info = {"start":7362,"length":80,"line":251,"column":4,"endLine":253,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"setScore","argumentNames":["value"]} -function effects_ParticleEffect_constructor__P188007_mk(s) { +function info_setScore__P187423_mk(s) { checkStack(s.depth); return { - parent: s, fn: effects_ParticleEffect_constructor__P188007, depth: s.depth + 1, + parent: s, fn: info_setScore__P187423, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function scene_Scene_init__P187658(s) { +function info_PlayerInfo_constructor__P187455(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24351,128 +23413,155 @@ 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__C187636_VT)) failedCast(r0); - r0 = s.arg0.fields["allSprites"]; + if (!checkSubtype(r0, info_PlayerInfo__C187443_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["visilibity"] = (0); + r0 = (s.arg0).fields["showScore"] = (undefined); + r0 = (s.arg0).fields["showLife"] = (undefined); + r0 = (s.arg0).fields["showPlayer"] = (undefined); + 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; r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = pxsim_ImageMethods.isMono(globals.screen___187019); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); if (!r0) { step = 1; continue; } - { step = 3; continue; } + r0 = 0; + { step = 2; continue; } case 1: + r0 = 2; case 2: - s.tmp_1 = power_poke__P186922_mk(s); - s.callLocIdx = 1019; s.pc = 4; return s.tmp_1; + // 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___187019); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 4; continue; } + r0 = 0; + { step = 5; continue; } case 4: - r0 = s.retval; + 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_Array__mk(); + r0 = pxsim_ImageMethods.width(globals.screen___187019); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["allSprites"] = (s.tmp_1); - r0 = (s.arg0).fields["spriteNextId"] = (0); - r0 = pxsim_pxtcore_mkAction(1, inline__P196212); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = control_EventContext_registerFrameHandler__P185609_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 = 1022; s.pc = 5; return s.tmp_1; - case 5: - r0 = s.retval; - s.tmp_0 = control_EventContext_registerFrameHandler__P185609_mk(s); - r0 = s.arg0.fields["eventContext"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = 13; - s.tmp_0.arg2 = controller__moveSprites__P187139; - s.callLocIdx = 1023; s.pc = 6; return s.tmp_0; + 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.retval; - r0 = pxsim_pxtcore_mkAction(1, inline__P196235); + r0 = (s.arg1 === 3); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = control_EventContext_registerFrameHandler__P185609_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 = 1025; s.pc = 7; return s.tmp_1; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 9; continue; } + r0 = pxsim_ImageMethods.isMono(globals.screen___187019); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 7; continue; } + r0 = 0; + { step = 8; continue; } case 7: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, inline__P196248); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = control_EventContext_registerFrameHandler__P185609_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 = 1029; s.pc = 8; return s.tmp_1; + r0 = 4; case 8: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, inline__P196269); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = control_EventContext_registerFrameHandler__P185609_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 = 1031; s.pc = 9; return s.tmp_1; + // 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_ImageMethods.height(globals.screen___187019); + 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 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, inline__P196277); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = control_EventContext_registerFrameHandler__P185609_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 = 1035; s.pc = 10; return s.tmp_1; - case 10: - r0 = s.retval; - s.tmp_0 = control_EventContext_registerFrameHandler__P185609_mk(s); - r0 = s.arg0.fields["eventContext"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = 200; - s.tmp_0.arg2 = control___screen_update__P186980; - s.callLocIdx = 1036; s.pc = 11; return s.tmp_0; - case 11: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, inline__P196306); + r0 = pxsim_ImageMethods.isMono(globals.screen___187019); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = helpers_arrayForEach__P185324_mk(s); - s.tmp_1.arg0 = globals.scene_Scene_initializers___187656; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 1038; s.pc = 12; return s.tmp_1; + 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___187019); + 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___187019); + 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: - r0 = s.retval; - case 3: + case 13: + case 14: + r0 = pxsim_numops_toBoolDecr(globals.players___189447); + 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 = pxsim_Array__mk(); + globals.players___189447 = (r0); + case 15: + case 16: + s.tmp_0 = r0 = globals.players___189447; + 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() } } } -scene_Scene_init__P187658.info = {"start":4168,"length":2477,"line":122,"column":8,"endLine":180,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"init","argumentNames":["this"]} +info_PlayerInfo_constructor__P187455.info = {"start":15446,"length":1370,"line":515,"column":8,"endLine":552,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["this","player"]} -function scene_Scene_init__P187658_mk(s) { +function info_PlayerInfo_constructor__P187455_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_init__P187658, depth: s.depth + 1, + parent: s, fn: info_PlayerInfo_constructor__P187455, depth: s.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 inline__P196212(s) { +function info_PlayerInfo_setScore__P187459(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24482,47 +23571,58 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = r0 = s.caps[0]; - r0 = s.tmp_0.fields["_millis"]; - s.tmp_2 = r0; - r0 = s.caps[0].fields["eventContext"]; - r0 = r0.fields["deltaTimeMillis"]; - s.tmp_3 = r0; - r0 = (s.tmp_2 + s.tmp_3); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_millis"] = (s.tmp_1); - s.tmp_0 = controller___update__P187167_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 = 1021; s.pc = 1; return s.tmp_0; + s.state___364749 = 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__C187443_VT)) failedCast(r0); + s.tmp_0 = info_PlayerInfo_getState__P187456_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 25; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; + s.state___364749 = (r0); + s.tmp_0 = info_updateFlag__P189496_mk(s); + s.tmp_0.arg0 = 2; + s.tmp_0.arg1 = true; + s.callLocIdx = 26; s.pc = 2; return s.tmp_0; + case 2: + r0 = s.retval; + s.tmp_0 = info_PlayerInfo_score__P187458_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 27; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.tmp_0 = r0 = s.state___364749; + r0 = (s.arg1 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["score"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P196212.info = {"start":4458,"length":217,"line":129,"column":72,"endLine":133,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} +info_PlayerInfo_setScore__P187459.info = {"start":18028,"length":220,"line":596,"column":8,"endLine":602,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"setScore","argumentNames":["this","value"]} -function inline__P196212_mk(s) { +function info_PlayerInfo_setScore__P187459_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P196212, depth: s.depth + 1, + parent: s, fn: info_PlayerInfo_setScore__P187459, depth: s.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___364749: undefined, + arg0: undefined, + arg1: undefined, } } -function inline__P196235(s) { +function info_updateFlag__P189496(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24532,41 +23632,61 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = PhysicsEngine__C187376_v4_2_mk(s); - r0 = s.caps[0].fields["physicsEngine"]; - s.tmp_0.arg0 = r0; - r0 = s.caps[0].fields["eventContext"]; - s.tmp_1 = r0; - r0 = s.tmp_1.fields["deltaTimeMillis"]; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + s.tmp_0 = info_initHUD__P189492_mk(s); + s.callLocIdx = 810; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + r0 = pxsim_numops_toBoolDecr(s.arg1); + if (!r0) { step = 1; continue; } + s.tmp_0 = r0 = globals.infoState___189446; + r0 = s.tmp_0.fields["visibilityFlag"]; s.tmp_2 = r0; - r0 = (s.tmp_2 / 1000); - s.tmp_0.arg1 = r0; - if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C187376_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.move; - s.pc = 1; return s.tmp_0; + r0 = (s.tmp_2 | s.arg0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["visibilityFlag"] = (s.tmp_1); + { step = 2; continue; } case 1: - r0 = s.retval; + s.tmp_0 = r0 = globals.infoState___189446; + r0 = globals.infoState___189446.fields["visibilityFlag"]; + s.tmp_4 = r0; + r0 = (~ s.tmp_4); + s.tmp_3 = r0; + r0 = (s.tmp_3 | s.arg0); + s.tmp_2 = r0; + r0 = (~ s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["visibilityFlag"] = (s.tmp_1); + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P196235.info = {"start":4970,"length":159,"line":138,"column":69,"endLine":141,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} +info_updateFlag__P189496.info = {"start":11455,"length":204,"line":393,"column":4,"endLine":397,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"updateFlag","argumentNames":["flag","on"]} -function inline__P196235_mk(s) { +function info_updateFlag__P189496_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P196235, depth: s.depth + 1, + parent: s, fn: info_updateFlag__P189496, depth: s.depth + 1, pc: 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 inline__P196248(s) { +function info_initHUD__P189492(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24576,80 +23696,47 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.dt___196249 = undefined; - s.s___196257 = undefined; - s.unnamed8922___U2 = undefined; - s.unnamed8923___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___196249 = (r0); - s.tmp_0 = scene_Camera_update__P187593_mk(s); - r0 = s.caps[0].fields["camera"]; - s.tmp_0.arg0 = r0; - s.callLocIdx = 1027; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.s___196257 = (undefined); - r0 = s.caps[0].fields["allSprites"]; - s.unnamed8922___U2 = (r0); - s.unnamed8923___U3 = (0); + r0 = pxsim_numops_toBoolDecr(globals.infoState___189446); + if (!r0) { step = 1; continue; } + { step = 3; continue; } case 1: - s.tmp_0 = r0 = s.unnamed8923___U3; - r0 = pxsim_Array__length(s.unnamed8922___U2); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 2; continue; } - r0 = pxsim_Array__getAt(s.unnamed8922___U2, s.unnamed8923___U3); - s.s___196257 = (r0); - s.tmp_2 = if___update_3_mk(s); - s.tmp_2.arg0 = s.s___196257; - r0 = s.caps[0].fields["camera"]; - s.tmp_2.arg1 = r0; - s.tmp_2.arg2 = s.dt___196249; - if (!s.tmp_2.arg0.vtable.iface) { - setupLambda(s.tmp_2, pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "__update"), 3); - s.callLocIdx = 1028; 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 = 1028; s.pc = 4; return s.tmp_2; } - else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 1028; s.pc = 4; return s.tmp_2;; } - else { s.callLocIdx = 1028; s.pc = 4; return s.tmp_2; } - } + case 2: + r0 = pxsim_pxtcore_mkClassInstance(info_InfoState__C189443_VT); + s.tmp_0 = r0; + s.tmp_1 = info_InfoState_constructor__P189444_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 779; s.pc = 4; return s.tmp_1; case 4: r0 = s.retval; - r0 = (s.unnamed8923___U3 + 1); - s.unnamed8923___U3 = (r0); - { step = 1; continue; } - case 2: - s.unnamed8922___U2 = (undefined); + globals.infoState___189446 = (s.tmp_0); + s.tmp_0 = scene_createRenderable__P187600_mk(s); + s.tmp_0.arg0 = 100; + s.tmp_0.arg1 = inline__P193334; + s.tmp_0.arg2 = undefined; + s.callLocIdx = 795; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + case 3: r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P196248.info = {"start":5318,"length":214,"line":147,"column":79,"endLine":153,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} +info_initHUD__P189492.info = {"start":2595,"length":2080,"line":97,"column":4,"endLine":147,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"initHUD","argumentNames":[]} -function inline__P196248_mk(s) { +function info_initHUD__P189492_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P196248, depth: s.depth + 1, + parent: s, fn: info_initHUD__P189492, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - dt___196249: undefined, - s___196257: undefined, - unnamed8922___U2: undefined, - unnamed8923___U3: undefined, } } -function inline__P196269(s) { +function inline__P193334(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24659,141 +23746,259 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = scene_Scene_render__P187663_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.callLocIdx = 1030; s.pc = 1; return s.tmp_0; + s.ps___193343 = undefined; + s.p___193364 = undefined; + s.scene___193397 = undefined; + s.elapsed___193400 = undefined; + s.t___193408 = undefined; + r0 = pxsim_numops_toBoolDecr(globals.infoState___189446); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + { step = 23; continue; } case 1: + case 2: + r0 = globals.infoState___189446.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__P185325_mk(s); + s.tmp_2.arg0 = globals.players___189447; + s.tmp_2.arg1 = inline__P193345; + s.callLocIdx = 780; s.pc = 24; return s.tmp_2; + case 24: r0 = s.retval; + s.ps___193343 = (r0); + s.tmp_0 = helpers_arrayForEach__P185324_mk(s); + s.tmp_0.arg0 = s.ps___193343; + s.tmp_0.arg1 = inline__P193354; + s.callLocIdx = 782; s.pc = 25; return s.tmp_0; + case 25: + r0 = s.retval; + s.tmp_0 = helpers_arrayForEach__P185324_mk(s); + s.tmp_0.arg0 = s.ps___193343; + s.tmp_0.arg1 = inline__P193360; + s.callLocIdx = 784; s.pc = 26; return s.tmp_0; + case 26: + r0 = s.retval; + { step = 12; continue; } + case 3: + s.p___193364 = (globals.player1___187474); + s.tmp_1 = info_PlayerInfo_hasScore__P187461_mk(s); + s.tmp_1.arg0 = s.p___193364; + s.callLocIdx = 785; 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___189446.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__P187469_mk(s); + s.tmp_4.arg0 = s.p___193364; + s.callLocIdx = 786; s.pc = 28; return s.tmp_4; + case 28: + r0 = s.retval; + case 6: + case 7: + s.tmp_1 = info_PlayerInfo_hasLife__P187465_mk(s); + s.tmp_1.arg0 = s.p___193364; + s.callLocIdx = 787; 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___189446.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__P187470_mk(s); + s.tmp_4.arg0 = s.p___193364; + s.callLocIdx = 788; s.pc = 30; return s.tmp_4; + case 30: + r0 = s.retval; + case 10: + case 11: + s.tmp_0 = info_PlayerInfo_raiseLifeZero__P187467_mk(s); + s.tmp_0.arg0 = s.p___193364; + s.tmp_0.arg1 = true; + s.callLocIdx = 789; s.pc = 31; return s.tmp_0; + case 31: + r0 = s.retval; + case 12: + r0 = globals.infoState___189446.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___189446.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__P187749_mk(s); + s.callLocIdx = 790; s.pc = 32; return s.tmp_4; + case 32: + r0 = s.retval; + s.scene___193397 = (r0); + r0 = globals.infoState___189446.fields["gameEnd"]; + s.tmp_0 = r0; + r0 = s.scene___193397.fields["_millis"]; + s.tmp_1 = r0; + r0 = (s.tmp_0 - s.tmp_1); + s.elapsed___193400 = (r0); + s.tmp_0 = info_drawTimer__P189497_mk(s); + s.tmp_0.arg0 = s.elapsed___193400; + s.callLocIdx = 792; s.pc = 33; return s.tmp_0; + case 33: + r0 = s.retval; + r0 = (s.elapsed___193400 / 1000); + s.t___193408 = (r0); + r0 = (s.t___193408 <= 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 19; continue; } + s.t___193408 = (0); + r0 = globals.infoState___189446.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___189446).fields["countdownExpired"] = (true); + r0 = (globals.infoState___189446).fields["gameEnd"] = (undefined); + r0 = globals.infoState___189446.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___189446; + if (!s.tmp_1.arg0.vtable.iface) { + setupLambda(s.tmp_1, pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "countdownEndHandler"), 1); + s.callLocIdx = 793; 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 = 793; s.pc = 34; return s.tmp_1; } + else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 793; s.pc = 34; return s.tmp_1;; } + else { s.callLocIdx = 793; s.pc = 34; return s.tmp_1; } + } + case 34: + r0 = s.retval; + { step = 16; continue; } + case 15: + s.tmp_0 = game_over__P187759_mk(s); + s.tmp_0.arg0 = false; + s.tmp_0.arg1 = undefined; + s.callLocIdx = 794; s.pc = 35; return s.tmp_0; + case 35: + 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() } } } -inline__P196269.info = {"start":5673,"length":109,"line":158,"column":76,"endLine":161,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} +inline__P193334.info = {"start":2755,"length":1903,"line":104,"column":12,"endLine":145,"endColumn":13,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":[]} -function inline__P196269_mk(s) { +function inline__P193334_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P196269, depth: s.depth + 1, + parent: s, fn: inline__P193334, depth: s.depth + 1, pc: 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___193343: undefined, + p___193364: undefined, + scene___193397: undefined, + elapsed___193400: undefined, + t___193408: undefined, } } -function inline__P196277(s) { +function inline__P193345(s) { let r0 = s.r0, step = s.pc; s.pc = -1; -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.tmp_0 = r0 = globals.stats___187746; - 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___185604; - 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___185604; - if ((globals.control_EventContext_lastStats___185603) && (globals.control_EventContext_lastStats___185603).vtable) { - setupResume(s, 8); - pxsim_String__stringConv(globals.control_EventContext_lastStats___185603); - checkResumeConsumed(); - return; - } else { s.retval = (globals.control_EventContext_lastStats___185603) + ""; } - case 8: - r0 = s.retval; - s.tmp_3 = r0; - r0 = s.caps[0].fields["allSprites"]; - s.tmp_8 = r0; - r0 = pxsim_Array__length(s.tmp_8); - s.tmp_7 = r0; - if ((s.tmp_7) && (s.tmp_7).vtable) { - setupResume(s, 9); - pxsim_String__stringConv(s.tmp_7); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_7) + ""; } - case 9: - r0 = s.retval; - s.tmp_6 = r0; - r0 = pxsim_String__concat(" sprites:", s.tmp_6); - s.tmp_5 = r0; - if ((s.tmp_5) && (s.tmp_5).vtable) { - setupResume(s, 10); - pxsim_String__stringConv(s.tmp_5); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_5) + ""; } - case 10: - r0 = s.retval; - s.tmp_4 = r0; - r0 = pxsim_String__concat(s.tmp_3, s.tmp_4); - s.tmp_2.arg0 = r0; - setupLambda(s.tmp_2, s.tmp_2.argL); - s.callLocIdx = 1032; s.pc = 7; return s.tmp_2; - case 7: - r0 = s.retval; - case 3: - case 4: - r0 = pxsim_numops_toBoolDecr(globals.debug___187745); - if (!r0) { step = 5; continue; } - s.tmp_0 = PhysicsEngine__C187376_v3_1_mk(s); - r0 = s.caps[0].fields["physicsEngine"]; - s.tmp_0.arg0 = r0; - if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C187376_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__P187871_mk(s); - s.callLocIdx = 1033; s.pc = 12; return s.tmp_0; - case 12: - r0 = s.retval; - s.tmp_0 = power_checkDeepSleep__P186923_mk(s); - s.callLocIdx = 1034; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; - r0 = undefined; +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = pxsim_numops_toBoolDecr(s.arg0); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_Boolean__bang(s.tmp_0); return leave(s, r0) default: oops() } } } -inline__P196277.info = {"start":5899,"length":504,"line":163,"column":80,"endLine":175,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} +inline__P193345.info = {"start":3003,"length":8,"line":109,"column":46,"endLine":109,"endColumn":54,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["p"]} -function inline__P196277_mk(s) { +function inline__P193345_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P196277, depth: s.depth + 1, + parent: s, fn: inline__P193345, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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, } } -function inline__P196306(s) { +function inline__P193354(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24807,23 +24012,21 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = lambda_2_mk(s); - s.tmp_0.argL = s.arg0; - s.tmp_0.arg0 = s.caps[0]; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 1037; s.pc = 1; return s.tmp_0; + s.tmp_0 = info_PlayerInfo_drawPlayer__P187468_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 781; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P196306.info = {"start":6621,"length":12,"line":179,"column":39,"endLine":179,"endColumn":51,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":["f"]} +inline__P193354.info = {"start":3087,"length":19,"line":111,"column":31,"endLine":111,"endColumn":50,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["p"]} -function inline__P196306_mk(s) { +function inline__P193354_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P196306, depth: s.depth + 1, + parent: s, fn: inline__P193354, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -24833,7 +24036,7 @@ function inline__P196306_mk(s) { -function game_consoleOverlay_draw__P187871(s) { +function inline__P193360(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24843,191 +24046,328 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.height___196355 = undefined; - s.top___196360 = undefined; - s.i___196366 = undefined; - s.t___196379 = undefined; - s.tOff___196386 = undefined; - s.tab___196388 = undefined; - s.unnamed8926___U6 = undefined; - s.unnamed8927___U7 = undefined; - s.padding___196390 = undefined; - r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___189862); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + s.tmp_0 = info_PlayerInfo_raiseLifeZero__P187467_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = false; + s.callLocIdx = 783; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +inline__P193360.info = {"start":3189,"length":27,"line":113,"column":31,"endLine":113,"endColumn":58,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["p"]} + +function inline__P193360_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: inline__P193360, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function info_drawTimer__P189497(s) { +let r0 = s.r0, 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___193436 = undefined; + s.smallFont___193438 = undefined; + s.seconds___193440 = undefined; + s.width___193444 = undefined; + s.left___193449 = undefined; + s.color1___193459 = undefined; + s.color2___193463 = undefined; + s.temp___193476 = undefined; + s.remainder___193512 = undefined; + s.decimalLeft___193531 = undefined; + s.minutes___193549 = undefined; + s.remainder___193553 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = (s.arg0 < 0); s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + s.arg0 = (0); case 1: - r0 = pxsim_numops_toBoolDecr(globals.instance___189816); - s.tmp_4 = r0; - r0 = pxsim_Boolean__bang(s.tmp_4); - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); case 2: - // jmp value (already in r0) - s.tmp_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); - if (!r0) { step = 3; continue; } - { step = 13; continue; } - case 3: - case 4: - s.tmp_7 = if_charHeight_1_mk(s); - s.tmp_7.arg0 = globals.consoleFont___189870; - if (!s.tmp_7.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_7.arg0, "charHeight"); + r0 = (s.arg0 | 0); + s.arg0 = (r0); + s.font___193436 = (globals.font8___186962); + s.smallFont___193438 = (globals.font5___186967); + r0 = pxsim.Math_.idiv(s.arg0, 1000); + s.seconds___193440 = (r0); + s.tmp_2 = if_charWidth_1_mk(s); + s.tmp_2.arg0 = s.font___193436; + if (!s.tmp_2.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "charWidth"); } 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 = 1499; s.pc = 14; return s.tmp_7; } + 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 = 811; s.pc = 11; return s.tmp_2; } } - case 14: + case 11: r0 = s.retval; - s.tmp_6 = r0; - r0 = (s.tmp_6 + 2); - s.height___196355 = (r0); - r0 = pxsim_numops_toBoolDecr(globals.stats___187746); - if (!r0) { step = 5; continue; } - r0 = s.height___196355; - { step = 6; continue; } - case 5: - r0 = 0; - case 6: - // jmp value (already in r0) + s.tmp_1 = r0; + r0 = (s.tmp_1 * 5); s.tmp_0 = r0; - r0 = (2 + s.tmp_0); - s.top___196360 = (r0); - s.i___196366 = (0); - case 7: - s.tmp_1 = r0 = s.i___196366; - r0 = pxsim_Array__length(globals.consoleStrings___189862); + r0 = (s.tmp_0 - 2); + s.width___193444 = (r0); + r0 = pxsim_ImageMethods.width(globals.screen___187019); s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); + r0 = (s.tmp_2 >> 1); + s.tmp_1 = r0; + r0 = (s.width___193444 >> 1); + 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 = 12; continue; } - r0 = pxsim_Array__getAt(globals.consoleStrings___189862, s.i___196366); - s.tmp_5 = r0; - r0 = pxsim_String_.indexOf(s.tmp_5, "\t", undefined); - s.tmp_4 = r0; - r0 = (s.tmp_4 >= 0); + r0 = (s.tmp_0 + 1); + s.left___193449 = (r0); + r0 = globals.infoState___189446.fields["fontColor"]; + s.color1___193459 = (r0); + r0 = globals.infoState___189446.fields["bgColor"]; + s.color2___193463 = (r0); + r0 = (s.seconds___193440 < 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___193440 & 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___187019); s.tmp_3 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 10; continue; } - s.tmp_6 = helpers_stringSplit__P185334_mk(s); - r0 = pxsim_Array__getAt(globals.consoleStrings___189862, s.i___196366); - s.tmp_6.arg0 = r0; - s.tmp_6.arg1 = "\t"; - s.tmp_6.arg2 = undefined; - s.callLocIdx = 1500; s.pc = 15; return s.tmp_6; + 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___193476 = (s.color1___193459); + s.color1___193459 = (s.color2___193463); + s.color2___193463 = (s.temp___193476); + case 7: + case 8: + s.tmp_0 = helpers_imageFillRect__P186945_mk(s); + s.tmp_0.arg0 = globals.screen___187019; + r0 = (s.left___193449 - 3); + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = 0; + r0 = (s.width___193444 + 6); + s.tmp_0.arg3 = r0; + s.tmp_2 = if_charHeight_1_mk(s); + s.tmp_2.arg0 = s.font___193436; + 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 = 812; 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___189446.fields["borderColor"]; + s.tmp_0.arg5 = r0; + s.callLocIdx = 813; s.pc = 12; return s.tmp_0; + case 12: + r0 = s.retval; + s.tmp_0 = helpers_imageFillRect__P186945_mk(s); + s.tmp_0.arg0 = globals.screen___187019; + r0 = (s.left___193449 - 2); + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = 0; + r0 = (s.width___193444 + 4); + s.tmp_0.arg3 = r0; + s.tmp_2 = if_charHeight_1_mk(s); + s.tmp_2.arg0 = s.font___193436; + 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 = 814; s.pc = 15; return s.tmp_2; } + } case 15: r0 = s.retval; - s.t___196379 = (r0); - s.tOff___196386 = (0); - s.tab___196388 = (undefined); - s.unnamed8926___U6 = (s.t___196379); - s.unnamed8927___U7 = (0); - case 8: - s.tmp_0 = r0 = s.unnamed8927___U7; - r0 = pxsim_Array__length(s.unnamed8926___U6); s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); + r0 = (s.tmp_1 + 2); + s.tmp_0.arg4 = r0; + s.tmp_0.arg5 = s.color2___193463; + s.callLocIdx = 815; s.pc = 14; return s.tmp_0; + case 14: + r0 = s.retval; + r0 = (s.seconds___193440 < 60); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 9; continue; } - r0 = pxsim_Array__getAt(s.unnamed8926___U6, s.unnamed8927___U7); - s.tab___196388 = (r0); - s.tmp_2 = r0 = globals.tabSize___189864; - s.tmp_5 = r0 = s.tOff___196386; - r0 = pxsim_String_.length(s.tab___196388); - s.tmp_6 = r0; - r0 = (s.tmp_5 + s.tmp_6); - s.tmp_4 = r0; - r0 = (s.tmp_4 % globals.tabSize___189864); - s.tmp_3 = r0; - r0 = (s.tmp_2 - s.tmp_3); - s.padding___196390 = (r0); + r0 = (s.arg0 % 1000); + s.tmp_1 = r0; + r0 = pxsim.Math_.idiv(s.tmp_1, 10); + s.remainder___193512 = (r0); s.tmp_0 = helpers_imagePrint__P186977_mk(s); s.tmp_0.arg0 = globals.screen___187019; - s.tmp_0.arg1 = s.tab___196388; - s.tmp_2 = r0 = s.tOff___196386; - s.tmp_4 = if_charWidth_1_mk(s); - s.tmp_4.arg0 = globals.consoleFont___189870; - 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 = 1501; s.pc = 17; return s.tmp_4; } - } + s.tmp_3 = info_formatDecimal__P189499_mk(s); + s.tmp_3.arg0 = s.seconds___193440; + s.callLocIdx = 816; s.pc = 17; return s.tmp_3; case 17: r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_2 * s.tmp_3); + 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 = (4 + s.tmp_1); - s.tmp_0.arg2 = r0; - s.tmp_5 = r0 = s.top___196360; - r0 = (s.i___196366 * s.height___196355); - s.tmp_6 = r0; - r0 = (s.tmp_5 + s.tmp_6); - s.tmp_0.arg3 = r0; - s.tmp_0.arg4 = globals.consoleColor___189861; - s.tmp_0.arg5 = globals.consoleFont___189870; + r0 = pxsim_String__concat(s.tmp_1, "."); + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = s.left___193449; + s.tmp_0.arg3 = 1; + s.tmp_0.arg4 = s.color1___193459; + s.tmp_0.arg5 = s.font___193436; s.tmp_0.arg6 = undefined; - s.callLocIdx = 1502; s.pc = 16; return s.tmp_0; + s.callLocIdx = 817; s.pc = 16; return s.tmp_0; case 16: r0 = s.retval; - s.tmp_0 = r0 = s.tOff___196386; - r0 = pxsim_String_.length(s.tab___196388); + s.tmp_0 = r0 = s.left___193449; + s.tmp_3 = if_charWidth_1_mk(s); + s.tmp_3.arg0 = s.font___193436; + 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 = 818; s.pc = 19; return s.tmp_3; } + } + case 19: + r0 = s.retval; s.tmp_2 = r0; - r0 = (s.tmp_2 + s.padding___196390); + r0 = (3 * s.tmp_2); s.tmp_1 = r0; r0 = (s.tmp_0 + s.tmp_1); - s.tOff___196386 = (r0); - r0 = (s.unnamed8927___U7 + 1); - s.unnamed8927___U7 = (r0); - { step = 8; continue; } - case 9: - s.unnamed8926___U6 = (undefined); - { step = 11; continue; } - case 10: + s.decimalLeft___193531 = (r0); s.tmp_0 = helpers_imagePrint__P186977_mk(s); s.tmp_0.arg0 = globals.screen___187019; - r0 = pxsim_Array__getAt(globals.consoleStrings___189862, s.i___196366); + s.tmp_1 = info_formatDecimal__P189499_mk(s); + s.tmp_1.arg0 = s.remainder___193512; + s.callLocIdx = 819; s.pc = 21; return s.tmp_1; + case 21: + r0 = s.retval; s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = 4; - s.tmp_1 = r0 = s.top___196360; - r0 = (s.i___196366 * s.height___196355); + s.tmp_0.arg2 = s.decimalLeft___193531; + s.tmp_0.arg3 = 3; + s.tmp_0.arg4 = s.color1___193459; + s.tmp_0.arg5 = s.smallFont___193438; + s.tmp_0.arg6 = undefined; + s.callLocIdx = 820; s.pc = 20; return s.tmp_0; + case 20: + r0 = s.retval; + { step = 10; continue; } + case 9: + r0 = pxsim.Math_.idiv(s.seconds___193440, 60); + s.minutes___193549 = (r0); + r0 = (s.seconds___193440 % 60); + s.remainder___193553 = (r0); + s.tmp_0 = helpers_imagePrint__P186977_mk(s); + s.tmp_0.arg0 = globals.screen___187019; + s.tmp_5 = info_formatDecimal__P189499_mk(s); + s.tmp_5.arg0 = s.minutes___193549; + s.callLocIdx = 821; 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; - r0 = (s.tmp_1 + s.tmp_2); - s.tmp_0.arg3 = r0; - s.tmp_0.arg4 = globals.consoleColor___189861; - s.tmp_0.arg5 = globals.consoleFont___189870; + 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__P189499_mk(s); + s.tmp_8.arg0 = s.remainder___193553; + s.callLocIdx = 822; 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___193449; + s.tmp_0.arg3 = 1; + s.tmp_0.arg4 = s.color1___193459; + s.tmp_0.arg5 = s.font___193436; s.tmp_0.arg6 = undefined; - s.callLocIdx = 1503; s.pc = 18; return s.tmp_0; - case 18: + s.callLocIdx = 823; s.pc = 22; return s.tmp_0; + case 22: r0 = s.retval; - case 11: - r0 = (s.i___196366 + 1); - s.i___196366 = (r0); - { step = 7; continue; } - case 12: - case 13: + case 10: r0 = undefined; return leave(s, r0) default: oops() } } } -game_consoleOverlay_draw__P187871.info = {"start":1364,"length":859,"line":44,"column":4,"endLine":61,"endColumn":5,"fileName":"pxt_modules/game/console.ts","functionName":"draw","argumentNames":[]} +info_drawTimer__P189497.info = {"start":13488,"length":1328,"line":462,"column":4,"endLine":497,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"drawTimer","argumentNames":["millis"]} -function game_consoleOverlay_draw__P187871_mk(s) { +function info_drawTimer__P189497_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_consoleOverlay_draw__P187871, depth: s.depth + 1, + parent: s, fn: info_drawTimer__P189497, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -25037,22 +24377,27 @@ function game_consoleOverlay_draw__P187871_mk(s) { tmp_5: undefined, tmp_6: undefined, tmp_7: undefined, - height___196355: undefined, - top___196360: undefined, - i___196366: undefined, - t___196379: undefined, - tOff___196386: undefined, - tab___196388: undefined, - unnamed8926___U6: undefined, - unnamed8927___U7: undefined, - padding___196390: undefined, + tmp_8: undefined, + font___193436: undefined, + smallFont___193438: undefined, + seconds___193440: undefined, + width___193444: undefined, + left___193449: undefined, + color1___193459: undefined, + color2___193463: undefined, + temp___193476: undefined, + remainder___193512: undefined, + decimalLeft___193531: undefined, + minutes___193549: undefined, + remainder___193553: undefined, + arg0: undefined, } } -function scene_systemMenu_isVisible__P187852(s) { +function info_formatDecimal__P189499(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25062,33 +24407,51 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.instance___189816); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = (s.arg0 | 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; s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); + 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() } } } -scene_systemMenu_isVisible__P187852.info = {"start":13170,"length":62,"line":395,"column":4,"endLine":397,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"isVisible","argumentNames":[]} +info_formatDecimal__P189499.info = {"start":28426,"length":156,"line":916,"column":4,"endLine":922,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"formatDecimal","argumentNames":["val"]} -function scene_systemMenu_isVisible__P187852_mk(s) { +function info_formatDecimal__P189499_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_isVisible__P187852, depth: s.depth + 1, + parent: s, fn: info_formatDecimal__P189499, 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_stringSplit__P185334(s) { +function info_InfoState_constructor__P189444(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25098,186 +24461,94 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.A___196444 = undefined; - s.lim___196446 = undefined; - s.s___196462 = undefined; - s.p___196465 = undefined; - s.R___196466 = undefined; - s.z___196480 = undefined; - s.T___196493 = undefined; - s.q___196494 = undefined; - s.e___196500 = 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, info_InfoState__C189443_VT)) failedCast(r0); + r0 = (s.arg0).fields["visibilityFlag"] = (8); + s.tmp_0 = r0 = s.arg0; r0 = pxsim_Array__mk(); - s.A___196444 = (r0); - s.lim___196446 = (0); - r0 = (s.arg2 === undefined); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["playerStates"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = info_defaultHeartImage__P189494_mk(s); + s.callLocIdx = 773; 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(_hex194778); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["multiplierImage"] = (s.tmp_1); + r0 = pxsim_ImageMethods.isMono(globals.screen___187019); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = (536870912 - 1); - s.lim___196446 = (r0); - { step = 4; continue; } + r0 = 0; + { step = 2; continue; } case 1: - r0 = (s.arg2 < 0); + 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___187019); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.lim___196446 = (0); - { step = 3; continue; } - case 2: - r0 = (s.arg2 | 0); - s.lim___196446 = (r0); + if (!r0) { step = 3; continue; } + r0 = 1; + { step = 4; continue; } case 3: + r0 = 3; case 4: - r0 = pxsim_String_.length(s.arg0); - s.s___196462 = (r0); - s.p___196465 = (0); - s.R___196466 = (s.arg1); - r0 = (s.lim___196446 == 0); + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = (s.arg0).fields["borderColor"] = (s.tmp_1); + r0 = pxsim_ImageMethods.isMono(globals.screen___187019); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 5; continue; } - r0 = s.A___196444; - { step = 21; continue; } + r0 = 1; + { step = 6; continue; } case 5: + r0 = 3; case 6: - r0 = (s.arg1 === undefined); + // jmp value (already in r0) s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 7; continue; } - r0 = pxsim_Array_.setAt(s.A___196444, 0, s.arg0); - r0 = s.A___196444; - { step = 21; continue; } - case 7: - case 8: - r0 = (s.s___196462 == 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 11; continue; } - s.tmp_1 = helpers_splitMatch__P189175_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_1.arg1 = 0; - s.tmp_1.arg2 = s.R___196466; - s.callLocIdx = 12; s.pc = 22; return s.tmp_1; - case 22: - r0 = s.retval; - s.z___196480 = (r0); - r0 = (s.z___196480 > -1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 9; continue; } - r0 = s.A___196444; - { step = 21; continue; } - case 9: - case 10: - r0 = pxsim_Array_.setAt(s.A___196444, 0, s.arg0); - r0 = s.A___196444; - { step = 21; continue; } - case 11: - case 12: - s.q___196494 = (s.p___196465); - case 13: - r0 = (s.q___196494 != s.s___196462); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 20; continue; } - s.tmp_1 = helpers_splitMatch__P189175_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_1.arg1 = s.q___196494; - s.tmp_1.arg2 = s.R___196466; - s.callLocIdx = 13; s.pc = 23; return s.tmp_1; - case 23: - r0 = s.retval; - s.e___196500 = (r0); - r0 = (s.e___196500 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 14; continue; } - r0 = (s.q___196494 + 1); - s.q___196494 = (r0); - { step = 19; continue; } - case 14: - r0 = (s.e___196500 == s.p___196465); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 15; continue; } - r0 = (s.q___196494 + 1); - s.q___196494 = (r0); - { step = 18; continue; } - case 15: - s.tmp_0 = helpers_stringSlice__P185332_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.p___196465; - s.tmp_0.arg2 = s.q___196494; - s.callLocIdx = 14; s.pc = 24; return s.tmp_0; - case 24: - r0 = s.retval; - s.T___196493 = (r0); - r0 = pxsim_Array__push(s.A___196444, s.T___196493); - r0 = pxsim_Array__length(s.A___196444); + 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_1 == s.lim___196446); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 16; continue; } - r0 = s.A___196444; - { step = 21; continue; } - case 16: - case 17: - s.p___196465 = (s.e___196500); - s.q___196494 = (s.p___196465); - case 18: - case 19: - { step = 13; continue; } - case 20: - s.tmp_0 = helpers_stringSlice__P185332_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.p___196465; - s.tmp_0.arg2 = s.q___196494; - s.callLocIdx = 15; s.pc = 25; return s.tmp_0; - case 25: - r0 = s.retval; - s.T___196493 = (r0); - r0 = pxsim_Array__push(s.A___196444, s.T___196493); - r0 = s.A___196444; - case 21: + r0 = (s.tmp_0).fields["playerStates"] = (s.tmp_1); + r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_stringSplit__P185334.info = {"start":11930,"length":1319,"line":407,"column":4,"endLine":451,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"stringSplit","argumentNames":["S","separator","limit"]} +info_InfoState_constructor__P189444.info = {"start":1045,"length":674,"line":43,"column":8,"endLine":61,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["this"]} -function helpers_stringSplit__P185334_mk(s) { +function info_InfoState_constructor__P189444_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_stringSplit__P185334, depth: s.depth + 1, + parent: s, fn: info_InfoState_constructor__P189444, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - A___196444: undefined, - lim___196446: undefined, - s___196462: undefined, - p___196465: undefined, - R___196466: undefined, - z___196480: undefined, - T___196493: undefined, - q___196494: undefined, - e___196500: undefined, + tmp_2: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } +const _hex194778 = pxsim.BufferMethods.createBufferFromHex("87040500050000000100010010100000000100001010000001000100") -function helpers_splitMatch__P189175(s) { +function info_defaultHeartImage__P189494(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25287,85 +24558,39 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.r___196576 = undefined; - s.s___196579 = undefined; - s.i___196589 = 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___196576 = (r0); - r0 = pxsim_String_.length(s.arg0); - s.s___196579 = (r0); - r0 = (s.arg1 + s.r___196576); - s.tmp_1 = r0; - r0 = (s.tmp_1 > s.s___196579); + r0 = pxsim_ImageMethods.isMono(globals.screen___187019); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = -1; - { step = 7; continue; } + r0 = pxsim.image.ofBuffer(_hex194806); + { step = 2; continue; } case 1: + r0 = pxsim.image.ofBuffer(_hex194808); case 2: - s.i___196589 = (0); - case 3: - r0 = (s.i___196589 < s.r___196576); - 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___196589); - 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___196589); - s.tmp_5 = r0; - r0 = (s.tmp_2 != s.tmp_5); + // jmp value (already in r0) 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___196589 + 1); - s.i___196589 = (r0); - { step = 3; continue; } - case 6: - r0 = (s.arg1 + s.r___196576); - case 7: + r0 = s.tmp_1; return leave(s, r0) default: oops() } } } -helpers_splitMatch__P189175.info = {"start":13255,"length":289,"line":453,"column":4,"endLine":462,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"splitMatch","argumentNames":["S","q","R"]} +info_defaultHeartImage__P189494.info = {"start":5080,"length":592,"line":162,"column":4,"endLine":183,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"defaultHeartImage","argumentNames":[]} -function helpers_splitMatch__P189175_mk(s) { +function info_defaultHeartImage__P189494_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_splitMatch__P189175, depth: s.depth + 1, + parent: s, fn: info_defaultHeartImage__P189494, depth: s.depth + 1, pc: 0, retval: undefined, 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___196576: undefined, - s___196579: undefined, - i___196589: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, } } +const _hex194806 = pxsim.BufferMethods.createBufferFromHex("87040800070000001011000001000100010010001000000101001000010001001011000000000000") +const _hex194808 = pxsim.BufferMethods.createBufferFromHex("8704080007000000c0cc00002c220c002222c2002222220c20222202222422004222020020220000") -function helpers_stringSlice__P185332(s) { +function scene_createRenderable__P187600(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25375,63 +24600,50 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.len___196545 = undefined; + s.renderable___194712 = 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___196545 = (r0); - r0 = (s.arg1 < 0); + r0 = pxsim_pxtcore_mkClassInstance(scene_Renderable__C187595_VT); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + s.tmp_1 = r0 = s.arg2; + r0 = pxsim_numops_toBool(s.tmp_1); if (!r0) { step = 1; continue; } - s.tmp_1 = Math_max__P185342_mk(s); - r0 = (s.len___196545 + s.arg1); - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 0; - s.callLocIdx = 11; s.pc = 7; return s.tmp_1; - case 7: - r0 = s.retval; - s.arg1 = (r0); + r0 = s.tmp_1; + { step = 2; continue; } case 1: + r0 = inline__P194718; case 2: - r0 = (s.arg2 == null); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.arg2 = (s.len___196545); - case 3: - case 4: - r0 = (s.arg2 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - r0 = (s.len___196545 + s.arg2); - s.arg2 = (r0); - case 5: - case 6: - s.tmp_0 = r0 = s.arg0; - s.tmp_1 = r0 = s.arg1; - r0 = (s.arg2 - s.arg1); + // jmp value (already in r0) s.tmp_2 = r0; - r0 = pxsim_String_.substr(s.tmp_0, s.tmp_1, s.tmp_2); + s.tmp_3 = scene_Renderable_constructor__P187596_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 = 1015; s.pc = 3; return s.tmp_3; + case 3: + r0 = s.retval; + s.renderable___194712 = (s.tmp_0); + r0 = s.renderable___194712; return leave(s, r0) default: oops() } } } -helpers_stringSlice__P185332.info = {"start":11047,"length":365,"line":373,"column":4,"endLine":389,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"stringSlice","argumentNames":["s","start","end"]} +scene_createRenderable__P187600.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 helpers_stringSlice__P185332_mk(s) { +function scene_createRenderable__P187600_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_stringSlice__P185332, depth: s.depth + 1, + parent: s, fn: scene_createRenderable__P187600, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - len___196545: undefined, + tmp_3: undefined, + renderable___194712: undefined, arg0: undefined, arg1: undefined, arg2: undefined, @@ -25441,7 +24653,34 @@ function helpers_stringSlice__P185332_mk(s) { -function scene_Scene_render__P187663(s) { +function inline__P194718(s) { +let r0 = s.r0, 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 = true; + return leave(s, r0) + default: oops() +} } } +inline__P194718.info = {"start":875,"length":10,"line":31,"column":32,"endLine":31,"endColumn":42,"fileName":"pxt_modules/game/renderable.ts","functionName":"inline","argumentNames":[]} + +function inline__P194718_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: inline__P194718, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, +} } + + + + + +function scene_Renderable_constructor__P187596(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25451,147 +24690,46 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.s___196673 = undefined; - s.unnamed8924___U1 = undefined; - s.unnamed8925___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, scene_Scene__C187636_VT)) failedCast(r0); - r0 = s.arg0.fields["flags"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 4); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 11; continue; } + if (!checkSubtype(r0, scene_Renderable__C187595_VT)) failedCast(r0); + r0 = (s.arg0).fields["handler"] = (s.arg1); + r0 = (s.arg0).fields["shouldBeVisible"] = (s.arg2); + s.tmp_0 = sprites_BaseSprite_constructor__P187077_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg3; + s.callLocIdx = 1012; s.pc = 1; return s.tmp_0; 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__P187663_mk(s); - r0 = s.arg0.fields["previousScene"]; - s.tmp_3.arg0 = r0; - s.callLocIdx = 1040; s.pc = 12; return s.tmp_3; - case 12: - r0 = s.retval; - { step = 6; continue; } - case 5: - s.tmp_0 = scene_Background_draw__P187491_mk(s); - r0 = s.arg0.fields["background"]; - s.tmp_0.arg0 = r0; - s.callLocIdx = 1041; 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__P185320_mk(s); - r0 = s.arg0.fields["allSprites"]; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = inline__P196650; - s.callLocIdx = 1046; 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___196673 = (undefined); - r0 = s.arg0.fields["allSprites"]; - s.unnamed8924___U1 = (r0); - s.unnamed8925___U2 = (0); - case 9: - s.tmp_0 = r0 = s.unnamed8925___U2; - r0 = pxsim_Array__length(s.unnamed8924___U1); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 10; continue; } - r0 = pxsim_Array__getAt(s.unnamed8924___U1, s.unnamed8925___U2); - s.s___196673 = (r0); - s.tmp_2 = if___draw_2_mk(s); - s.tmp_2.arg0 = s.s___196673; - 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 = 1047; 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 = 1047; s.pc = 15; return s.tmp_2; } - else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 1047; s.pc = 15; return s.tmp_2;; } - else { s.callLocIdx = 1047; s.pc = 15; return s.tmp_2; } - } - case 15: r0 = s.retval; - r0 = (s.unnamed8925___U2 + 1); - s.unnamed8925___U2 = (r0); - { step = 9; continue; } - case 10: - s.unnamed8924___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__P187663.info = {"start":7844,"length":917,"line":221,"column":8,"endLine":245,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"render","argumentNames":["this"]} +scene_Renderable_constructor__P187596.info = {"start":83,"length":212,"line":2,"column":8,"endLine":8,"endColumn":9,"fileName":"pxt_modules/game/renderable.ts","functionName":"inline","argumentNames":["this","handler","shouldBeVisible","z"]} -function scene_Scene_render__P187663_mk(s) { +function scene_Renderable_constructor__P187596_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_render__P187663, depth: s.depth + 1, - pc: 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___196673: undefined, - unnamed8924___U1: undefined, - unnamed8925___U2: undefined, + parent: s, fn: scene_Renderable_constructor__P187596, 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 inline__P196650(s) { +function info_PlayerInfo_drawLives__P187470(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25601,84 +24739,290 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.state___193929 = undefined; + s.font___193935 = undefined; + s.i___193979 = undefined; + s.num___194001 = undefined; + s.textWidth___194008 = undefined; + s.mult___194061 = 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 = 1042; s.pc = 3; return s.tmp_2; } - } - case 3: + r0 = s.arg0; + if (!checkSubtype(r0, info_PlayerInfo__C187443_VT)) failedCast(r0); + s.tmp_0 = info_PlayerInfo_getState__P187456_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 858; s.pc = 8; return s.tmp_0; + case 8: r0 = s.retval; + s.state___193929 = (r0); + r0 = s.state___193929.fields["life"]; 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 = 1043; s.pc = 4; return s.tmp_4; } - } - case 4: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_1 - s.tmp_3); + r0 = (s.tmp_1 < 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; - { step = 2; continue; } + { step = 7; 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"); + case 2: + s.font___193935 = (globals.font8___186962); + r0 = s.state___193929.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__P186945_mk(s); + s.tmp_2.arg0 = globals.screen___187019; + s.tmp_2.arg1 = 0; + s.tmp_2.arg2 = 0; + r0 = s.state___193929.fields["life"]; + s.tmp_4 = r0; + r0 = globals.infoState___189446.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___189446.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___189446.fields["borderColor"]; + s.tmp_2.arg5 = r0; + s.callLocIdx = 859; s.pc = 9; return s.tmp_2; + case 9: + r0 = s.retval; + s.tmp_0 = helpers_imageFillRect__P186945_mk(s); + s.tmp_0.arg0 = globals.screen___187019; + s.tmp_0.arg1 = 0; + s.tmp_0.arg2 = 0; + r0 = s.state___193929.fields["life"]; + s.tmp_2 = r0; + r0 = globals.infoState___189446.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___189446.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___189446.fields["bgColor"]; + s.tmp_0.arg5 = r0; + s.callLocIdx = 860; s.pc = 10; return s.tmp_0; + case 10: + r0 = s.retval; + s.i___193979 = (0); + case 3: + r0 = s.state___193929.fields["life"]; + s.tmp_1 = r0; + r0 = (s.i___193979 < 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___187019; + r0 = globals.infoState___189446.fields["heartImage"]; + s.tmp_3 = r0; + s.tmp_6 = r0 = s.i___193979; + r0 = globals.infoState___189446.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___193979 + 1); + s.i___193979 = (r0); + { step = 3; continue; } + case 4: + { step = 6; continue; } + case 5: + r0 = s.state___193929.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_String_.mkEmpty(); + s.tmp_2 = r0; + r0 = pxsim_String__concat(s.tmp_0, s.tmp_2); + s.num___194001 = (r0); + r0 = pxsim_String_.length(s.num___194001); + s.tmp_1 = r0; + s.tmp_3 = if_charWidth_1_mk(s); + s.tmp_3.arg0 = s.font___193935; + if (!s.tmp_3.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "charWidth"); } 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 = 1044; s.pc = 5; return s.tmp_6; } + 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 = 861; s.pc = 12; return s.tmp_3; } } - case 5: + 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___194008 = (r0); + s.tmp_0 = helpers_imageFillRect__P186945_mk(s); + s.tmp_0.arg0 = globals.screen___187019; + s.tmp_0.arg1 = 0; + s.tmp_0.arg2 = 0; + r0 = globals.infoState___189446.fields["heartImage"]; + s.tmp_4 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_4); + s.tmp_3 = r0; + r0 = globals.infoState___189446.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___194008); + s.tmp_1 = r0; + r0 = (s.tmp_1 + 5); + s.tmp_0.arg3 = r0; + r0 = globals.infoState___189446.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___189446.fields["borderColor"]; + s.tmp_0.arg5 = r0; + s.callLocIdx = 862; s.pc = 13; return s.tmp_0; + case 13: r0 = s.retval; + s.tmp_0 = helpers_imageFillRect__P186945_mk(s); + s.tmp_0.arg0 = globals.screen___187019; + s.tmp_0.arg1 = 0; + s.tmp_0.arg2 = 0; + r0 = globals.infoState___189446.fields["heartImage"]; + s.tmp_4 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_4); + s.tmp_3 = r0; + r0 = globals.infoState___189446.fields["multiplierImage"]; + s.tmp_6 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_6); s.tmp_5 = r0; - s.tmp_8 = if_id_1_mk(s); - s.tmp_8.arg0 = s.arg1; + r0 = (s.tmp_3 + s.tmp_5); + s.tmp_2 = r0; + r0 = (s.tmp_2 + s.textWidth___194008); + s.tmp_1 = r0; + r0 = (s.tmp_1 + 4); + s.tmp_0.arg3 = r0; + r0 = globals.infoState___189446.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___189446.fields["bgColor"]; + s.tmp_0.arg5 = r0; + s.callLocIdx = 863; s.pc = 14; return s.tmp_0; + case 14: + r0 = s.retval; + r0 = globals.infoState___189446.fields["heartImage"]; + s.tmp_0 = r0; + r0 = pxsim_ImageMethods.drawTransparentImage(globals.screen___187019, s.tmp_0, 1, 1); + r0 = globals.infoState___189446.fields["multiplierImage"]; + s.tmp_0 = r0; + r0 = pxsim_ImageMethods.clone(s.tmp_0); + s.mult___194061 = (r0); + r0 = globals.infoState___189446.fields["fontColor"]; + s.tmp_0 = r0; + r0 = pxsim_ImageMethods.replace(s.mult___194061, 1, s.tmp_0); + s.tmp_0 = r0 = globals.screen___187019; + s.tmp_1 = r0 = s.mult___194061; + r0 = globals.infoState___189446.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___193935; if (!s.tmp_8.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_8.arg0, "id"); + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_8.arg0, "charHeight"); } 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"]; } + 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 = 1045; s.pc = 6; return s.tmp_8; } + else { s.callLocIdx = 864; s.pc = 15; return s.tmp_8; } } - case 6: + case 15: r0 = s.retval; s.tmp_7 = r0; - r0 = (s.tmp_5 - s.tmp_7); - case 2: - // jmp value (already in r0) + r0 = globals.infoState___189446.fields["multiplierImage"]; + s.tmp_10 = r0; + r0 = pxsim_ImageMethods.height(s.tmp_10); s.tmp_9 = r0; - r0 = s.tmp_9; + 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__P186977_mk(s); + s.tmp_0.arg0 = globals.screen___187019; + s.tmp_0.arg1 = s.num___194001; + r0 = globals.infoState___189446.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___189446.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___189446.fields["fontColor"]; + s.tmp_0.arg4 = r0; + s.tmp_0.arg5 = s.font___193935; + s.tmp_0.arg6 = undefined; + s.callLocIdx = 865; s.pc = 16; return s.tmp_0; + case 16: + r0 = s.retval; + case 6: + case 7: + r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P196650.info = {"start":8422,"length":52,"line":235,"column":37,"endLine":235,"endColumn":89,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":["a","b"]} +info_PlayerInfo_drawLives__P187470.info = {"start":25956,"length":2458,"line":847,"column":8,"endLine":913,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"drawLives","argumentNames":["this"]} -function inline__P196650_mk(s) { +function info_PlayerInfo_drawLives__P187470_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P196650, depth: s.depth + 1, + parent: s, fn: info_PlayerInfo_drawLives__P187470, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -25690,15 +25034,21 @@ function inline__P196650_mk(s) { tmp_7: undefined, tmp_8: undefined, tmp_9: undefined, + tmp_10: undefined, + state___193929: undefined, + font___193935: undefined, + i___193979: undefined, + num___194001: undefined, + textWidth___194008: undefined, + mult___194061: undefined, arg0: undefined, - arg1: undefined, } } -function scene_Background_draw__P187491(s) { +function info_PlayerInfo_drawScore__P187469(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25708,123 +25058,153 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.s___194176 = undefined; + s.font___194180 = undefined; + s.offsetY___194181 = undefined; + s.num___194190 = undefined; + s.width___194194 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_Background__C187482_VT)) failedCast(r0); - r0 = s.arg0.fields["color"]; + if (!checkSubtype(r0, info_PlayerInfo__C187443_VT)) failedCast(r0); + s.tmp_1 = info_PlayerInfo_score__P187458_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 851; s.pc = 3; return s.tmp_1; + case 3: + r0 = s.retval; s.tmp_0 = r0; - r0 = pxsim_ImageMethods.fill(globals.screen___187019, s.tmp_0); - r0 = s.arg0.fields["_image"]; + r0 = (s.tmp_0 | 0); + s.s___194176 = (r0); + r0 = (s.s___194176 >= 1000000); 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___187019, s.tmp_1, 0, 0); + s.offsetY___194181 = (2); + s.font___194180 = (globals.font5___186967); + { step = 2; continue; } case 1: + s.offsetY___194181 = (1); + s.font___194180 = (globals.font8___186962); case 2: - r0 = s.arg0.fields["_layers"]; + r0 = pxsim_numops.toString(s.s___194176); + s.num___194190 = (r0); + r0 = pxsim_String_.length(s.num___194190); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = pxsim_pxtcore_mkAction(1, inline__P196705); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.arg0); - s.tmp_2 = helpers_arrayForEach__P185324_mk(s); - r0 = s.arg0.fields["_layers"]; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = s.tmp_1; - s.callLocIdx = 868; s.pc = 5; return s.tmp_2; - case 5: - r0 = s.retval; - case 3: - case 4: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -scene_Background_draw__P187491.info = {"start":1166,"length":545,"line":48,"column":8,"endLine":60,"endColumn":9,"fileName":"pxt_modules/game/background.ts","functionName":"draw","argumentNames":["this"]} - -function scene_Background_draw__P187491_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: scene_Background_draw__P187491, 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 inline__P196705(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.ox___196707 = undefined; - s.oy___196718 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; + s.tmp_2 = if_charWidth_1_mk(s); + s.tmp_2.arg0 = s.font___194180; + 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 = 852; s.pc = 4; return s.tmp_2; } } - r0 = s.caps[0].fields["camera"]; - r0 = r0.fields["drawOffsetX"]; + case 4: + r0 = s.retval; s.tmp_1 = r0; - r0 = s.arg0.fields["distance"]; - s.tmp_3 = r0; - r0 = (1 + s.tmp_3); + r0 = (s.tmp_0 * s.tmp_1); + s.width___194194 = (r0); + s.tmp_0 = helpers_imageFillRect__P186945_mk(s); + s.tmp_0.arg0 = globals.screen___187019; + r0 = pxsim_ImageMethods.width(globals.screen___187019); s.tmp_2 = r0; - r0 = (s.tmp_1 / s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim.Math_.round(s.tmp_0); - s.ox___196707 = (r0); - r0 = s.caps[0].fields["camera"]; - r0 = r0.fields["drawOffsetY"]; + r0 = (s.tmp_2 - s.width___194194); s.tmp_1 = r0; - r0 = s.arg0.fields["distance"]; + r0 = (s.tmp_1 - 2); + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = 0; + r0 = pxsim_ImageMethods.width(globals.screen___187019); + s.tmp_0.arg3 = r0; + s.tmp_4 = if_charHeight_1_mk(s); + s.tmp_4.arg0 = globals.font8___186962; + 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 = 853; s.pc = 6; return s.tmp_4; } + } + case 6: + r0 = s.retval; s.tmp_3 = r0; - r0 = (1 + s.tmp_3); + r0 = (s.tmp_3 + 3); + s.tmp_0.arg4 = r0; + r0 = globals.infoState___189446.fields["borderColor"]; + s.tmp_0.arg5 = r0; + s.callLocIdx = 854; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.tmp_0 = helpers_imageFillRect__P186945_mk(s); + s.tmp_0.arg0 = globals.screen___187019; + r0 = pxsim_ImageMethods.width(globals.screen___187019); s.tmp_2 = r0; - r0 = (s.tmp_1 / s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim.Math_.round(s.tmp_0); - s.oy___196718 = (r0); - s.tmp_0 = scene_BackgroundLayer_draw__P187500_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.ox___196707; - s.tmp_0.arg2 = s.oy___196718; - s.callLocIdx = 867; s.pc = 1; return s.tmp_0; - case 1: + r0 = (s.tmp_2 - s.width___194194); + 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___187019); + s.tmp_0.arg3 = r0; + s.tmp_4 = if_charHeight_1_mk(s); + s.tmp_4.arg0 = globals.font8___186962; + 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 = 855; 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___189446.fields["bgColor"]; + s.tmp_0.arg5 = r0; + s.callLocIdx = 856; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + s.tmp_0 = helpers_imagePrint__P186977_mk(s); + s.tmp_0.arg0 = globals.screen___187019; + s.tmp_0.arg1 = s.num___194190; + r0 = pxsim_ImageMethods.width(globals.screen___187019); + s.tmp_1 = r0; + r0 = (s.tmp_1 - s.width___194194); + s.tmp_0.arg2 = r0; + s.tmp_0.arg3 = s.offsetY___194181; + r0 = globals.infoState___189446.fields["fontColor"]; + s.tmp_0.arg4 = r0; + s.tmp_0.arg5 = s.font___194180; + s.tmp_0.arg6 = undefined; + s.callLocIdx = 857; s.pc = 9; return s.tmp_0; + case 9: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P196705.info = {"start":1373,"length":312,"line":53,"column":37,"endLine":58,"endColumn":17,"fileName":"pxt_modules/game/background.ts","functionName":"inline","argumentNames":["layer"]} +info_PlayerInfo_drawScore__P187469.info = {"start":24898,"length":1048,"line":807,"column":8,"endLine":845,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"drawScore","argumentNames":["this"]} -function inline__P196705_mk(s) { +function info_PlayerInfo_drawScore__P187469_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P196705, depth: s.depth + 1, + parent: s, fn: info_PlayerInfo_drawScore__P187469, depth: s.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___196707: undefined, - oy___196718: undefined, + tmp_4: undefined, + s___194176: undefined, + font___194180: undefined, + offsetY___194181: undefined, + num___194190: undefined, + width___194194: undefined, arg0: undefined, } } @@ -25832,7 +25212,7 @@ function inline__P196705_mk(s) { -function scene_BackgroundLayer_draw__P187500(s) { +function info_PlayerInfo_drawPlayer__P187468(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25842,251 +25222,649 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.w___196736 = undefined; - s.h___196739 = undefined; - s.pw___196742 = undefined; - s.ph___196746 = undefined; - s.rx___196755 = undefined; - s.ry___196758 = undefined; - s.y___196827 = undefined; - s.py___196828 = undefined; - s.dh___196837 = undefined; - s.x___196845 = undefined; - s.rxl___196846 = undefined; - s.px___196852 = undefined; - s.dw___196856 = undefined; + s.state___194390 = undefined; + s.font___194393 = undefined; + s.score___194395 = undefined; + s.life___194396 = undefined; + s.height___194397 = undefined; + s.scoreWidth___194398 = undefined; + s.lifeWidth___194399 = undefined; + s.offsetY___194402 = undefined; + s.showScore___194403 = undefined; + s.showLife___194411 = undefined; + s.width___194479 = undefined; + s.x___194489 = undefined; + s.y___194496 = undefined; + s.bump___194529 = undefined; + s.xLoc___194554 = undefined; + s.mult___194565 = undefined; + s.pNum___194627 = undefined; + s.iconWidth___194634 = undefined; + s.iconHeight___194642 = undefined; + s.iconX___194650 = undefined; + s.iconY___194662 = 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__C187492_VT)) failedCast(r0); - r0 = pxsim_ImageMethods.width(globals.screen___187019); - s.w___196736 = (r0); - r0 = pxsim_ImageMethods.height(globals.screen___187019); - s.h___196739 = (r0); - r0 = s.arg0.fields["img"]; - s.tmp_0 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_0); - s.pw___196742 = (r0); - r0 = s.arg0.fields["img"]; - s.tmp_0 = r0; - r0 = pxsim_ImageMethods.height(s.tmp_0); - s.ph___196746 = (r0); - r0 = pxsim_numops_toBoolDecr(s.pw___196742); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + if (!checkSubtype(r0, info_PlayerInfo__C187443_VT)) failedCast(r0); + s.tmp_0 = info_PlayerInfo_getState__P187456_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 834; s.pc = 43; return s.tmp_0; + case 43: + r0 = s.retval; + s.state___194390 = (r0); + s.font___194393 = (globals.font5___186967); + s.height___194397 = (4); + s.scoreWidth___194398 = (0); + s.lifeWidth___194399 = (0); + s.offsetY___194402 = (2); + r0 = s.arg0.fields["showScore"]; s.tmp_0 = r0; r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } + if (r0) { step = 1; continue; } r0 = s.tmp_0; { step = 2; continue; } case 1: - r0 = pxsim_numops_toBoolDecr(s.ph___196746); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); + r0 = s.state___194390.fields["score"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 !== undefined); 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; } + s.tmp_2 = r0; + s.showScore___194403 = (s.tmp_2); + r0 = s.arg0.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___194390.fields["life"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 !== undefined); case 4: - r0 = (0 - s.arg1); - s.rx___196755 = (r0); - r0 = (0 - s.arg2); - s.ry___196758 = (r0); - r0 = s.arg0.fields["alignX"]; + // jmp value (already in r0) + s.tmp_2 = r0; + s.showLife___194411 = (s.tmp_2); + r0 = pxsim_numops_toBoolDecr(s.showScore___194403); + if (!r0) { step = 5; continue; } + r0 = pxsim_String_.mkEmpty(); 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___196755; - r0 = (s.w___196736 + s.pw___196742); + r0 = s.state___194390.fields["score"]; s.tmp_2 = r0; - r0 = (s.tmp_1 - s.tmp_2); - s.rx___196755 = (r0); - { step = 7; continue; } - case 6: - s.tmp_0 = r0 = s.rx___196755; - r0 = (s.w___196736 + s.pw___196742); + 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; + s.tmp_1 = r0; + r0 = pxsim_String__concat(s.tmp_0, s.tmp_1); + s.score___194395 = (r0); + r0 = pxsim_String_.length(s.score___194395); + s.tmp_1 = r0; + s.tmp_3 = if_charWidth_1_mk(s); + s.tmp_3.arg0 = s.font___194393; + 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 = 835; s.pc = 45; return s.tmp_3; } + } + case 45: + r0 = s.retval; s.tmp_2 = r0; - r0 = (s.tmp_2 >> 1); + r0 = (s.tmp_1 * s.tmp_2); + s.tmp_0 = r0; + r0 = (s.tmp_0 + 3); + s.scoreWidth___194398 = (r0); + s.tmp_0 = r0 = s.height___194397; + s.tmp_2 = if_charHeight_1_mk(s); + s.tmp_2.arg0 = s.font___194393; + 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 = 836; s.pc = 46; return s.tmp_2; } + } + case 46: + r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_0 - s.tmp_1); - s.rx___196755 = (r0); - case 7: - r0 = s.arg0.fields["alignY"]; + r0 = (s.tmp_0 + s.tmp_1); + s.height___194397 = (r0); + s.tmp_0 = r0 = s.offsetY___194402; + s.tmp_3 = if_charHeight_1_mk(s); + s.tmp_3.arg0 = s.font___194393; + 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 = 837; s.pc = 47; return s.tmp_3; } + } + case 47: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_2 + 1); + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); + s.offsetY___194402 = (r0); + case 5: + case 6: + r0 = pxsim_numops_toBoolDecr(s.showLife___194411); + if (!r0) { step = 9; continue; } + r0 = s.state___194390.fields["life"]; 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 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 7; continue; } r0 = s.tmp_0; - { step = 10; continue; } + { step = 8; continue; } + case 7: + r0 = 0; case 8: - s.tmp_1 = r0 = s.ry___196758; - r0 = (s.h___196739 + s.ph___196746); + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_String_.mkEmpty(); s.tmp_2 = r0; - r0 = (s.tmp_1 - s.tmp_2); - s.ry___196758 = (r0); - { step = 10; continue; } - case 9: - s.tmp_0 = r0 = s.ry___196758; - r0 = (s.h___196739 + s.ph___196746); + 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___194396 = (r0); + r0 = globals.infoState___189446.fields["heartImage"]; + s.tmp_3 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_3); s.tmp_2 = r0; - r0 = (s.tmp_2 >> 1); + r0 = globals.infoState___189446.fields["multiplierImage"]; + s.tmp_5 = r0; + 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 - s.tmp_1); - s.ry___196758 = (r0); - case 10: - r0 = (s.rx___196755 % s.w___196736); - s.rx___196755 = (r0); - r0 = (s.rx___196755 < 0); + r0 = pxsim_String_.length(s.life___194396); + s.tmp_7 = r0; + s.tmp_9 = if_charWidth_1_mk(s); + s.tmp_9.arg0 = s.font___194393; + 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 = 838; s.pc = 49; return s.tmp_9; } + } + case 49: + 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 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 11; continue; } - r0 = (s.rx___196755 + s.w___196736); - s.rx___196755 = (r0); + r0 = (s.tmp_0 + 3); + s.lifeWidth___194399 = (r0); + s.tmp_0 = r0 = s.height___194397; + r0 = globals.infoState___189446.fields["heartImage"]; + s.tmp_2 = r0; + r0 = pxsim_ImageMethods.height(s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); + s.height___194397 = (r0); + case 9: + case 10: + s.tmp_0 = Math_max__P185342_mk(s); + s.tmp_0.arg0 = s.scoreWidth___194398; + s.tmp_0.arg1 = s.lifeWidth___194399; + s.callLocIdx = 839; s.pc = 50; return s.tmp_0; + case 50: + r0 = s.retval; + s.width___194479 = (r0); + s.tmp_0 = r0 = s.showScore___194403; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 11; continue; } + r0 = s.tmp_0; + { step = 12; continue; } case 11: + r0 = s.showLife___194411; case 12: - r0 = (s.ry___196758 % s.h___196739); - s.ry___196758 = (r0); - r0 = (s.ry___196758 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); if (!r0) { step = 13; continue; } - r0 = (s.ry___196758 + s.h___196739); - s.ry___196758 = (r0); + r0 = (s.height___194397 + 1); + s.height___194397 = (r0); case 13: case 14: - r0 = pxsim.Math_.floor(s.rx___196755); - s.rx___196755 = (r0); - r0 = pxsim.Math_.floor(s.ry___196758); - s.ry___196758 = (r0); - s.y___196827 = (0); - s.py___196828 = (0); + r0 = s.arg0.fields["left"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 15; continue; } + r0 = s.width___194479; + { step = 16; continue; } case 15: - r0 = (s.y___196827 < s.h___196739); + r0 = 0; + case 16: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = s.arg0.fields["x"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 - s.tmp_1); + s.x___194489 = (r0); + r0 = s.arg0.fields["up"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 17; continue; } + r0 = s.height___194397; + { step = 18; continue; } + case 17: + r0 = 0; + case 18: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = s.arg0.fields["y"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 - s.tmp_1); + s.y___194496 = (r0); + s.tmp_0 = r0 = s.showScore___194403; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 19; continue; } + r0 = s.tmp_0; + { step = 20; continue; } + case 19: + r0 = s.showLife___194411; + 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__P186945_mk(s); + s.tmp_2.arg0 = globals.screen___187019; + s.tmp_2.arg1 = s.x___194489; + s.tmp_2.arg2 = s.y___194496; + s.tmp_2.arg3 = s.width___194479; + s.tmp_2.arg4 = s.height___194397; + r0 = s.arg0.fields["border"]; + s.tmp_2.arg5 = r0; + s.callLocIdx = 840; s.pc = 51; return s.tmp_2; + case 51: + r0 = s.retval; + s.tmp_0 = helpers_imageFillRect__P186945_mk(s); + s.tmp_0.arg0 = globals.screen___187019; + r0 = (s.x___194489 + 1); + s.tmp_0.arg1 = r0; + r0 = (s.y___194496 + 1); + s.tmp_0.arg2 = r0; + r0 = (s.width___194479 - 2); + s.tmp_0.arg3 = r0; + r0 = (s.height___194397 - 2); + s.tmp_0.arg4 = r0; + r0 = s.arg0.fields["bg"]; + s.tmp_0.arg5 = r0; + s.callLocIdx = 841; s.pc = 52; return s.tmp_0; + case 52: + r0 = s.retval; + case 21: + case 22: + r0 = pxsim_numops_toBoolDecr(s.showScore___194403); + if (!r0) { step = 25; continue; } + r0 = s.arg0.fields["left"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 23; continue; } + r0 = (s.width___194479 - s.scoreWidth___194398); + { step = 24; continue; } + case 23: + r0 = 0; + case 24: + // jmp value (already in r0) + s.tmp_1 = r0; + s.bump___194529 = (s.tmp_1); + s.tmp_0 = helpers_imagePrint__P186977_mk(s); + s.tmp_0.arg0 = globals.screen___187019; + s.tmp_0.arg1 = s.score___194395; + r0 = (s.x___194489 + 1); + s.tmp_2 = r0; + r0 = (s.tmp_2 + s.bump___194529); + s.tmp_1 = r0; + r0 = (s.tmp_1 + 1); + s.tmp_0.arg2 = r0; + r0 = (s.y___194496 + 2); + s.tmp_0.arg3 = r0; + r0 = s.arg0.fields["fc"]; + s.tmp_0.arg4 = r0; + s.tmp_0.arg5 = s.font___194393; + s.tmp_0.arg6 = undefined; + s.callLocIdx = 842; s.pc = 53; return s.tmp_0; + case 53: + r0 = s.retval; + case 25: + case 26: + r0 = pxsim_numops_toBoolDecr(s.showLife___194411); + if (!r0) { step = 29; continue; } + r0 = s.arg0.fields["left"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 27; continue; } + r0 = (s.width___194479 - s.lifeWidth___194399); + { step = 28; continue; } + case 27: + r0 = 0; + case 28: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = (s.x___194489 + 1); + s.tmp_2 = r0; + r0 = (s.tmp_2 + s.tmp_1); + s.xLoc___194554 = (r0); + r0 = globals.infoState___189446.fields["multiplierImage"]; + s.tmp_0 = r0; + r0 = pxsim_ImageMethods.clone(s.tmp_0); + s.mult___194565 = (r0); + r0 = s.arg0.fields["fc"]; + s.tmp_0 = r0; + r0 = pxsim_ImageMethods.replace(s.mult___194565, 1, s.tmp_0); + s.tmp_0 = r0 = globals.screen___187019; + r0 = globals.infoState___189446.fields["heartImage"]; + s.tmp_1 = r0; + s.tmp_2 = r0 = s.xLoc___194554; + r0 = (s.y___194496 + s.offsetY___194402); + 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___187019; + s.tmp_1 = r0 = s.mult___194565; + s.tmp_3 = r0 = s.xLoc___194554; + r0 = globals.infoState___189446.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___194496 + s.offsetY___194402); + s.tmp_9 = r0; + s.tmp_11 = if_charHeight_1_mk(s); + s.tmp_11.arg0 = s.font___194393; + 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 = 843; 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___189446.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__P186977_mk(s); + s.tmp_0.arg0 = globals.screen___187019; + s.tmp_0.arg1 = s.life___194396; + s.tmp_3 = r0 = s.xLoc___194554; + r0 = globals.infoState___189446.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___189446.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___194496 + s.offsetY___194402); + s.tmp_0.arg3 = r0; + r0 = s.arg0.fields["fc"]; + s.tmp_0.arg4 = r0; + s.tmp_0.arg5 = s.font___194393; + s.tmp_0.arg6 = undefined; + s.callLocIdx = 844; s.pc = 55; return s.tmp_0; + case 55: + r0 = s.retval; + case 29: + case 30: + r0 = s.arg0.fields["showPlayer"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 22; continue; } - r0 = (s.y___196827 % s.ph___196746); - s.py___196828 = (r0); - s.tmp_0 = Math_min__P185343_mk(s); - r0 = (s.ph___196746 - s.py___196828); - s.tmp_0.arg0 = r0; - r0 = (s.h___196739 - s.ry___196758); - s.tmp_0.arg1 = r0; - s.callLocIdx = 870; s.pc = 24; return s.tmp_0; - case 24: + 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.dh___196837 = (r0); - s.x___196845 = (0); - s.rxl___196846 = (s.rx___196755); - case 16: - r0 = (s.x___196845 < s.w___196736); + s.tmp_2 = r0; + r0 = pxsim_String__concat(s.tmp_1, s.tmp_2); + s.pNum___194627 = (r0); + r0 = pxsim_String_.length(s.pNum___194627); + s.tmp_1 = r0; + s.tmp_3 = if_charWidth_1_mk(s); + s.tmp_3.arg0 = s.font___194393; + 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 = 845; 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 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 19; continue; } - r0 = (s.x___196845 % s.pw___196742); - s.px___196852 = (r0); - s.tmp_0 = Math_min__P185343_mk(s); - r0 = (s.pw___196742 - s.px___196852); - s.tmp_0.arg0 = r0; - r0 = (s.w___196736 - s.rxl___196846); + r0 = (s.tmp_0 + 1); + s.iconWidth___194634 = (r0); + s.tmp_0 = Math_max__P185342_mk(s); + s.tmp_0.arg0 = s.height___194397; + s.tmp_2 = if_charHeight_1_mk(s); + s.tmp_2.arg0 = s.font___194393; + 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 = 846; 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 = 871; s.pc = 25; return s.tmp_0; - case 25: + s.callLocIdx = 847; s.pc = 58; return s.tmp_0; + case 58: r0 = s.retval; - s.dw___196856 = (r0); - r0 = s.arg0.fields["img"]; - s.tmp_0 = r0; - r0 = pxsim_ImageMethods.drawImage(globals.screen___187019, s.tmp_0, s.rxl___196846, s.ry___196758); - r0 = (s.rxl___196846 + s.dw___196856); - s.tmp_0 = r0; - r0 = (s.tmp_0 % s.w___196736); - s.rxl___196846 = (r0); - r0 = s.arg0.fields["repeatX"]; + s.iconHeight___194642 = (r0); + r0 = s.arg0.fields["left"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 17; continue; } - r0 = s.dw___196856; - { step = 18; continue; } - case 17: - r0 = s.w___196736; - case 18: + if (!r0) { step = 31; continue; } + r0 = (s.x___194489 - s.iconWidth___194634); + s.tmp_1 = r0; + r0 = (s.tmp_1 + 1); + { step = 32; continue; } + case 31: + r0 = (s.x___194489 + s.width___194479); + s.tmp_2 = r0; + r0 = (s.tmp_2 - 1); + case 32: // jmp value (already in r0) + s.tmp_3 = r0; + s.iconX___194650 = (s.tmp_3); + s.iconY___194662 = (s.y___194496); + r0 = pxsim_numops_toBoolDecr(s.showScore___194403); s.tmp_1 = r0; - r0 = (s.x___196845 + s.tmp_1); - s.x___196845 = (r0); - { step = 16; continue; } - case 19: - r0 = (s.ry___196758 + s.dh___196837); + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = (s.tmp_0 % s.h___196739); - s.ry___196758 = (r0); - r0 = s.arg0.fields["repeatY"]; + 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___194411); + 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["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___194650 + s.tmp_5); + s.iconX___194650 = (r0); + r0 = s.arg0.fields["up"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 20; continue; } - r0 = s.dh___196837; - { step = 21; continue; } - case 20: - r0 = s.h___196739; - case 21: - // jmp value (already in r0) + if (!r0) { step = 37; continue; } + r0 = (s.iconY___194662 - 3); + s.iconY___194662 = (r0); + case 37: + case 38: + case 39: + case 40: + s.tmp_0 = helpers_imageFillRect__P186945_mk(s); + s.tmp_0.arg0 = globals.screen___187019; + s.tmp_0.arg1 = s.iconX___194650; + s.tmp_0.arg2 = s.iconY___194662; + s.tmp_0.arg3 = s.iconWidth___194634; + s.tmp_0.arg4 = s.iconHeight___194642; + r0 = s.arg0.fields["border"]; + s.tmp_0.arg5 = r0; + s.callLocIdx = 848; s.pc = 60; return s.tmp_0; + case 60: + r0 = s.retval; + s.tmp_0 = helpers_imagePrint__P186977_mk(s); + s.tmp_0.arg0 = globals.screen___187019; + s.tmp_0.arg1 = s.pNum___194627; + r0 = (s.iconX___194650 + 1); + s.tmp_0.arg2 = r0; + s.tmp_2 = r0 = s.iconY___194662; + r0 = (s.iconHeight___194642 >> 1); + s.tmp_3 = r0; + r0 = (s.tmp_2 + s.tmp_3); s.tmp_1 = r0; - r0 = (s.y___196827 + s.tmp_1); - s.y___196827 = (r0); - { step = 15; continue; } - case 22: - case 23: + s.tmp_6 = if_charHeight_1_mk(s); + s.tmp_6.arg0 = s.font___194393; + 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 = 849; 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["bg"]; + s.tmp_0.arg4 = r0; + s.tmp_0.arg5 = s.font___194393; + s.tmp_0.arg6 = undefined; + s.callLocIdx = 850; s.pc = 61; return s.tmp_0; + case 61: + r0 = s.retval; + case 41: + case 42: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_BackgroundLayer_draw__P187500.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"]} +info_PlayerInfo_drawPlayer__P187468.info = {"start":21253,"length":3635,"line":702,"column":8,"endLine":805,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"drawPlayer","argumentNames":["this"]} -function scene_BackgroundLayer_draw__P187500_mk(s) { +function info_PlayerInfo_drawPlayer__P187468_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_BackgroundLayer_draw__P187500, depth: s.depth + 1, + parent: s, fn: info_PlayerInfo_drawPlayer__P187468, depth: s.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___196736: undefined, - h___196739: undefined, - pw___196742: undefined, - ph___196746: undefined, - rx___196755: undefined, - ry___196758: undefined, - y___196827: undefined, - py___196828: undefined, - dh___196837: undefined, - x___196845: undefined, - rxl___196846: undefined, - px___196852: undefined, - dw___196856: 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___194390: undefined, + font___194393: undefined, + score___194395: undefined, + life___194396: undefined, + height___194397: undefined, + scoreWidth___194398: undefined, + lifeWidth___194399: undefined, + offsetY___194402: undefined, + showScore___194403: undefined, + showLife___194411: undefined, + width___194479: undefined, + x___194489: undefined, + y___194496: undefined, + bump___194529: undefined, + xLoc___194554: undefined, + mult___194565: undefined, + pNum___194627: undefined, + iconWidth___194634: undefined, + iconHeight___194642: undefined, + iconX___194650: undefined, + iconY___194662: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function scene_Camera_update__P187593(s) { +function info_PlayerInfo_raiseLifeZero__P187467(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26096,156 +25874,67 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.elapsed___196937 = undefined; - s.percentComplete___196951 = undefined; - s.damp___196958 = undefined; - s.f___196967 = undefined; - s.x___196973 = undefined; - s.y___196980 = undefined; + s.state___194368 = 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__C187577_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 = scene_Camera_offsetX__P187583_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_3 = Sprite_x__P187242_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_3.arg0 = r0; - s.callLocIdx = 1001; s.pc = 10; return s.tmp_3; - case 10: - r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_ImageMethods.width(globals.screen___187019); - s.tmp_5 = r0; - r0 = (s.tmp_5 >> 1); - s.tmp_4 = r0; - r0 = (s.tmp_2 - s.tmp_4); - s.tmp_1.arg1 = r0; - s.callLocIdx = 1002; s.pc = 9; return s.tmp_1; - case 9: - r0 = s.retval; - s.tmp_0 = scene_Camera_offsetY__P187585_mk(s); + if (!checkSubtype(r0, info_PlayerInfo__C187443_VT)) failedCast(r0); + s.tmp_0 = info_PlayerInfo_getState__P187456_mk(s); s.tmp_0.arg0 = s.arg0; - s.tmp_2 = Sprite_y__P187244_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 1003; s.pc = 12; return s.tmp_2; - case 12: - r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_ImageMethods.height(globals.screen___187019); - 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 = 1004; s.pc = 11; return s.tmp_0; - case 11: - r0 = s.retval; - case 1: - case 2: - s.tmp_0 = scene_Camera_offsetX__P187583_mk(s); - s.tmp_1 = r0 = s.arg0; - s.tmp_0.arg0 = r0; - r0 = s.tmp_1.fields["_offsetX"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); - s.tmp_0.arg1 = r0; - s.callLocIdx = 1006; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; - s.tmp_0 = scene_Camera_offsetY__P187585_mk(s); - s.tmp_1 = r0 = s.arg0; - s.tmp_0.arg0 = r0; - r0 = s.tmp_1.fields["_offsetY"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); - s.tmp_0.arg1 = r0; - s.callLocIdx = 1008; s.pc = 14; return s.tmp_0; - case 14: + s.callLocIdx = 831; s.pc = 9; return s.tmp_0; + case 9: r0 = s.retval; - 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.state___194368 = (r0); + r0 = s.state___194368.fields["life"]; s.tmp_1 = r0; - r0 = (s.tmp_1 !== undefined); + r0 = (s.tmp_1 !== null); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - r0 = pxsim.control.millis(); + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + r0 = s.state___194368.fields["life"]; s.tmp_2 = r0; - r0 = s.arg0.fields["shakeStartTime"]; + r0 = (s.tmp_2 <= 0); + case 2: + // jmp value (already in r0) s.tmp_3 = r0; - r0 = (s.tmp_2 - s.tmp_3); - s.elapsed___196937 = (r0); - r0 = s.arg0.fields["shakeDuration"]; - s.tmp_1 = r0; - r0 = (s.elapsed___196937 >= s.tmp_1); + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 7; continue; } + r0 = (s.state___194368).fields["life"] = (null); + r0 = s.state___194368.fields["lifeZeroHandler"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 3; continue; } - r0 = (s.arg0).fields["shakeStartTime"] = (undefined); + s.tmp_1 = if_lifeZeroHandler_1_mk(s); + s.tmp_1.arg0 = s.state___194368; + if (!s.tmp_1.arg0.vtable.iface) { + setupLambda(s.tmp_1, pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "lifeZeroHandler"), 1); + s.callLocIdx = 832; 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 = 832; s.pc = 10; return s.tmp_1; } + else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 832; s.pc = 10; return s.tmp_1;; } + else { s.callLocIdx = 832; s.pc = 10; return s.tmp_1; } + } + case 10: + r0 = s.retval; { step = 6; continue; } case 3: - r0 = s.arg0.fields["shakeDuration"]; - s.tmp_0 = r0; - r0 = (s.elapsed___196937 / s.tmp_0); - s.percentComplete___196951 = (r0); - s.damp___196958 = (1); - r0 = (s.percentComplete___196951 >= 0.75); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.arg1); if (!r0) { step = 4; continue; } - s.tmp_1 = Math_max__P185342_mk(s); - s.tmp_1.arg0 = 0; - r0 = (1 - s.percentComplete___196951); - s.tmp_1.arg1 = r0; - s.callLocIdx = 1011; s.pc = 15; return s.tmp_1; - case 15: + s.tmp_0 = game_over__P187759_mk(s); + s.tmp_0.arg0 = false; + s.tmp_0.arg1 = undefined; + s.callLocIdx = 833; s.pc = 11; return s.tmp_0; + case 11: r0 = s.retval; - s.damp___196958 = (r0); case 4: case 5: - r0 = s.arg0.fields["shakeAmplitude"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 * s.damp___196958); - s.f___196967 = (r0); - r0 = pxsim.Math_.random(); - s.tmp_1 = r0; - r0 = (s.tmp_1 * s.f___196967); - s.tmp_0 = r0; - r0 = (s.tmp_0 >> 0); - s.x___196973 = (r0); - r0 = pxsim.Math_.random(); - s.tmp_1 = r0; - r0 = (s.tmp_1 * s.f___196967); - s.tmp_0 = r0; - r0 = (s.tmp_0 >> 0); - s.y___196980 = (r0); - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["drawOffsetX"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 + s.x___196973); - 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___196980); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["drawOffsetY"] = (s.tmp_1); case 6: case 7: case 8: @@ -26253,33 +25942,27 @@ switch (step) { return leave(s, r0) default: oops() } } } -scene_Camera_update__P187593.info = {"start":2297,"length":1397,"line":77,"column":8,"endLine":112,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"update","argumentNames":["this"]} +info_PlayerInfo_raiseLifeZero__P187467.info = {"start":20869,"length":374,"line":690,"column":8,"endLine":700,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"raiseLifeZero","argumentNames":["this","gameOver"]} -function scene_Camera_update__P187593_mk(s) { +function info_PlayerInfo_raiseLifeZero__P187467_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Camera_update__P187593, depth: s.depth + 1, + parent: s, fn: info_PlayerInfo_raiseLifeZero__P187467, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - elapsed___196937: undefined, - percentComplete___196951: undefined, - damp___196958: undefined, - f___196967: undefined, - x___196973: undefined, - y___196980: undefined, + state___194368: undefined, arg0: undefined, + arg1: undefined, } } -function scene_Camera_offsetY__P187585(s) { +function info_PlayerInfo_hasLife__P187465(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26289,87 +25972,58 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___196999 = undefined; + s.state___194163 = 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__C187577_VT)) failedCast(r0); - s.tmp_0 = game_currentScene__P187749_mk(s); - s.callLocIdx = 998; s.pc = 5; return s.tmp_0; - case 5: + if (!checkSubtype(r0, info_PlayerInfo__C187443_VT)) failedCast(r0); + s.tmp_0 = info_PlayerInfo_getState__P187456_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 830; s.pc = 3; return s.tmp_0; + case 3: r0 = s.retval; - s.scene___196999 = (r0); - r0 = s.scene___196999.fields["tileMap"]; + s.state___194163 = (r0); + r0 = s.state___194163.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.scene___196999.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); + r0 = s.state___194163.fields["life"]; s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); + r0 = (s.tmp_2 !== null); 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_9 = tiles_TileMap_offsetY__P187539_mk(s); - r0 = s.scene___196999.fields["tileMap"]; - s.tmp_9.arg0 = r0; - s.tmp_9.arg1 = s.arg1; - s.callLocIdx = 1000; s.pc = 6; return s.tmp_9; - case 6: - r0 = s.retval; - s.tmp_8 = r0; - r0 = (s.tmp_7).fields["_offsetY"] = (s.tmp_8); - { step = 4; continue; } - case 3: - r0 = (s.arg0).fields["_offsetY"] = (s.arg1); - case 4: - r0 = undefined; + s.tmp_3 = r0; + r0 = s.tmp_3; return leave(s, r0) default: oops() } } } -scene_Camera_offsetY__P187585.info = {"start":1034,"length":267,"line":37,"column":8,"endLine":44,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"offsetY","argumentNames":["this","v"]} +info_PlayerInfo_hasLife__P187465.info = {"start":20346,"length":141,"line":673,"column":8,"endLine":676,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"hasLife","argumentNames":["this"]} -function scene_Camera_offsetY__P187585_mk(s) { +function info_PlayerInfo_hasLife__P187465_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Camera_offsetY__P187585, depth: s.depth + 1, + parent: s, fn: info_PlayerInfo_hasLife__P187465, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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, - scene___196999: undefined, + state___194163: undefined, arg0: undefined, - arg1: undefined, } } -function tiles_TileMap_offsetY__P187539(s) { +function info_PlayerInfo_hasScore__P187461(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26379,59 +26033,42 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.state___194267 = 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__C187534_VT)) failedCast(r0); - s.tmp_0 = Math_clamp__P185339_mk(s); - s.tmp_0.arg0 = 0; - s.tmp_1 = Math_max__P185342_mk(s); - s.tmp_3 = tiles_TileMap_areaHeight__P187541_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 893; s.pc = 3; return s.tmp_3; - case 3: - r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_ImageMethods.height(globals.screen___187019); - s.tmp_4 = r0; - r0 = (s.tmp_2 - s.tmp_4); - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 0; - s.callLocIdx = 894; 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 = 895; s.pc = 1; return s.tmp_0; + if (!checkSubtype(r0, info_PlayerInfo__C187443_VT)) failedCast(r0); + s.tmp_0 = info_PlayerInfo_getState__P187456_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 829; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; + s.state___194267 = (r0); + r0 = s.state___194267.fields["score"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 !== undefined); return leave(s, r0) default: oops() } } } -tiles_TileMap_offsetY__P187539.info = {"start":6560,"length":123,"line":239,"column":8,"endLine":241,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"offsetY","argumentNames":["this","value"]} +info_PlayerInfo_hasScore__P187461.info = {"start":18619,"length":111,"line":616,"column":8,"endLine":619,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"hasScore","argumentNames":["this"]} -function tiles_TileMap_offsetY__P187539_mk(s) { +function info_PlayerInfo_hasScore__P187461_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_offsetY__P187539, depth: s.depth + 1, + parent: s, fn: info_PlayerInfo_hasScore__P187461, depth: s.depth + 1, pc: 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___194267: undefined, arg0: undefined, - arg1: undefined, } } -function scene_Camera_offsetY__P187584(s) { +function info_PlayerInfo_score__P187458(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26441,24 +26078,60 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.state___194255 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_Camera__C187577_VT)) failedCast(r0); - r0 = s.arg0.fields["_offsetY"]; - return leaveAccessor(s, r0) + if (!checkSubtype(r0, info_PlayerInfo__C187443_VT)) failedCast(r0); + r0 = s.arg0.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 = (s.arg0).fields["showScore"] = (true); + case 1: + case 2: + r0 = s.arg0.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.arg0).fields["showPlayer"] = (true); + case 3: + case 4: + s.tmp_0 = info_PlayerInfo_getState__P187456_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 828; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + s.state___194255 = (r0); + r0 = s.state___194255.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___194255).fields["score"] = (0); + case 5: + case 6: + r0 = s.state___194255.fields["score"]; + return leave(s, r0) default: oops() } } } -scene_Camera_offsetY__P187584.info = {"start":966,"length":59,"line":34,"column":8,"endLine":36,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"offsetY","argumentNames":["this"]} -scene_Camera_offsetY__P187584.isGetter = true; +info_PlayerInfo_score__P187458.info = {"start":17492,"length":314,"line":578,"column":8,"endLine":587,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"score","argumentNames":["this"]} -function scene_Camera_offsetY__P187584_mk(s) { +function info_PlayerInfo_score__P187458_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Camera_offsetY__P187584, depth: s.depth + 1, + parent: s, fn: info_PlayerInfo_score__P187458, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + state___194255: undefined, arg0: undefined, } } @@ -26466,7 +26139,7 @@ function scene_Camera_offsetY__P187584_mk(s) { -function scene_Camera_offsetX__P187583(s) { +function info_PlayerInfo_getState__P187456(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26476,87 +26149,45 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___197055 = 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__C187577_VT)) failedCast(r0); - s.tmp_0 = game_currentScene__P187749_mk(s); - s.callLocIdx = 995; s.pc = 5; return s.tmp_0; - case 5: + if (!checkSubtype(r0, info_PlayerInfo__C187443_VT)) failedCast(r0); + s.tmp_0 = info_PlayerInfo_init__P189498_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 827; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - s.scene___197055 = (r0); - r0 = s.scene___197055.fields["tileMap"]; + r0 = globals.infoState___189446.fields["playerStates"]; 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___197055.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); + r0 = s.arg0.fields["_player"]; 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_9 = tiles_TileMap_offsetX__P187538_mk(s); - r0 = s.scene___197055.fields["tileMap"]; - s.tmp_9.arg0 = r0; - s.tmp_9.arg1 = s.arg1; - s.callLocIdx = 997; s.pc = 6; return s.tmp_9; - case 6: - r0 = s.retval; - s.tmp_8 = r0; - r0 = (s.tmp_7).fields["_offsetX"] = (s.tmp_8); - { step = 4; continue; } - case 3: - r0 = (s.arg0).fields["_offsetX"] = (s.arg1); - case 4: - r0 = undefined; + 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() } } } -scene_Camera_offsetX__P187583.info = {"start":690,"length":267,"line":26,"column":8,"endLine":33,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"offsetX","argumentNames":["this","v"]} +info_PlayerInfo_getState__P187456.info = {"start":17088,"length":121,"line":562,"column":8,"endLine":565,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"getState","argumentNames":["this"]} -function scene_Camera_offsetX__P187583_mk(s) { +function info_PlayerInfo_getState__P187456_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Camera_offsetX__P187583, depth: s.depth + 1, + parent: s, fn: info_PlayerInfo_getState__P187456, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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, - scene___197055: undefined, arg0: undefined, - arg1: undefined, } } -function tiles_TileMap_offsetX__P187538(s) { +function info_PlayerInfo_init__P189498(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26568,57 +26199,81 @@ 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__C187534_VT)) failedCast(r0); - s.tmp_0 = Math_clamp__P185339_mk(s); - s.tmp_0.arg0 = 0; - s.tmp_1 = Math_max__P185342_mk(s); - s.tmp_3 = tiles_TileMap_areaWidth__P187540_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 890; s.pc = 3; return s.tmp_3; - case 3: + if (!checkSubtype(r0, info_PlayerInfo__C187443_VT)) failedCast(r0); + s.tmp_0 = info_initHUD__P189492_mk(s); + s.callLocIdx = 824; s.pc = 5; return s.tmp_0; + case 5: r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_ImageMethods.width(globals.screen___187019); - s.tmp_4 = r0; - r0 = (s.tmp_2 - s.tmp_4); - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 0; - s.callLocIdx = 891; s.pc = 2; return s.tmp_1; - case 2: + 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__P189493_mk(s); + s.callLocIdx = 825; s.pc = 6; return s.tmp_2; + case 6: r0 = s.retval; - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = s.arg1; - s.callLocIdx = 892; s.pc = 1; return s.tmp_0; case 1: - r0 = s.retval; + case 2: + r0 = globals.infoState___189446.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__C187414_VT); + s.tmp_6 = r0; + r0 = undefined; + r0 = globals.infoState___189446.fields["playerStates"]; + s.tmp_7 = r0; + r0 = s.arg0.fields["_player"]; + s.tmp_9 = r0; + r0 = (s.tmp_9 - 1); + s.tmp_8 = r0; + r0 = pxsim_Array_.setAt(s.tmp_7, s.tmp_8, s.tmp_6); + case 3: + case 4: + r0 = undefined; return leave(s, r0) default: oops() } } } -tiles_TileMap_offsetX__P187538.info = {"start":6429,"length":121,"line":235,"column":8,"endLine":237,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"offsetX","argumentNames":["this","value"]} +info_PlayerInfo_init__P189498.info = {"start":16826,"length":252,"line":554,"column":8,"endLine":560,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"init","argumentNames":["this"]} -function tiles_TileMap_offsetX__P187538_mk(s) { +function info_PlayerInfo_init__P189498_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_offsetX__P187538, depth: s.depth + 1, + parent: s, fn: info_PlayerInfo_init__P189498, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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 scene_Camera_offsetX__P187582(s) { +function info_initMultiHUD__P189493(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26628,32 +26283,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, scene_Camera__C187577_VT)) failedCast(r0); - r0 = s.arg0.fields["_offsetX"]; - return leaveAccessor(s, r0) + r0 = globals.infoState___189446.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___189446; + 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___189446.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___189446; + s.tmp_6 = info_defaultMultiplayerHeartImage__P189495_mk(s); + s.callLocIdx = 796; 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___189446; + r0 = pxsim.image.ofBuffer(_hex194155); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["multiplierImage"] = (s.tmp_1); + case 5: + r0 = undefined; + return leave(s, r0) default: oops() } } } -scene_Camera_offsetX__P187582.info = {"start":622,"length":59,"line":23,"column":8,"endLine":25,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"offsetX","argumentNames":["this"]} -scene_Camera_offsetX__P187582.isGetter = true; +info_initMultiHUD__P189493.info = {"start":4681,"length":393,"line":149,"column":4,"endLine":160,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"initMultiHUD","argumentNames":[]} -function scene_Camera_offsetX__P187582_mk(s) { +function info_initMultiHUD__P189493_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Camera_offsetX__P187582, depth: s.depth + 1, + parent: s, fn: info_initMultiHUD__P189493, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, } } +const _hex194155 = pxsim.BufferMethods.createBufferFromHex("8704030003000000010100001000000001010000") -function PhysicsEngine_move__P187382(s) { +function info_defaultMultiplayerHeartImage__P189495(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26663,33 +26357,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, PhysicsEngine__C187376_VT)) failedCast(r0); - r0 = undefined; + r0 = pxsim_ImageMethods.isMono(globals.screen___187019); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = pxsim.image.ofBuffer(_hex194159); + { step = 2; continue; } + case 1: + r0 = pxsim.image.ofBuffer(_hex194161); + case 2: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = s.tmp_1; return leave(s, r0) default: oops() } } } -PhysicsEngine_move__P187382.info = {"start":351,"length":20,"line":18,"column":4,"endLine":18,"endColumn":24,"fileName":"pxt_modules/game/physics.ts","functionName":"move","argumentNames":["this","dt"]} +info_defaultMultiplayerHeartImage__P189495.info = {"start":5678,"length":503,"line":185,"column":4,"endLine":202,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"defaultMultiplayerHeartImage","argumentNames":[]} -function PhysicsEngine_move__P187382_mk(s) { +function info_defaultMultiplayerHeartImage__P189495_mk(s) { checkStack(s.depth); return { - parent: s, fn: PhysicsEngine_move__P187382, depth: s.depth + 1, + parent: s, fn: info_defaultMultiplayerHeartImage__P189495, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, - arg1: undefined, + tmp_0: undefined, + tmp_1: undefined, } } +const _hex194159 = pxsim.BufferMethods.createBufferFromHex("870407000500000000000000100100000110000010000100011000001001000000000000") +const _hex194161 = pxsim.BufferMethods.createBufferFromHex("870407000500000000000000100100002112000010240100411200001001000000000000") -function PhysicsEngine_draw__P187381(s) { +function info_PlayerState_constructor__P187418(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26704,17 +26404,17 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, PhysicsEngine__C187376_VT)) failedCast(r0); + if (!checkSubtype(r0, info_PlayerState__C187414_VT)) failedCast(r0); r0 = undefined; return leave(s, r0) default: oops() } } } -PhysicsEngine_draw__P187381.info = {"start":279,"length":10,"line":15,"column":4,"endLine":15,"endColumn":14,"fileName":"pxt_modules/game/physics.ts","functionName":"draw","argumentNames":["this"]} +info_PlayerState_constructor__P187418.info = {"start":608,"length":17,"line":27,"column":8,"endLine":27,"endColumn":25,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["this"]} -function PhysicsEngine_draw__P187381_mk(s) { +function info_PlayerState_constructor__P187418_mk(s) { checkStack(s.depth); return { - parent: s, fn: PhysicsEngine_draw__P187381, depth: s.depth + 1, + parent: s, fn: info_PlayerState_constructor__P187418, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, } } @@ -26723,7 +26423,7 @@ function PhysicsEngine_draw__P187381_mk(s) { -function controller___update__P187167(s) { +function tiles_setTileAt__P187559(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26733,51 +26433,120 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.dtms___197415 = undefined; + s.scene___206367 = undefined; + s.scale___206380 = undefined; + s.index___206384 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg0 * 1000); - s.tmp_0 = r0; - r0 = (s.tmp_0 | 0); - s.dtms___197415 = (r0); - r0 = pxsim_pxtcore_mkAction(1, inline__P197422); + s.tmp_0 = game_currentScene__P187749_mk(s); + s.callLocIdx = 970; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + s.scene___206367 = (r0); + r0 = pxsim_numops_toBoolDecr(s.arg0); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.dtms___197415); - s.tmp_1 = helpers_arrayForEach__P185324_mk(s); - s.tmp_2 = controller_players__P187135_mk(s); - s.callLocIdx = 241; s.pc = 2; return s.tmp_2; + 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: + r0 = s.scene___206367.fields["tileMap"]; + 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_6 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_6); + if (!r0) { step = 5; continue; } + r0 = null; + { step = 7; continue; } + case 5: + case 6: + r0 = s.scene___206367.fields["tileMap"]; + s.tmp_7 = r0; + r0 = s.tmp_7.fields["_scale"]; + s.scale___206380 = (r0); + s.tmp_0 = tiles_TileMap_getImageType__P187549_mk(s); + r0 = s.scene___206367.fields["tileMap"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 972; s.pc = 9; return s.tmp_0; + case 9: r0 = s.retval; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 243; s.pc = 1; return s.tmp_1; - case 1: + s.index___206384 = (r0); + s.tmp_0 = tiles_TileMap_setTileAt__P187548_mk(s); + r0 = s.scene___206367.fields["tileMap"]; + s.tmp_0.arg0 = r0; + s.tmp_2 = tiles_Location_x__P187510_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 973; s.pc = 11; return s.tmp_2; + case 11: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_1 >> s.scale___206380); + s.tmp_0.arg1 = r0; + s.tmp_4 = tiles_Location_y__P187511_mk(s); + s.tmp_4.arg0 = s.arg0; + s.callLocIdx = 974; s.pc = 12; return s.tmp_4; + case 12: + r0 = s.retval; + s.tmp_3 = r0; + r0 = (s.tmp_3 >> s.scale___206380); + s.tmp_0.arg2 = r0; + s.tmp_0.arg3 = s.index___206384; + s.callLocIdx = 975; s.pc = 10; return s.tmp_0; + case 10: r0 = s.retval; + case 7: r0 = undefined; return leave(s, r0) default: oops() } } } -controller___update__P187167.info = {"start":17961,"length":137,"line":550,"column":4,"endLine":553,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"__update","argumentNames":["dt"]} +tiles_setTileAt__P187559.info = {"start":15058,"length":339,"line":482,"column":4,"endLine":488,"endColumn":5,"fileName":"pxt_modules/game/tilemap.ts","functionName":"setTileAt","argumentNames":["loc","tile"]} -function controller___update__P187167_mk(s) { +function tiles_setTileAt__P187559_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller___update__P187167, depth: s.depth + 1, + parent: s, fn: tiles_setTileAt__P187559, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - dtms___197415: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + scene___206367: undefined, + scale___206380: undefined, + index___206384: undefined, arg0: undefined, + arg1: undefined, } } -function inline__P197422(s) { +function tiles_TileMap_getImageType__P187549(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26787,36 +26556,92 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.tileset___206093 = undefined; + s.i___206098 = undefined; + s.newIndex___206112 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = controller_Controller___update__P187165_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.caps[0]; - s.callLocIdx = 242; s.pc = 1; return s.tmp_0; + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMap__C187534_VT)) failedCast(r0); + r0 = s.arg0.fields["_map"]; + s.tmp_0 = r0; + r0 = s.tmp_0.fields["tileset"]; + s.tileset___206093 = (r0); + s.i___206098 = (0); case 1: + s.tmp_1 = r0 = s.i___206098; + r0 = pxsim_Array__length(s.tileset___206093); + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + r0 = pxsim_Array__getAt(s.tileset___206093, s.i___206098); + s.tmp_4 = r0; + r0 = pxsim_ImageMethods.equals(s.tmp_4, s.arg1); + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 2; continue; } + r0 = s.i___206098; + { step = 7; continue; } + case 2: + case 3: + r0 = (s.i___206098 + 1); + s.i___206098 = (r0); + { step = 1; continue; } + case 4: + r0 = pxsim_Array__length(s.tileset___206093); + s.newIndex___206112 = (r0); + s.tmp_3 = tiles_TileMap_isInvalidIndex__P189509_mk(s); + s.tmp_3.arg0 = s.arg0; + s.tmp_3.arg1 = s.newIndex___206112; + s.callLocIdx = 907; s.pc = 8; return s.tmp_3; + case 8: r0 = s.retval; - r0 = undefined; + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + r0 = pxsim_Array__push(s.tileset___206093, s.arg1); + r0 = s.newIndex___206112; + { step = 7; continue; } + case 5: + case 6: + r0 = -1; + case 7: return leave(s, r0) default: oops() } } } -inline__P197422.info = {"start":18063,"length":27,"line":552,"column":26,"endLine":552,"endColumn":53,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["ctrl"]} +tiles_TileMap_getImageType__P187549.info = {"start":7714,"length":482,"line":282,"column":8,"endLine":295,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getImageType","argumentNames":["this","im"]} -function inline__P197422_mk(s) { +function tiles_TileMap_getImageType__P187549_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P197422, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_getImageType__P187549, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tileset___206093: undefined, + i___206098: undefined, + newIndex___206112: undefined, arg0: undefined, + arg1: undefined, } } -function controller_Controller___update__P187165(s) { +function tiles_TileMap_isInvalidIndex__P189509(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26832,42 +26657,31 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, controller_Controller__C187140_VT)) failedCast(r0); - r0 = pxsim_pxtrt.mklocRef(); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.arg1); - s.arg1 = (s.tmp_0); - s.tmp_1 = r0 = s.arg1; - r0 = pxsim_pxtrt_ldlocRef(s.arg1); - s.tmp_3 = r0; - r0 = (s.tmp_3 | 0); - s.tmp_2 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_1, s.tmp_2); - r0 = pxsim_pxtcore_mkAction(1, inline__P197435); + if (!checkSubtype(r0, tiles_TileMap__C187534_VT)) failedCast(r0); + r0 = (s.arg1 < 0); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); - s.tmp_1 = helpers_arrayForEach__P185324_mk(s); - r0 = s.arg0.fields["buttons"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 240; s.pc = 1; return s.tmp_1; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: - r0 = s.retval; - r0 = undefined; + r0 = (s.arg1 > 255); + case 2: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = s.tmp_1; return leave(s, r0) default: oops() } } } -controller_Controller___update__P187165.info = {"start":17439,"length":124,"line":532,"column":8,"endLine":535,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"__update","argumentNames":["this","dtms"]} +tiles_TileMap_isInvalidIndex__P189509.info = {"start":10071,"length":106,"line":343,"column":8,"endLine":345,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"isInvalidIndex","argumentNames":["this","index"]} -function controller_Controller___update__P187165_mk(s) { +function tiles_TileMap_isInvalidIndex__P189509_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller___update__P187165, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_isInvalidIndex__P189509, depth: s.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, } } @@ -26876,7 +26690,7 @@ function controller_Controller___update__P187165_mk(s) { -function inline__P197435(s) { +function tiles_TileMapData_getTileset__P187529(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26890,25 +26704,19 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = controller_Button___update__P187132_mk(s); - s.tmp_0.arg0 = s.arg0; - r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); - s.tmp_0.arg1 = r0; - s.callLocIdx = 239; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMapData__C187521_VT)) failedCast(r0); + r0 = s.arg0.fields["tileset"]; return leave(s, r0) default: oops() } } } -inline__P197435.info = {"start":17526,"length":25,"line":534,"column":33,"endLine":534,"endColumn":58,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["btn"]} +tiles_TileMapData_getTileset__P187529.info = {"start":4532,"length":57,"line":168,"column":8,"endLine":170,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTileset","argumentNames":["this"]} -function inline__P197435_mk(s) { +function tiles_TileMapData_getTileset__P187529_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P197435, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_getTileset__P187529, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, } } @@ -26916,7 +26724,7 @@ function inline__P197435_mk(s) { -function controller_Button___update__P187132(s) { +function tiles_TileMap_setTileAt__P187548(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26926,105 +26734,69 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.delay___197451 = undefined; - s.interval___197460 = undefined; - s.count___197473 = 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__C187120_VT)) failedCast(r0); - r0 = s.arg0.fields["_pressed"]; + if (!checkSubtype(r0, tiles_TileMap__C187534_VT)) failedCast(r0); + s.tmp_3 = tiles_TileMapData_isOutsideMap__P187533_mk(s); + r0 = s.arg0.fields["_map"]; + s.tmp_3.arg0 = r0; + s.tmp_3.arg1 = s.arg1; + s.tmp_3.arg2 = s.arg2; + s.callLocIdx = 903; s.pc = 5; return s.tmp_3; + case 5: + r0 = s.retval; s.tmp_2 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 11; continue; } + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: - case 2: - s.tmp_3 = r0 = s.arg0; - r0 = s.tmp_3.fields["_pressedElasped"]; + s.tmp_6 = tiles_TileMap_isInvalidIndex__P189509_mk(s); + s.tmp_6.arg0 = s.arg0; + s.tmp_6.arg1 = s.arg3; + s.callLocIdx = 904; s.pc = 6; return s.tmp_6; + case 6: + r0 = s.retval; s.tmp_5 = r0; - r0 = (s.tmp_5 + s.arg1); + r0 = pxsim_numops_toBoolDecr(s.tmp_5); 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___189395; - { step = 4; continue; } - case 3: - r0 = s.arg0.fields["repeatDelay"]; - case 4: - // jmp value (already in r0) - s.tmp_2 = r0; - s.delay___197451 = (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___189397; - { step = 6; continue; } - case 5: - r0 = s.arg0.fields["repeatInterval"]; - case 6: + r0 = pxsim_Boolean__bang(s.tmp_4); + case 2: // jmp value (already in r0) - s.tmp_2 = r0; - s.interval___197460 = (s.tmp_2); - r0 = s.arg0.fields["_pressedElasped"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 < s.delay___197451); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - { step = 11; continue; } + s.tmp_7 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_7); + if (!r0) { step = 3; continue; } + s.tmp_8 = tiles_TileMapData_setTile__P187528_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.tmp_8.arg3 = s.arg3; + s.callLocIdx = 905; s.pc = 7; return s.tmp_8; case 7: - case 8: - r0 = s.arg0.fields["_pressedElasped"]; - s.tmp_5 = r0; - r0 = (s.tmp_5 - s.delay___197451); - s.tmp_4 = r0; - r0 = (s.tmp_4 - s.interval___197460); - s.tmp_3 = r0; - r0 = (s.tmp_3 / s.interval___197460); - s.tmp_2 = r0; - r0 = pxsim.Math_.floor(s.tmp_2); - s.count___197473 = (r0); - r0 = s.arg0.fields["_repeatCount"]; - s.tmp_1 = r0; - r0 = (s.count___197473 != 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__P189402_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 189; s.pc = 12; return s.tmp_2; - case 12: r0 = s.retval; - r0 = (s.arg0).fields["_repeatCount"] = (s.count___197473); - case 9: - case 10: - case 11: + case 3: + case 4: r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Button___update__P187132.info = {"start":5117,"length":704,"line":164,"column":8,"endLine":181,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"__update","argumentNames":["this","dtms"]} +tiles_TileMap_setTileAt__P187548.info = {"start":7495,"length":209,"line":277,"column":8,"endLine":280,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"setTileAt","argumentNames":["this","col","row","index"]} -function controller_Button___update__P187132_mk(s) { +function tiles_TileMap_setTileAt__P187548_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button___update__P187132, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_setTileAt__P187548, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -27032,18 +26804,20 @@ function controller_Button___update__P187132_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - delay___197451: undefined, - interval___197460: undefined, - count___197473: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function controller_Button_raiseButtonRepeat__P189402(s) { +function tiles_TileMapData_setTile__P187528(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27055,41 +26829,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, controller_Button__C187120_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(globals._userEventsEnabled___189393); - if (!r0) { step = 1; continue; } - r0 = s.arg0.fields["id"]; + if (!checkSubtype(r0, tiles_TileMapData__C187521_VT)) failedCast(r0); + s.tmp_1 = tiles_TileMapData_isOutsideMap__P187533_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_1.arg1 = s.arg1; + s.tmp_1.arg2 = s.arg2; + s.callLocIdx = 881; s.pc = 6; return s.tmp_1; + case 6: + r0 = s.retval; s.tmp_0 = r0; - r0 = pxsim.control.raiseEvent(2054, s.tmp_0); - { step = 2; continue; } + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + { step = 5; continue; } case 1: - r0 = s.arg0.fields["id"]; - s.tmp_0 = r0; - r0 = pxsim.control.raiseEvent(2055, s.tmp_0); case 2: + r0 = s.arg0.fields["data"]; + s.tmp_3 = r0; + r0 = pxsim.BufferMethods.isReadOnly(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 3; continue; } + s.tmp_4 = r0 = s.arg0; + r0 = s.arg0.fields["data"]; + s.tmp_6 = r0; + r0 = pxsim.BufferMethods.slice(s.tmp_6, 0, -1); + s.tmp_5 = r0; + r0 = (s.tmp_4).fields["data"] = (s.tmp_5); + case 3: + case 4: + r0 = s.arg0.fields["data"]; + s.tmp_0 = r0; + r0 = (s.arg1 | 0); + s.tmp_3 = r0; + r0 = (4 + s.tmp_3); + s.tmp_2 = r0; + r0 = (s.arg2 | 0); + s.tmp_5 = r0; + r0 = s.arg0.fields["_width"]; + s.tmp_6 = r0; + r0 = (s.tmp_5 * s.tmp_6); + s.tmp_4 = r0; + r0 = (s.tmp_2 + s.tmp_4); + s.tmp_1 = r0; + r0 = pxsim.BufferMethods.setUint8(s.tmp_0, s.tmp_1, s.arg3); + case 5: r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Button_raiseButtonRepeat__P189402.info = {"start":2887,"length":211,"line":99,"column":8,"endLine":104,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"raiseButtonRepeat","argumentNames":["this"]} +tiles_TileMapData_setTile__P187528.info = {"start":4207,"length":315,"line":158,"column":8,"endLine":166,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"setTile","argumentNames":["this","col","row","tile"]} -function controller_Button_raiseButtonRepeat__P189402_mk(s) { +function tiles_TileMapData_setTile__P187528_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_raiseButtonRepeat__P189402, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_setTile__P187528, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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 controller_players__P187135(s) { +function tiles_getTilesByType__P187567(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27099,34 +26917,82 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = controller__player1__P187134_mk(s); - s.callLocIdx = 192; s.pc = 1; return s.tmp_0; - case 1: + s.scene___206016 = undefined; + s.index___206026 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + s.tmp_0 = game_currentScene__P187749_mk(s); + s.callLocIdx = 989; s.pc = 6; return s.tmp_0; + case 6: r0 = s.retval; - s.tmp_0 = helpers_arrayFilter__P185325_mk(s); - s.tmp_0.arg0 = globals._players___189406; - s.tmp_0.arg1 = inline__P197310; - s.callLocIdx = 193; s.pc = 2; return s.tmp_0; + s.scene___206016 = (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_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + r0 = s.scene___206016.fields["tileMap"]; + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); case 2: + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + if (!r0) { step = 3; continue; } + r0 = pxsim_Array__mk(); + { step = 5; continue; } + case 3: + case 4: + s.tmp_5 = tiles_TileMap_getImageType__P187549_mk(s); + r0 = s.scene___206016.fields["tileMap"]; + s.tmp_5.arg0 = r0; + s.tmp_5.arg1 = s.arg0; + s.callLocIdx = 990; s.pc = 7; return s.tmp_5; + case 7: + r0 = s.retval; + s.index___206026 = (r0); + s.tmp_0 = tiles_TileMap_getTilesByType__P187551_mk(s); + r0 = s.scene___206016.fields["tileMap"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.index___206026; + s.callLocIdx = 991; s.pc = 8; return s.tmp_0; + case 8: r0 = s.retval; + case 5: return leave(s, r0) default: oops() } } } -controller_players__P187135.info = {"start":7040,"length":144,"line":220,"column":4,"endLine":223,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"players","argumentNames":[]} +tiles_getTilesByType__P187567.info = {"start":19427,"length":262,"line":597,"column":4,"endLine":602,"endColumn":5,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTilesByType","argumentNames":["tile"]} -function controller_players__P187135_mk(s) { +function tiles_getTilesByType__P187567_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_players__P187135, depth: s.depth + 1, + parent: s, fn: tiles_getTilesByType__P187567, depth: s.depth + 1, pc: 0, retval: undefined, 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___206016: undefined, + index___206026: undefined, + arg0: undefined, } } -function inline__P197310(s) { +function tiles_TileMap_getTilesByType__P187551(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27136,38 +27002,143 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.output___206045 = undefined; + s.col___206047 = undefined; + s.row___206054 = undefined; + s.currTile___206061 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(s.arg0); + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMap__C187534_VT)) failedCast(r0); + s.tmp_1 = tiles_TileMap_isInvalidIndex__P189509_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_1.arg1 = s.arg1; + s.callLocIdx = 910; s.pc = 12; return s.tmp_1; + case 12: + 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 = s.arg0.fields["_map"]; + 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); + 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); + case 2: + // jmp value (already in r0) + s.tmp_8 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_8); + if (!r0) { step = 3; continue; } + r0 = pxsim_Array__mk(); + { step = 11; continue; } + case 3: + case 4: + r0 = pxsim_Array__mk(); + s.output___206045 = (r0); + s.col___206047 = (0); + case 5: + s.tmp_1 = r0 = s.col___206047; + r0 = s.arg0.fields["_map"]; + s.tmp_3 = r0; + r0 = s.tmp_3.fields["_width"]; + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 10; continue; } + s.row___206054 = (0); + case 6: + s.tmp_1 = r0 = s.row___206054; + r0 = s.arg0.fields["_map"]; + s.tmp_3 = r0; + r0 = s.tmp_3.fields["_height"]; + 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; } + s.tmp_4 = tiles_TileMapData_getTile__P187527_mk(s); + r0 = s.arg0.fields["_map"]; + s.tmp_4.arg0 = r0; + s.tmp_4.arg1 = s.col___206047; + s.tmp_4.arg2 = s.row___206054; + s.callLocIdx = 914; s.pc = 13; return s.tmp_4; + case 13: + r0 = s.retval; + s.currTile___206061 = (r0); + r0 = (s.currTile___206061 === s.arg1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; continue; } + r0 = pxsim_pxtcore_mkClassInstance(tiles_Location__C187506_VT); + s.tmp_1 = r0; + s.tmp_2 = tiles_Location_constructor__P187509_mk(s); + s.tmp_2.arg0 = s.tmp_1; + s.tmp_2.arg1 = s.col___206047; + s.tmp_2.arg2 = s.row___206054; + s.tmp_2.arg3 = s.arg0; + s.callLocIdx = 915; s.pc = 14; return s.tmp_2; + case 14: + r0 = s.retval; + r0 = pxsim_Array__push(s.output___206045, s.tmp_1); + case 7: + case 8: + r0 = (s.row___206054 + 1); + s.row___206054 = (r0); + { step = 6; continue; } + case 9: + r0 = (s.col___206047 + 1); + s.col___206047 = (r0); + { step = 5; continue; } + case 10: + r0 = s.output___206045; + case 11: return leave(s, r0) default: oops() } } } -inline__P197310.info = {"start":7162,"length":14,"line":222,"column":31,"endLine":222,"endColumn":45,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["ctrl"]} +tiles_TileMap_getTilesByType__P187551.info = {"start":8389,"length":561,"line":302,"column":8,"endLine":315,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTilesByType","argumentNames":["this","index"]} -function inline__P197310_mk(s) { +function tiles_TileMap_getTilesByType__P187551_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P197310, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_getTilesByType__P187551, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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, + output___206045: undefined, + col___206047: undefined, + row___206054: undefined, + currTile___206061: undefined, arg0: undefined, + arg1: undefined, } } -function controller__moveSprites__P187139(s) { +function tiles_Location_constructor__P187509(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27177,36 +27148,40 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = helpers_arrayForEach__P185324_mk(s); - s.tmp_1 = controller_players__P187135_mk(s); - s.callLocIdx = 194; s.pc = 2; return s.tmp_1; - case 2: - r0 = s.retval; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = inline__P197105; - s.callLocIdx = 196; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, tiles_Location__C187506_VT)) failedCast(r0); + r0 = (s.arg0).fields["_col"] = (s.arg1); + r0 = (s.arg0).fields["_row"] = (s.arg2); + r0 = (s.arg0).fields["tileMap"] = (s.arg3); r0 = undefined; return leave(s, r0) default: oops() } } } -controller__moveSprites__P187139.info = {"start":7400,"length":182,"line":234,"column":4,"endLine":238,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"_moveSprites","argumentNames":[]} +tiles_Location_constructor__P187509.info = {"start":528,"length":153,"line":27,"column":8,"endLine":31,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"inline","argumentNames":["this","col","row","map"]} -function controller__moveSprites__P187139_mk(s) { +function tiles_Location_constructor__P187509_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller__moveSprites__P187139, depth: s.depth + 1, + parent: s, fn: tiles_Location_constructor__P187509, 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 inline__P197105(s) { +function controller_moveSprite__P187169(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27218,33 +27193,45 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - s.tmp_0 = controller_Controller___preUpdate__P187164_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 195; s.pc = 1; return s.tmp_0; + s.tmp_0 = controller_Controller_moveSprite__P187156_mk(s); + s.tmp_1 = controller__player1__P187134_mk(s); + s.callLocIdx = 244; s.pc = 2; return s.tmp_1; + case 2: + r0 = s.retval; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.arg0; + s.tmp_0.arg2 = s.arg1; + s.tmp_0.arg3 = s.arg2; + s.callLocIdx = 245; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P197105.info = {"start":7548,"length":26,"line":237,"column":26,"endLine":237,"endColumn":52,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["ctrl"]} +controller_moveSprite__P187169.info = {"start":18919,"length":133,"line":574,"column":4,"endLine":576,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"moveSprite","argumentNames":["sprite","vx","vy"]} -function inline__P197105_mk(s) { +function controller_moveSprite__P187169_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P197105, depth: s.depth + 1, + parent: s, fn: controller_moveSprite__P187169, 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 controller_Controller___preUpdate__P187164(s) { +function controller_Controller_moveSprite__P187156(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27254,493 +27241,144 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.deadSprites___197112 = undefined; - s.svx___197113 = undefined; - s.svy___197114 = undefined; - s.svxInCricle___197149 = undefined; - s.svyInCircle___197151 = undefined; - s.sq___197153 = undefined; - s.scale___197168 = undefined; + s.cp___200812 = 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_Controller__C187140_VT)) failedCast(r0); - s.tmp_3 = controller_Controller__controlledSprites__P187145_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 214; s.pc = 18; return s.tmp_3; - case 18: - r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + 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 = 17; continue; } + { step = 15; continue; } case 1: case 2: - r0 = pxsim_pxtrt.mklocRef(); - s.deadSprites___197112 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.deadSprites___197112, false); - r0 = pxsim_pxtrt.mklocRef(); - s.svx___197113 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.svx___197113, 0); - r0 = pxsim_pxtrt.mklocRef(); - s.svy___197114 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.svy___197114, 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___197113; - s.tmp_5 = controller_Button_pressureLevel__P187130_mk(s); - s.tmp_6 = controller_Controller_right__P187150_mk(s); - s.tmp_6.arg0 = s.arg0; - s.callLocIdx = 215; s.pc = 20; return s.tmp_6; - case 20: - r0 = s.retval; - s.tmp_5.arg0 = r0; - s.callLocIdx = 216; s.pc = 19; return s.tmp_5; - case 19: - r0 = s.retval; - s.tmp_4 = r0; - s.tmp_8 = controller_Button_pressureLevel__P187130_mk(s); - s.tmp_9 = controller_Controller_left__P187149_mk(s); - s.tmp_9.arg0 = s.arg0; - s.callLocIdx = 217; s.pc = 22; return s.tmp_9; - case 22: - r0 = s.retval; - s.tmp_8.arg0 = r0; - s.callLocIdx = 218; 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___197114; - s.tmp_4 = controller_Button_pressureLevel__P187130_mk(s); - s.tmp_5 = controller_Controller_down__P187152_mk(s); + s.tmp_5 = controller_Controller__controlledSprites__P187145_mk(s); s.tmp_5.arg0 = s.arg0; - s.callLocIdx = 219; s.pc = 24; return s.tmp_5; - case 24: - r0 = s.retval; - s.tmp_4.arg0 = r0; - s.callLocIdx = 220; s.pc = 23; return s.tmp_4; - case 23: - r0 = s.retval; - s.tmp_3 = r0; - s.tmp_7 = controller_Button_pressureLevel__P187130_mk(s); - s.tmp_8 = controller_Controller_up__P187151_mk(s); - s.tmp_8.arg0 = s.arg0; - s.callLocIdx = 221; s.pc = 26; return s.tmp_8; - case 26: - r0 = s.retval; - s.tmp_7.arg0 = r0; - s.callLocIdx = 222; 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__C187120_v0_1_mk(s); - s.tmp_2 = controller_Controller_right__P187150_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 223; 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__C187120_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__C187120_v0_1_mk(s); - s.tmp_6 = controller_Controller_left__P187149_mk(s); - s.tmp_6.arg0 = s.arg0; - s.callLocIdx = 224; 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__C187120_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: + s.callLocIdx = 205; s.pc = 16; return s.tmp_5; + case 16: 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___197113; - 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__C187120_v0_1_mk(s); - s.tmp_2 = controller_Controller_down__P187152_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 225; 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__C187120_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__C187120_v0_1_mk(s); - s.tmp_6 = controller_Controller_up__P187151_mk(s); + r0 = pxsim_Boolean__bang(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 3; continue; } + s.tmp_6 = controller_Controller__controlledSprites__P187146_mk(s); s.tmp_6.arg0 = s.arg0; - s.callLocIdx = 226; 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__C187120_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 = pxsim_Array__mk(); + s.tmp_6.arg1 = r0; + s.callLocIdx = 206; s.pc = 17; return s.tmp_6; + case 17: 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___197114; - 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___197149 = (r0); - s.tmp_0 = r0 = s.svxInCricle___197149; - r0 = pxsim_pxtrt_ldlocRef(s.svx___197113); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); - r0 = pxsim_pxtrt.mklocRef(); - s.svyInCircle___197151 = (r0); - s.tmp_0 = r0 = s.svyInCircle___197151; - r0 = pxsim_pxtrt_ldlocRef(s.svy___197114); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); - r0 = pxsim_pxtrt_ldlocRef(s.svx___197113); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_ldlocRef(s.svx___197113); - s.tmp_2 = r0; - r0 = (s.tmp_1 * s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_ldlocRef(s.svy___197114); - s.tmp_4 = r0; - r0 = pxsim_pxtrt_ldlocRef(s.svy___197114); - s.tmp_5 = r0; - r0 = (s.tmp_4 * s.tmp_5); - s.tmp_3 = r0; - r0 = (s.tmp_0 + s.tmp_3); - s.sq___197153 = (r0); - r0 = (s.sq___197153 > 65536); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 13; continue; } - r0 = (65536 / s.sq___197153); - s.tmp_1 = r0; - r0 = pxsim.Math_.sqrt(s.tmp_1); - s.scale___197168 = (r0); - s.tmp_0 = r0 = s.svxInCricle___197149; - s.tmp_3 = r0 = s.scale___197168; - r0 = pxsim_pxtrt_ldlocRef(s.svx___197113); - 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___197151; - s.tmp_3 = r0 = s.scale___197168; - r0 = pxsim_pxtrt_ldlocRef(s.svy___197114); - 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, inline__P197186); + case 3: + case 4: + r0 = pxsim_pxtcore_mkAction(1, inline__P200815); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.deadSprites___197112); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.svx___197113); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.svy___197114); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 3, s.svxInCricle___197149); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 4, s.svyInCircle___197151); - s.tmp_1 = helpers_arrayForEach__P185324_mk(s); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); + s.tmp_1 = helpers_arrayFind__P185326_mk(s); s.tmp_2 = controller_Controller__controlledSprites__P187145_mk(s); s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 227; s.pc = 36; return s.tmp_2; - case 36: + s.callLocIdx = 207; s.pc = 19; return s.tmp_2; + case 19: r0 = s.retval; s.tmp_1.arg0 = r0; s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 235; s.pc = 35; return s.tmp_1; - case 35: + s.callLocIdx = 208; s.pc = 18; return s.tmp_1; + case 18: r0 = s.retval; - r0 = pxsim_pxtrt_ldlocRef(s.deadSprites___197112); + s.cp___200812 = (r0); + r0 = pxsim_numops_toBoolDecr(s.cp___200812); + 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; } - s.tmp_1 = controller_Controller__controlledSprites__P187146_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_2 = helpers_arrayFilter__P185325_mk(s); - s.tmp_3 = controller_Controller__controlledSprites__P187145_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 236; s.pc = 39; return s.tmp_3; - case 39: - r0 = s.retval; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = inline__P197243; - s.callLocIdx = 237; s.pc = 38; return s.tmp_2; - case 38: - r0 = s.retval; - s.tmp_1.arg1 = r0; - s.callLocIdx = 238; s.pc = 37; return s.tmp_1; - case 37: - r0 = s.retval; - case 15: - case 16: - case 17: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -controller_Controller___preUpdate__P187164.info = {"start":14894,"length":2535,"line":466,"column":8,"endLine":530,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"__preUpdate","argumentNames":["this"]} - -function controller_Controller___preUpdate__P187164_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: controller_Controller___preUpdate__P187164, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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___197112: undefined, - svx___197113: undefined, - svy___197114: undefined, - svxInCricle___197149: undefined, - svyInCircle___197151: undefined, - sq___197153: undefined, - scale___197168: undefined, - arg0: undefined, -} } - - - - - -function inline__P197186(s) { -let r0 = s.r0, 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___197189 = undefined; - s.vx___197190 = undefined; - s.vy___197191 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - s.tmp_0 = if_s_1_mk(s); - s.tmp_1 = r0 = s.arg0; - s.tmp_0.arg0 = r0; - if (!s.tmp_0.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "s"); - } else { - s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["s"]; - if (s.tmp_0.fn == null) { s.retval = s.tmp_0.arg0.fields["s"]; } - else if (!s.tmp_0.fn.isGetter) { s.retval = bind(s.tmp_0); } - else { s.callLocIdx = 228; s.pc = 22; return s.tmp_0; } - } - case 22: - r0 = s.retval; - s.s___197189 = (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 = 229; s.pc = 23; return s.tmp_2; } - } - case 23: + if (!r0) { step = 5; continue; } + r0 = pxsim_pxtcore_mkClassInstance(controller_ControlledSprite__C187136_VT); + s.tmp_2 = r0; + s.tmp_3 = controller_ControlledSprite_constructor__P187138_mk(s); + s.tmp_3.arg0 = s.tmp_2; + s.tmp_3.arg1 = s.arg1; + s.tmp_3.arg2 = s.arg2; + s.tmp_3.arg3 = s.arg3; + s.callLocIdx = 209; s.pc = 20; return s.tmp_3; + case 20: r0 = s.retval; - s.vx___197190 = (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 = 230; s.pc = 24; return s.tmp_3; } - } - case 24: + s.cp___200812 = (s.tmp_2); + s.tmp_1 = controller_Controller__controlledSprites__P187145_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 210; s.pc = 21; return s.tmp_1; + case 21: r0 = s.retval; - s.vy___197191 = (r0); - r0 = s.s___197189.fields["flags"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = pxsim_pxtrt_stlocRef(s.caps[0], true); - { step = 21; continue; } - case 1: - case 2: - r0 = s.arg0.fields["_inputLastFrame"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - r0 = pxsim_numops_toBoolDecr(s.vx___197190); - if (!r0) { step = 3; continue; } - r0 = (s.s___197189).fields["_vx"] = (0); - case 3: - case 4: - r0 = pxsim_numops_toBoolDecr(s.vy___197191); - if (!r0) { step = 5; continue; } - r0 = (s.s___197189).fields["_vy"] = (0); + r0 = pxsim_Array__push(s.tmp_0, s.cp___200812); case 5: case 6: - case 7: - case 8: - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + r0 = s.cp___200812.fields["vx"]; s.tmp_0 = r0; r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 9; continue; } + if (r0) { step = 7; continue; } r0 = s.tmp_0; - { step = 10; continue; } - case 9: - r0 = pxsim_pxtrt_ldlocRef(s.caps[2]); - case 10: + { step = 8; continue; } + case 7: + r0 = (s.arg2 == 0); + case 8: // jmp value (already in r0) s.tmp_1 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 19; continue; } - s.tmp_2 = r0 = s.vx___197190; - r0 = pxsim_numops_toBool(s.tmp_2); - if (r0) { step = 11; continue; } - r0 = s.tmp_2; - { step = 12; continue; } - case 11: - r0 = s.vy___197191; - 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___197189; - r0 = pxsim_pxtrt_ldlocRef(s.caps[3]); - s.tmp_6 = r0; - r0 = pxsim.Math_.imul(s.tmp_6, s.vx___197190); - s.tmp_5 = r0; - r0 = (s.tmp_4).fields["_vx"] = (s.tmp_5); - s.tmp_0 = r0 = s.s___197189; - r0 = pxsim_pxtrt_ldlocRef(s.caps[4]); - s.tmp_2 = r0; - r0 = pxsim.Math_.imul(s.tmp_2, s.vy___197191); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_vy"] = (s.tmp_1); - { step = 18; continue; } - case 13: - r0 = pxsim_numops_toBoolDecr(s.vx___197190); - if (!r0) { step = 14; continue; } - s.tmp_0 = r0 = s.s___197189; - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); - s.tmp_2 = r0; - r0 = pxsim.Math_.imul(s.tmp_2, s.vx___197190); + if (!r0) { step = 9; continue; } + s.tmp_2 = Sprite_vx__P187247_mk(s); + r0 = s.cp___200812.fields["s"]; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = 0; + s.callLocIdx = 211; s.pc = 22; return s.tmp_2; + case 22: + r0 = s.retval; + case 9: + case 10: + r0 = s.cp___200812.fields["vy"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 11; continue; } + r0 = s.tmp_0; + { step = 12; continue; } + case 11: + r0 = (s.arg3 == 0); + case 12: + // jmp value (already in r0) s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_vx"] = (s.tmp_1); - { step = 17; continue; } + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 13; continue; } + s.tmp_2 = Sprite_vy__P187249_mk(s); + r0 = s.cp___200812.fields["s"]; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = 0; + s.callLocIdx = 212; s.pc = 23; return s.tmp_2; + case 23: + r0 = s.retval; + case 13: case 14: - r0 = pxsim_numops_toBoolDecr(s.vy___197191); - if (!r0) { step = 15; continue; } - s.tmp_0 = r0 = s.s___197189; - r0 = pxsim_pxtrt_ldlocRef(s.caps[2]); - s.tmp_2 = r0; - r0 = pxsim.Math_.imul(s.tmp_2, s.vy___197191); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_vy"] = (s.tmp_1); + r0 = (s.cp___200812).fields["vx"] = (s.arg2); + r0 = (s.cp___200812).fields["vy"] = (s.arg3); case 15: - case 16: - case 17: - case 18: - r0 = (s.arg0).fields["_inputLastFrame"] = (true); - { step = 20; continue; } - case 19: - r0 = (s.arg0).fields["_inputLastFrame"] = (false); - case 20: - case 21: r0 = undefined; return leave(s, r0) default: oops() } } } -inline__P197186.info = {"start":16077,"length":1171,"line":497,"column":44,"endLine":525,"endColumn":13,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["controlledSprite"]} +controller_Controller_moveSprite__P187156.info = {"start":10866,"length":608,"line":355,"column":8,"endLine":371,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"moveSprite","argumentNames":["this","sprite","vx","vy"]} -function inline__P197186_mk(s) { +function controller_Controller_moveSprite__P187156_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P197186, depth: s.depth + 1, + parent: s, fn: controller_Controller_moveSprite__P187156, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -27749,17 +27387,18 @@ function inline__P197186_mk(s) { tmp_4: undefined, tmp_5: undefined, tmp_6: undefined, - s___197189: undefined, - vx___197190: undefined, - vy___197191: undefined, + cp___200812: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function inline__P197243(s) { +function inline__P200815(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27774,26 +27413,23 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0.fields["s"]; - r0 = r0.fields["flags"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 & 2); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); + r0 = r0.fields["id"]; s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); + r0 = s.caps[0].fields["id"]; + s.tmp_1 = r0; + r0 = (s.tmp_0 == s.tmp_1); return leave(s, r0) default: oops() } } } -inline__P197243.info = {"start":17375,"length":42,"line":529,"column":28,"endLine":529,"endColumn":70,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["s"]} +inline__P200815.info = {"start":11086,"length":26,"line":358,"column":50,"endLine":358,"endColumn":76,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["cp"]} -function inline__P197243_mk(s) { +function inline__P200815_mk(s) { checkStack(s.depth); return { - parent: s, fn: inline__P197243, depth: s.depth + 1, + parent: s, fn: inline__P200815, 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, } } @@ -27801,7 +27437,7 @@ function inline__P197243_mk(s) { -function controller_Controller_down__P187152(s) { +function controller_ControlledSprite_constructor__P187138(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27813,36 +27449,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; } r0 = s.arg0; - if (!checkSubtype(r0, controller_Controller__C187140_VT)) failedCast(r0); - r0 = s.arg0.fields["buttons"]; - s.tmp_0 = r0; - r0 = (4 - 1); - s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); - return leaveAccessor(s, r0) + if (!checkSubtype(r0, controller_ControlledSprite__C187136_VT)) failedCast(r0); + r0 = (s.arg0).fields["s"] = (s.arg1); + r0 = (s.arg0).fields["vx"] = (s.arg2); + r0 = (s.arg0).fields["vy"] = (s.arg3); + r0 = undefined; + return leave(s, r0) default: oops() } } } -controller_Controller_down__P187152.info = {"start":9528,"length":77,"line":312,"column":8,"endLine":314,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"down","argumentNames":["this"]} -controller_Controller_down__P187152.isGetter = true; +controller_ControlledSprite_constructor__P187138.info = {"start":7271,"length":117,"line":227,"column":8,"endLine":231,"endColumn":13,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["this","s","vx","vy"]} -function controller_Controller_down__P187152_mk(s) { +function controller_ControlledSprite_constructor__P187138_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller_down__P187152, depth: s.depth + 1, + parent: s, fn: controller_ControlledSprite_constructor__P187138, 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 controller_Controller_button__P189408(s) { +function summon_fish__P394663(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27857,34 +27495,157 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, controller_Controller__C187140_VT)) failedCast(r0); - r0 = s.arg0.fields["buttons"]; + r0 = pxsim_Array__mk(); s.tmp_0 = r0; - r0 = (s.arg1 - 1); + r0 = pxsim.image.ofBuffer(_hex394671); s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); + r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); + r0 = pxsim_Array__mk(); + s.tmp_2 = r0; + r0 = pxsim_Array__push(s.tmp_2, s.tmp_0); + r0 = pxsim_Array__mk(); + s.tmp_3 = r0; + r0 = pxsim.image.ofBuffer(_hex394674); + s.tmp_4 = r0; + r0 = pxsim_Array__push(s.tmp_3, s.tmp_4); + r0 = pxsim_Array__push(s.tmp_2, s.tmp_3); + globals.left_fish_animations___394667 = (s.tmp_2); + r0 = pxsim_Array__mk(); + s.tmp_0 = r0; + r0 = pxsim.image.ofBuffer(_hex394680); + s.tmp_1 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); + r0 = pxsim_Array__mk(); + s.tmp_2 = r0; + r0 = pxsim_Array__push(s.tmp_2, s.tmp_0); + r0 = pxsim_Array__mk(); + s.tmp_3 = r0; + r0 = pxsim.image.ofBuffer(_hex394683); + s.tmp_4 = r0; + r0 = pxsim_Array__push(s.tmp_3, s.tmp_4); + r0 = pxsim_Array__push(s.tmp_2, s.tmp_3); + globals.right_fish_animations___394676 = (s.tmp_2); + r0 = pxsim.Math_.randomRange(0, 1); + globals.local_choice___394685 = (r0); + s.tmp_0 = sprites_create__P187191_mk(s); + r0 = pxsim_Array__getAt(globals.right_fish_animations___394676, globals.local_choice___394685); + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_1, 0); + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = globals.NPC___394652; + s.callLocIdx = 84; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + globals.sprite_fish___394690 = (r0); + s.tmp_0 = tiles_placeOnRandomTile__P187566_mk(s); + s.tmp_0.arg0 = globals.sprite_fish___394690; + s.tmp_0.arg1 = globals.tile13___189163; + s.callLocIdx = 85; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + s.tmp_0 = tiles_setTileAt__P187559_mk(s); + s.tmp_1 = tiles_locationOfSprite__P188992_mk(s); + s.tmp_1.arg0 = globals.sprite_fish___394690; + s.callLocIdx = 86; s.pc = 6; return s.tmp_1; + case 6: + r0 = s.retval; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = globals.tile15___189164; + s.callLocIdx = 87; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.tmp_0 = character_loopFrames__P188956_mk(s); + s.tmp_0.arg0 = globals.sprite_fish___394690; + r0 = pxsim_Array__getAt(globals.left_fish_animations___394667, globals.local_choice___394685); + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = 100; + s.tmp_1 = character_rule__P188962_mk(s); + s.tmp_1.arg0 = 512; + s.tmp_1.arg1 = undefined; + s.tmp_1.arg2 = undefined; + s.tmp_1.arg3 = undefined; + s.tmp_1.arg4 = undefined; + s.callLocIdx = 88; s.pc = 8; return s.tmp_1; + case 8: + r0 = s.retval; + s.tmp_0.arg3 = r0; + s.callLocIdx = 89; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + s.tmp_0 = character_loopFrames__P188956_mk(s); + s.tmp_0.arg0 = globals.sprite_fish___394690; + r0 = pxsim_Array__getAt(globals.right_fish_animations___394676, globals.local_choice___394685); + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = 100; + s.tmp_1 = character_rule__P188962_mk(s); + s.tmp_1.arg0 = 128; + s.tmp_1.arg1 = undefined; + s.tmp_1.arg2 = undefined; + s.tmp_1.arg3 = undefined; + s.tmp_1.arg4 = undefined; + s.callLocIdx = 90; s.pc = 10; return s.tmp_1; + case 10: + r0 = s.retval; + s.tmp_0.arg3 = r0; + s.callLocIdx = 91; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; + r0 = pxsim_numops_toBoolDecr(s.arg1); + if (!r0) { step = 1; continue; } + s.tmp_0 = character_setCharacterState__P188960_mk(s); + s.tmp_0.arg0 = globals.sprite_fish___394690; + s.tmp_1 = character_rule__P188962_mk(s); + s.tmp_1.arg0 = 128; + s.tmp_1.arg1 = undefined; + s.tmp_1.arg2 = undefined; + s.tmp_1.arg3 = undefined; + s.tmp_1.arg4 = undefined; + s.callLocIdx = 92; s.pc = 12; return s.tmp_1; + case 12: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 93; s.pc = 11; return s.tmp_0; + case 11: + r0 = s.retval; + case 1: + case 2: + r0 = pxsim_pxtcore_mkAction(1, inline__P394734); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = timer_background__P188812_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 105; s.pc = 13; return s.tmp_1; + case 13: + r0 = s.retval; + r0 = globals.sprite_fish___394690; return leave(s, r0) default: oops() } } } -controller_Controller_button__P189408.info = {"start":11484,"length":105,"line":373,"column":8,"endLine":375,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"button","argumentNames":["this","button"]} +summon_fish__P394663.info = {"start":216,"length":4176,"line":6,"column":0,"endLine":108,"endColumn":1,"fileName":"main.ts","functionName":"summon_fish","argumentNames":["ai","force_animate"]} -function controller_Controller_button__P189408_mk(s) { +function summon_fish__P394663_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller_button__P189408, depth: s.depth + 1, + parent: s, fn: summon_fish__P394663, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, arg0: undefined, arg1: undefined, } } +const _hex394671 = pxsim.BufferMethods.createBufferFromHex("87041000100000000000000000f00f000000000000dc0f0000000000c0dc0f00000000ccccddf1000000cc11dd1df10000c01b111111110f005c1b11c111110f005cbb1b1111110fc055bbbbbb11b1f5c0551b1111b1bbf5c055bb11b1bbbbf5c055b51111115bf5c055c5cc5bfb5ff5005cc5005b0bf0ff00c00cc055c50000000000c0cccc0000") +const _hex394674 = pxsim.BufferMethods.createBufferFromHex("870410001000000000000000ff0f0000000000c044f400000000004c44440f000000c04444440f0000004c44f444f40000c0dc444444fd0000cc44111111440f00cc4444c4c4440fc0cd4444c4444f0fc0cd444444ff4f0fc0cd4d444444c4cdc0dd1c4d44d4dccd00cccc1111fdbfcd000000ccf4ffcc0c0000c04444f400000000c0ccffff0000") +const _hex394680 = pxsim.BufferMethods.createBufferFromHex("8704100010000000000000c0cccc000000c00cc055c50000005cc5005b0bf0ffc055c5cc5bfb5ff5c055b51111115bf5c055bb11b1bbbbf5c0551b1111b1bbf5c055bbbbbb11b1f5005cbb1b1111110f005c1b11c111110f00c01b111111110f0000cc11dd1df100000000ccccddf10000000000c0dc0f000000000000dc0f000000000000f00f00") +const _hex394683 = pxsim.BufferMethods.createBufferFromHex("87041000100000000000c0ccffff00000000c04444f40000000000ccf4ffcc0c00cccc1111fdbfcdc0dd1c4d44d4dccdc0cd4d444444c4cdc0cd444444ff4f0fc0cd4444c4444f0f00cc4444c4c4440f00cc44111111440f00c0dc444444fd0000004c44f444f4000000c04444440f000000004c44440f00000000c044f4000000000000ff0f0000") -function controller_Controller_up__P187151(s) { +function inline__P394734(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27894,79 +27655,119 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, controller_Controller__C187140_VT)) failedCast(r0); - r0 = s.arg0.fields["buttons"]; + r0 = pxsim_numops_toBoolDecr(s.caps[0]); + if (!r0) { step = 1; continue; } + s.tmp_1 = tiles_getTilesByType__P187567_mk(s); + s.tmp_1.arg0 = globals.tile16___189165; + s.callLocIdx = 94; s.pc = 3; return s.tmp_1; + case 3: + r0 = s.retval; s.tmp_0 = r0; - r0 = (2 - 1); + s.tmp_6 = tiles_getTilesByType__P187567_mk(s); + s.tmp_6.arg0 = globals.tile16___189165; + s.callLocIdx = 95; s.pc = 4; return s.tmp_6; + case 4: + r0 = s.retval; + s.tmp_5 = r0; + r0 = pxsim_Array__length(s.tmp_5); + s.tmp_4 = r0; + r0 = (s.tmp_4 - 1); + s.tmp_3 = r0; + r0 = pxsim.Math_.randomRange(0, s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_2); + globals.location___394737 = (r0); + s.tmp_0 = tiles_setTileAt__P187559_mk(s); + s.tmp_0.arg0 = globals.location___394737; + s.tmp_0.arg1 = globals.tile12___189161; + s.callLocIdx = 96; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.tmp_0 = r0 = globals.paths___394754; + s.tmp_2 = scene_aStar__P188872_mk(s); + s.tmp_3 = tiles_locationOfSprite__P188992_mk(s); + s.tmp_3.arg0 = globals.sprite_fish___394690; + s.callLocIdx = 97; s.pc = 7; return s.tmp_3; + case 7: + r0 = s.retval; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = globals.location___394737; + s.tmp_2.arg2 = null; + s.callLocIdx = 98; s.pc = 6; return s.tmp_2; + case 6: + r0 = s.retval; s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); - return leaveAccessor(s, r0) - default: oops() -} } } -controller_Controller_up__P187151.info = {"start":9376,"length":73,"line":304,"column":8,"endLine":306,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"up","argumentNames":["this"]} -controller_Controller_up__P187151.isGetter = true; - -function controller_Controller_up__P187151_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: controller_Controller_up__P187151, 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__P187150(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (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__C187140_VT)) failedCast(r0); - r0 = s.arg0.fields["buttons"]; - s.tmp_0 = r0; - r0 = (3 - 1); + r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); + s.tmp_0 = sprites_setDataNumber__P188836_mk(s); + s.tmp_0.arg0 = globals.sprite_fish___394690; + s.tmp_0.arg1 = "path_index"; + r0 = pxsim_Array__length(globals.paths___394754); s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); - return leaveAccessor(s, r0) + r0 = (s.tmp_1 - 1); + s.tmp_0.arg2 = r0; + s.callLocIdx = 99; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + s.tmp_0 = sprites_setDataNumber__P188836_mk(s); + s.tmp_0.arg0 = globals.sprite_fish___394690; + s.tmp_0.arg1 = "target_row"; + s.tmp_1 = tiles_locationXY__P189008_mk(s); + s.tmp_1.arg0 = globals.location___394737; + s.tmp_1.arg1 = 1; + s.callLocIdx = 100; s.pc = 10; return s.tmp_1; + case 10: + r0 = s.retval; + s.tmp_0.arg2 = r0; + s.callLocIdx = 101; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; + s.tmp_0 = sprites_setDataNumber__P188836_mk(s); + s.tmp_0.arg0 = globals.sprite_fish___394690; + s.tmp_0.arg1 = "target_col"; + s.tmp_1 = tiles_locationXY__P189008_mk(s); + s.tmp_1.arg0 = globals.location___394737; + s.tmp_1.arg1 = 0; + s.callLocIdx = 102; s.pc = 12; return s.tmp_1; + case 12: + r0 = s.retval; + s.tmp_0.arg2 = r0; + s.callLocIdx = 103; s.pc = 11; return s.tmp_0; + case 11: + r0 = s.retval; + s.tmp_0 = sprites_setDataBoolean__P188841_mk(s); + s.tmp_0.arg0 = globals.sprite_fish___394690; + s.tmp_0.arg1 = "running_away"; + s.tmp_0.arg2 = false; + s.callLocIdx = 104; s.pc = 13; return s.tmp_0; + case 13: + r0 = s.retval; + case 1: + case 2: + r0 = undefined; + return leave(s, r0) default: oops() } } } -controller_Controller_right__P187150.info = {"start":9220,"length":79,"line":296,"column":8,"endLine":298,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"right","argumentNames":["this"]} -controller_Controller_right__P187150.isGetter = true; +inline__P394734.info = {"start":3702,"length":664,"line":96,"column":21,"endLine":106,"endColumn":5,"fileName":"main.ts","functionName":"inline","argumentNames":[]} -function controller_Controller_right__P187150_mk(s) { +function inline__P394734_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller_right__P187150, depth: s.depth + 1, + parent: s, fn: inline__P394734, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - arg0: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, } } -function controller_Controller_left__P187149(s) { +function tiles_locationXY__P189008(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27978,36 +27779,188 @@ 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__C187140_VT)) failedCast(r0); - r0 = s.arg0.fields["buttons"]; + r0 = (s.arg1 === 1); s.tmp_0 = r0; - r0 = (1 - 1); - s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); - return leaveAccessor(s, r0) + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_1 = tiles_screenCoordinateToTile__P189014_mk(s); + s.tmp_2 = tiles_Location_y__P187511_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 2092; s.pc = 14; return s.tmp_2; + case 14: + r0 = s.retval; + s.tmp_1.arg0 = r0; + s.callLocIdx = 2093; s.pc = 13; return s.tmp_1; + case 13: + r0 = s.retval; + { step = 12; continue; } + { step = 4; continue; } + case 1: + r0 = (s.arg1 === 0); + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 2; continue; } + s.tmp_4 = tiles_screenCoordinateToTile__P189014_mk(s); + s.tmp_5 = tiles_Location_x__P187510_mk(s); + s.tmp_5.arg0 = s.arg0; + s.callLocIdx = 2094; s.pc = 16; return s.tmp_5; + case 16: + r0 = s.retval; + s.tmp_4.arg0 = r0; + s.callLocIdx = 2095; s.pc = 15; return s.tmp_4; + case 15: + r0 = s.retval; + { step = 12; continue; } + case 2: + case 3: + case 4: + s.tmp_6 = r0 = s.arg1; + r0 = pxsim_pxtcore.switch_eq(2, s.tmp_6); + if (r0) { step = 5; continue; } + r0 = pxsim_pxtcore.switch_eq(3, s.tmp_6); + if (r0) { step = 6; continue; } + r0 = pxsim_pxtcore.switch_eq(5, s.tmp_6); + if (r0) { step = 7; continue; } + r0 = pxsim_pxtcore.switch_eq(6, s.tmp_6); + if (r0) { step = 8; continue; } + r0 = pxsim_pxtcore.switch_eq(4, s.tmp_6); + if (r0) { step = 9; continue; } + r0 = pxsim_pxtcore.switch_eq(7, s.tmp_6); + if (r0) { step = 10; continue; } + r0 = s.tmp_6; + { step = 11; continue; } + case 5: + s.tmp_7 = tiles_Location_x__P187510_mk(s); + s.tmp_7.arg0 = s.arg0; + s.callLocIdx = 2096; s.pc = 17; return s.tmp_7; + case 17: + r0 = s.retval; + { step = 12; continue; } + case 6: + s.tmp_8 = tiles_Location_y__P187511_mk(s); + s.tmp_8.arg0 = s.arg0; + s.callLocIdx = 2097; s.pc = 18; return s.tmp_8; + case 18: + r0 = s.retval; + { step = 12; continue; } + case 7: + s.tmp_10 = tiles_Location_x__P187510_mk(s); + s.tmp_10.arg0 = s.arg0; + s.callLocIdx = 2098; s.pc = 19; return s.tmp_10; + case 19: + r0 = s.retval; + s.tmp_9 = r0; + s.tmp_13 = tiles_tileWidth__P189011_mk(s); + s.callLocIdx = 2099; s.pc = 20; return s.tmp_13; + case 20: + r0 = s.retval; + s.tmp_12 = r0; + r0 = (s.tmp_12 / 2); + s.tmp_11 = r0; + r0 = (s.tmp_9 - s.tmp_11); + { step = 12; continue; } + case 8: + s.tmp_15 = tiles_Location_x__P187510_mk(s); + s.tmp_15.arg0 = s.arg0; + s.callLocIdx = 2100; s.pc = 21; return s.tmp_15; + case 21: + r0 = s.retval; + s.tmp_14 = r0; + s.tmp_18 = tiles_tileWidth__P189011_mk(s); + s.callLocIdx = 2101; s.pc = 22; return s.tmp_18; + case 22: + r0 = s.retval; + s.tmp_17 = r0; + r0 = (s.tmp_17 / 2); + s.tmp_16 = r0; + r0 = (s.tmp_14 + s.tmp_16); + { step = 12; continue; } + case 9: + s.tmp_20 = tiles_Location_y__P187511_mk(s); + s.tmp_20.arg0 = s.arg0; + s.callLocIdx = 2102; s.pc = 23; return s.tmp_20; + case 23: + r0 = s.retval; + s.tmp_19 = r0; + s.tmp_23 = tiles_tileWidth__P189011_mk(s); + s.callLocIdx = 2103; s.pc = 24; return s.tmp_23; + case 24: + r0 = s.retval; + s.tmp_22 = r0; + r0 = (s.tmp_22 / 2); + s.tmp_21 = r0; + r0 = (s.tmp_19 - s.tmp_21); + { step = 12; continue; } + case 10: + s.tmp_25 = tiles_Location_y__P187511_mk(s); + s.tmp_25.arg0 = s.arg0; + s.callLocIdx = 2104; s.pc = 25; return s.tmp_25; + case 25: + r0 = s.retval; + s.tmp_24 = r0; + s.tmp_28 = tiles_tileWidth__P189011_mk(s); + s.callLocIdx = 2105; s.pc = 26; return s.tmp_28; + case 26: + r0 = s.retval; + s.tmp_27 = r0; + r0 = (s.tmp_27 / 2); + s.tmp_26 = r0; + r0 = (s.tmp_24 + s.tmp_26); + { step = 12; continue; } + case 11: + r0 = undefined; + case 12: + return leave(s, r0) default: oops() } } } -controller_Controller_left__P187149.info = {"start":9063,"length":77,"line":288,"column":8,"endLine":290,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"left","argumentNames":["this"]} -controller_Controller_left__P187149.isGetter = true; +tiles_locationXY__P189008.info = {"start":11480,"length":745,"line":324,"column":4,"endLine":345,"endColumn":5,"fileName":"pxt_modules/tilemaps/tilemap.ts","functionName":"locationXY","argumentNames":["location","xy"]} -function controller_Controller_left__P187149_mk(s) { +function tiles_locationXY__P189008_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller_left__P187149, depth: s.depth + 1, + parent: s, fn: tiles_locationXY__P189008, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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, arg0: undefined, + arg1: undefined, } } -function controller_Button_pressureLevel__P187130(s) { +function tiles_tileWidth__P189011(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28017,70 +27970,48 @@ 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__C187120_VT)) failedCast(r0); - r0 = pxsim.control.deviceDalVersion(); + s.tm___205912 = undefined; + s.tmp_0 = game_currentScene__P187749_mk(s); + s.callLocIdx = 2106; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + r0 = r0.fields["tileMap"]; + s.tm___205912 = (r0); + r0 = pxsim_numops_toBoolDecr(s.tm___205912); s.tmp_1 = r0; - r0 = (s.tmp_1 == "sim"); + 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 = controller_Button__C187120_v0_1_mk(s); - s.tmp_3.arg0 = s.arg0; - if (!checkSubtype(s.tmp_3.arg0, controller_Button__C187120_VT)) failedCast(s.tmp_3.arg0); - s.tmp_3.fn = s.tmp_3.arg0.vtable.methods.isPressed; - s.pc = 6; return s.tmp_3; - case 6: - r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); if (!r0) { step = 1; continue; } - r0 = 512; - { step = 2; continue; } - case 1: r0 = 0; + { step = 3; continue; } + case 1: case 2: - // jmp value (already in r0) - s.tmp_4 = r0; - r0 = s.tmp_4; - { step = 5; continue; } - { step = 4; continue; } + r0 = s.tm___205912.fields["_scale"]; + s.tmp_2 = r0; + r0 = (1 << s.tmp_2); case 3: - r0 = s.arg0.fields["id"]; - s.tmp_5 = r0; - r0 = pxsim_pxtcore.pressureLevelByButtonId(s.tmp_5, -1); - { step = 5; continue; } - case 4: - r0 = undefined; - case 5: return leave(s, r0) default: oops() } } } -controller_Button_pressureLevel__P187130.info = {"start":4279,"length":311,"line":139,"column":8,"endLine":146,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"pressureLevel","argumentNames":["this"]} +tiles_tileWidth__P189011.info = {"start":13283,"length":154,"line":376,"column":4,"endLine":381,"endColumn":5,"fileName":"pxt_modules/tilemaps/tilemap.ts","functionName":"tileWidth","argumentNames":[]} -function controller_Button_pressureLevel__P187130_mk(s) { +function tiles_tileWidth__P189011_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_pressureLevel__P187130, depth: s.depth + 1, + parent: s, fn: tiles_tileWidth__P189011, depth: s.depth + 1, pc: 0, retval: undefined, 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, + tm___205912: undefined, } } -function controller_Button_isPressed__P187129(s) { +function sprites_setDataNumber__P188836(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28090,31 +28021,68 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.d___205943 = 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__C187120_VT)) failedCast(r0); - r0 = s.arg0.fields["_pressed"]; + 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_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 = 5; continue; } + case 3: + case 4: + s.tmp_4 = Sprite_data__P187258_mk(s); + s.tmp_4.arg0 = s.arg0; + s.callLocIdx = 1765; s.pc = 6; return s.tmp_4; + case 6: + r0 = s.retval; + s.d___205943 = (r0); + r0 = pxsim_pxtrt.mapSetGeneric(s.d___205943, s.arg1, s.arg2); + case 5: + r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Button_isPressed__P187129.info = {"start":4129,"length":57,"line":132,"column":8,"endLine":134,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"isPressed","argumentNames":["this"]} +sprites_setDataNumber__P188836.info = {"start":241,"length":176,"line":8,"column":4,"endLine":12,"endColumn":5,"fileName":"pxt_modules/arcade-sprite-data/main.ts","functionName":"setDataNumber","argumentNames":["sprite","name","value"]} -function controller_Button_isPressed__P187129_mk(s) { +function sprites_setDataNumber__P188836_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_isPressed__P187129, depth: s.depth + 1, + parent: s, fn: sprites_setDataNumber__P188836, depth: s.depth + 1, pc: 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___205943: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function Fx_imul__P185373(s) { +function character_setCharacterState__P188960(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28124,22 +28092,38 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.state___206138 = 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 = character_getStateForSprite__P191371_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = true; + s.callLocIdx = 2084; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + s.state___206138 = (r0); + s.tmp_0 = character_CharacterState_setManualFlags__P191364_mk(s); + s.tmp_0.arg0 = s.state___206138; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 2085; s.pc = 2; return s.tmp_0; + case 2: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -Fx_imul__P185373.info = {"start":1010,"length":130,"line":32,"column":4,"endLine":34,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"imul","argumentNames":["a","b"]} +character_setCharacterState__P188960.info = {"start":18284,"length":160,"line":529,"column":4,"endLine":532,"endColumn":5,"fileName":"pxt_modules/character-animations/main.ts","functionName":"setCharacterState","argumentNames":["sprite","rule"]} -function Fx_imul__P185373_mk(s) { +function character_setCharacterState__P188960_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_imul__P185373, depth: s.depth + 1, + parent: s, fn: character_setCharacterState__P188960, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + state___206138: undefined, arg0: undefined, arg1: undefined, } } @@ -28148,7 +28132,7 @@ function Fx_imul__P185373_mk(s) { -function power_checkDeepSleep__P186923(s) { +function character_getStateForSprite__P191371(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28158,77 +28142,93 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.p___196310 = undefined; - s.to___196313 = undefined; - s.tmp_0 = power_init__P189307_mk(s); - s.callLocIdx = 117; s.pc = 11; return s.tmp_0; - case 11: + s.sceneState___201408 = undefined; + s.state___201415 = undefined; + s.unnamed8946___U2 = undefined; + s.unnamed8947___U3 = undefined; + s.newState___201426 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + s.tmp_0 = character_init__P191368_mk(s); + s.callLocIdx = 2076; s.pc = 10; return s.tmp_0; + case 10: r0 = s.retval; - s.tmp_0 = r0 = globals._poked___189305; - r0 = pxsim_numops_toBool(s.tmp_0); + 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.tmp_0; - { step = 2; continue; } + r0 = undefined; + { step = 9; continue; } case 1: - r0 = 0; case 2: - // jmp value (already in r0) - s.tmp_1 = r0; - s.p___196310 = (s.tmp_1); - s.tmp_0 = r0 = globals._timeout___189306; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = s.tmp_0; - { step = 4; continue; } + s.tmp_2 = r0 = globals.sceneStack___191351; + r0 = pxsim_Array__length(globals.sceneStack___191351); + s.tmp_4 = r0; + r0 = (s.tmp_4 - 1); + s.tmp_3 = r0; + r0 = pxsim_Array__getAt(s.tmp_2, s.tmp_3); + s.sceneState___201408 = (r0); + s.state___201415 = (undefined); + r0 = s.sceneState___201408.fields["characters"]; + s.unnamed8946___U2 = (r0); + s.unnamed8947___U3 = (0); case 3: - r0 = 0; - case 4: - // jmp value (already in r0) + s.tmp_0 = r0 = s.unnamed8947___U3; + r0 = pxsim_Array__length(s.unnamed8946___U2); s.tmp_1 = r0; - s.to___196313 = (s.tmp_1); - r0 = (s.to___196313 > 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 5; continue; } - r0 = s.tmp_0; - { step = 6; continue; } - case 5: - r0 = pxsim.control.millis(); + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 6; continue; } + r0 = pxsim_Array__getAt(s.unnamed8946___U2, s.unnamed8947___U3); + s.state___201415 = (r0); + r0 = s.state___201415.fields["sprite"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 === s.arg0); s.tmp_2 = r0; - r0 = (s.tmp_2 - s.p___196310); - s.tmp_1 = r0; - r0 = (s.tmp_1 > s.to___196313); + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 4; continue; } + r0 = s.state___201415; + { step = 9; continue; } + case 4: + case 5: + r0 = (s.unnamed8947___U3 + 1); + s.unnamed8947___U3 = (r0); + { step = 3; continue; } case 6: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBool(s.tmp_3); - if (r0) { step = 7; continue; } - r0 = s.tmp_3; - { step = 8; continue; } - case 7: - r0 = pxsim.control.isUSBInitialized(); - s.tmp_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); + s.unnamed8946___U2 = (undefined); + r0 = pxsim_numops_toBoolDecr(s.arg1); + if (!r0) { step = 7; continue; } + r0 = pxsim_pxtcore_mkClassInstance(character_CharacterState__C191357_VT); s.tmp_4 = r0; - r0 = pxsim_Boolean__bang(s.tmp_4); + s.tmp_5 = character_CharacterState_constructor__P191367_mk(s); + s.tmp_5.arg0 = s.tmp_4; + s.tmp_5.arg1 = s.arg0; + s.callLocIdx = 2077; s.pc = 11; return s.tmp_5; + case 11: + r0 = s.retval; + s.newState___201426 = (s.tmp_4); + r0 = s.sceneState___201408.fields["characters"]; + s.tmp_0 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.newState___201426); + r0 = s.newState___201426; + { step = 9; continue; } + case 7: case 8: - // jmp value (already in r0) - s.tmp_6 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_6); - if (!r0) { step = 9; continue; } - r0 = pxsim_pxtcore.deepSleep(); - case 9: - case 10: r0 = undefined; + case 9: return leave(s, r0) default: oops() } } } -power_checkDeepSleep__P186923.info = {"start":1087,"length":298,"line":36,"column":4,"endLine":46,"endColumn":5,"fileName":"pxt_modules/power/power.ts","functionName":"checkDeepSleep","argumentNames":[]} +character_getStateForSprite__P191371.info = {"start":11331,"length":551,"line":352,"column":4,"endLine":370,"endColumn":5,"fileName":"pxt_modules/character-animations/main.ts","functionName":"getStateForSprite","argumentNames":["sprite","createIfNotFound"]} -function power_checkDeepSleep__P186923_mk(s) { +function character_getStateForSprite__P191371_mk(s) { checkStack(s.depth); return { - parent: s, fn: power_checkDeepSleep__P186923, depth: s.depth + 1, + parent: s, fn: character_getStateForSprite__P191371, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -28236,16 +28236,20 @@ function power_checkDeepSleep__P186923_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - tmp_6: undefined, - p___196310: undefined, - to___196313: undefined, + sceneState___201408: undefined, + state___201415: undefined, + unnamed8946___U2: undefined, + unnamed8947___U3: undefined, + newState___201426: undefined, + arg0: undefined, + arg1: undefined, } } -function power_init__P189307(s) { +function character_init__P191368(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28255,54 +28259,64 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = (globals._timeout___189306 !== undefined); + r0 = pxsim_numops_toBoolDecr(globals.sceneStack___191351); + if (!r0) { step = 3; continue; } + r0 = pxsim_Array__length(globals.sceneStack___191351); + 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_3 = character_initScene__P191369_mk(s); + s.callLocIdx = 2069; s.pc = 6; return s.tmp_3; + case 6: + r0 = s.retval; case 1: case 2: - r0 = pxsim_pxtcore.getConfig(212, -1); - s.tmp_1 = r0; - r0 = (s.tmp_1 * 1000); - globals._timeout___189306 = (r0); - r0 = (globals._timeout___189306 > 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 3; continue; } - r0 = s.tmp_0; - { step = 4; continue; } + { step = 5; continue; } case 3: - r0 = (globals._timeout___189306 < 300000); case 4: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 5; continue; } - globals._timeout___189306 = (300000); - case 5: - case 6: + r0 = pxsim_Array__mk(); + globals.sceneStack___191351 = (r0); + s.tmp_0 = game_addScenePushHandler__P187766_mk(s); + s.tmp_0.arg0 = character_initScene__P191369; + s.callLocIdx = 2070; s.pc = 7; return s.tmp_0; case 7: + r0 = s.retval; + s.tmp_0 = game_addScenePopHandler__P187768_mk(s); + s.tmp_0.arg0 = inline__P201480; + s.callLocIdx = 2071; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + s.tmp_0 = character_initScene__P191369_mk(s); + s.callLocIdx = 2072; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; + case 5: r0 = undefined; return leave(s, r0) default: oops() } } } -power_init__P189307.info = {"start":1610,"length":376,"line":57,"column":4,"endLine":66,"endColumn":5,"fileName":"pxt_modules/power/power.ts","functionName":"init","argumentNames":[]} +character_init__P191368.info = {"start":10391,"length":376,"line":310,"column":5,"endLine":326,"endColumn":6,"fileName":"pxt_modules/character-animations/main.ts","functionName":"init","argumentNames":[]} -function power_init__P189307_mk(s) { +function character_init__P191368_mk(s) { checkStack(s.depth); return { - parent: s, fn: power_init__P189307, depth: s.depth + 1, + parent: s, fn: character_init__P191368, depth: s.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 power_poke__P186922(s) { +function inline__P201480(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28312,31 +28326,30 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = power_init__P189307_mk(s); - s.callLocIdx = 116; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = pxsim.control.millis(); - globals._poked___189305 = (r0); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = pxsim_Array_.pop(globals.sceneStack___191351); r0 = undefined; return leave(s, r0) default: oops() } } } -power_poke__P186922.info = {"start":795,"length":81,"line":26,"column":4,"endLine":29,"endColumn":5,"fileName":"pxt_modules/power/power.ts","functionName":"poke","argumentNames":[]} +inline__P201480.info = {"start":10659,"length":76,"line":321,"column":33,"endLine":323,"endColumn":10,"fileName":"pxt_modules/character-animations/main.ts","functionName":"inline","argumentNames":["oldScene"]} -function power_poke__P186922_mk(s) { +function inline__P201480_mk(s) { checkStack(s.depth); return { - parent: s, fn: power_poke__P186922, depth: s.depth + 1, + parent: s, fn: inline__P201480, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, + arg0: undefined, } } -function control_EventContext_deltaTime__P185606(s) { +function character_initScene__P191369(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28346,35 +28359,52 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, control_EventContext__C185601_VT)) failedCast(r0); - r0 = s.arg0.fields["deltaTimeMillis"]; + s.sceneState___201491 = undefined; + r0 = pxsim_pxtcore_mkClassInstance(character_CharacterAnimationSceneState__C191352_VT); s.tmp_0 = r0; - r0 = (s.tmp_0 / 1000); - return leaveAccessor(s, r0) + s.tmp_1 = character_CharacterAnimationSceneState_constructor__P191354_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 2073; s.pc = 1; return s.tmp_1; + case 1: + r0 = s.retval; + r0 = pxsim_Array__push(globals.sceneStack___191351, s.tmp_0); + s.tmp_0 = r0 = globals.sceneStack___191351; + r0 = pxsim_Array__length(globals.sceneStack___191351); + s.tmp_2 = r0; + r0 = (s.tmp_2 - 1); + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); + s.sceneState___201491 = (r0); + r0 = pxsim_pxtcore_mkAction(1, inline__P201498); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.sceneState___201491); + s.tmp_1 = game_onUpdate__P187760_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 2075; s.pc = 2; return s.tmp_1; + case 2: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) default: oops() } } } -control_EventContext_deltaTime__P185606.info = {"start":2097,"length":75,"line":70,"column":8,"endLine":72,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"deltaTime","argumentNames":["this"]} -control_EventContext_deltaTime__P185606.isGetter = true; +character_initScene__P191369.info = {"start":10774,"length":287,"line":328,"column":5,"endLine":336,"endColumn":6,"fileName":"pxt_modules/character-animations/main.ts","functionName":"initScene","argumentNames":[]} -function control_EventContext_deltaTime__P185606_mk(s) { +function character_initScene__P191369_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_deltaTime__P185606, depth: s.depth + 1, + parent: s, fn: character_initScene__P191369, 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, + sceneState___201491: undefined, } } -function scene_Scene_constructor__P187657(s) { +function inline__P201498(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28384,114 +28414,74 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, scene_Scene__C187636_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__C187390_VT); - s.tmp_0 = r0; - s.tmp_1 = ArcadePhysicsEngine_constructor__P187391_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 = 1016; 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__C187577_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_Camera_constructor__P187581_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 1017; 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__C187482_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_Background_constructor__P187486_mk(s); - s.tmp_1.arg0 = s.tmp_0; - r0 = s.arg0.fields["camera"]; - s.tmp_1.arg1 = r0; - s.callLocIdx = 1018; s.pc = 3; return s.tmp_1; + r0 = pxsim_numops_toBoolDecr(s.caps[0]); + if (!r0) { step = 1; continue; } + s.tmp_0 = character_CharacterAnimationSceneState_update__P191353_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.callLocIdx = 2074; s.pc = 3; return s.tmp_0; case 3: r0 = s.retval; - r0 = (s.arg0).fields["background"] = (s.tmp_0); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["destroyedHandlers"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["createdHandlers"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["overlapHandlers"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_pxtrt.mkMap(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["overlapMap"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["tileOverlapHandlers"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["collisionHandlers"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["wallCollisionHandlers"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["gameForeverHandlers"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_pxtrt.mkMap(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["spritesByKind"] = (s.tmp_1); + case 1: + case 2: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +inline__P201498.info = {"start":10945,"length":108,"line":331,"column":23,"endLine":335,"endColumn":10,"fileName":"pxt_modules/character-animations/main.ts","functionName":"inline","argumentNames":[]} + +function inline__P201498_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: inline__P201498, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, +} } + + + + + +function character_CharacterAnimationSceneState_constructor__P191354(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (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, character_CharacterAnimationSceneState__C191352_VT)) failedCast(r0); 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_pxtrt.mkMap(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_data"] = (s.tmp_1); - r0 = (s.arg0).fields["_millis"] = (0); + r0 = (s.tmp_0).fields["characters"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -scene_Scene_constructor__P187657.info = {"start":3365,"length":793,"line":102,"column":8,"endLine":120,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":["this","eventContext","previousScene"]} +character_CharacterAnimationSceneState_constructor__P191354.info = {"start":1525,"length":59,"line":52,"column":8,"endLine":54,"endColumn":9,"fileName":"pxt_modules/character-animations/main.ts","functionName":"inline","argumentNames":["this"]} -function scene_Scene_constructor__P187657_mk(s) { +function character_CharacterAnimationSceneState_constructor__P191354_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_constructor__P187657, depth: s.depth + 1, + parent: s, fn: character_CharacterAnimationSceneState_constructor__P191354, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function scene_Camera_constructor__P187581(s) { +function character_CharacterAnimationSceneState_update__P191353(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28501,27 +28491,92 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.dt___201503 = undefined; + s.cleanup___201508 = undefined; + s.character___201510 = undefined; + s.unnamed8940___U3 = undefined; + s.unnamed8941___U4 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_Camera__C187577_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); + if (!checkSubtype(r0, character_CharacterAnimationSceneState__C191352_VT)) failedCast(r0); + s.tmp_0 = game_currentScene__P187749_mk(s); + s.callLocIdx = 2035; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + r0 = r0.fields["eventContext"]; + r0 = r0.fields["deltaTimeMillis"]; + s.dt___201503 = (r0); + s.cleanup___201508 = (false); + s.character___201510 = (undefined); + r0 = s.arg0.fields["characters"]; + s.unnamed8940___U3 = (r0); + s.unnamed8941___U4 = (0); + case 1: + s.tmp_0 = r0 = s.unnamed8941___U4; + r0 = pxsim_Array__length(s.unnamed8940___U3); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 4; continue; } + r0 = pxsim_Array__getAt(s.unnamed8940___U3, s.unnamed8941___U4); + s.character___201510 = (r0); + r0 = s.character___201510.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___201508 = (true); + case 2: + case 3: + s.tmp_0 = character_CharacterState_update__P191361_mk(s); + s.tmp_0.arg0 = s.character___201510; + s.tmp_0.arg1 = s.dt___201503; + s.callLocIdx = 2036; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + r0 = (s.unnamed8941___U4 + 1); + s.unnamed8941___U4 = (r0); + { step = 1; continue; } + case 4: + s.unnamed8940___U3 = (undefined); + r0 = pxsim_numops_toBoolDecr(s.cleanup___201508); + if (!r0) { step = 5; continue; } + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = helpers_arrayFilter__P185325_mk(s); + r0 = s.arg0.fields["characters"]; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = inline__P201528; + s.callLocIdx = 2037; s.pc = 9; return s.tmp_2; + case 9: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["characters"] = (s.tmp_1); + case 5: + case 6: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_Camera_constructor__P187581.info = {"start":456,"length":156,"line":15,"column":8,"endLine":21,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"inline","argumentNames":["this"]} +character_CharacterAnimationSceneState_update__P191353.info = {"start":1594,"length":483,"line":56,"column":8,"endLine":68,"endColumn":9,"fileName":"pxt_modules/character-animations/main.ts","functionName":"update","argumentNames":["this"]} -function scene_Camera_constructor__P187581_mk(s) { +function character_CharacterAnimationSceneState_update__P191353_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Camera_constructor__P187581, depth: s.depth + 1, + parent: s, fn: character_CharacterAnimationSceneState_update__P191353, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + dt___201503: undefined, + cleanup___201508: undefined, + character___201510: undefined, + unnamed8940___U3: undefined, + unnamed8941___U4: undefined, arg0: undefined, } } @@ -28529,7 +28584,7 @@ function scene_Camera_constructor__P187581_mk(s) { -function scene_Background_constructor__P187486(s) { +function inline__P201528(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28541,39 +28596,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, scene_Background__C187482_VT)) failedCast(r0); - r0 = (s.arg0).fields["color"] = (0); - r0 = (s.arg0).fields["camera"] = (s.arg1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); + r0 = s.arg0.fields["sprite"]; + r0 = r0.fields["flags"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 & 2); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_layers"] = (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() } } } -scene_Background_constructor__P187486.info = {"start":367,"length":132,"line":20,"column":8,"endLine":24,"endColumn":9,"fileName":"pxt_modules/game/background.ts","functionName":"inline","argumentNames":["this","camera"]} +inline__P201528.info = {"start":1989,"length":63,"line":66,"column":57,"endLine":66,"endColumn":120,"fileName":"pxt_modules/character-animations/main.ts","functionName":"inline","argumentNames":["character"]} -function scene_Background_constructor__P187486_mk(s) { +function inline__P201528_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Background_constructor__P187486, depth: s.depth + 1, + parent: s, fn: inline__P201528, 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_constructor__P187391(s) { +function character_CharacterState_update__P191361(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28583,319 +28636,671 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.state___201539 = undefined; + s.newAnimation___201765 = 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__C187390_VT)) failedCast(r0); - r0 = undefined; + if (!checkSubtype(r0, character_CharacterState__C191357_VT)) failedCast(r0); + s.state___201539 = (0); + s.tmp_2 = Sprite_vx__P187246_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 2042; s.pc = 66; return s.tmp_2; + case 66: + r0 = s.retval; + s.tmp_1 = r0; + s.tmp_4 = Sprite_vy__P187248_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_4.arg0 = r0; + s.callLocIdx = 2043; 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___201539 | 2); + s.state___201539 = (r0); + s.tmp_2 = Sprite_vx__P187246_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 2044; 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___201539; + 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___201539 = (r0); + { step = 4; continue; } + case 1: + s.tmp_2 = Sprite_vx__P187246_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 2045; s.pc = 69; return s.tmp_2; + case 69: + 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 = 2; continue; } + s.tmp_3 = r0 = s.state___201539; + 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___201539 = (r0); + case 2: + case 3: + case 4: + s.tmp_2 = Sprite_vy__P187248_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 2046; 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 = 5; continue; } + s.tmp_3 = r0 = s.state___201539; + 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___201539 = (r0); + { step = 8; continue; } + case 5: + s.tmp_2 = Sprite_vy__P187248_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 2047; s.pc = 71; return s.tmp_2; + case 71: + 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 = 6; continue; } + s.tmp_3 = r0 = s.state___201539; + 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___201539 = (r0); + case 6: + case 7: + case 8: + r0 = (s.state___201539 & 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___201539; + 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___201539 = (r0); + case 9: + case 10: + { step = 26; continue; } + case 11: + s.tmp_2 = Sprite_x__P187242_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 2048; 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__P187244_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_5.arg0 = r0; + s.callLocIdx = 2049; 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___201539 | 2); + s.state___201539 = (r0); + s.tmp_2 = Sprite_x__P187242_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 2050; 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___201539; + 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___201539 = (r0); + { step = 17; continue; } + case 14: + s.tmp_2 = Sprite_x__P187242_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 2051; 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___201539; + 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___201539 = (r0); + case 15: + case 16: + case 17: + s.tmp_2 = Sprite_y__P187244_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 2052; 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___201539; + 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___201539 = (r0); + { step = 21; continue; } + case 18: + s.tmp_2 = Sprite_y__P187244_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 2053; 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___201539; + 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___201539 = (r0); + case 19: + case 20: + case 21: + r0 = (s.state___201539 & 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___201539; + 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___201539 = (r0); + case 22: + case 23: + { step = 25; continue; } + case 24: + r0 = (s.state___201539 | 1); + s.state___201539 = (r0); + s.tmp_0 = r0 = s.state___201539; + 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___201539 = (r0); + case 25: + case 26: + s.tmp_1 = Sprite_isHittingTile__P187298_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 3; + s.callLocIdx = 2054; 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___201539 | 4096); + s.state___201539 = (r0); + case 27: + case 28: + s.tmp_1 = Sprite_isHittingTile__P187298_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 1; + s.callLocIdx = 2055; 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___201539 | 1024); + s.state___201539 = (r0); + case 29: + case 30: + s.tmp_1 = Sprite_isHittingTile__P187298_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 2; + s.callLocIdx = 2056; 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___201539 | 2048); + s.state___201539 = (r0); + case 31: + case 32: + s.tmp_1 = Sprite_isHittingTile__P187298_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 0; + s.callLocIdx = 2057; 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___201539 | 8192); + s.state___201539 = (r0); + case 33: + case 34: s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); + s.tmp_2 = Sprite_x__P187242_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 2058; 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__P187244_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 2059; s.pc = 83; return s.tmp_2; + case 83: + r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_0).fields["sprites"] = (s.tmp_1); - r0 = pxsim_pxtcore_mkClassInstance(sprites_SpriteMap__C187311_VT); + r0 = (s.tmp_0).fields["lastY"] = (s.tmp_1); + r0 = s.arg0.fields["manualFlags"]; s.tmp_0 = r0; - s.tmp_1 = sprites_SpriteMap_constructor__P187312_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 537; 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__P187393_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 538; s.pc = 2; return s.tmp_0; - case 2: + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 35; continue; } + r0 = s.tmp_0; + { step = 36; continue; } + case 35: + r0 = s.state___201539; + case 36: + // jmp value (already in r0) + s.tmp_1 = r0; + s.tmp_2 = character_CharacterState_pickRule__P191366_mk(s); + s.tmp_2.arg0 = s.arg0; + s.tmp_2.arg1 = s.tmp_1; + s.callLocIdx = 2060; s.pc = 84; return s.tmp_2; + case 84: r0 = s.retval; - s.tmp_0 = ArcadePhysicsEngine_maxStep__P187397_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg3; - s.callLocIdx = 539; s.pc = 3; return s.tmp_0; - case 3: + s.newAnimation___201765 = (r0); + r0 = s.arg0.fields["current"]; + s.tmp_1 = r0; + r0 = (s.newAnimation___201765 !== 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___201765; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 37; continue; } + r0 = s.tmp_0; + { step = 38; continue; } + case 37: + r0 = s.newAnimation___201765.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___201765); + 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 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 41; continue; } + s.tmp_3 = Sprite_setImage__P187273_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 = 2061; s.pc = 85; return s.tmp_3; + case 85: r0 = s.retval; - s.tmp_0 = ArcadePhysicsEngine_minStep__P187395_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg2; - s.callLocIdx = 540; s.pc = 4; return s.tmp_0; - case 4: + { step = 42; continue; } + case 41: + s.tmp_0 = Sprite_setImage__P187273_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 = 2062; s.pc = 86; return s.tmp_0; + case 86: r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -ArcadePhysicsEngine_constructor__P187391.info = {"start":1330,"length":277,"line":55,"column":4,"endLine":62,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["this","maxVelocity","minSingleStep","maxSingleStep"]} - -function ArcadePhysicsEngine_constructor__P187391_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: ArcadePhysicsEngine_constructor__P187391, 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__P187397(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (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__C187390_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 * 256); + case 42: + case 43: + case 44: + case 45: + case 46: + r0 = s.arg0.fields["current"]; 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["maxSingleStep"] = (s.tmp_1); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -ArcadePhysicsEngine_maxStep__P187397.info = {"start":2058,"length":67,"line":85,"column":4,"endLine":87,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"maxStep","argumentNames":["this","v"]} - -function ArcadePhysicsEngine_maxStep__P187397_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: ArcadePhysicsEngine_maxStep__P187397, 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__P187396(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (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, ArcadePhysicsEngine__C187390_VT)) failedCast(r0); - r0 = s.arg0.fields["maxSingleStep"]; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = (s.tmp_0 + 128); - s.tmp_1 = r0; - r0 = (s.tmp_1 >> 8); - return leaveAccessor(s, r0) - default: oops() -} } } -ArcadePhysicsEngine_maxStep__P187396.info = {"start":1978,"length":74,"line":81,"column":4,"endLine":83,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"maxStep","argumentNames":["this"]} -ArcadePhysicsEngine_maxStep__P187396.isGetter = true; - -function ArcadePhysicsEngine_maxStep__P187396_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: ArcadePhysicsEngine_maxStep__P187396, 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__P185382(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = (s.arg0 + 128); + r0 = 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 = 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 = (s.tmp_0 >> 8); - return leave(s, r0) - default: oops() -} } } -Fx_toInt__P185382.info = {"start":2144,"length":86,"line":68,"column":4,"endLine":70,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"toInt","argumentNames":["v"]} - -function Fx_toInt__P185382_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Fx_toInt__P185382, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, -} } - - - - - -function ArcadePhysicsEngine_minStep__P187395(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (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__C187390_VT)) failedCast(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 = 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.arg1 * 256); + r0 = s.tmp_0.fields["frame"]; s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); + r0 = (s.tmp_2 + 1); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["minSingleStep"] = (s.tmp_1); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -ArcadePhysicsEngine_minStep__P187395.info = {"start":1905,"length":67,"line":77,"column":4,"endLine":79,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"minStep","argumentNames":["this","v"]} - -function ArcadePhysicsEngine_minStep__P187395_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: ArcadePhysicsEngine_minStep__P187395, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function ArcadePhysicsEngine_minStep__P187394(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (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, ArcadePhysicsEngine__C187390_VT)) failedCast(r0); - r0 = s.arg0.fields["minSingleStep"]; + 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 = (s.tmp_0 + 128); + 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__P187273_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 = 2063; 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__P187273_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.tmp_1 >> 8); - return leaveAccessor(s, r0) - default: oops() -} } } -ArcadePhysicsEngine_minStep__P187394.info = {"start":1825,"length":74,"line":73,"column":4,"endLine":75,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"minStep","argumentNames":["this"]} -ArcadePhysicsEngine_minStep__P187394.isGetter = true; - -function ArcadePhysicsEngine_minStep__P187394_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: ArcadePhysicsEngine_minStep__P187394, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, -} } - - - - - -function ArcadePhysicsEngine_maxSpeed__P187393(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (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__C187390_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 * 256); + r0 = s.arg0.fields["frame"]; s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); + r0 = pxsim_Array__getAt(s.tmp_1, s.tmp_2); + s.tmp_0.arg1 = r0; + s.callLocIdx = 2064; 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 = (s.tmp_0).fields["maxVelocity"] = (s.tmp_1); + 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["maxVelocity"]; + r0 = s.arg0.fields["frame"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 + 1); s.tmp_2 = r0; - r0 = (0 - s.tmp_2); + 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["maxNegativeVelocity"] = (s.tmp_1); + r0 = (s.tmp_0).fields["frame"] = (s.tmp_1); + s.tmp_0 = Sprite_setImage__P187273_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 = 2065; 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() } } } -ArcadePhysicsEngine_maxSpeed__P187393.info = {"start":1692,"length":127,"line":68,"column":4,"endLine":71,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"maxSpeed","argumentNames":["this","v"]} +character_CharacterState_update__P191361.info = {"start":4439,"length":4624,"line":148,"column":8,"endLine":263,"endColumn":9,"fileName":"pxt_modules/character-animations/main.ts","functionName":"update","argumentNames":["this","dt"]} -function ArcadePhysicsEngine_maxSpeed__P187393_mk(s) { +function character_CharacterState_update__P191361_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_maxSpeed__P187393, depth: s.depth + 1, + parent: s, fn: character_CharacterState_update__P191361, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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___201539: undefined, + newAnimation___201765: undefined, arg0: undefined, arg1: undefined, } } @@ -28904,39 +29309,7 @@ function ArcadePhysicsEngine_maxSpeed__P187393_mk(s) { -function Fx_neg__P185367(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (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 = (0 - s.arg0); - return leave(s, r0) - default: oops() -} } } -Fx_neg__P185367.info = {"start":311,"length":88,"line":14,"column":4,"endLine":16,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"neg","argumentNames":["a"]} - -function Fx_neg__P185367_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Fx_neg__P185367, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function ArcadePhysicsEngine_maxSpeed__P187392(s) { +function character_CharacterState_pickRule__P191366(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28946,112 +29319,120 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.best___201923 = undefined; + s.bestScore___201926 = undefined; + s.currentScore___201935 = undefined; + s.animation___201937 = undefined; + s.unnamed8944___U4 = undefined; + s.unnamed8945___U5 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C187390_VT)) failedCast(r0); - r0 = s.arg0.fields["maxVelocity"]; + if (!checkSubtype(r0, character_CharacterState__C191357_VT)) failedCast(r0); + r0 = (s.arg0).fields["lastState"] = (s.arg1); + r0 = s.arg0.fields["current"]; + s.best___201923 = (r0); + r0 = s.arg0.fields["current"]; 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: + s.tmp_1 = character_score__P191370_mk(s); + s.tmp_1.arg0 = s.arg1; + r0 = s.best___201923.fields["rule"]; + s.tmp_1.arg1 = r0; + s.callLocIdx = 2067; 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___201926 = (s.tmp_2); + s.animation___201937 = (undefined); + r0 = s.arg0.fields["animations"]; + s.unnamed8944___U4 = (r0); + s.unnamed8945___U5 = (0); + case 3: + s.tmp_0 = r0 = s.unnamed8945___U5; + r0 = pxsim_Array__length(s.unnamed8944___U4); s.tmp_1 = r0; - r0 = (s.tmp_1 >> 8); - return leaveAccessor(s, r0) - default: oops() -} } } -ArcadePhysicsEngine_maxSpeed__P187392.info = {"start":1613,"length":73,"line":64,"column":4,"endLine":66,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"maxSpeed","argumentNames":["this"]} -ArcadePhysicsEngine_maxSpeed__P187392.isGetter = true; - -function ArcadePhysicsEngine_maxSpeed__P187392_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: ArcadePhysicsEngine_maxSpeed__P187392, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, -} } - - - - - -function PhysicsEngine_constructor__P187377(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, PhysicsEngine__C187376_VT)) failedCast(r0); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -PhysicsEngine_constructor__P187377.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_constructor__P187377_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: PhysicsEngine_constructor__P187377, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function sprites_SpriteMap_constructor__P187312(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, sprites_SpriteMap__C187311_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 6; continue; } + r0 = pxsim_Array__getAt(s.unnamed8944___U4, s.unnamed8945___U5); + s.animation___201937 = (r0); + s.tmp_2 = character_score__P191370_mk(s); + s.tmp_2.arg0 = s.arg1; + r0 = s.animation___201937.fields["rule"]; + s.tmp_2.arg1 = r0; + s.callLocIdx = 2068; s.pc = 13; return s.tmp_2; + case 13: + r0 = s.retval; + s.currentScore___201935 = (r0); + r0 = (s.currentScore___201935 > s.bestScore___201926); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + s.bestScore___201926 = (s.currentScore___201935); + s.best___201923 = (s.animation___201937); + case 4: + case 5: + r0 = (s.unnamed8945___U5 + 1); + s.unnamed8945___U5 = (r0); + { step = 3; continue; } + case 6: + s.unnamed8944___U4 = (undefined); + r0 = (s.bestScore___201926 === 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___201926 == undefined); + case 8: + // jmp value (already in r0) s.tmp_1 = r0; - r0 = (s.tmp_0).fields["buckets"] = (s.tmp_1); - r0 = undefined; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 9; continue; } + r0 = null; + { step = 11; continue; } + case 9: + case 10: + r0 = s.best___201923; + case 11: return leave(s, r0) default: oops() } } } -sprites_SpriteMap_constructor__P187312.info = {"start":237,"length":56,"line":8,"column":8,"endLine":10,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"inline","argumentNames":["this"]} +character_CharacterState_pickRule__P191366.info = {"start":9567,"length":811,"line":286,"column":8,"endLine":307,"endColumn":9,"fileName":"pxt_modules/character-animations/main.ts","functionName":"pickRule","argumentNames":["this","state"]} -function sprites_SpriteMap_constructor__P187312_mk(s) { +function character_CharacterState_pickRule__P191366_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_constructor__P187312, depth: s.depth + 1, + parent: s, fn: character_CharacterState_pickRule__P191366, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + best___201923: undefined, + bestScore___201926: undefined, + currentScore___201935: undefined, + animation___201937: undefined, + unnamed8944___U4: undefined, + unnamed8945___U5: undefined, arg0: undefined, + arg1: undefined, } } -function music_Melody_constructor__P186818(s) { +function character_score__P191370(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29061,171 +29442,66 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.res___201962 = undefined; + s.check___201963 = 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__C186815_VT)) failedCast(r0); - r0 = (s.arg0).fields["_text"] = (s.arg1); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -music_Melody_constructor__P186818.info = {"start":6328,"length":67,"line":199,"column":8,"endLine":201,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"inline","argumentNames":["this","text"]} - -function music_Melody_constructor__P186818_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: music_Melody_constructor__P186818, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, - arg1: undefined, -} } - - - - - -function control_pushEventContext__P185615(s) { -let r0 = s.r0, 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___197514 = undefined; - s.n___197520 = undefined; - r0 = pxsim_numops_toBoolDecr(globals.eventContexts___189248); + s.res___201962 = (0); + s.check___201963 = (s.arg0); + r0 = (s.arg0 & s.arg1); s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = (s.tmp_1 ^ s.arg1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = pxsim_Array__mk(); - globals.eventContexts___189248 = (r0); + r0 = 0; + { step = 7; continue; } case 1: case 2: - s.tmp_0 = control_eventContext__P185614_mk(s); - s.callLocIdx = 62; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - s.ctx___197514 = (r0); - r0 = pxsim_numops_toBoolDecr(s.ctx___197514); - if (!r0) { step = 3; continue; } - s.tmp_0 = control_EventContext_unregister__P185608_mk(s); - s.tmp_0.arg0 = s.ctx___197514; - s.callLocIdx = 63; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; case 3: + r0 = pxsim_numops_toBoolDecr(s.check___201963); + if (!r0) { step = 6; continue; } + r0 = (s.check___201963 & 1); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 4; continue; } + r0 = (s.res___201962 + 1); + s.res___201962 = (r0); case 4: - r0 = pxsim_pxtcore_mkClassInstance(control_EventContext__C185601_VT); - s.tmp_0 = r0; - s.tmp_1 = control_EventContext_constructor__P185605_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 64; s.pc = 7; return s.tmp_1; + case 5: + r0 = (s.check___201963 >> 1); + s.check___201963 = (r0); + { step = 3; continue; } + case 6: + r0 = s.res___201962; case 7: - r0 = s.retval; - s.n___197520 = (s.tmp_0); - r0 = pxsim_Array__push(globals.eventContexts___189248, s.n___197520); - r0 = s.n___197520; - return leave(s, r0) - default: oops() -} } } -control_pushEventContext__P185615.info = {"start":7123,"length":340,"line":216,"column":4,"endLine":227,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"pushEventContext","argumentNames":[]} - -function control_pushEventContext__P185615_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: control_pushEventContext__P185615, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - ctx___197514: undefined, - n___197520: undefined, -} } - - - - - -function control_EventContext_unregister__P185608(s) { -let r0 = s.r0, 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___195135 = undefined; - s.unnamed8900___U1 = undefined; - s.unnamed8901___U2 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, control_EventContext__C185601_VT)) failedCast(r0); - s.h___195135 = (undefined); - r0 = s.arg0.fields["handlers"]; - s.unnamed8900___U1 = (r0); - s.unnamed8901___U2 = (0); - case 1: - s.tmp_0 = r0 = s.unnamed8901___U2; - r0 = pxsim_Array__length(s.unnamed8900___U1); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 2; continue; } - r0 = pxsim_Array__getAt(s.unnamed8900___U1, s.unnamed8901___U2); - s.h___195135 = (r0); - s.tmp_2 = control_EventHandler_unregister__P189242_mk(s); - s.tmp_2.arg0 = s.h___195135; - s.callLocIdx = 58; s.pc = 3; return s.tmp_2; - case 3: - r0 = s.retval; - r0 = (s.unnamed8901___U2 + 1); - s.unnamed8901___U2 = (r0); - { step = 1; continue; } - case 2: - s.unnamed8900___U1 = (undefined); - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["frameWorker"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 + 1); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["frameWorker"] = (s.tmp_1); - r0 = undefined; return leave(s, r0) default: oops() } } } -control_EventContext_unregister__P185608.info = {"start":4534,"length":131,"line":137,"column":8,"endLine":141,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"unregister","argumentNames":["this"]} +character_score__P191370.info = {"start":11067,"length":258,"line":338,"column":4,"endLine":350,"endColumn":5,"fileName":"pxt_modules/character-animations/main.ts","functionName":"score","argumentNames":["state","rule"]} -function control_EventContext_unregister__P185608_mk(s) { +function character_score__P191370_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_unregister__P185608, depth: s.depth + 1, + parent: s, fn: character_score__P191370, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - h___195135: undefined, - unnamed8900___U1: undefined, - unnamed8901___U2: undefined, + res___201962: undefined, + check___201963: undefined, arg0: undefined, + arg1: undefined, } } -function control_EventHandler_unregister__P189242(s) { +function Sprite_isHittingTile__P187298(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29237,114 +29513,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, control_EventHandler__C189240_VT)) failedCast(r0); - r0 = s.arg0.fields["src"]; + if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); + r0 = s.arg0.fields["_obstacles"]; s.tmp_0 = r0; - r0 = s.arg0.fields["value"]; - s.tmp_1 = r0; - r0 = s.arg0.fields["flags"]; + 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 = pxsim_Boolean__bang(s.tmp_3); s.tmp_2 = r0; - r0 = pxsim.control.internalOnEvent(s.tmp_0, s.tmp_1, control_doNothing__P189244, s.tmp_2); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -control_EventHandler_unregister__P189242.info = {"start":1136,"length":106,"line":36,"column":8,"endLine":38,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"unregister","argumentNames":["this"]} - -function control_EventHandler_unregister__P189242_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: control_EventHandler_unregister__P189242, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - arg0: undefined, -} } - - - - - -function control_doNothing__P189244(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -control_doNothing__P189244.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__P189244_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: control_doNothing__P189244, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, -} } - - - - - -function control_EventContext_constructor__P185605(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (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, control_EventContext__C185601_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___185603); + 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(); - globals.control_EventContext_lastStats___185603 = (r0); - case 1: case 2: - r0 = undefined; + // jmp value (already in r0) + s.tmp_6 = r0; + r0 = s.tmp_6; return leave(s, r0) default: oops() } } } -control_EventContext_constructor__P185605.info = {"start":1740,"length":347,"line":58,"column":8,"endLine":68,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":["this"]} +Sprite_isHittingTile__P187298.info = {"start":25208,"length":125,"line":765,"column":4,"endLine":767,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"isHittingTile","argumentNames":["this","direction"]} -function control_EventContext_constructor__P185605_mk(s) { +function Sprite_isHittingTile__P187298_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_constructor__P185605, depth: s.depth + 1, + parent: s, fn: Sprite_isHittingTile__P187298, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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, } } @@ -30611,7 +30825,7 @@ function Sprite_setPosition__P187289_mk(s) { -function summon_shark__P348236(s) { +function summon_shark__P395007(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30622,36 +30836,36 @@ switch (step) { case 0: s.tmp_0 = sprites_create__P187191_mk(s); - r0 = pxsim.image.ofBuffer(_hex349006); + r0 = pxsim.image.ofBuffer(_hex395181); s.tmp_0.arg0 = r0; s.tmp_0.arg1 = globals.Enemy___187348; - s.callLocIdx = 174; s.pc = 3; return s.tmp_0; + s.callLocIdx = 184; s.pc = 3; return s.tmp_0; case 3: r0 = s.retval; - globals.sprite_shark___348296 = (r0); + globals.sprite_shark___395177 = (r0); s.tmp_0 = sprites_setDataNumber__P188836_mk(s); - s.tmp_0.arg0 = globals.sprite_shark___348296; + s.tmp_0.arg0 = globals.sprite_shark___395177; s.tmp_0.arg1 = "speed_dif"; s.tmp_0.arg2 = 0; - s.callLocIdx = 175; s.pc = 4; return s.tmp_0; + s.callLocIdx = 185; s.pc = 4; return s.tmp_0; case 4: r0 = s.retval; s.tmp_0 = tiles_placeOnRandomTile__P187566_mk(s); - s.tmp_0.arg0 = globals.sprite_shark___348296; + s.tmp_0.arg0 = globals.sprite_shark___395177; s.tmp_0.arg1 = globals.tile15___189164; - s.callLocIdx = 176; s.pc = 5; return s.tmp_0; + s.callLocIdx = 186; s.pc = 5; return s.tmp_0; case 5: r0 = s.retval; case 1: s.tmp_2 = tiles_locationXY__P189008_mk(s); s.tmp_3 = tiles_locationOfSprite__P188992_mk(s); - s.tmp_3.arg0 = globals.sprite_shark___348296; - s.callLocIdx = 177; s.pc = 7; return s.tmp_3; + s.tmp_3.arg0 = globals.sprite_shark___395177; + s.callLocIdx = 187; s.pc = 7; return s.tmp_3; case 7: r0 = s.retval; s.tmp_2.arg0 = r0; s.tmp_2.arg1 = 0; - s.callLocIdx = 178; s.pc = 6; return s.tmp_2; + s.callLocIdx = 188; s.pc = 6; return s.tmp_2; case 6: r0 = s.retval; s.tmp_1 = r0; @@ -30660,20 +30874,20 @@ switch (step) { r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 2; continue; } s.tmp_4 = tiles_placeOnRandomTile__P187566_mk(s); - s.tmp_4.arg0 = globals.sprite_shark___348296; + s.tmp_4.arg0 = globals.sprite_shark___395177; s.tmp_4.arg1 = globals.tile15___189164; - s.callLocIdx = 179; s.pc = 8; return s.tmp_4; + s.callLocIdx = 189; s.pc = 8; return s.tmp_4; case 8: r0 = s.retval; { step = 1; continue; } case 2: r0 = pxsim_Array__mk(); s.tmp_0 = r0; - r0 = pxsim.image.ofBuffer(_hex349027); + r0 = pxsim.image.ofBuffer(_hex395202); s.tmp_1 = r0; r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); s.tmp_2 = character_loopFrames__P188956_mk(s); - s.tmp_2.arg0 = globals.sprite_shark___348296; + s.tmp_2.arg0 = globals.sprite_shark___395177; s.tmp_2.arg1 = s.tmp_0; s.tmp_2.arg2 = 250; s.tmp_3 = character_rule__P188962_mk(s); @@ -30682,20 +30896,20 @@ switch (step) { s.tmp_3.arg2 = undefined; s.tmp_3.arg3 = undefined; s.tmp_3.arg4 = undefined; - s.callLocIdx = 180; s.pc = 10; return s.tmp_3; + s.callLocIdx = 190; s.pc = 10; return s.tmp_3; case 10: r0 = s.retval; s.tmp_2.arg3 = r0; - s.callLocIdx = 181; s.pc = 9; return s.tmp_2; + s.callLocIdx = 191; s.pc = 9; return s.tmp_2; case 9: r0 = s.retval; r0 = pxsim_Array__mk(); s.tmp_0 = r0; - r0 = pxsim.image.ofBuffer(_hex349038); + r0 = pxsim.image.ofBuffer(_hex395213); s.tmp_1 = r0; r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); s.tmp_2 = character_loopFrames__P188956_mk(s); - s.tmp_2.arg0 = globals.sprite_shark___348296; + s.tmp_2.arg0 = globals.sprite_shark___395177; s.tmp_2.arg1 = s.tmp_0; s.tmp_2.arg2 = 250; s.tmp_3 = character_rule__P188962_mk(s); @@ -30704,23 +30918,23 @@ switch (step) { s.tmp_3.arg2 = undefined; s.tmp_3.arg3 = undefined; s.tmp_3.arg4 = undefined; - s.callLocIdx = 182; s.pc = 12; return s.tmp_3; + s.callLocIdx = 192; s.pc = 12; return s.tmp_3; case 12: r0 = s.retval; s.tmp_2.arg3 = r0; - s.callLocIdx = 183; s.pc = 11; return s.tmp_2; + s.callLocIdx = 193; s.pc = 11; return s.tmp_2; case 11: r0 = s.retval; - r0 = globals.sprite_shark___348296; + r0 = globals.sprite_shark___395177; return leave(s, r0) default: oops() } } } -summon_shark__P348236.info = {"start":16448,"length":2606,"line":301,"column":0,"endLine":372,"endColumn":1,"fileName":"main.ts","functionName":"summon_shark","argumentNames":[]} +summon_shark__P395007.info = {"start":16906,"length":2606,"line":317,"column":0,"endLine":388,"endColumn":1,"fileName":"main.ts","functionName":"summon_shark","argumentNames":[]} -function summon_shark__P348236_mk(s) { +function summon_shark__P395007_mk(s) { checkStack(s.depth); return { - parent: s, fn: summon_shark__P348236, depth: s.depth + 1, + parent: s, fn: summon_shark__P395007, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -30729,9 +30943,9 @@ function summon_shark__P348236_mk(s) { tmp_4: undefined, } } -const _hex349006 = pxsim.BufferMethods.createBufferFromHex("8704200010000000000000f0ff000000000000f0bb0f0000000000bfbcfb00000000f0bbbbc10f000000f0bb1bc1fc000000bfbb1bc1c1000000bfbb1133c3000000bfbb1113cc000000bffb1fcc110c0000bffb1f1c110c00fcbcbb1111110cc0ccbcbc1b11fc0cc0cdcccbbcbbbb0fdcbdbcbcbbbbdbfcdcbbbccbbbbbbbfdbfcbbcbbbbcbbffbcfffbfbbbbccccfbff00cfbbcbcccdfc0000f0ccccccdd0c0000f0cccccccd000000f0ccccbccd00000000cfccdc0c00000000cfccbc0c00000000f0cffc0000000000ccbffc00000000c0ddbbbc0f000000c0bbcbbcfb000000bcbbffcfbb0f0000bcfc00f0bf0f0000cc000000f00f00000000000000000000000000000000") -const _hex349027 = pxsim.BufferMethods.createBufferFromHex("8704200010000000000000f0ff000000000000f0bb0f0000000000bfbcfb00000000f0bbbbc10f000000f0bb1bc1fc000000bfbb1bc1c1000000bfbb1133c3000000bfbb1113cc000000bffb1fcc110c0000bffb1f1c110c00fcbcbb1111110cc0ccbcbc1b11fc0cc0cdcccbbcbbbb0fdcbdbcbcbbbbdbfcdcbbbccbbbbbbbfdbfcbbcbbbbcbbffbcfffbfbbbbccccfbff00cfbbcbcccdfc0000f0ccccccdd0c0000f0cccccccd000000f0ccccbccd00000000cfccdc0c00000000cfccbc0c00000000f0cffc0000000000ccbffc00000000c0ddbbbc0f000000c0bbcbbcfb000000bcbbffcfbb0f0000bcfc00f0bf0f0000cc000000f00f00000000000000000000000000000000") -const _hex349038 = pxsim.BufferMethods.createBufferFromHex("8704200010000000000000000000000000000000000000000000cc000000f00f0000bcfc00f0bf0f0000bcbbffcfbb0f0000c0bbcbbcfb000000c0ddbbbc0f00000000ccbffc0000000000f0cffc0000000000cfccbc0c00000000cfccdc0c000000f0ccccbccd000000f0cccccccd000000f0ccccccdd0cff00cfbbcbcccdfccfffbfbbbbccccfbbfcbbcbbbbcbbffbdcbbbccbbbbbbbfddcbdbcbcbbbbdbfcc0cdcccbbcbbbb0fc0ccbcbc1b11fc0c00fcbcbb1111110c0000bffb1f1c110c0000bffb1fcc110c0000bfbb1113cc000000bfbb1133c3000000bfbb1bc1c1000000f0bb1bc1fc000000f0bbbbc10f00000000bfbcfb0000000000f0bb0f0000000000f0ff000000") +const _hex395181 = pxsim.BufferMethods.createBufferFromHex("8704200010000000000000f0ff000000000000f0bb0f0000000000bfbcfb00000000f0bbbbc10f000000f0bb1bc1fc000000bfbb1bc1c1000000bfbb1133c3000000bfbb1113cc000000bffb1fcc110c0000bffb1f1c110c00fcbcbb1111110cc0ccbcbc1b11fc0cc0cdcccbbcbbbb0fdcbdbcbcbbbbdbfcdcbbbccbbbbbbbfdbfcbbcbbbbcbbffbcfffbfbbbbccccfbff00cfbbcbcccdfc0000f0ccccccdd0c0000f0cccccccd000000f0ccccbccd00000000cfccdc0c00000000cfccbc0c00000000f0cffc0000000000ccbffc00000000c0ddbbbc0f000000c0bbcbbcfb000000bcbbffcfbb0f0000bcfc00f0bf0f0000cc000000f00f00000000000000000000000000000000") +const _hex395202 = pxsim.BufferMethods.createBufferFromHex("8704200010000000000000f0ff000000000000f0bb0f0000000000bfbcfb00000000f0bbbbc10f000000f0bb1bc1fc000000bfbb1bc1c1000000bfbb1133c3000000bfbb1113cc000000bffb1fcc110c0000bffb1f1c110c00fcbcbb1111110cc0ccbcbc1b11fc0cc0cdcccbbcbbbb0fdcbdbcbcbbbbdbfcdcbbbccbbbbbbbfdbfcbbcbbbbcbbffbcfffbfbbbbccccfbff00cfbbcbcccdfc0000f0ccccccdd0c0000f0cccccccd000000f0ccccbccd00000000cfccdc0c00000000cfccbc0c00000000f0cffc0000000000ccbffc00000000c0ddbbbc0f000000c0bbcbbcfb000000bcbbffcfbb0f0000bcfc00f0bf0f0000cc000000f00f00000000000000000000000000000000") +const _hex395213 = pxsim.BufferMethods.createBufferFromHex("8704200010000000000000000000000000000000000000000000cc000000f00f0000bcfc00f0bf0f0000bcbbffcfbb0f0000c0bbcbbcfb000000c0ddbbbc0f00000000ccbffc0000000000f0cffc0000000000cfccbc0c00000000cfccdc0c000000f0ccccbccd000000f0cccccccd000000f0ccccccdd0cff00cfbbcbcccdfccfffbfbbbbccccfbbfcbbcbbbbcbbffbdcbbbccbbbbbbbfddcbdbcbcbbbbdbfcc0cdcccbbcbbbb0fc0ccbcbc1b11fc0c00fcbcbb1111110c0000bffb1f1c110c0000bffb1fcc110c0000bfbb1113cc000000bfbb1133c3000000bfbb1bc1c1000000f0bb1bc1fc000000f0bbbbc10f00000000bfbcfb0000000000f0bb0f0000000000f0ff000000") @@ -31379,7 +31593,7 @@ function Buffer_sizeOfNumberFormat__P185421_mk(s) { -function fade_in__P348179(s) { +function fade_in__P394892(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -31393,23 +31607,23 @@ switch (step) { s.tmp_0.arg0 = globals.originalPalette___188791; s.tmp_0.arg1 = globals.Black___188802; s.tmp_0.arg2 = 2000; - s.callLocIdx = 130; s.pc = 1; return s.tmp_0; + s.callLocIdx = 134; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; s.tmp_0 = color_pauseUntilFadeDone__P188789_mk(s); - s.callLocIdx = 131; s.pc = 2; return s.tmp_0; + s.callLocIdx = 135; s.pc = 2; return s.tmp_0; case 2: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -fade_in__P348179.info = {"start":5766,"length":116,"line":149,"column":0,"endLine":152,"endColumn":1,"fileName":"main.ts","functionName":"fade_in","argumentNames":[]} +fade_in__P394892.info = {"start":5935,"length":116,"line":155,"column":0,"endLine":158,"endColumn":1,"fileName":"main.ts","functionName":"fade_in","argumentNames":[]} -function fade_in__P348179_mk(s) { +function fade_in__P394892_mk(s) { checkStack(s.depth); return { - parent: s, fn: fade_in__P348179, depth: s.depth + 1, + parent: s, fn: fade_in__P394892, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, } } @@ -42602,7 +42816,7 @@ function blockMenu_MenuSprite_selectedMenuIndex__P188917_mk(s) { -function wait_for_select_and_close__P348139(s) { +function wait_for_select_and_close__P394841(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -42612,9 +42826,9 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - globals.selected_option___348243 = (false); + globals.selected_option___394843 = (false); case 1: - r0 = pxsim_numops_toBoolDecr(globals.selected_option___348243); + r0 = pxsim_numops_toBoolDecr(globals.selected_option___394843); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; @@ -42622,25 +42836,25 @@ switch (step) { if (!r0) { step = 2; continue; } s.tmp_2 = pause__P185619_mk(s); s.tmp_2.arg0 = 100; - s.callLocIdx = 121; s.pc = 3; return s.tmp_2; + s.callLocIdx = 123; s.pc = 3; return s.tmp_2; case 3: r0 = s.retval; { step = 1; continue; } case 2: s.tmp_0 = blockMenu_closeMenu__P188899_mk(s); - s.callLocIdx = 122; s.pc = 4; return s.tmp_0; + s.callLocIdx = 124; s.pc = 4; return s.tmp_0; case 4: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -wait_for_select_and_close__P348139.info = {"start":5139,"length":153,"line":128,"column":0,"endLine":134,"endColumn":1,"fileName":"main.ts","functionName":"wait_for_select_and_close","argumentNames":[]} +wait_for_select_and_close__P394841.info = {"start":5222,"length":153,"line":131,"column":0,"endLine":137,"endColumn":1,"fileName":"main.ts","functionName":"wait_for_select_and_close","argumentNames":[]} -function wait_for_select_and_close__P348139_mk(s) { +function wait_for_select_and_close__P394841_mk(s) { checkStack(s.depth); return { - parent: s, fn: wait_for_select_and_close__P348139, depth: s.depth + 1, + parent: s, fn: wait_for_select_and_close__P394841, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -42946,7 +43160,7 @@ function blockMenu_setColors__P188900_mk(s) { -function fade_out__P348138(s) { +function fade_out__P394836(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -42960,23 +43174,23 @@ switch (step) { s.tmp_0.arg0 = globals.Black___188802; s.tmp_0.arg1 = globals.originalPalette___188791; s.tmp_0.arg2 = 2000; - s.callLocIdx = 119; s.pc = 1; return s.tmp_0; + s.callLocIdx = 121; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; s.tmp_0 = color_pauseUntilFadeDone__P188789_mk(s); - s.callLocIdx = 120; s.pc = 2; return s.tmp_0; + s.callLocIdx = 122; s.pc = 2; return s.tmp_0; case 2: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -fade_out__P348138.info = {"start":5021,"length":117,"line":124,"column":0,"endLine":127,"endColumn":1,"fileName":"main.ts","functionName":"fade_out","argumentNames":[]} +fade_out__P394836.info = {"start":5104,"length":117,"line":127,"column":0,"endLine":130,"endColumn":1,"fileName":"main.ts","functionName":"fade_out","argumentNames":[]} -function fade_out__P348138_mk(s) { +function fade_out__P394836_mk(s) { checkStack(s.depth); return { - parent: s, fn: fade_out__P348138, depth: s.depth + 1, + parent: s, fn: fade_out__P394836, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, } } @@ -44773,284 +44987,33 @@ switch (step) { } } } game_calculateHitBox__P187187.info = {"start":894,"length":684,"line":40,"column":4,"endLine":62,"endColumn":5,"fileName":"pxt_modules/game/hitbox.ts","functionName":"calculateHitBox","argumentNames":["s"]} -function game_calculateHitBox__P187187_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: game_calculateHitBox__P187187, depth: s.depth + 1, - pc: 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___201290: undefined, - minX___201293: undefined, - minY___201296: undefined, - maxX___201299: undefined, - maxY___201300: undefined, - c___201301: undefined, - r___201307: undefined, - width___201338: undefined, - height___201344: undefined, - arg0: undefined, -} } - - - - - -function game_Hitbox_constructor__P187182(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); - s.arg5 = (s.lambdaArgs[5]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, game_Hitbox__C187176_VT)) failedCast(r0); - r0 = (s.arg0).fields["parent"] = (s.arg1); - 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["width"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg3 * 256); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["height"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg4 * 256); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["ox"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg5 * 256); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["oy"] = (s.tmp_1); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -game_Hitbox_constructor__P187182.info = {"start":151,"length":266,"line":8,"column":8,"endLine":14,"endColumn":9,"fileName":"pxt_modules/game/hitbox.ts","functionName":"inline","argumentNames":["this","parent","width","height","ox","oy"]} - -function game_Hitbox_constructor__P187182_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: game_Hitbox_constructor__P187182, 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_abs__P185377(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (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 - s.arg0); - { step = 3; continue; } - { step = 2; continue; } - case 1: - r0 = s.arg0; - { step = 3; continue; } - case 2: - r0 = undefined; - case 3: - return leave(s, r0) - default: oops() -} } } -Fx_abs__P185377.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__P185377_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Fx_abs__P185377, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, -} } - - - - - -function Sprite_image__P187272(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (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__C187233_VT)) failedCast(r0); - r0 = s.arg0.fields["_image"]; - return leaveAccessor(s, r0) - default: oops() -} } } -Sprite_image__P187272.info = {"start":6549,"length":54,"line":242,"column":4,"endLine":244,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"image","argumentNames":["this"]} -Sprite_image__P187272.isGetter = true; - -function Sprite_image__P187272_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Sprite_image__P187272, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function character_setCharacterAnimationsEnabled__P188959(s) { -let r0 = s.r0, 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.state___201387 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - s.tmp_0 = character_getStateForSprite__P191371_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = false; - s.callLocIdx = 2082; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - s.state___201387 = (r0); - r0 = pxsim_numops_toBoolDecr(s.state___201387); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 3; continue; } - case 1: - case 2: - s.tmp_2 = character_CharacterState_setEnabled__P191363_mk(s); - s.tmp_2.arg0 = s.state___201387; - s.tmp_2.arg1 = s.arg1; - s.callLocIdx = 2083; s.pc = 5; return s.tmp_2; - case 5: - r0 = s.retval; - case 3: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -character_setCharacterAnimationsEnabled__P188959.info = {"start":17492,"length":207,"line":507,"column":4,"endLine":512,"endColumn":5,"fileName":"pxt_modules/character-animations/main.ts","functionName":"setCharacterAnimationsEnabled","argumentNames":["sprite","enabled"]} - -function character_setCharacterAnimationsEnabled__P188959_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: character_setCharacterAnimationsEnabled__P188959, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - state___201387: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function character_CharacterState_setEnabled__P191363(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (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, character_CharacterState__C191357_VT)) failedCast(r0); - r0 = (s.arg0).fields["enabled"] = (s.arg1); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -character_CharacterState_setEnabled__P191363.info = {"start":9194,"length":76,"line":269,"column":8,"endLine":271,"endColumn":9,"fileName":"pxt_modules/character-animations/main.ts","functionName":"setEnabled","argumentNames":["this","enabled"]} - -function character_CharacterState_setEnabled__P191363_mk(s) { +function game_calculateHitBox__P187187_mk(s) { checkStack(s.depth); return { - parent: s, fn: character_CharacterState_setEnabled__P191363, depth: s.depth + 1, + parent: s, fn: game_calculateHitBox__P187187, depth: s.depth + 1, pc: 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___201290: undefined, + minX___201293: undefined, + minY___201296: undefined, + maxX___201299: undefined, + maxY___201300: undefined, + c___201301: undefined, + r___201307: undefined, + width___201338: undefined, + height___201344: undefined, arg0: undefined, - arg1: undefined, } } -function timer_after__P188811(s) { +function game_Hitbox_constructor__P187182(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -45063,35 +45026,66 @@ 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 = setTimeout__P185629_mk(s); - s.tmp_0.arg0 = s.arg1; - s.tmp_0.arg1 = s.arg0; - s.callLocIdx = 1740; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; + r0 = s.arg0; + if (!checkSubtype(r0, game_Hitbox__C187176_VT)) failedCast(r0); + r0 = (s.arg0).fields["parent"] = (s.arg1); + 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["width"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg3 * 256); + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["height"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg4 * 256); + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["ox"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg5 * 256); + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["oy"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -timer_after__P188811.info = {"start":317,"length":96,"line":11,"column":4,"endLine":13,"endColumn":5,"fileName":"pxt_modules/Timers/timers.ts","functionName":"after","argumentNames":["time","thenDo"]} +game_Hitbox_constructor__P187182.info = {"start":151,"length":266,"line":8,"column":8,"endLine":14,"endColumn":9,"fileName":"pxt_modules/game/hitbox.ts","functionName":"inline","argumentNames":["this","parent","width","height","ox","oy"]} -function timer_after__P188811_mk(s) { +function game_Hitbox_constructor__P187182_mk(s) { checkStack(s.depth); return { - parent: s, fn: timer_after__P188811, depth: s.depth + 1, + parent: s, fn: game_Hitbox_constructor__P187182, 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 setTimeout__P185629(s) { +function Fx_abs__P185377(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -45103,36 +45097,40 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = control_setInterval__P185560_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.tmp_0.arg2 = 1; - s.callLocIdx = 67; s.pc = 1; return s.tmp_0; + r0 = (s.arg0 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = (0 - s.arg0); + { step = 3; continue; } + { step = 2; continue; } case 1: - r0 = s.retval; + r0 = s.arg0; + { step = 3; continue; } + case 2: + r0 = undefined; + case 3: return leave(s, r0) default: oops() } } } -setTimeout__P185629.info = {"start":610,"length":139,"line":26,"column":0,"endLine":28,"endColumn":1,"fileName":"pxt_modules/base/scheduling.ts","functionName":"setTimeout","argumentNames":["func","delay"]} +Fx_abs__P185377.info = {"start":1506,"length":164,"line":44,"column":4,"endLine":49,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"abs","argumentNames":["a"]} -function setTimeout__P185629_mk(s) { +function Fx_abs__P185377_mk(s) { checkStack(s.depth); return { - parent: s, fn: setTimeout__P185629, depth: s.depth + 1, + parent: s, fn: Fx_abs__P185377, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, - arg1: undefined, } } -function control_setInterval__P185560(s) { +function Sprite_image__P187272(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -45142,81 +45140,32 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.interval___202021 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(s.arg0); - 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 < 0); - case 2: - // jmp value (already in r0) - 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___189213); - 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___189213 = (r0); - case 5: - case 6: - r0 = pxsim_pxtcore_mkClassInstance(control_Interval__C189214_VT); - s.tmp_0 = r0; - s.tmp_1 = control_Interval_constructor__P189217_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 = 31; s.pc = 8; return s.tmp_1; - case 8: - r0 = s.retval; - s.interval___202021 = (s.tmp_0); - r0 = s.interval___202021.fields["id"]; - case 7: - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C187233_VT)) failedCast(r0); + r0 = s.arg0.fields["_image"]; + return leaveAccessor(s, r0) default: oops() } } } -control_setInterval__P185560.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"]} +Sprite_image__P187272.info = {"start":6549,"length":54,"line":242,"column":4,"endLine":244,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"image","argumentNames":["this"]} +Sprite_image__P187272.isGetter = true; -function control_setInterval__P185560_mk(s) { +function Sprite_image__P187272_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_setInterval__P185560, depth: s.depth + 1, + parent: s, fn: Sprite_image__P187272, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - interval___202021: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function control_Interval_constructor__P189217(s) { +function character_setCharacterAnimationsEnabled__P188959(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -45226,107 +45175,59 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.state___201387 = 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, control_Interval__C189214_VT)) failedCast(r0); - r0 = pxsim_Array__length(globals._intervals___189213); + s.tmp_0 = character_getStateForSprite__P191371_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = false; + s.callLocIdx = 2082; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + s.state___201387 = (r0); + r0 = pxsim_numops_toBoolDecr(s.state___201387); 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 = 1; - { step = 2; continue; } + { step = 3; continue; } case 1: - s.tmp_3 = r0 = globals._intervals___189213; - r0 = pxsim_Array__length(globals._intervals___189213); - 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___189213, s.arg0); - r0 = pxsim_pxtcore_mkAction(1, inline__P202064); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - r0 = pxsim.control.runInParallel(s.tmp_0); + s.tmp_2 = character_CharacterState_setEnabled__P191363_mk(s); + s.tmp_2.arg0 = s.state___201387; + s.tmp_2.arg1 = s.arg1; + s.callLocIdx = 2083; s.pc = 5; return s.tmp_2; + case 5: + r0 = s.retval; + case 3: r0 = undefined; return leave(s, r0) default: oops() } } } -control_Interval_constructor__P189217.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"]} +character_setCharacterAnimationsEnabled__P188959.info = {"start":17492,"length":207,"line":507,"column":4,"endLine":512,"endColumn":5,"fileName":"pxt_modules/character-animations/main.ts","functionName":"setCharacterAnimationsEnabled","argumentNames":["sprite","enabled"]} -function control_Interval_constructor__P189217_mk(s) { +function character_setCharacterAnimationsEnabled__P188959_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_Interval_constructor__P189217, depth: s.depth + 1, + parent: s, fn: character_setCharacterAnimationsEnabled__P188959, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, + state___201387: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, -} } - - - - - -function inline__P202064(s) { -let r0 = s.r0, 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 = control_Interval_work__P189215_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.callLocIdx = 26; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -inline__P202064.info = {"start":621,"length":17,"line":23,"column":34,"endLine":23,"endColumn":51,"fileName":"pxt_modules/base/interval.ts","functionName":"inline","argumentNames":[]} - -function inline__P202064_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: inline__P202064, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, } } -function control_Interval_work__P189215(s) { +function character_CharacterState_setEnabled__P191363(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -45338,113 +45239,25 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, control_Interval__C189214_VT)) failedCast(r0); - r0 = s.arg0.fields["mode"]; - s.tmp_0 = r0; - 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: - case 2: - r0 = s.arg0.fields["delay"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 > 0); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 3; continue; } - s.tmp_3 = pause__P185619_mk(s); - r0 = s.arg0.fields["delay"]; - s.tmp_3.arg0 = r0; - s.callLocIdx = 27; 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 = 28; 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 = 28; s.pc = 14; return s.tmp_2; } - else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 28; s.pc = 14; return s.tmp_2;; } - else { s.callLocIdx = 28; 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__P185619_mk(s); - r0 = s.arg0.fields["delay"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 29; 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 = 30; 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 = 30; s.pc = 16; return s.tmp_2; } - else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 30; s.pc = 16; return s.tmp_2;; } - else { s.callLocIdx = 30; 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___189213, s.arg0); + if (!checkSubtype(r0, character_CharacterState__C191357_VT)) failedCast(r0); + r0 = (s.arg0).fields["enabled"] = (s.arg1); r0 = undefined; return leave(s, r0) default: oops() } } } -control_Interval_work__P189215.info = {"start":660,"length":823,"line":26,"column":8,"endLine":47,"endColumn":9,"fileName":"pxt_modules/base/interval.ts","functionName":"work","argumentNames":["this"]} +character_CharacterState_setEnabled__P191363.info = {"start":9194,"length":76,"line":269,"column":8,"endLine":271,"endColumn":9,"fileName":"pxt_modules/character-animations/main.ts","functionName":"setEnabled","argumentNames":["this","enabled"]} -function control_Interval_work__P189215_mk(s) { +function character_CharacterState_setEnabled__P191363_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_Interval_work__P189215, depth: s.depth + 1, + parent: s, fn: character_CharacterState_setEnabled__P191363, depth: s.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, } } @@ -46822,6 +46635,168 @@ function scene_OverlapHandler_constructor__P187610_mk(s) { +function info_changeScoreBy__P187424(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (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 = info_PlayerInfo_changeScoreBy__P187460_mk(s); + s.tmp_0.arg0 = globals.player1___187474; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 24; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +info_changeScoreBy__P187424.info = {"start":7694,"length":90,"line":263,"column":4,"endLine":265,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"changeScoreBy","argumentNames":["value"]} + +function info_changeScoreBy__P187424_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: info_changeScoreBy__P187424, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function info_PlayerInfo_changeScoreBy__P187460(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (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__C187443_VT)) failedCast(r0); + s.tmp_0 = info_PlayerInfo_setScore__P187459_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_2 = info_PlayerInfo_score__P187458_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 25; s.pc = 2; return s.tmp_2; + case 2: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_1 + s.arg1); + s.tmp_0.arg1 = r0; + s.callLocIdx = 26; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +info_PlayerInfo_changeScoreBy__P187460.info = {"start":18514,"length":95,"line":612,"column":8,"endLine":614,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"changeScoreBy","argumentNames":["this","value"]} + +function info_PlayerInfo_changeScoreBy__P187460_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: info_PlayerInfo_changeScoreBy__P187460, 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 timer_background__P188812(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (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 = control_runInBackground__P185496_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1741; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +timer_background__P188812.info = {"start":665,"length":90,"line":22,"column":4,"endLine":24,"endColumn":5,"fileName":"pxt_modules/Timers/timers.ts","functionName":"background","argumentNames":["then"]} + +function timer_background__P188812_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: timer_background__P188812, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function control_runInBackground__P185496(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (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.control.runInParallel(s.arg0); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +control_runInBackground__P185496.info = {"start":384,"length":88,"line":10,"column":4,"endLine":12,"endColumn":5,"fileName":"pxt_modules/base/control.ts","functionName":"runInBackground","argumentNames":["a"]} + +function control_runInBackground__P185496_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: control_runInBackground__P185496, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + function game_over__P187759(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -53036,6 +53011,443 @@ function info_startCountdown__P187430_mk(s) { +function timer_after__P188811(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (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 = setTimeout__P185629_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 1740; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +timer_after__P188811.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 timer_after__P188811_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: timer_after__P188811, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function setTimeout__P185629(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (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 = control_setInterval__P185560_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.tmp_0.arg2 = 1; + s.callLocIdx = 67; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + return leave(s, r0) + default: oops() +} } } +setTimeout__P185629.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 setTimeout__P185629_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: setTimeout__P185629, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function control_setInterval__P185560(s) { +let r0 = s.r0, 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.interval___202021 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.lambdaArgs = null; + } + r0 = pxsim_numops_toBoolDecr(s.arg0); + 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 < 0); + case 2: + // jmp value (already in r0) + 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___189213); + 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___189213 = (r0); + case 5: + case 6: + r0 = pxsim_pxtcore_mkClassInstance(control_Interval__C189214_VT); + s.tmp_0 = r0; + s.tmp_1 = control_Interval_constructor__P189217_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 = 31; s.pc = 8; return s.tmp_1; + case 8: + r0 = s.retval; + s.interval___202021 = (s.tmp_0); + r0 = s.interval___202021.fields["id"]; + case 7: + return leave(s, r0) + default: oops() +} } } +control_setInterval__P185560.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 control_setInterval__P185560_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: control_setInterval__P185560, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + interval___202021: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, +} } + + + + + +function control_Interval_constructor__P189217(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (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, control_Interval__C189214_VT)) failedCast(r0); + r0 = pxsim_Array__length(globals._intervals___189213); + 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___189213; + r0 = pxsim_Array__length(globals._intervals___189213); + 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___189213, s.arg0); + r0 = pxsim_pxtcore_mkAction(1, inline__P202064); + 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() +} } } +control_Interval_constructor__P189217.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 control_Interval_constructor__P189217_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: control_Interval_constructor__P189217, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: 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 inline__P202064(s) { +let r0 = s.r0, 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 = control_Interval_work__P189215_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.callLocIdx = 26; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +inline__P202064.info = {"start":621,"length":17,"line":23,"column":34,"endLine":23,"endColumn":51,"fileName":"pxt_modules/base/interval.ts","functionName":"inline","argumentNames":[]} + +function inline__P202064_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: inline__P202064, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, +} } + + + + + +function control_Interval_work__P189215(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (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, control_Interval__C189214_VT)) failedCast(r0); + r0 = s.arg0.fields["mode"]; + s.tmp_0 = r0; + 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: + case 2: + r0 = s.arg0.fields["delay"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 > 0); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 3; continue; } + s.tmp_3 = pause__P185619_mk(s); + r0 = s.arg0.fields["delay"]; + s.tmp_3.arg0 = r0; + s.callLocIdx = 27; 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 = 28; 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 = 28; s.pc = 14; return s.tmp_2; } + else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 28; s.pc = 14; return s.tmp_2;; } + else { s.callLocIdx = 28; 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__P185619_mk(s); + r0 = s.arg0.fields["delay"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 29; 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 = 30; 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 = 30; s.pc = 16; return s.tmp_2; } + else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 30; s.pc = 16; return s.tmp_2;; } + else { s.callLocIdx = 30; 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___189213, s.arg0); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +control_Interval_work__P189215.info = {"start":660,"length":823,"line":26,"column":8,"endLine":47,"endColumn":9,"fileName":"pxt_modules/base/interval.ts","functionName":"work","argumentNames":["this"]} + +function control_Interval_work__P189215_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: control_Interval_work__P189215, depth: s.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 info_stopCountdown__P187431(s) { +let r0 = s.r0, 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 = info_updateFlag__P189496_mk(s); + s.tmp_0.arg0 = 1; + s.tmp_0.arg1 = false; + s.callLocIdx = 808; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = (globals.infoState___189446).fields["gameEnd"] = (undefined); + r0 = (globals.infoState___189446).fields["countdownExpired"] = (true); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +info_stopCountdown__P187431.info = {"start":9829,"length":170,"line":338,"column":4,"endLine":342,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"stopCountdown","argumentNames":[]} + +function info_stopCountdown__P187431_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: info_stopCountdown__P187431, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, +} } + + + + + function Sprite_setKind__P187288(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -61109,6 +61521,40 @@ function game_BaseDialog_setText__P187708_mk(s) { +function info_PlayerInfo_id__P187457(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (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__C187443_VT)) failedCast(r0); + r0 = s.arg0.fields["_player"]; + return leave(s, r0) + default: oops() +} } } +info_PlayerInfo_id__P187457.info = {"start":17259,"length":57,"line":568,"column":8,"endLine":570,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"id","argumentNames":["this"]} + +function info_PlayerInfo_id__P187457_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: info_PlayerInfo_id__P187457, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + function music_Melody_toString__P186824(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -68322,40 +68768,6 @@ function scene_Background_hasBackgroundImage__P187490_mk(s) { -function info_PlayerInfo_id__P187457(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (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__C187443_VT)) failedCast(r0); - r0 = s.arg0.fields["_player"]; - return leave(s, r0) - default: oops() -} } } -info_PlayerInfo_id__P187457.info = {"start":17259,"length":57,"line":568,"column":8,"endLine":570,"endColumn":9,"fileName":"pxt_modules/game/info.ts","functionName":"id","argumentNames":["this"]} - -function info_PlayerInfo_id__P187457_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: info_PlayerInfo_id__P187457, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - function Sprite_toString__P187307(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -70458,6 +70870,105 @@ function blockMenu_MenuSprite___visible__P188927_mk(s) { +function scene_Renderable___drawCore__P187598(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, scene_Renderable__C187595_VT)) failedCast(r0); + s.tmp_0 = if_handler_3_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = globals.screen___187019; + 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 = 1014; 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 = 1014; s.pc = 1; return s.tmp_0; } + else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 1014; s.pc = 1; return s.tmp_0;; } + else { s.callLocIdx = 1014; s.pc = 1; return s.tmp_0; } + } + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +scene_Renderable___drawCore__P187598.info = {"start":390,"length":86,"line":14,"column":8,"endLine":16,"endColumn":9,"fileName":"pxt_modules/game/renderable.ts","functionName":"__drawCore","argumentNames":["this","camera"]} + +function scene_Renderable___drawCore__P187598_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: scene_Renderable___drawCore__P187598, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function scene_Renderable___visible__P187597(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (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_Renderable__C187595_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 = 1013; 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 = 1013; s.pc = 1; return s.tmp_0; } + else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 1013; s.pc = 1; return s.tmp_0;; } + else { s.callLocIdx = 1013; s.pc = 1; return s.tmp_0; } + } + case 1: + r0 = s.retval; + return leave(s, r0) + default: oops() +} } } +scene_Renderable___visible__P187597.info = {"start":305,"length":75,"line":10,"column":8,"endLine":12,"endColumn":9,"fileName":"pxt_modules/game/renderable.ts","functionName":"__visible","argumentNames":["this"]} + +function scene_Renderable___visible__P187597_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: scene_Renderable___visible__P187597, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + function scene_Camera_top__P187590(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -70831,105 +71342,6 @@ function particles_SprayFactory_drawParticle__P187938_mk(s) { -function scene_Renderable___drawCore__P187598(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, scene_Renderable__C187595_VT)) failedCast(r0); - s.tmp_0 = if_handler_3_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = globals.screen___187019; - 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 = 1014; 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 = 1014; s.pc = 1; return s.tmp_0; } - else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 1014; s.pc = 1; return s.tmp_0;; } - else { s.callLocIdx = 1014; s.pc = 1; return s.tmp_0; } - } - case 1: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -scene_Renderable___drawCore__P187598.info = {"start":390,"length":86,"line":14,"column":8,"endLine":16,"endColumn":9,"fileName":"pxt_modules/game/renderable.ts","functionName":"__drawCore","argumentNames":["this","camera"]} - -function scene_Renderable___drawCore__P187598_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: scene_Renderable___drawCore__P187598, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function scene_Renderable___visible__P187597(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (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_Renderable__C187595_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 = 1013; 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 = 1013; s.pc = 1; return s.tmp_0; } - else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 1013; s.pc = 1; return s.tmp_0;; } - else { s.callLocIdx = 1013; s.pc = 1; return s.tmp_0; } - } - case 1: - r0 = s.retval; - return leave(s, r0) - default: oops() -} } } -scene_Renderable___visible__P187597.info = {"start":305,"length":75,"line":10,"column":8,"endLine":12,"endColumn":9,"fileName":"pxt_modules/game/renderable.ts","functionName":"__visible","argumentNames":["this"]} - -function scene_Renderable___visible__P187597_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: scene_Renderable___visible__P187597, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, -} } - - - - - function Sprite___drawCore__P187294(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -71414,24 +71826,7 @@ function Sprite___visible__P187276_mk(s) { -function lambda_4_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, - arg2: undefined, - arg3: undefined, -} } - - -function lambda_2_mk(s) { +function lambda_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71442,11 +71837,10 @@ function lambda_2_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, - arg1: undefined, } } -function if_comparator_3_mk(s) { +function lambda_3_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71462,7 +71856,7 @@ function if_comparator_3_mk(s) { } } -function if_target_1_mk(s) { +function if_flags_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71476,7 +71870,7 @@ function if_target_1_mk(s) { } } -function if_self_1_mk(s) { +function particles_ParticleFactory__C187931_v0_2_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71487,10 +71881,11 @@ function if_self_1_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, + arg1: undefined, } } -function if_turnRate_1_mk(s) { +function particles_ParticleSource__C187895_v4_3_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71501,10 +71896,12 @@ function if_turnRate_1_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function if_rate_1_mk(s) { +function if_x_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71518,7 +71915,7 @@ function if_rate_1_mk(s) { } } -function if_handler_1_mk(s) { +function if_y_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71532,7 +71929,7 @@ function if_handler_1_mk(s) { } } -function lambda_1_mk(s) { +function if_id_2_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71543,10 +71940,11 @@ function lambda_1_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, + arg1: undefined, } } -function if_condition_1_mk(s) { +function PhysicsEngine__C187376_v4_2_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71557,10 +71955,11 @@ function if_condition_1_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, + arg1: undefined, } } -function lambda_3_mk(s) { +function if___update_3_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71576,21 +71975,7 @@ function lambda_3_mk(s) { } } -function if_image_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_scale_1_mk(s) { +function lambda_2_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71601,10 +71986,11 @@ function if_scale_1_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, + arg1: undefined, } } -function if_borderWidth_1_mk(s) { +function PhysicsEngine__C187376_v3_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71618,7 +72004,7 @@ function if_borderWidth_1_mk(s) { } } -function if_countdownEndHandler_1_mk(s) { +function if_charHeight_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71646,20 +72032,6 @@ function if_charWidth_1_mk(s) { } } -function if_charHeight_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_multiplier_1_mk(s) { checkStack(s.depth); return { @@ -71716,7 +72088,7 @@ function if_yOffset_1_mk(s) { } } -function if_id_2_mk(s) { +function if___draw_2_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71731,7 +72103,7 @@ function if_id_2_mk(s) { } } -function if_lifeZeroHandler_1_mk(s) { +function if_z_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71745,7 +72117,7 @@ function if_lifeZeroHandler_1_mk(s) { } } -function PhysicsEngine__C187376_v2_4_mk(s) { +function if_id_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71756,13 +72128,10 @@ function PhysicsEngine__C187376_v2_4_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function PhysicsEngine__C187376_v0_2_mk(s) { +function controller_Button__C187120_v0_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71773,11 +72142,10 @@ function PhysicsEngine__C187376_v0_2_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, - arg1: undefined, } } -function if_handler_2_mk(s) { +function if_s_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71788,11 +72156,10 @@ function if_handler_2_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, - arg1: undefined, } } -function if_flags_1_mk(s) { +function if_vx_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71806,7 +72173,7 @@ function if_flags_1_mk(s) { } } -function particles_ParticleFactory__C187931_v0_2_mk(s) { +function if_vy_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71817,11 +72184,10 @@ function particles_ParticleFactory__C187931_v0_2_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, - arg1: undefined, } } -function particles_ParticleSource__C187895_v4_3_mk(s) { +function if_handler_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71832,12 +72198,10 @@ function particles_ParticleSource__C187895_v4_3_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function if_x_1_mk(s) { +function if_condition_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71851,7 +72215,7 @@ function if_x_1_mk(s) { } } -function if_y_1_mk(s) { +function lambda_4_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71862,10 +72226,13 @@ function if_y_1_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function PhysicsEngine__C187376_v4_2_mk(s) { +function if_comparator_3_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71877,10 +72244,11 @@ function PhysicsEngine__C187376_v4_2_mk(s) { tmp_4: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function if___update_3_mk(s) { +function if_target_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71891,12 +72259,10 @@ function if___update_3_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function PhysicsEngine__C187376_v3_1_mk(s) { +function if_self_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71910,7 +72276,7 @@ function PhysicsEngine__C187376_v3_1_mk(s) { } } -function if___draw_2_mk(s) { +function if_turnRate_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71921,11 +72287,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_rate_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71939,7 +72304,7 @@ function if_z_1_mk(s) { } } -function if_id_1_mk(s) { +function if_image_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71953,7 +72318,7 @@ function if_id_1_mk(s) { } } -function controller_Button__C187120_v0_1_mk(s) { +function if_scale_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71967,7 +72332,7 @@ function controller_Button__C187120_v0_1_mk(s) { } } -function if_s_1_mk(s) { +function if_borderWidth_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71981,7 +72346,7 @@ function if_s_1_mk(s) { } } -function if_vx_1_mk(s) { +function PhysicsEngine__C187376_v2_4_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -71992,10 +72357,13 @@ function if_vx_1_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function if_vy_1_mk(s) { +function PhysicsEngine__C187376_v0_2_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -72006,10 +72374,11 @@ function if_vy_1_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, + arg1: undefined, } } -function if_colorInput_1_mk(s) { +function if_handler_2_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -72020,10 +72389,11 @@ function if_colorInput_1_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, + arg1: undefined, } } -function if_colorInputText_1_mk(s) { +function if_countdownEndHandler_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -72037,7 +72407,7 @@ function if_colorInputText_1_mk(s) { } } -function if_colorCursor_1_mk(s) { +function if_lifeZeroHandler_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -72051,7 +72421,7 @@ function if_colorCursor_1_mk(s) { } } -function if_colorBottomBackground_1_mk(s) { +function if_colorInput_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -72065,7 +72435,7 @@ function if_colorBottomBackground_1_mk(s) { } } -function if_colorInputHighlighted_1_mk(s) { +function if_colorInputText_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -72079,7 +72449,7 @@ function if_colorInputHighlighted_1_mk(s) { } } -function if_z_2_mk(s) { +function if_colorCursor_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -72090,11 +72460,10 @@ function if_z_2_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, - arg1: undefined, } } -function if_colorPrompt_1_mk(s) { +function if_colorBottomBackground_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -72108,7 +72477,21 @@ function if_colorPrompt_1_mk(s) { } } -function game_Dialog__C187711_v1_2_mk(s) { +function if_colorInputHighlighted_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_z_2_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -72123,7 +72506,7 @@ function game_Dialog__C187711_v1_2_mk(s) { } } -function game_BaseDialog__C187694_v0_1_mk(s) { +function if_colorPrompt_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -72137,7 +72520,7 @@ function game_BaseDialog__C187694_v0_1_mk(s) { } } -function game_BaseDialog__C187694_v2_1_mk(s) { +function game_Dialog__C187711_v1_2_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -72148,10 +72531,25 @@ function game_BaseDialog__C187694_v2_1_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, + arg1: undefined, } } -function if_func_1_mk(s) { +function game_BaseDialog__C187694_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 game_BaseDialog__C187694_v2_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -72386,6 +72784,20 @@ function if_handler_3_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_generator_1_mk(s) { checkStack(s.depth); return { @@ -73031,199 +73443,41 @@ const Sprite__C187233_VT = mkVTable({ "__visible": Sprite___visible__P187276, "width": Sprite_width__P187277, "height": Sprite_height__P187278, - "left": Sprite_left__P187279, - "set/left": Sprite_left__P187280, - "right": Sprite_right__P187281, - "set/right": Sprite_right__P187282, - "top": Sprite_top__P187283, - "set/top": Sprite_top__P187284, - "bottom": Sprite_bottom__P187285, - "set/bottom": Sprite_bottom__P187286, - "kind": Sprite_kind__P187287, - "setKind": Sprite_setKind__P187288, - "setPosition": Sprite_setPosition__P187289, - "setVelocity": Sprite_setVelocity__P187290, - "isOutOfScreen": Sprite_isOutOfScreen__P187293, - "__drawCore": Sprite___drawCore__P187294, - "__update": Sprite___update__P187295, - "setFlag": Sprite_setFlag__P187296, - "overlapsWith": Sprite_overlapsWith__P187297, - "isHittingTile": Sprite_isHittingTile__P187298, - "clearObstacles": Sprite_clearObstacles__P187301, - "registerObstacle": Sprite_registerObstacle__P187302, - "destroy": Sprite_destroy__P187304, - "_destroyCore": Sprite__destroyCore__P187305, - "follow": Sprite_follow__P187306, - "toString": Sprite_toString__P187307, - "z": sprites_BaseSprite_z__P187079, - "set/z": sprites_BaseSprite_z__P187080, - "__draw": sprites_BaseSprite___draw__P187081, - }, - toStringMethod: Sprite_toString__P187307, -}); -const tiles_TileMap__C187534_VT = mkVTable({ - name: "TileMap", - numFields: 3, - classNo: 26, - lastSubtypeNo: 26, - maxBgInstances: null, - methods: { - }, - iface: { - "_scale": null, - "set/_scale": null, - "_layer": null, - "set/_layer": null, - "_map": null, - "set/_map": null, - "scale": tiles_TileMap_scale__P187536, - "set/scale": tiles_TileMap_scale__P187537, - "data": tiles_TileMap_data__P189508, - "offsetX": tiles_TileMap_offsetX__P187538, - "offsetY": tiles_TileMap_offsetY__P187539, - "areaWidth": tiles_TileMap_areaWidth__P187540, - "areaHeight": tiles_TileMap_areaHeight__P187541, - "layer": tiles_TileMap_layer__P187542, - "enabled": tiles_TileMap_enabled__P187544, - "setData": tiles_TileMap_setData__P187545, - "getTile": tiles_TileMap_getTile__P187546, - "getTileIndex": tiles_TileMap_getTileIndex__P187547, - "setTileAt": tiles_TileMap_setTileAt__P187548, - "getImageType": tiles_TileMap_getImageType__P187549, - "setWallAt": tiles_TileMap_setWallAt__P187550, - "getTilesByType": tiles_TileMap_getTilesByType__P187551, - "sampleTilesByType": tiles_TileMap_sampleTilesByType__P187552, - "isInvalidIndex": tiles_TileMap_isInvalidIndex__P189509, - "draw": tiles_TileMap_draw__P189510, - "isObstacle": tiles_TileMap_isObstacle__P187553, - "getObstacle": tiles_TileMap_getObstacle__P187554, - "isOnWall": tiles_TileMap_isOnWall__P187555, - "getTileImage": tiles_TileMap_getTileImage__P187556, - }, -}); -const tiles_Location__C187506_VT = mkVTable({ - name: "Location", - numFields: 3, - classNo: 27, - lastSubtypeNo: 27, - maxBgInstances: null, - methods: { - }, - iface: { - "_row": null, - "set/_row": null, - "_col": null, - "set/_col": null, - "tileMap": null, - "set/tileMap": null, - "col": tiles_Location_col__P187507, - "row": tiles_Location_row__P187508, - "x": tiles_Location_x__P187510, - "y": tiles_Location_y__P187511, - "tileSet": tiles_Location_tileSet__P187512, - "place": tiles_Location_place__P187513, - }, -}); -const tiles_TileMapData__C187521_VT = mkVTable({ - name: "TileMapData", - numFields: 7, - classNo: 28, - lastSubtypeNo: 28, - maxBgInstances: null, - methods: { - }, - iface: { - "data": null, - "set/data": null, - "layers": null, - "set/layers": null, - "tileset": null, - "set/tileset": null, - "cachedTileView": null, - "set/cachedTileView": null, - "_scale": null, - "set/_scale": null, - "_width": null, - "set/_width": null, - "_height": null, - "set/_height": null, - "width": tiles_TileMapData_width__P187523, - "height": tiles_TileMapData_height__P187524, - "scale": tiles_TileMapData_scale__P187525, - "set/scale": tiles_TileMapData_scale__P187526, - "getTile": tiles_TileMapData_getTile__P187527, - "setTile": tiles_TileMapData_setTile__P187528, - "getTileset": tiles_TileMapData_getTileset__P187529, - "getTileImage": tiles_TileMapData_getTileImage__P187530, - "setWall": tiles_TileMapData_setWall__P187531, - "isWall": tiles_TileMapData_isWall__P187532, - "isOutsideMap": tiles_TileMapData_isOutsideMap__P187533, - }, -}); -const Heap__C188863_VT = mkVTable({ - name: "Heap", - numFields: 2, - classNo: 29, - lastSubtypeNo: 29, - maxBgInstances: null, - methods: { - }, - iface: { - "store": null, - "set/store": null, - "comparator": null, - "set/comparator": null, - "percolateDown": Heap_percolateDown__P191290, - "percolateUp": Heap_percolateUp__P191291, - "push": Heap_push__P188865, - "pop": Heap_pop__P188866, - "length": Heap_length__P188868, - "parent": Heap_parent__P191292, - "leftChild": Heap_leftChild__P191293, - "rightChild": Heap_rightChild__P191294, - }, -}); -const scene_PrioritizedLocation__C191295_VT = mkVTable({ - name: "PrioritizedLocation", - numFields: 3, - classNo: 30, - lastSubtypeNo: 30, - maxBgInstances: null, - methods: { - }, - iface: { - "loc": null, - "set/loc": null, - "cost": null, - "set/cost": null, - "extraCost": null, - "set/extraCost": null, - }, -}); -const scene_LocationNode__C191297_VT = mkVTable({ - name: "LocationNode", - numFields: 4, - classNo: 31, - lastSubtypeNo: 31, - maxBgInstances: null, - methods: { - }, - iface: { - "visited": null, - "set/visited": null, - "l": null, - "set/l": null, - "parent": null, - "set/parent": null, - "lastCost": null, - "set/lastCost": null, + "left": Sprite_left__P187279, + "set/left": Sprite_left__P187280, + "right": Sprite_right__P187281, + "set/right": Sprite_right__P187282, + "top": Sprite_top__P187283, + "set/top": Sprite_top__P187284, + "bottom": Sprite_bottom__P187285, + "set/bottom": Sprite_bottom__P187286, + "kind": Sprite_kind__P187287, + "setKind": Sprite_setKind__P187288, + "setPosition": Sprite_setPosition__P187289, + "setVelocity": Sprite_setVelocity__P187290, + "isOutOfScreen": Sprite_isOutOfScreen__P187293, + "__drawCore": Sprite___drawCore__P187294, + "__update": Sprite___update__P187295, + "setFlag": Sprite_setFlag__P187296, + "overlapsWith": Sprite_overlapsWith__P187297, + "isHittingTile": Sprite_isHittingTile__P187298, + "clearObstacles": Sprite_clearObstacles__P187301, + "registerObstacle": Sprite_registerObstacle__P187302, + "destroy": Sprite_destroy__P187304, + "_destroyCore": Sprite__destroyCore__P187305, + "follow": Sprite_follow__P187306, + "toString": Sprite_toString__P187307, + "z": sprites_BaseSprite_z__P187079, + "set/z": sprites_BaseSprite_z__P187080, + "__draw": sprites_BaseSprite___draw__P187081, }, + toStringMethod: Sprite_toString__P187307, }); const control_EventContext__C185601_VT = mkVTable({ name: "EventContext", numFields: 9, - classNo: 32, - lastSubtypeNo: 32, + classNo: 26, + lastSubtypeNo: 26, maxBgInstances: null, methods: { }, @@ -73255,134 +73509,11 @@ const control_EventContext__C185601_VT = mkVTable({ "registerHandler": control_EventContext_registerHandler__P185611, }, }); -const sprites_FollowingSprite__C187189_VT = mkVTable({ - name: "FollowingSprite", - numFields: 4, - classNo: 33, - lastSubtypeNo: 33, - maxBgInstances: null, - methods: { - }, - iface: { - "self": null, - "set/self": null, - "target": null, - "set/target": null, - "rate": null, - "set/rate": null, - "turnRate": null, - "set/turnRate": null, - }, -}); -const control_FrameCallback__C185598_VT = mkVTable({ - name: "FrameCallback", - numFields: 2, - classNo: 34, - lastSubtypeNo: 34, - maxBgInstances: null, - methods: { - }, - iface: { - "order": null, - "set/order": null, - "handler": null, - "set/handler": null, - }, -}); -const control_PollEvent__C189219_VT = mkVTable({ - name: "PollEvent", - numFields: 6, - classNo: 35, - lastSubtypeNo: 35, - maxBgInstances: null, - methods: { - }, - iface: { - "eid": null, - "set/eid": null, - "vid": null, - "set/vid": null, - "start": null, - "set/start": null, - "timeOut": null, - "set/timeOut": null, - "condition": null, - "set/condition": null, - "once": null, - "set/once": null, - }, -}); -const control_EventHandler__C189240_VT = mkVTable({ - name: "EventHandler", - numFields: 4, - classNo: 36, - lastSubtypeNo: 36, - maxBgInstances: null, - methods: { - }, - iface: { - "src": null, - "set/src": null, - "value": null, - "set/value": null, - "handler": null, - "set/handler": null, - "flags": null, - "set/flags": null, - "register": control_EventHandler_register__P189241, - "unregister": control_EventHandler_unregister__P189242, - }, -}); -const info_PlayerInfo__C187443_VT = mkVTable({ - name: "PlayerInfo", - numFields: 12, - classNo: 37, - lastSubtypeNo: 37, - maxBgInstances: null, - methods: { - }, - iface: { - "_player": null, - "set/_player": null, - "bg": null, - "set/bg": null, - "border": null, - "set/border": null, - "fc": null, - "set/fc": null, - "showScore": null, - "set/showScore": null, - "showLife": null, - "set/showLife": null, - "visilibity": null, - "set/visilibity": null, - "showPlayer": null, - "set/showPlayer": null, - "x": null, - "set/x": null, - "y": null, - "set/y": null, - "left": null, - "set/left": null, - "up": null, - "set/up": null, - "init": info_PlayerInfo_init__P189498, - "getState": info_PlayerInfo_getState__P187456, - "id": info_PlayerInfo_id__P187457, - "score": info_PlayerInfo_score__P187458, - "hasScore": info_PlayerInfo_hasScore__P187461, - "hasLife": info_PlayerInfo_hasLife__P187465, - "raiseLifeZero": info_PlayerInfo_raiseLifeZero__P187467, - "drawPlayer": info_PlayerInfo_drawPlayer__P187468, - "drawScore": info_PlayerInfo_drawScore__P187469, - "drawLives": info_PlayerInfo_drawLives__P187470, - }, -}); const scene_Scene__C187636_VT = mkVTable({ name: "Scene", numFields: 23, - classNo: 38, - lastSubtypeNo: 38, + classNo: 27, + lastSubtypeNo: 27, maxBgInstances: null, methods: { }, @@ -73441,232 +73572,11 @@ const scene_Scene__C187636_VT = mkVTable({ "render": scene_Scene_render__P187663, }, }); -const info_InfoState__C189443_VT = mkVTable({ - name: "InfoState", - numFields: 10, - classNo: 39, - lastSubtypeNo: 39, - maxBgInstances: null, - methods: { - }, - iface: { - "playerStates": null, - "set/playerStates": null, - "visibilityFlag": null, - "set/visibilityFlag": null, - "gameEnd": null, - "set/gameEnd": null, - "heartImage": null, - "set/heartImage": null, - "multiplierImage": null, - "set/multiplierImage": null, - "bgColor": null, - "set/bgColor": null, - "borderColor": null, - "set/borderColor": null, - "fontColor": null, - "set/fontColor": null, - "countdownExpired": null, - "set/countdownExpired": null, - "countdownEndHandler": null, - "set/countdownEndHandler": null, - }, -}); -const scene_Renderable__C187595_VT = mkVTable({ - name: "Renderable", - numFields: 4, - classNo: 23, - lastSubtypeNo: 23, - maxBgInstances: null, - methods: { - "__visible": scene_Renderable___visible__P187597, - "__draw": sprites_BaseSprite___draw__P187081, - "__drawCore": scene_Renderable___drawCore__P187598, - "__update": sprites_BaseSprite___update__P187083, - }, - iface: { - "_z": null, - "set/_z": null, - "id": null, - "set/id": null, - "handler": null, - "set/handler": null, - "shouldBeVisible": null, - "set/shouldBeVisible": null, - "__visible": scene_Renderable___visible__P187597, - "__drawCore": scene_Renderable___drawCore__P187598, - "z": sprites_BaseSprite_z__P187079, - "set/z": sprites_BaseSprite_z__P187080, - "__draw": sprites_BaseSprite___draw__P187081, - "__update": sprites_BaseSprite___update__P187083, - }, -}); -const info_PlayerState__C187414_VT = mkVTable({ - name: "PlayerState", - numFields: 3, - classNo: 40, - lastSubtypeNo: 40, - maxBgInstances: null, - methods: { - }, - iface: { - "score": null, - "set/score": null, - "life": null, - "set/life": null, - "lifeZeroHandler": null, - "set/lifeZeroHandler": null, - }, -}); -const scene_GameForeverHandler__C187615_VT = mkVTable({ - name: "GameForeverHandler", - numFields: 2, - classNo: 41, - lastSubtypeNo: 41, - maxBgInstances: null, - methods: { - }, - iface: { - "lock": null, - "set/lock": null, - "handler": null, - "set/handler": null, - }, -}); -const PhysicsEngine__C187376_VT = mkVTable({ - name: "PhysicsEngine", - numFields: 0, - classNo: 42, - lastSubtypeNo: 43, - maxBgInstances: null, - methods: { - "addSprite": PhysicsEngine_addSprite__P187378, - "removeSprite": PhysicsEngine_removeSprite__P187379, - "moveSprite": PhysicsEngine_moveSprite__P187380, - "draw": PhysicsEngine_draw__P187381, - "move": PhysicsEngine_move__P187382, - }, - iface: { - "addSprite": PhysicsEngine_addSprite__P187378, - "removeSprite": PhysicsEngine_removeSprite__P187379, - "moveSprite": PhysicsEngine_moveSprite__P187380, - "draw": PhysicsEngine_draw__P187381, - "move": PhysicsEngine_move__P187382, - }, -}); -const controller_Controller__C187140_VT = mkVTable({ - name: "Controller", - numFields: 5, - classNo: 44, - lastSubtypeNo: 44, - maxBgInstances: null, - methods: { - }, - iface: { - "playerIndex": null, - "set/playerIndex": null, - "buttons": null, - "set/buttons": null, - "analog": null, - "set/analog": null, - "_id": null, - "set/_id": null, - "_connected": null, - "set/_connected": null, - "_controlledSprites": controller_Controller__controlledSprites__P187145, - "set/_controlledSprites": controller_Controller__controlledSprites__P187146, - "id": controller_Controller_id__P187147, - "left": controller_Controller_left__P187149, - "right": controller_Controller_right__P187150, - "up": controller_Controller_up__P187151, - "down": controller_Controller_down__P187152, - "moveSprite": controller_Controller_moveSprite__P187156, - "button": controller_Controller_button__P189408, - "connected": controller_Controller_connected__P187159, - "set/connected": controller_Controller_connected__P187160, - "__preUpdate": controller_Controller___preUpdate__P187164, - "__update": controller_Controller___update__P187165, - }, -}); -const controller_ControlledSprite__C187136_VT = mkVTable({ - name: "ControlledSprite", - numFields: 4, - classNo: 45, - lastSubtypeNo: 45, - maxBgInstances: null, - methods: { - }, - iface: { - "_inputLastFrame": null, - "set/_inputLastFrame": null, - "s": null, - "set/s": null, - "vx": null, - "set/vx": null, - "vy": null, - "set/vy": null, - }, -}); -const character_CharacterState__C191357_VT = mkVTable({ - name: "CharacterState", - numFields: 12, - classNo: 46, - lastSubtypeNo: 46, - 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, - "setFrames": character_CharacterState_setFrames__P191358, - "setLoopFrames": character_CharacterState_setLoopFrames__P191359, - "update": character_CharacterState_update__P191361, - "setEnabled": character_CharacterState_setEnabled__P191363, - "setManualFlags": character_CharacterState_setManualFlags__P191364, - "pickRule": character_CharacterState_pickRule__P191366, - }, -}); -const character_CharacterAnimationSceneState__C191352_VT = mkVTable({ - name: "CharacterAnimationSceneState", - numFields: 1, - classNo: 47, - lastSubtypeNo: 47, - maxBgInstances: null, - methods: { - }, - iface: { - "characters": null, - "set/characters": null, - "update": character_CharacterAnimationSceneState_update__P191353, - }, -}); const effects_ImageEffect__C188033_VT = mkVTable({ name: "ImageEffect", numFields: 4, - classNo: 48, - lastSubtypeNo: 48, + classNo: 28, + lastSubtypeNo: 28, maxBgInstances: null, methods: { }, @@ -73687,8 +73597,8 @@ const effects_ImageEffect__C188033_VT = mkVTable({ const effects_ParticleEffect__C188006_VT = mkVTable({ name: "ParticleEffect", numFields: 3, - classNo: 49, - lastSubtypeNo: 50, + classNo: 29, + lastSubtypeNo: 30, maxBgInstances: null, methods: { }, @@ -73706,8 +73616,8 @@ const effects_ParticleEffect__C188006_VT = mkVTable({ const effects_ScreenEffect__C188010_VT = mkVTable({ name: "ScreenEffect", numFields: 5, - classNo: 50, - lastSubtypeNo: 50, + classNo: 30, + lastSubtypeNo: 30, maxBgInstances: null, methods: { }, @@ -73731,8 +73641,8 @@ const effects_ScreenEffect__C188010_VT = mkVTable({ const particles_ParticleFactory__C187931_VT = mkVTable({ name: "ParticleFactory", numFields: 0, - classNo: 51, - lastSubtypeNo: 55, + classNo: 31, + lastSubtypeNo: 35, maxBgInstances: null, methods: { "createParticle": particles_ParticleFactory_createParticle__P187933, @@ -73746,8 +73656,8 @@ const particles_ParticleFactory__C187931_VT = mkVTable({ const particles_SprayFactory__C187935_VT = mkVTable({ name: "SprayFactory", numFields: 3, - classNo: 52, - lastSubtypeNo: 55, + classNo: 32, + lastSubtypeNo: 35, maxBgInstances: null, methods: { "createParticle": particles_SprayFactory_createParticle__P187937, @@ -73769,8 +73679,8 @@ const particles_SprayFactory__C187935_VT = mkVTable({ const particles_AreaFactory__C187941_VT = mkVTable({ name: "AreaFactory", numFields: 8, - classNo: 53, - lastSubtypeNo: 55, + classNo: 33, + lastSubtypeNo: 35, maxBgInstances: null, methods: { "createParticle": particles_AreaFactory_createParticle__P187947, @@ -73802,8 +73712,8 @@ const particles_AreaFactory__C187941_VT = mkVTable({ const particles_ShapeFactory__C187957_VT = mkVTable({ name: "ShapeFactory", numFields: 11, - classNo: 54, - lastSubtypeNo: 55, + classNo: 34, + lastSubtypeNo: 35, maxBgInstances: null, methods: { "createParticle": particles_ShapeFactory_createParticle__P187961, @@ -73842,8 +73752,8 @@ const particles_ShapeFactory__C187957_VT = mkVTable({ const particles_ConfettiFactory__C187962_VT = mkVTable({ name: "ConfettiFactory", numFields: 11, - classNo: 55, - lastSubtypeNo: 55, + classNo: 35, + lastSubtypeNo: 35, maxBgInstances: null, methods: { "createParticle": particles_ShapeFactory_createParticle__P187961, @@ -73882,8 +73792,8 @@ const particles_ConfettiFactory__C187962_VT = mkVTable({ const particles_ParticleSource__C187895_VT = mkVTable({ name: "ParticleSource", numFields: 13, - classNo: 24, - lastSubtypeNo: 24, + classNo: 23, + lastSubtypeNo: 23, maxBgInstances: null, methods: { "__visible": sprites_BaseSprite___visible__P187078, @@ -73943,8 +73853,8 @@ const particles_ParticleSource__C187895_VT = mkVTable({ const particles_Particle__C187876_VT = mkVTable({ name: "Particle", numFields: 8, - classNo: 56, - lastSubtypeNo: 56, + classNo: 36, + lastSubtypeNo: 36, maxBgInstances: 200, methods: { }, @@ -73967,11 +73877,32 @@ const particles_Particle__C187876_VT = mkVTable({ "set/color": null, }, }); +const PhysicsEngine__C187376_VT = mkVTable({ + name: "PhysicsEngine", + numFields: 0, + classNo: 37, + lastSubtypeNo: 38, + maxBgInstances: null, + methods: { + "addSprite": PhysicsEngine_addSprite__P187378, + "removeSprite": PhysicsEngine_removeSprite__P187379, + "moveSprite": PhysicsEngine_moveSprite__P187380, + "draw": PhysicsEngine_draw__P187381, + "move": PhysicsEngine_move__P187382, + }, + iface: { + "addSprite": PhysicsEngine_addSprite__P187378, + "removeSprite": PhysicsEngine_removeSprite__P187379, + "moveSprite": PhysicsEngine_moveSprite__P187380, + "draw": PhysicsEngine_draw__P187381, + "move": PhysicsEngine_move__P187382, + }, +}); const scene_Camera__C187577_VT = mkVTable({ name: "Camera", numFields: 8, - classNo: 57, - lastSubtypeNo: 57, + classNo: 39, + lastSubtypeNo: 39, maxBgInstances: null, methods: { }, @@ -74006,8 +73937,8 @@ const scene_Camera__C187577_VT = mkVTable({ const scene_Background__C187482_VT = mkVTable({ name: "Background", numFields: 4, - classNo: 58, - lastSubtypeNo: 58, + classNo: 40, + lastSubtypeNo: 40, maxBgInstances: null, methods: { }, @@ -74026,35 +73957,145 @@ const scene_Background__C187482_VT = mkVTable({ "draw": scene_Background_draw__P187491, }, }); -const scene_BackgroundLayer__C187492_VT = mkVTable({ - name: "BackgroundLayer", - numFields: 6, - classNo: 59, - lastSubtypeNo: 59, +const scene_BackgroundLayer__C187492_VT = mkVTable({ + name: "BackgroundLayer", + numFields: 6, + classNo: 41, + lastSubtypeNo: 41, + maxBgInstances: null, + methods: { + }, + iface: { + "distance": null, + "set/distance": null, + "img": null, + "set/img": null, + "repeatX": null, + "set/repeatX": null, + "repeatY": null, + "set/repeatY": null, + "alignX": null, + "set/alignX": null, + "alignY": null, + "set/alignY": null, + "draw": scene_BackgroundLayer_draw__P187500, + }, +}); +const tiles_TileMap__C187534_VT = mkVTable({ + name: "TileMap", + numFields: 3, + classNo: 42, + lastSubtypeNo: 42, + maxBgInstances: null, + methods: { + }, + iface: { + "_scale": null, + "set/_scale": null, + "_layer": null, + "set/_layer": null, + "_map": null, + "set/_map": null, + "scale": tiles_TileMap_scale__P187536, + "set/scale": tiles_TileMap_scale__P187537, + "data": tiles_TileMap_data__P189508, + "offsetX": tiles_TileMap_offsetX__P187538, + "offsetY": tiles_TileMap_offsetY__P187539, + "areaWidth": tiles_TileMap_areaWidth__P187540, + "areaHeight": tiles_TileMap_areaHeight__P187541, + "layer": tiles_TileMap_layer__P187542, + "enabled": tiles_TileMap_enabled__P187544, + "setData": tiles_TileMap_setData__P187545, + "getTile": tiles_TileMap_getTile__P187546, + "getTileIndex": tiles_TileMap_getTileIndex__P187547, + "setTileAt": tiles_TileMap_setTileAt__P187548, + "getImageType": tiles_TileMap_getImageType__P187549, + "setWallAt": tiles_TileMap_setWallAt__P187550, + "getTilesByType": tiles_TileMap_getTilesByType__P187551, + "sampleTilesByType": tiles_TileMap_sampleTilesByType__P187552, + "isInvalidIndex": tiles_TileMap_isInvalidIndex__P189509, + "draw": tiles_TileMap_draw__P189510, + "isObstacle": tiles_TileMap_isObstacle__P187553, + "getObstacle": tiles_TileMap_getObstacle__P187554, + "isOnWall": tiles_TileMap_isOnWall__P187555, + "getTileImage": tiles_TileMap_getTileImage__P187556, + }, +}); +const tiles_TileMapData__C187521_VT = mkVTable({ + name: "TileMapData", + numFields: 7, + classNo: 43, + lastSubtypeNo: 43, + maxBgInstances: null, + methods: { + }, + iface: { + "data": null, + "set/data": null, + "layers": null, + "set/layers": null, + "tileset": null, + "set/tileset": null, + "cachedTileView": null, + "set/cachedTileView": null, + "_scale": null, + "set/_scale": null, + "_width": null, + "set/_width": null, + "_height": null, + "set/_height": null, + "width": tiles_TileMapData_width__P187523, + "height": tiles_TileMapData_height__P187524, + "scale": tiles_TileMapData_scale__P187525, + "set/scale": tiles_TileMapData_scale__P187526, + "getTile": tiles_TileMapData_getTile__P187527, + "setTile": tiles_TileMapData_setTile__P187528, + "getTileset": tiles_TileMapData_getTileset__P187529, + "getTileImage": tiles_TileMapData_getTileImage__P187530, + "setWall": tiles_TileMapData_setWall__P187531, + "isWall": tiles_TileMapData_isWall__P187532, + "isOutsideMap": tiles_TileMapData_isOutsideMap__P187533, + }, +}); +const controller_Controller__C187140_VT = mkVTable({ + name: "Controller", + numFields: 5, + classNo: 44, + lastSubtypeNo: 44, maxBgInstances: null, methods: { }, iface: { - "distance": null, - "set/distance": null, - "img": null, - "set/img": null, - "repeatX": null, - "set/repeatX": null, - "repeatY": null, - "set/repeatY": null, - "alignX": null, - "set/alignX": null, - "alignY": null, - "set/alignY": null, - "draw": scene_BackgroundLayer_draw__P187500, + "playerIndex": null, + "set/playerIndex": null, + "buttons": null, + "set/buttons": null, + "analog": null, + "set/analog": null, + "_id": null, + "set/_id": null, + "_connected": null, + "set/_connected": null, + "_controlledSprites": controller_Controller__controlledSprites__P187145, + "set/_controlledSprites": controller_Controller__controlledSprites__P187146, + "id": controller_Controller_id__P187147, + "left": controller_Controller_left__P187149, + "right": controller_Controller_right__P187150, + "up": controller_Controller_up__P187151, + "down": controller_Controller_down__P187152, + "moveSprite": controller_Controller_moveSprite__P187156, + "button": controller_Controller_button__P189408, + "connected": controller_Controller_connected__P187159, + "set/connected": controller_Controller_connected__P187160, + "__preUpdate": controller_Controller___preUpdate__P187164, + "__update": controller_Controller___update__P187165, }, }); const ArcadePhysicsEngine__C187390_VT = mkVTable({ name: "ArcadePhysicsEngine", numFields: 6, - classNo: 43, - lastSubtypeNo: 43, + classNo: 38, + lastSubtypeNo: 38, maxBgInstances: null, methods: { "addSprite": ArcadePhysicsEngine_addSprite__P187399, @@ -74098,8 +74139,8 @@ const ArcadePhysicsEngine__C187390_VT = mkVTable({ const sprites_SpriteMap__C187311_VT = mkVTable({ name: "SpriteMap", numFields: 5, - classNo: 60, - lastSubtypeNo: 60, + classNo: 45, + lastSubtypeNo: 45, maxBgInstances: null, methods: { }, @@ -74130,8 +74171,8 @@ const sprites_SpriteMap__C187311_VT = mkVTable({ const music_Melody__C186815_VT = mkVTable({ name: "Melody", numFields: 2, - classNo: 61, - lastSubtypeNo: 61, + classNo: 46, + lastSubtypeNo: 46, maxBgInstances: null, methods: { }, @@ -74149,6 +74190,379 @@ const music_Melody__C186815_VT = mkVTable({ }, toStringMethod: music_Melody_toString__P186824, }); +const control_EventHandler__C189240_VT = mkVTable({ + name: "EventHandler", + numFields: 4, + classNo: 47, + lastSubtypeNo: 47, + maxBgInstances: null, + methods: { + }, + iface: { + "src": null, + "set/src": null, + "value": null, + "set/value": null, + "handler": null, + "set/handler": null, + "flags": null, + "set/flags": null, + "register": control_EventHandler_register__P189241, + "unregister": control_EventHandler_unregister__P189242, + }, +}); +const control_FrameCallback__C185598_VT = mkVTable({ + name: "FrameCallback", + numFields: 2, + classNo: 48, + lastSubtypeNo: 48, + maxBgInstances: null, + methods: { + }, + iface: { + "order": null, + "set/order": null, + "handler": null, + "set/handler": null, + }, +}); +const control_PollEvent__C189219_VT = mkVTable({ + name: "PollEvent", + numFields: 6, + classNo: 49, + lastSubtypeNo: 49, + maxBgInstances: null, + methods: { + }, + iface: { + "eid": null, + "set/eid": null, + "vid": null, + "set/vid": null, + "start": null, + "set/start": null, + "timeOut": null, + "set/timeOut": null, + "condition": null, + "set/condition": null, + "once": null, + "set/once": null, + }, +}); +const tiles_Location__C187506_VT = mkVTable({ + name: "Location", + numFields: 3, + classNo: 50, + lastSubtypeNo: 50, + maxBgInstances: null, + methods: { + }, + iface: { + "_row": null, + "set/_row": null, + "_col": null, + "set/_col": null, + "tileMap": null, + "set/tileMap": null, + "col": tiles_Location_col__P187507, + "row": tiles_Location_row__P187508, + "x": tiles_Location_x__P187510, + "y": tiles_Location_y__P187511, + "tileSet": tiles_Location_tileSet__P187512, + "place": tiles_Location_place__P187513, + }, +}); +const Heap__C188863_VT = mkVTable({ + name: "Heap", + numFields: 2, + classNo: 51, + lastSubtypeNo: 51, + maxBgInstances: null, + methods: { + }, + iface: { + "store": null, + "set/store": null, + "comparator": null, + "set/comparator": null, + "percolateDown": Heap_percolateDown__P191290, + "percolateUp": Heap_percolateUp__P191291, + "push": Heap_push__P188865, + "pop": Heap_pop__P188866, + "length": Heap_length__P188868, + "parent": Heap_parent__P191292, + "leftChild": Heap_leftChild__P191293, + "rightChild": Heap_rightChild__P191294, + }, +}); +const scene_PrioritizedLocation__C191295_VT = mkVTable({ + name: "PrioritizedLocation", + numFields: 3, + classNo: 52, + lastSubtypeNo: 52, + maxBgInstances: null, + methods: { + }, + iface: { + "loc": null, + "set/loc": null, + "cost": null, + "set/cost": null, + "extraCost": null, + "set/extraCost": null, + }, +}); +const scene_LocationNode__C191297_VT = mkVTable({ + name: "LocationNode", + numFields: 4, + classNo: 53, + lastSubtypeNo: 53, + maxBgInstances: null, + methods: { + }, + iface: { + "visited": null, + "set/visited": null, + "l": null, + "set/l": null, + "parent": null, + "set/parent": null, + "lastCost": null, + "set/lastCost": null, + }, +}); +const sprites_FollowingSprite__C187189_VT = mkVTable({ + name: "FollowingSprite", + numFields: 4, + classNo: 54, + lastSubtypeNo: 54, + maxBgInstances: null, + methods: { + }, + iface: { + "self": null, + "set/self": null, + "target": null, + "set/target": null, + "rate": null, + "set/rate": null, + "turnRate": null, + "set/turnRate": null, + }, +}); +const scene_GameForeverHandler__C187615_VT = mkVTable({ + name: "GameForeverHandler", + numFields: 2, + classNo: 55, + lastSubtypeNo: 55, + maxBgInstances: null, + methods: { + }, + iface: { + "lock": null, + "set/lock": null, + "handler": null, + "set/handler": null, + }, +}); +const info_PlayerInfo__C187443_VT = mkVTable({ + name: "PlayerInfo", + numFields: 12, + classNo: 56, + lastSubtypeNo: 56, + maxBgInstances: null, + methods: { + }, + iface: { + "_player": null, + "set/_player": null, + "bg": null, + "set/bg": null, + "border": null, + "set/border": null, + "fc": null, + "set/fc": null, + "showScore": null, + "set/showScore": null, + "showLife": null, + "set/showLife": null, + "visilibity": null, + "set/visilibity": null, + "showPlayer": null, + "set/showPlayer": null, + "x": null, + "set/x": null, + "y": null, + "set/y": null, + "left": null, + "set/left": null, + "up": null, + "set/up": null, + "init": info_PlayerInfo_init__P189498, + "getState": info_PlayerInfo_getState__P187456, + "id": info_PlayerInfo_id__P187457, + "score": info_PlayerInfo_score__P187458, + "setScore": info_PlayerInfo_setScore__P187459, + "changeScoreBy": info_PlayerInfo_changeScoreBy__P187460, + "hasScore": info_PlayerInfo_hasScore__P187461, + "hasLife": info_PlayerInfo_hasLife__P187465, + "raiseLifeZero": info_PlayerInfo_raiseLifeZero__P187467, + "drawPlayer": info_PlayerInfo_drawPlayer__P187468, + "drawScore": info_PlayerInfo_drawScore__P187469, + "drawLives": info_PlayerInfo_drawLives__P187470, + }, +}); +const info_InfoState__C189443_VT = mkVTable({ + name: "InfoState", + numFields: 10, + classNo: 57, + lastSubtypeNo: 57, + maxBgInstances: null, + methods: { + }, + iface: { + "playerStates": null, + "set/playerStates": null, + "visibilityFlag": null, + "set/visibilityFlag": null, + "gameEnd": null, + "set/gameEnd": null, + "heartImage": null, + "set/heartImage": null, + "multiplierImage": null, + "set/multiplierImage": null, + "bgColor": null, + "set/bgColor": null, + "borderColor": null, + "set/borderColor": null, + "fontColor": null, + "set/fontColor": null, + "countdownExpired": null, + "set/countdownExpired": null, + "countdownEndHandler": null, + "set/countdownEndHandler": null, + }, +}); +const scene_Renderable__C187595_VT = mkVTable({ + name: "Renderable", + numFields: 4, + classNo: 24, + lastSubtypeNo: 24, + maxBgInstances: null, + methods: { + "__visible": scene_Renderable___visible__P187597, + "__draw": sprites_BaseSprite___draw__P187081, + "__drawCore": scene_Renderable___drawCore__P187598, + "__update": sprites_BaseSprite___update__P187083, + }, + iface: { + "_z": null, + "set/_z": null, + "id": null, + "set/id": null, + "handler": null, + "set/handler": null, + "shouldBeVisible": null, + "set/shouldBeVisible": null, + "__visible": scene_Renderable___visible__P187597, + "__drawCore": scene_Renderable___drawCore__P187598, + "z": sprites_BaseSprite_z__P187079, + "set/z": sprites_BaseSprite_z__P187080, + "__draw": sprites_BaseSprite___draw__P187081, + "__update": sprites_BaseSprite___update__P187083, + }, +}); +const info_PlayerState__C187414_VT = mkVTable({ + name: "PlayerState", + numFields: 3, + classNo: 58, + lastSubtypeNo: 58, + maxBgInstances: null, + methods: { + }, + iface: { + "score": null, + "set/score": null, + "life": null, + "set/life": null, + "lifeZeroHandler": null, + "set/lifeZeroHandler": null, + }, +}); +const controller_ControlledSprite__C187136_VT = mkVTable({ + name: "ControlledSprite", + numFields: 4, + classNo: 59, + lastSubtypeNo: 59, + maxBgInstances: null, + methods: { + }, + iface: { + "_inputLastFrame": null, + "set/_inputLastFrame": null, + "s": null, + "set/s": null, + "vx": null, + "set/vx": null, + "vy": null, + "set/vy": null, + }, +}); +const character_CharacterState__C191357_VT = mkVTable({ + name: "CharacterState", + numFields: 12, + classNo: 60, + lastSubtypeNo: 60, + 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, + "setFrames": character_CharacterState_setFrames__P191358, + "setLoopFrames": character_CharacterState_setLoopFrames__P191359, + "update": character_CharacterState_update__P191361, + "setEnabled": character_CharacterState_setEnabled__P191363, + "setManualFlags": character_CharacterState_setManualFlags__P191364, + "pickRule": character_CharacterState_pickRule__P191366, + }, +}); +const character_CharacterAnimationSceneState__C191352_VT = mkVTable({ + name: "CharacterAnimationSceneState", + numFields: 1, + classNo: 61, + lastSubtypeNo: 61, + maxBgInstances: null, + methods: { + }, + iface: { + "characters": null, + "set/characters": null, + "update": character_CharacterAnimationSceneState_update__P191353, + }, +}); const character_CharacterAnimation__C191355_VT = mkVTable({ name: "CharacterAnimation", numFields: 5, @@ -74563,31 +74977,11 @@ const game_Hitbox__C187176_VT = mkVTable({ "bottom": game_Hitbox_bottom__P187186, }, }); -const control_Interval__C189214_VT = mkVTable({ - name: "Interval", - numFields: 4, - classNo: 74, - lastSubtypeNo: 74, - 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__P189215, - }, -}); const sprites_SpriteSet__C187328_VT = mkVTable({ name: "SpriteSet", numFields: 1, - classNo: 75, - lastSubtypeNo: 75, + classNo: 74, + lastSubtypeNo: 74, maxBgInstances: null, methods: { }, @@ -74606,8 +75000,8 @@ const sprites_SpriteSet__C187328_VT = mkVTable({ const scene_OverlapHandler__C187609_VT = mkVTable({ name: "OverlapHandler", numFields: 3, - classNo: 76, - lastSubtypeNo: 76, + classNo: 75, + lastSubtypeNo: 75, maxBgInstances: null, methods: { }, @@ -74683,8 +75077,8 @@ const game_GameOverDialog__C187733_VT = mkVTable({ const music_MelodyPlayer__C186825_VT = mkVTable({ name: "MelodyPlayer", numFields: 2, - classNo: 77, - lastSubtypeNo: 77, + classNo: 76, + lastSubtypeNo: 76, maxBgInstances: null, methods: { }, @@ -74701,8 +75095,8 @@ const music_MelodyPlayer__C186825_VT = mkVTable({ const scene_PathFollowingSprite__C191306_VT = mkVTable({ name: "PathFollowingSprite", numFields: 5, - classNo: 78, - lastSubtypeNo: 78, + classNo: 77, + lastSubtypeNo: 77, maxBgInstances: null, methods: { }, @@ -74719,6 +75113,26 @@ const scene_PathFollowingSprite__C191306_VT = mkVTable({ "set/speed": null, }, }); +const control_Interval__C189214_VT = mkVTable({ + name: "Interval", + numFields: 4, + classNo: 78, + lastSubtypeNo: 78, + 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__P189215, + }, +}); const scene_TileOverlapHandler__C187613_VT = mkVTable({ name: "TileOverlapHandler", numFields: 3, @@ -74869,7 +75283,7 @@ const effects_SceneAnchor__C189962_VT = mkVTable({ }, }); -const breakpoints = setupDebugger(1, ["NPC___348070","Map___348073","SurvivedPlayer___348076","SurvivedNPC___348079","loading___348087","message___348118","tile12___189161","last_15___348134","in_game___348145","paths___348167","player_made_it___348177","selected_option___348243","user_fish_count___348312","user_shark_count___348310","transparency16___189149","tile2___189151","tile3___189152","tile4___189153","tile8___189157","tile9___189158","tile11___189160","in_menu___348325","loading_start_time___348517","sprite_map___348294","shortest_distance___348292","sprite_closest_sprite___348290","map___348298","sprite_player_fish___348300","tile1___189150","tile5___189154","tile6___189155","tile7___189156","tile10___189159","tile14___189162","tile13___189163","tile15___189164","tile16___189165","left_fish_animations___348308","right_fish_animations___348307","local_choice___348306","sprite_fish___348304","location___348302","sprite_shark___348296"]) +const breakpoints = setupDebugger(1, ["NPC___394652","Map___394655","SurvivedPlayer___394658","SurvivedNPC___394661","loading___394782","message___394813","tile12___189161","last_15___394829","in_game___394856","paths___394754","player_made_it___394890","selected_option___394843","user_fish_count___395047","user_shark_count___395004","transparency16___189149","tile2___189151","tile3___189152","tile4___189153","tile8___189157","tile9___189158","tile11___189160","in_menu___395311","loading_start_time___395503","sprite_map___395223","shortest_distance___395295","sprite_closest_sprite___395293","map___395139","sprite_player_fish___395118","tile1___189150","tile5___189154","tile6___189155","tile7___189156","tile10___189159","tile14___189162","tile13___189163","tile15___189164","tile16___189165","left_fish_animations___394667","right_fish_animations___394676","local_choice___394685","sprite_fish___394690","location___394737","sprite_shark___395177"]) -return _main___P349886 +return _main___P396133 }) diff --git a/assets/version.txt b/assets/version.txt index b966e81..3a1f10e 100644 --- a/assets/version.txt +++ b/assets/version.txt @@ -1 +1 @@ -1.2.4 \ No newline at end of file +1.2.5 \ No newline at end of file diff --git a/pxt.json b/pxt.json index 804342a..c724cb0 100644 --- a/pxt.json +++ b/pxt.json @@ -1,6 +1,6 @@ { "name": "Fishy Fishy Cross my Ocean! v1.2.2 attempt 3", - "version": "1.2.4", + "version": "1.2.5", "description": "", "dependencies": { "device": "*",