; Remix dives (galaga-remix path mod; docs/paths.md). ; ; Bees pick one of four dives at random, equally likely: the original, a ; figure eight, a zigzag weave, or a feint (drop fast, pull up hard, fly ; home). Butterflies do a wide S-swoop half the time; the right-hand side's ; dives are mirrored, so swooping pairs cross. The choice uses the remix's ; `random_jump` interpreter extension. extend random_jump ; --- bees: the dive at p034f ------------------------------------------------- org 0x034f jump bee_dive org 0x1000 bee_dive: fly 2 1 turn 20 for 36 ; peel off the formation random_jump bee_pick_b random_jump bee_figure_eight jump p0352 ; 1/4: the original dive bee_pick_b: random_jump bee_feint ; 1/4 jump bee_zigzag ; 1/4 bee_figure_eight: ; 1/4 fly 2 1 turn 16 for 64 ; a full loop one way (16 x 64 = 1024) fly 2 1 turn -16 for 64 ; and the other jump p0352 bee_zigzag: ; weave down in place of the straight run fly 2 1 turn 24 for 9 fly 2 1 turn -24 for 18 fly 2 1 turn 24 for 18 fly 2 1 turn -24 for 18 fly 2 1 turn 24 for 9 ; back on the dive's heading fly 2 1 turn -5 for 38 ; the original's bend toward the bottom jump p0358 ; and the rest of the original dive bee_feint: fly 4 3 turn 0 for 26 ; drop fast fly 3 3 turn 32 for 16 ; pull up hard: half a turn (512) fly 3 3 turn 0 for 20 ; climb home ; head for the formation cell fly 2 1 turn 0 for 255 end ; --- butterflies: the dive at p03a9 --------------------------------------------- org 0x03a9 jump butterfly_dive org 0x1100 butterfly_dive: fly 2 1 turn 21 for 33 ; peel off (about the original's total turn) random_jump butterfly_swoop jump p03ac ; 1/2: the original dive butterfly_swoop: ; 1/2: a wide S down the screen ; The peel-off leaves a butterfly heading steeply sideways, not down ; (measured: about 64 degrees off), so point it straight down first: ; heading 0x300 = heading 0xc0 here, measured from the game's own flights ; (and its own mirror image, so both sides dive straight down). heading 0xc0 fly 2 2 turn 0 for 10 fly 2 2 turn 8 for 32 ; a quarter turn: out to the side fly 2 2 turn -8 for 64 ; a half turn back across, through straight down fly 2 2 turn 8 for 32 ; and a quarter turn back to straight down ; The original dive after p03ac runs on fixed timings and then re-enters ; from the top, trusting that the butterfly has left the screen by then; ; after a swoop it has not. So dive on until just below the screen (queue ; Y 0x06: screen y is about 318 - 2 x queue Y, and the original re-enters ; at 0x06-0x07), then join the original at its re-entry. fly 2 2 turn 0 for 2 until_y 0x06 jump p03c4 ; reenter_top, back to the home column, home