~technomancy/fennel-compendium

1609784bd650ee69d6d04dd976006b21fc5ad390 — Phil Hagelberg 1 year, 3 months ago a20839f
Add Autumn 2020 jam entries.
3 files changed, 1655 insertions(+), 2 deletions(-)

M Makefile
M README.md
A spilljackers.fnl
M Makefile => Makefile +6 -2
@@ 1,6 1,6 @@
lovegames: always-kill-your-heroes apocalypse-meow energize exo-encounter-667 \
	fallen slime-the-world slimers-dungeon backpackless frog-collect-cheese \
	gravity-fall goo-runner
	gravity-fall goo-runner tremendous-quest-iv bussard downsheep yahtzee-adventure

fennel.lua: ../fennel/fennel.lua ; cp $< $@
fennelview.lua: ../fennel/fennelview.lua ; cp $< $@


@@ 34,6 34,8 @@ gravity-fall/fennel: fennel ; cp $< $@
goo-runner/lib/fennel.lua: fennel.lua ; cp $< $@
tremendous-quest-iv/polywell/lib/fennel.lua: fennel.lua ; cp $< $@
bussard/polywell/lib/fennel.lua: fennel.lua ; cp $< $@
downsheep/lib/fennel.lua: fennel.lua ; cp $< $@
yahtzee-adventure/lib/fennel.lua: fennel.lua ; cp $< $@

always-kill-your-heroes: always-kill-your-heroes/lib/fennel.lua \
	always-kill-your-heroes/lib/fennel \


@@ 58,9 60,11 @@ slimers-dungeon: slimers-dungeon/lib/fennel.lua \
	slimers-dungeon/lib/fennelview.lua
backpackless: backpackless/lib/fennel.lua slimers-dungeon/lib/fennelview.lua
frog-collect-cheese: frog-collect-cheese/lib/Fennel/fennel.lua
gravity-fall: gravity-fall/fennel ; make
gravity-fall: gravity-fall/fennel ; make -C gravity-fall
goo-runner: goo-runner/lib/fennel.lua
tremendous-quest-iv: tremendous-quest-iv/polywell/lib/fennel.lua
bussard: bussard/polywell/lib/fennel.lua
downsheep: downsheep/lib/fennel.lua
yahtzee-adventure: yahtzee-adventure/lib/fennel.lua

.PHONY: lovegames

M README.md => README.md +2 -0
@@ 1,3 1,5 @@
# Fennel Codebases

A way to see if Fennel changes break things.

Just games so far.

A spilljackers.fnl => spilljackers.fnl +1647 -0
@@ 0,0 1,1647 @@
;; title: Spilljackers
;; author: emmabukacek / technomancy
;; desc: cyberspace revenge heist
;; script: fennel
;; input: gamepad
;; saveid: spilljackers

(local (W H MW MH tau) (values 240 136 140 68 (* math.pi 2)))
(local (spd tspd max-spd) (values 0.2 0.1 2.5))
(local full-trace 8)

(local CHAR-HEIGHT 6)
(local EMAIL-PADDING 4)
(local EMAIL-WORD-WRAP 38)
(local SCREEN-HEIGHT 136)
(local SCREEN-WIDTH 240)
(local TILE-SIZE 8)

(local TRACKS {
  0 {:frames 3} ;; Email
  1 {:frames 9} ;; Battle
})

(local s (or _G.state {:msgs []
                       :music {:current-track nil
                               :random-frame? false}
                       :render 12 :interleave 2
                       :inv 0 :ph 0.5
                       :sfx? true}))

;; music / sfx

(fn music-enabled? [] (= 0 (pmem 0))) ; check persistent memory

(fn play-music [track-number random-frame?]
  (when (music-enabled?)
    (let [frame (if random-frame? (math.random 0 (. TRACKS track-number :frames)) 0)]
      (when (not= s.music.current-track track-number) (music track-number frame 0 true))
      (set s.music.current-track track-number))))

(fn continue-music []
  (play-music s.music.current-track s.music.random-frame?))

(fn sfx-enabled? [] (= 0 (pmem 1)))

(fn play-sfx [id channel]
  (when (sfx-enabled?)
    (if
      (= id -1) (sfx -1 0 0 (or channel 0)) ;; off
      (= id 0) (sfx 0 60 1 3 10) ;; chat
      (= id 1) (sfx 1 67 10 0) ;; select
      (= id 2) (sfx 2 60 10 0) ;; confirm
      (= id 3) (sfx 3 48 10 0) ;; cancel
      (= id 4) (sfx 4 24 20 2) ;; hit
      (= id 5) (sfx 5 55 20 3) ;; shot
      (= id 6) (sfx 6 32 -1 1 8) ;; beam
      (= id 7) (sfx 7 32 -1 1) ;; exa shot
      (= id 8) (sfx 8 84 -1 1) ;; add nail
     )))


;; shared functions

(fn ip-for [cx cy] (: "10.0.%d.%d" :format (% (* 15 cx) 255) (% (* 9 cy) 255)))

(fn choose-rand [tbl] (. tbl (math.random (# tbl))))

(fn dist [x1 y1 x2 y2]
  (let [dx (- x1 x2) dy (- y1 y2)]
    (math.sqrt (+ (* dx dx) (* dy dy)))))

(fn intersection [s1x s1y e1x e1y s2x s2y e2x e2y]
  (let [d (- (* (- s1x e1x) (- s2y e2y)) (* (- s1y e1y) (- s2x e2x)))
        a (- (* s1x e1y) (* s1y e1x))
        b (- (* s2x e2y) (* s2y e2x))
        x (/ (- (* a (- s2x e2x)) (* (- s1x e1x) b)) d)
        y (/ (- (* a (- s2y e2y)) (* (- s1y e1y) b)) d)]
    (if (and (or (<= s1x x e1x) (>= s1x x e1x))
             (or (<= s1y y e1y) (>= s1y y e1y))
             (or (<= s2x x e2x) (>= s2x x e2x))
             (or (<= s2y y e2y) (>= s2y y e2y)))
        (values x y))))

(fn combine-v [a b] (* (math.abs b) (if (< 0 a) 0.25 -0.25)))

(fn new-pos [ox oy vx vy ok? pw]
  (let [nx (+ ox vx) ny (+ oy vy)]
    (if (and (ok? (- nx pw) (- ny pw)) (ok? (- nx pw) (+ ny pw))
             (ok? (+ nx pw) (- ny pw)) (ok? (+ nx pw) (+ ny pw)))
        (values nx vx ny vy)
        (and (ok? (- nx pw) (- oy pw)) (ok? (- nx pw) (+ oy pw))
             (ok? (+ nx pw) (- oy pw)) (ok? (+ nx pw) (+ oy pw)))
        (values nx (+ vx (combine-v vx vy)) oy 0)
        (and (ok? (- ox pw) (- ny pw)) (ok? (- ox pw) (+ ny pw))
             (ok? (+ ox pw) (- ny pw)) (ok? (+ ox pw) (+ ny pw)))
        (values ox 0 ny (+ (combine-v vy vx) vy))
        (values ox 0 oy 0))))

(fn tt [...] (trace (table.concat [...] " ")))

(fn apply-word-wrap [message limit]
  "Take a message and append new line characters after as many whole words as
   possible without breaching the limit. This currently has a limitation in the
   way newlines are recognized. It's probably better to split the initial string
   on newlines to respect all author's intent, THEN word-wrap any remaining
   tokens that are longer than the limit, but uh, fuck it."
  (var (i line-start last-safe-breakpoint new-message)
    (values 1 1 nil ""))

  (while (< i (length message))
    (let [token (string.sub message i i)]
      ; Check for newlines
      (if (string.match token "[\n]")
        (do
          (set new-message (.. new-message (string.sub message line-start i)))
          (set line-start (+ i 1))))

      ;; Check for the limit
      (if (= i (- (+ line-start limit) 1))
        (do
          ;; Override last-safe-breakpoint in the event you have a word longer
          ;; than the limit.
          (if (or (= last-safe-breakpoint nil)
                  (< last-safe-breakpoint line-start))
              (set last-safe-breakpoint (- (+ line-start limit) 1)))
          (set new-message
               (.. new-message
                   (string.sub message line-start last-safe-breakpoint) "\n"))
          (set line-start (+ last-safe-breakpoint 1))))

      ;; Every space is stored as a potential breakpoint
      (if (= token " ") (set last-safe-breakpoint i))

      ;; Iterate
      (set i (+ i 1))))
  (.. new-message (string.sub message line-start)))

(fn mission-complete? []
  (var complete? true)
  (each [i c? (pairs s.mission.flags-needed)]
    (when (not c?) (set complete? false)))
  complete?)

(local modes {})

;; dialog

(fn get-string-height [input]
  "Gets total number of newlines, plus one, and multiplies that by character
  height."
  (var height 1)
  (each [newline (string.gmatch input "[\n]")]
    (set height (+ height 1)))
  (* height CHAR-HEIGHT))

(fn reset-dialog []
  (set s.dialog nil))

(fn any-key-to-continue []
  (for [i 0 7]
    (when (btn i) (reset-dialog))))

(fn txt-dialog [msg answer]
  {:title msg :choices [(or answer "OK")] :choice 1 :select reset-dialog})

(fn draw-dialog [menu]
  (let [margin 12 m2 14
        cmargin (+ 26 (get-string-height menu.title))]
    (rect margin margin (- W (* margin 2) 1) (- H (* margin 2) 1) 10)
    (rectb m2 m2 (- W (* m2 2) 1) (- H (* m2 2) 1) 14)
    (print menu.title 32 28)
    (each [i c (ipairs menu.choices)]
      (print c 64 (+ cmargin (* 12 i))))
    (print ">" 54 (+ cmargin (* 12 menu.choice)))))

(fn run-dialog [menu]
  (draw-dialog menu)
  (when (btnp 0)
    (do
      (play-sfx 1)
      (set menu.choice (math.max 1 (- menu.choice 1)))))
  (when (btnp 1)
    (do
      (play-sfx 1)
      (set menu.choice (math.min (# menu.choices) (+ menu.choice 1)))))
  (when (btnp 4) (menu:select)))

(fn set-dialog [func] (set s.dialog (partial run-dialog func)))

(fn rm-trigger [tile] (tset s.mission.triggers tile nil))

(fn tdialog [tile text answer]
  (let [wrapped-text (apply-word-wrap text 35)]
    (fn []
      (if (= :table (type tile))
          (each [_ t (ipairs tile)] (rm-trigger t))
          (rm-trigger tile))
      (set-dialog (txt-dialog wrapped-text answer)))))

(fn tdialog? [tile text condition]
  (let [wrapped-text (apply-word-wrap text 35)]
    (fn []
      (when (condition)
        (rm-trigger tile)
        (set-dialog (txt-dialog wrapped-text))))))

;; real-time message
(fn msg [m time color]
  (table.insert s.msgs [(apply-word-wrap m 45) time color]))

(local mission1-triggers
  {10 (tdialog 10 "BUDDY! welcome to the party! keep your hands and legs inside the ride at all times. use your arrow keys to move around.\n\nand uh, press Z to select a response after selecting one with your arrow keys." "...I know how to move, Bit.")
   26 #(let [dialog-func (tdialog 26 "HA! Look at that mocking, red wavy line. As if that firewall could prevent my tomfoolery. look around for an account server and snag some credentials. And don't forget to pay attention to the IP addresses and names in the lower left-hand corner. You know how it's done." "You got it.")]
         (if (not (. s.mission.creds 5)) (dialog-func)))
   42 (tdialog 42 "those are some tougher, anti-jack patrols ahead. looks like Digital Craftmakers don't want us in there. I know it's tempting, but we're just here to prank my friend. let's go around.")
   58 (tdialog 58 "see that over-sized french fry in the distance? the yellow one? that's a security tower. they consistently spawn anti-jack instances and are generally anti-fun. Also anti-cool. And anti--" "I think I got the point.")
   74 (fn []
        (rm-trigger 74)
        (msg "captain's log server, star-date 41532" 120)
        (msg "it's unclear if we can fit more log servers\nnumber two" 160))
   90 #(let [dialog-func (tdialog 90 "okay pud, our DB is right behind that firewall...which that wimpy bug sentry is guarding. they're tenacious and will chase you, but their battle mode is easy. just dodge until they run out of gas. otherwise, you'll get traced and your chrome will be as good as fried." "Yeah, yeah. This isn't my\nfirst spill, as they say.")]
         (if (not (. s.mission.creds 21)) (dialog-func)))
   106 #(let [dialog-func (tdialog 106 "SUCCESS! i don't understand my obsession with butts either, but here we are. i think you're ready for the Spilljackers, pink!\n\nThe IO tower to jack-out should be just around the corner behind. see you in IRC3!" "Thanks Bit.")]
          (if (mission-complete?) (dialog-func)))})

(local mission2-triggers
       {26 (tdialog 26 "hey, i forgot to mention! firewalls won't let security programs thru. use that to your advantage.\n\nthere should be a DB in this area with the logs we're looking for." "Oh, right. Thanks!")
        42 (tdialog 42 "security towers charge up their orange bars before sending those anti-jack bastards after you.\n\nremember, if it's all yellow, it's all clear, but if you see a strip, it's time to dip, even if it only sends one at a time.." "Yup!")
        58 (tdialog 58 "oh farg, we got a security tower on the right. watch out. that's gonna send some trouble this way if we stick around." "You just HAD to say\nleft, huh?")
								74 (tdialog 74 "after you get these creds, head back, past the database." "Got it.")
								106 (tdialog [106 122 138] "ok, now that we have the data, we need to get out of here. some creds are beyond the security tower behind you. try heading there." "Great. First you tell me \n to go away from security, \n now you tell me to go \n towrds them?")
								90 (tdialog 90 "now, get this security, get the creds, and head the other way. an IO tower is back there." "Out of the frying pan, \n into the fire ...")})

(local mission4-triggers
       {10 (tdialog 10 "hey, aimes here. we've got a plan, we can do this. the physical side of the operation will be headed by turingVertigo.\n\nwe're focusing on the cyber side, which means unlocking doors and disabling security subsystems." "Let me at 'em")
        26 (tdialog 26 "first step is to kill the cameras. they're controlled by a node near here.")
        42 (tdialog? 42 "great--cameras are down! now to cause a distraction. for that we'll head back thru a ways." #(. s.mission.flags-needed 1))
        58 (tdialog? 58 "the door control for low-security cells is right ahead.\n\nthat won't let us unlock bitcrush, but opening a bunch of doors here will definitely mix things up and cause some chaos. always love some quality chaos."
                     #(. s.mission.creds 53))
        74 (tdialog 74 "I read about this; it's where they test new models of security programs. those exas are probably modified to be extra nasty--let's hope those firewalls hold.")
        90 (tdialog 90 "we're getting close, but watch out; I'm reading unusually high IOPS in the neighboring hosts. straight ahead is the subnet junction--might need to make a break for it." "gulp")
        106 (tdialog? 106 "the security programs can't follow us here in subnet! high-security cell control is on the right; let's go!"
                      #s.subnet?)
        122 (tdialog? 122 "wait no! we're flipped around now. it's uhh.... it's left." #s.subnet?)
        138 (tdialog? 138 "turingVertigo reports bitcrush's cell has opened! great work. but we still gotta get out of here."
                      #(. s.mission.flags-needed 81))
        154 (tdialog 154 "bitcrush is on their way out; mission accomplished. I know it breaks your heart to pass by all these juicy databases, but hit the I/O tower and jack out.")
})

(fn handler2 []
  (msg "we're not in the kiddie pool any more, so prep for some nastier bots.")
  (msg "if you get traced, it's all over.")
  (msg "and I'm not ready for a pinkthunder-less world.")
  (while (. s.msgs 1) (coroutine.yield))
  (when (and (< s.x 40) (< s.y 40))
    (msg "let's, uh... try going left?"))
  (while true (coroutine.yield)))

(fn handler3 []
  (while (< 197 s.x) (coroutine.yield))
  (msg "> so if we find the evidence, what then?" 90 9)
  (msg "> we're not like ... taking it to the cops?" 70 9)
  (msg "hah. cops have spent decades looking the other way for encom." 100)
  (msg "> I guess making a public splash is the best we can do" nil 9)
  (msg "with some luck it'll hit them in their share price, where it can't be ignored.")
  (while (not (. s.mission.flags-needed 1)) (coroutine.yield))
  (msg "> you think the workers at encom know?" nil 9)
  (msg "some of 'em gotta have suspicions.")
  (while (or (< 64 s.x) (< s.y 655)) (coroutine.yield))
  (msg "we're getting some weird signals from up ahead around the corner.")
  (msg "their IOPS are off the charts.")
  (while true (coroutine.yield)))

(local missions
       [{:start {:x 1910 :y 1044 :r math.pi} :id 1
         :bounds {:min-x 210 :min-y 120 :max-x 235 :max-y 135}
         :db-commands {1 "Rename octo's gear\nto 'Butt Stuff' (Ugh.)"}
         :chat ["(The year is 2041.)"
  "(You've fallen asleep to the CRT glow.)"
  "(Like many, you surf day after day...)"
  "(looking for something better.)"
  "unknown: wake up, kid."
  "..."
  "unknown: I said, WAKE UP."
  "unknown: WAKE UP!"
  ""
  "(The TTV's read of CAPS snaps you awake.)"
  ""
  "> How did you get access to my deck?"
  "unknown: relax, pud. you know me."
  "> Talk."
  "unknown: 2031 was the year our Chrome"
  "  House won the Spike trophy. You, the"
  "  transistor dykes, and me. No one saw that"
  "  DNS poisoning coming!"
  "> ...No fargin' way! ..bitcrush!?"
  "bitcrush: haha. hey buddy! I had you going."
  "  I'd hug you, but this is IRC3."
  "> Wow! Long time, no talk."
  "> To what do I owe this tremendous honor?"
  "bitcrush: I want you to join Spilljackers."
  "  there will be excitement, adventure,"
  "  and honestly....we're getting crusty."
  "  plus, we have some big stuff coming!"
  "> You know I'm not up for that kind of heat."
  "bitcrush: yeah, I know--you told me."
  "  but just like you insist on proper grammar"
  "  ..i'm gonna insist. =)"
  "(Their lowercase makes you bite your lip.)"
  "bitcrush: look, we're onto something."
  "  It could really dent this pitzered world."
  "  AND you hate megacorps as much as I do."
  "(They got that right.)"
  "> ..."
  "bitcrush: ride shotgun with me on something"
  "  simple. i swear to motherboard pink, i"
  "  will lower-case every damn i if it's the"
  "  last thing *i* do."
  "> Farg...OK. Let me brew some nutri-coffee."
  "bitcrush: that garbage is gonna kill you. =P"
  "  anyway, we're hackin' Tremendous Quest IV."
  "> Huh?"
  "bitcrush: to rename my buddy, octo's gear..."
  "  Octo's a bit of a pill and I love messing"
  "  with them. It'll be the perfect intro!"
  "  89.23.1.234:47 ... I'll be waiting."
  "[bitcrush has left the chat]"
  ""
  "(Well.. Guess you found something better.)"
  "[Press Z to continue]"]
         :triggers mission1-triggers}
        ;; mission 2
        {:start {:x 12 :y 12 :r 0} :id 2
         :bounds {:min-x 0 :min-y 0 :max-x 59 :max-y 68}
         :email-metadata "Date: Aug 19, 2041, 11:06 AM UTC\nFrom: unknown <w89d8wd@olp2hj37>\nSubject: Fwd: next job\nMessage-Id: 8c5c-00247edf9e14\n"
         :email-content "Alright pud, read the email below. I'll be providing you support once you're in.\n\n- B\n\n---- ORIGINAL MESSAGE ----Date: Aug 18, 2041, 5:43 AM UTC\nFrom: unknown <8cm5id9j@vm8w92as>\nSubject: next job\nMessage-Id: 11ea-35c0b348fa40\n\nHey B,\n\nGot a regular B&E job for you. The silverbacks over at Encom and even some pushers from the Sinothei crime family have been collaborating with the state in KC. Ordinarily, we wouldn't bat an eye at this, but the spill potential from these dealings reportedly has the potential to shatter Encom and spark the revolution.\n\nAnd let's be honest. I enjoy a match of tagball with their spikes and malware as much as the next person, but I'm tired of playing defense against these suits.\n\nLuckily for us, the Sinothei crime family has a regular Fredo who is obsessed with virtual reality aqua parties and he ain't too good with security. Rumor has it that he's a regular at a virtual joint in the P&L and often uses his work deck to party. The place is called Digital Destiny. We have a sympathizer who runs the VR cluster and has root access, so door's wide open.\n\n I need you to jack in, download chat logs and access tokens, scrub your entry, and get out. This should be straight forward, but don't get cute. Digital Destiny may be a shlock name, but their security system isn't.\n\nAnd bring backup. Maybe the newb.\nEvery new Spilljacker needs to get initiated eventually.\n\n- K"
         :handler (coroutine.wrap handler2)
         :db-commands {1 "Scan redacted logs"}
         :triggers mission2-triggers
         :chat ["/connect irc://a9c22e6a-7296.onion..."
 "/join #spilljackers" ""
 "[pinkthunder has joined the channel]"
 "dedust: ... who's this?"
 "bitcrush: he's cool; I invited him"
 "> Uh, hi everyone? I'm pinkthunder. (he/him)"
 "aimes: bitcrush you gotta give it a rest"
 "  you keep bringing in starry-eyed recruits"
 "  dreaming of bein' some hi-tech robin hood"
 "bitcrush: hey now! simmer down aimes."
 "  I took him on a run first and he"
 "  ain't no clown."
 "dedust: hey! I resemble that remark."
 "> You don't trust me. I get it."
 "bitcrush: we'll show 'em."
 "  puds, don't we have another lead to try?"
 "turingVertigo: you mean that encom leak?"
 "bitcrush: yeah! those stemless turds"
 "dedust: nothing but posh ties & silverbacks"
 "aimes: damn it bitcrush..."
 "bitcrush: what do you think, pinkthunder?"
 "  want to try taking on encom?"
 "> Let's do it."
 "[aimes has left the channel]" "" "" "[Press Z to continue]"]}
        ;; mission 3
        {:start {:x (* 8 29) :y (* 8 84) :r 2}
         :bounds {:min-x 0 :max-x 59 :min-y 68 :max-y 101 }
         :handler (coroutine.wrap handler3)
         :db-commands {1 "download email archive"
                       33 "download audit files"}
         :chat ["/connect irc://a9c22e6a-7296.onion..."
 "/join #spilljackers" ""
"[pinkthunder has joined the channel]"
"bitcrush: have you SEEN these chat logs?"
"dedust: just grepped for a few keywords"
"  so far but yeahhhh"
"> What'd you find?"
"aimes: this is no joke; dude seems spooked"
"bitcrush: there's definitely a coverup here."
"  he was regional manager for the Atlanta"
"  branch--well, you know. back when there"
"  was an Atlanta."
"dedust: you don't think encom was involved"
"  with The Incident?"
"> They said that was a natural disaster."
"aimes: hah! don't tell me you believe that."
"bitcrush: pinkthunder: I'll forward you some"
"  details. the logs included creds for an"
"  account at ellingson, an encom subsidiary"
"  that was implicated."
"turingVertigo: so you're gonna take a peek?"
"[bitcrush has left the channel]"
"aimes: don't do anything foolish, bit"
"turningVertigo: welp; guess that answers"
"   my question."
"aimes: every damn time." "" "" "[Press Z to continue]"]}

        ;; mission 4
        {:start {:x (* 182 8) :y (+ 4 (* 35 8))}
         :bounds {:min-x 180 :min-y 34 :max-x 209 :max-y 65}
         :db-commands {1 "Disable cameras"
                       17 "Unlock all cells in block T17"
                       81 "Unlock cell Q9-F31"}
         :triggers mission4-triggers
:chat ["/connect irc://a9c22e6a-7296.onion..."
 "/join #spilljackers" ""
"[pinkthunder has joined the channel]"
"aimes: what .. happened to bitcrush?"
"> they, uh... I'm not sure"
"dedust: I'm reading a deadswitch alert."
"  they must have gotten traced..."
"turingVertigo: and tossed in a van."
"aimes: don't panic; we can get them back."
"> how??"
"aimes: encom detention center just"
"  installed netCells--all controlled"
"  from their dataplane."
"dedust: you want to hack IN to a prison??"
"> in a gibson like that--we'd fry in seconds!"
"aimes: in a normal deck, sure!"
"  but while you silverbacks were pissing"
"  around... I managed to procure a Hosaka"
"  Mark 7."
"turingVertigo: that new deck that can jack"
"  into subnet?!"
"aimes: better believe it"
"> this ... this could work. I'm in."
"dedust: yall are unbelievable. but I love it."
"> hang in there bitcrush!" "" "" "" "[Press Z to continue]"]}])

;; Allow other missions to be played if they've been added to the map
;; even if the code doesn't know about them!
(fn get-mission [n]
  (let [m (or (. missions n)
              {:email-briefing-metadata "Subject: UNKNOWN"
               :email-briefing-content "Proceed with caution."
               :start {:x (* 8 4) :y (* 8 (+ 8 (* 17 (- n 1))))}
               :bounds {:min-x 0 :min-y (* 17 (- n 1)) :max-x 60 :max-y (* 17 n)}})]
    (set m.id n)
    (when (not m.triggers) (set m.triggers {}))
    (when (not m.db-commands) (set m.db-commands {}))
    m))

;;;; lost mode

(fn lost []
  (cls)
  (print "GAME OVER\n\n   YOU GOT\n\n  TRACED" 20 20 15 false 3)
  (print "press Z to try again." 100 126 2)
  (sfx -1 0 0 1)
  (sync 4 0 false) ; undo mset calls
  (when (btnp 4)
    (modes.start-mission s.mission.id)
    (modes.activate-chat)))

;;;; battle mode

(local (BW BH BS BL BR) (values 80 80 6 24 103))
(local bs {}) ;; battle state!

;; enemies

(fn hit! [?dmg]
  (play-sfx 4)
  (when (<= bs.inv 0)
    (set (s.traced bs.inv) (values (- s.traced (or ?dmg 1)) 40))
    (when (<= s.traced 0)
      (global TIC lost))))

(local bug {:name "bug" :cooldown 140 :shots 4 :spawns [[BL BL] [BR BR]]})
(local recognizer {:name "recognizer" :cooldown 60 :shots 8 :rv 0.03
                   :spawns [[90 60 0]]})
(local spectre {:name "spectre" :cooldown 90 :shots 6
                :spawns [[BL 50] [BR 70] [40 40]]})
(local exa {:name "exa" :cooldown 140 :shots 6 :spawns [[BL BL]] :vx 1
            :spike-cooldown 30})

(local quadrec {:name "quadrec" :cooldown 30 :shots 32 :rv 0.05
                :spawns [[0 0 0] [0 0 (/ math.pi 2)]
                         [0 0 math.pi] [0 0 (* math.pi 1.5)]]})

(fn bug.move [e]
  (while (< e.x BR)
    (set e.x (+ e.x 1)) (coroutine.yield))
  (while (< e.y BR)
    (set e.y (+ e.y 1)) (coroutine.yield))
  (while (< BL e.x)
    (set e.x (- e.x 1)) (coroutine.yield))
  (while (< BL e.y)
    (set e.y (- e.y 1)) (coroutine.yield))
  (bug.move e))

(fn bug.attack [e]
  (set e.cooldown (+ 30 (math.random 100)))
  (let [dx (- bs.x e.x) dy (- bs.y e.y) d (dist bs.x bs.y e.x e.y)]
    (play-sfx 5)
    (table.insert bs.shots {:x (+ e.x 4) :y (+ e.y 4) :from e
                            :vx (/ dx d) :vy (/ dy d) :c 15})))

(fn beam-sfx [e]
  (when (= e.cooldown 50)
    (play-sfx 6))
  (when (= e.cooldown 1)
    (sfx -1 32 -1 1 8)))

(fn recognizer.move [e]
  (beam-sfx e)
  (set e.r (% (+ e.r e.rv) tau))
  (set e.x (+ 60 (* 50 (math.cos e.r))))
  (set e.y (+ 60 (* 50 (math.sin e.r))))
  (coroutine.yield)
  (recognizer.move e))

(fn recognizer.attack [e cooldown]
  (set e.cooldown (or cooldown 120))
  (let [r (+ (math.random BW) 20)]
    (match (math.random 4)
      1 (set (e.tx e.ty) (values r (- BL 1)))
      2 (set (e.tx e.ty) (values (+ BR 1) r))
      3 (set (e.tx e.ty) (values r (+ BR 1)))
      4 (set (e.tx e.ty) (values (- BL 1) r)))))

(fn quadrec.move [e]
  (beam-sfx e)
  (set e.r (% (+ e.r e.rv) tau))
  (set e.x (+ 60 (* 50 (math.cos e.r))))
  (set e.y (+ 60 (* 50 (math.sin e.r))))
  (when (and (not bs.hijack) (<= s.traced 3) (= s.mission.id 3)
             (< s.traced (math.max 2 bs.start-traced)))
    (set (bs.hijack bs.vx bs.vy) (values 0 0 0))
    (set bs.msgs ["This ... wasn't supposed\nto happen."
                  "I can't let them get you."
                  "This is my fault."
                  "... I can ... stop them."]))
  (coroutine.yield)
  (quadrec.move e))

(fn quadrec.attack [e] (recognizer.attack e 90))

(fn spectre.move [e]
  (when (and (< 90 e.cooldown 100) e.ox)
    (let [distance (dist e.ox e.oy e.tx e.ty)
          close (/ (- e.cooldown 110) 20)
          dx (- e.ox e.tx) dy (- e.oy e.ty)
          th (math.atan2 dy dx)]
      (set e.x (+ e.ox (* 1.5 close distance (math.cos th))))
      (set e.y (+ e.oy (* 1.5 close distance (math.sin th))))))
  (coroutine.yield)
  (spectre.move e))

(fn spectre.attack [e]
  (set (e.tx e.ty) (values bs.x bs.y))
  (set (e.ox e.oy) (values e.x e.y))
  (set e.cooldown (+ 120 (math.random 60))))

(fn spike-hit? [[x y _ l]]
  (and (<= (- bs.x 3) x (+ bs.x 3)) (<= y bs.y (+ y l))))

(fn exa.attack [e]
  (play-sfx 7)
  (set e.cooldown 140)
  (each [_ spike (ipairs e.spikes)]
    (when (= 0 (. spike 3))
      (tset spike 3 (+ 0.8 (math.random) (math.random) (math.random))))))

(fn exa.move [e]
  (when (not (<= BL e.x BR))
    (set e.vx (- e.vx)))
  (set e.spike-cooldown (- e.spike-cooldown 1))
  (when (<= e.spike-cooldown 0)
    (play-sfx 8)
    (set e.spike-cooldown (+ 10 (math.random 20)))
    (table.insert e.spikes [e.x BL 0 BL 10]))
  (if (and (= 1 e.shots) (< e.cooldown 60))
      (set e.shots 0) ; don't end the last shot mid-sequence
      (< 5 e.cooldown 30)
      (set e.y (- BL (- 30 e.cooldown)))
      (< e.cooldown 5)
      (set e.y (math.min BL (- BL (* 6 e.cooldown))))
      (set e.y BL))
  (set e.x (+ e.x e.vx))
  (each [_ spike (ipairs e.spikes)]
    (let [[x y vy l] spike]
      (tset spike 2 (+ y vy))
      (when (spike-hit? spike)
        (hit! 2))))
  (coroutine.yield)
  (exa.move e))

(local enemy-types {32 bug 48 recognizer 64 spectre 80 exa 96 quadrec})

(fn beam-active? [e]
  (or (and e.tx e.recognizer? (< e.cooldown 50))
      (and bs.bitcrush bs.bitcrush.target?)))

(fn update-battle-enemy [enemy i]
  (enemy:move)
  (set enemy.cooldown (- enemy.cooldown 1))
  (when (< (dist bs.x bs.y enemy.x enemy.y) 6)
    (hit!))
  (when (and (beam-active? enemy)
             (intersection enemy.x enemy.y enemy.tx enemy.ty
                           bs.x bs.y (+ bs.x BS) (+ bs.y BS)))
    (hit!))
  (when (<= enemy.cooldown 0)
    (set enemy.shots (- enemy.shots 1))
    (enemy:attack)
    (when (<= enemy.shots 0)
      (table.remove bs.enemies i))))

(fn make-enemies [s]
  (let [etype (. enemy-types s)]
    (each [_ [x y r] (ipairs etype.spawns)]
      (let [enemy {: x : y : r : s :update update-battle-enemy}]
        (each [k v (pairs etype)] (tset enemy k v))
        (set enemy.recognizer? (or (= s 48) (= s 96)))
        (set enemy.cooldown (* enemy.cooldown (+ 0.5 (math.random))))
        (set enemy.type etype)
        (set enemy.spikes [])
        (set enemy.move (coroutine.wrap etype.move))
        (set enemy.ip (: "10.2.%d.%d" :format (math.random 256) (math.random 256)))
        (when enemy.init (enemy:init))
        (table.insert bs.enemies enemy)))))

(fn bpos-ok? [x y] (and (<= BL x BR) (<= BL y BR)))

(fn end-battle []
  (set s.inv 240) ; avoid stunlock
  (global TIC modes.nav)
  (play-music 0 true))

(fn update-battle []
  (set (bs.x bs.vx bs.y bs.vy) (new-pos bs.x bs.y (* bs.vx 0.85) (* bs.vy 0.85)
                                        bpos-ok? 0.7))
  (set bs.inv (- bs.inv 1))
  (when (and (= 0 (# bs.enemies)) (= 0 (# bs.shots)))
    (end-battle))
  (for [i (# bs.enemies) 1 -1]
    (: (. bs.enemies i) :update i))
  (for [i (# bs.shots) 1 -1]
    (let [s (. bs.shots i)]
      (set (s.x s.y) (values (+ s.x s.vx) (+ s.y s.vy)))
      (when (not (and (< BL s.x BR) (< BL s.y BR)))
        (table.remove bs.shots i))
      (when (and (<= bs.x s.x (+ bs.x BS)) (<= bs.y s.y (+ bs.y BS)))
        (table.remove bs.shots i)
        (hit!)))))

(fn input-battle []
  (when (btn 0) (set bs.vy (- bs.vy bs.spd)))
  (when (btn 1) (set bs.vy (+ bs.vy bs.spd)))
  (when (btn 2) (set bs.vx (- bs.vx bs.spd)))
  (when (btn 3) (set bs.vx (+ bs.vx bs.spd))))

(fn enemy-status [e]
  ["" (.. "type: " (e.type.name:upper)) (.. "ip: " e.ip)
   (.. "pattern: " (: (tostring e.type) :sub 7 13))
   (: "remaining: %0.2f" :format (/ e.shots e.type.shots))])

(fn enemy-statuses [es]
  (let [msgs ["SECURITY SCAN"]]
    (each [_ e (ipairs es)]
      (table.insert msgs (table.concat (enemy-status e) "\n")))
    (table.concat msgs "\n")))

(fn draw-battle []
  (cls)
  (rectb BL BL BW BH 2)
  (let [full-trace-w 200]
    (rectb 0 126 full-trace-w 8 5)
    (rect 0 126 (* full-trace-w (/ s.traced full-trace)) 8 5))
  (rectb 136 6 110 110 7)
  (print "@" (- bs.x 3) (- bs.y 3) (if (<= 0 bs.inv) 14 15))
  (match bs.bitcrush {: x : y} (print "@" x y 13))
  (print (enemy-statuses bs.enemies) 140 14)
  (when (and bs.msgs (. bs.msgs 1))
    (print (. bs.msgs 1) 4 4))
  (match bs.msgs [msg] (print msg 4 4))
  (each [_ e (ipairs bs.enemies)]
    (spr e.s (- e.x 4) (- e.y 4) 0)
    (when (and e.recognizer? e.tx (< e.cooldown 90)) ; recognizer target
      (circb e.tx e.ty 2 14))
    (when (beam-active? e)
      (line e.x e.y e.tx e.ty 3))
    (when (and (= e.s 64) (< 100 e.cooldown) e.ox)
      (circb e.x e.y (* 1.5 (- e.cooldown 100)) 2))
    (each [_ [sx sy _ l l2] (ipairs (or e.spikes []))]
      (line (- sx 1) sy (- sx 1) (+ sy l2) 15)
      (line sx sy sx (+ sy l) 15)
      (line (+ sx 1) sy (+ sx 1) (+ sy l2) 15)))
  (each [_ s (ipairs bs.shots)]
    (pix s.x s.y s.c)))

(local hmsg-time 120)

(fn update-bitcrush [t]
  (when (= 0 (% (+ 1 bs.hijack) 120))
    (table.remove bs.msgs 1))
  (let [msg-num (// t hmsg-time)]
    (when (= 3 msg-num)
      (set bs.bitcrush {:x 160 :y 160}))
    (when (and (< 3 msg-num) (= bs.vx 0))
      (let [dx (- bs.bitcrush.x bs.x)
            dy (- bs.bitcrush.y bs.y)
            th (math.atan2 dy dx)]
        (set (bs.bitcrush.x bs.bitcrush.y) (values (+ bs.x (* dx 0.9)) (+ bs.y (* dy 0.9))))
        (when (< dx 1)
          (set bs.bitcrush.target? true)
          (set (bs.vx bs.vy) (values (- dx) (- dy))))))
    (set (bs.x bs.y) (values (+ bs.x bs.vx) (+ bs.y bs.vy)))
    (when (and bs.bitcrush bs.bitcrush.target?)
      (each [_ e (ipairs bs.enemies)]
        (let [dx (- bs.bitcrush.x e.tx)
              dy (- bs.bitcrush.y e.ty)]
          (set (e.tx e.ty) (values (+ e.tx (* dx 0.05)) (+ e.ty (* dy 0.05))))
          (play-sfx 6)
          (when (< dx 1)
            (set bs.bitcrush.x (+ bs.bitcrush.x (- (math.random 3) 2)))
            (set bs.bitcrush.y (+ bs.bitcrush.y (- (math.random 3) 2)))))))
    (when (= 7 msg-num)
      (sfx -1 32 -1 1 8)
      (modes.start-mission (+ s.mission.id 1))
      (modes.activate-chat))))

(fn modes.battle []
  (draw-battle)
  (if bs.hijack
      (do (set bs.hijack (+ bs.hijack 1))
          (set bs.inv 60) ;; don't get hurt during hijack
          (update-bitcrush bs.hijack)
          (when (= 0 (% bs.hijack (+ 1 (// bs.hijack 20))))
            (update-battle))) ; update but slow down as we go
      (do
        (input-battle)
        (update-battle))))

(local original-line line)
(local original-pix pix)
(var rotation 0)

(fn rotate [x y]
  (let [d (dist x y MW MH)
        th (+ rotation (math.atan2 (- y MH) (- x MW)))]
    (values (+ MW (* d (math.cos th))) (+ MH (* d (math.sin th))))))

(fn rline [x1 y1 x2 y2 c]
  (let [(nx1 ny1) (rotate x1 y1)
        (nx2 ny2) (rotate x2 y2)]
    (original-line nx1 ny1 nx2 ny2 c)))

(fn rpix [x y c]
  (let [(nx ny) (rotate x y)]
    (original-pix nx ny c)))

(fn draw-rotated [draw target-r done]
  (set _G.line rline)
  (set _G.pix rpix)
  (set rotation (+ rotation 0.1))
  (when (< target-r rotation)
    (done))
  (draw))

(fn wipe [draw done]
  (set s.transition (+ s.transition 8))
  (when (< W s.transition) (done))
  (draw)
  (for [c 0 W]
    (when (or (< c s.transition) (< c (+ s.transition (math.random 64))))
      (line c 0 c H 10))))

(fn activate-battle [e]
  (set (rotation _G.pix _G.line) (values 0 original-pix original-line))
  (global TIC modes.battle)
  (play-music 1 true)
  (set (bs.x bs.y bs.vx bs.vy bs.spd bs.inv) (values 70 70 0 0 0.15 0))
  (set (bs.shots bs.enemies bs.hijack bs.bitcrush) (values [] [] nil nil))
  (set bs.start-traced s.traced)
  (make-enemies e.spr))

(fn modes.transition-battle [e]
  (set s.transition 0)
  (global TIC (partial wipe modes.nav-draw (partial activate-battle e))))

;;;; email mode

(var email-state {
  :content ""
  :content-height 0
  :meta-content ""
  :meta-content-height 0
  :height 0
  :scroll-position 0
  :scroll-marker-height 0
  :show-scroll-marker true
})

(fn input-email [state]
  (when (btn 0)
    (set state.scroll-position
      (math.max (- EMAIL-PADDING) (- state.scroll-position 2))))
  (when (btn 1)
    (set state.scroll-position
      (math.min (+ (- state.height H) EMAIL-PADDING)
                (+ state.scroll-position 2))))
  (when (btnp 4)
    (modes.activate-nav)))

(local scrollbar-x (- SCREEN-WIDTH TILE-SIZE))
(local scrollbar-height (- SCREEN-HEIGHT (* TILE-SIZE 2)))

(fn draw-scrollbar [state]
  (spr 511 scrollbar-x (- SCREEN-HEIGHT TILE-SIZE) 0 1)
  (spr 511 scrollbar-x 0 0 1 0 2)
  (for [y TILE-SIZE scrollbar-height TILE-SIZE]
    (spr 495 scrollbar-x y 0 1))
  (let [pos (+ 10 (/ state.scroll-position 3.2))]
    (rect scrollbar-x pos TILE-SIZE state.scroll-marker-height 6)))

(fn draw-email []
  (cls 10)
  (let [metadata-y (- email-state.scroll-position)
        content-y (- email-state.metadata-height email-state.scroll-position)]
    (print email-state.metadata EMAIL-PADDING metadata-y 15 true 1)
    (print email-state.content EMAIL-PADDING content-y 9 true 1))
  (draw-scrollbar email-state))

(fn modes.email []
  (input-email email-state)
  (draw-email))

(fn set-scroll [state]
  (let [scroll-ratio (/ SCREEN-HEIGHT state.height)]
      (set state.scroll-marker-height (math.floor (* scrollbar-height scroll-ratio)))
      (set state.scroll-marker-bottom (- SCREEN-HEIGHT TILE-SIZE state.scroll-marker-height))
      (set state.scrollbar-speed (/ scrollbar-height state.height))))

(fn modes.activate-email [override]
  (let [{:email-content content :email-metadata metadata} (or override s.mission)]
    (play-music 0)
    (set email-state.scroll-position (- EMAIL-PADDING))
    (set email-state.content (apply-word-wrap content EMAIL-WORD-WRAP))
    (set email-state.content-height (get-string-height email-state.content))
    (set email-state.metadata (apply-word-wrap metadata EMAIL-WORD-WRAP))
    (set email-state.metadata-height (+ (get-string-height email-state.metadata)
                                        CHAR-HEIGHT))
    (set email-state.height (+ email-state.content-height
                               email-state.metadata-height))
    (set-scroll email-state))
  (global TIC modes.email))

;;;; chat mode

(local chat-state {:timer 70})

(fn draw-chat [lines]
  (cls 10)
  (for [i 1 lines]
    (let [msg (. s.mission.chat i)
          color (or (. {">" 9 "[" 4 "/" 6 "(" 12} (msg:sub 1 1)) 15)]
      (print msg EMAIL-PADDING (- (* i 8) chat-state.scroll-position) color))))

(fn modes.chat []
  (set chat-state.progress (+ chat-state.progress 1))
  (let [line-count (math.min (// chat-state.progress 60) (# s.mission.chat))]
    (set chat-state.height (+ 8 (* line-count 8)))
    (when (not chat-state.pressed?)
      (set chat-state.scroll-position (+ (- chat-state.height H) EMAIL-PADDING)))
    (modes.input-chat)
    (draw-chat line-count)))

(fn modes.input-chat []
  (when (btnp 4)
    (if (>= chat-state.height chat-state.max-scroll)
        (if s.mission.email-content
            (modes.activate-email)
            (modes.activate-nav))
        (do (set chat-state.pressed? true)
            (set chat-state.progress 999999)
            (set chat-state.scroll-position (- chat-state.max-scroll H)))))
  (when (btn 0)
    (set chat-state.pressed? true)
    (set chat-state.scroll-position (math.max (- chat-state.scroll-position 2)
                                              (- EMAIL_PADDING))))
  (when (btn 1)
    (set chat-state.pressed? true)
    (set chat-state.scroll-position (math.min (- chat-state.max-scroll H)
                                              (+ chat-state.scroll-position 2)))))

(fn modes.activate-chat []
  (play-music 0)
  (if s.mission.chat
      (do
        (set chat-state.scroll-position (- EMAIL-PADDING))
        (set chat-state.progress 0)
        (set chat-state.max-scroll (+ 8 (* (# s.mission.chat) 8)))
        (global TIC modes.chat))
      (global TIC modes.nav))
  (when (= 5 s.mission.id)
    (play-music 1)
    (global TIC modes.win)))

;;;; nav mode

(fn system-select [m]
  (match m.choice
    1 (if (music-enabled?)
          (do (pmem 0 1) (music))
          (do (pmem 0 0) (continue-music)))
    2 (pmem 1 (if (sfx-enabled?) 1 0))
    3 (set s.interleave (+ 1 (% s.interleave 2)))
    4 (do (set s.render (. {12 20 20 32 32 8 8 12} s.render))
          (tset m.choices 4 (.. "Render distance (" s.render ")")))
    5 (do (modes.start-mission s.mission.id)
          (modes.activate-chat)))
  (when (not= m.choice 4)
    (set (m.choice s.dialog) 1)))

(local system-menu
       {:title "Spilljackers"
        :choices ["Toggle music" "Toggle SFX"
                  "Toggle interleaving" "Render distance (12)"
                  "Restart mission" "Done"]
        :choice 1
        :select system-select})

;; db: connect to for mission objectives
;; app: these just get in the way
;; ldap: connect to and gain credentials
;; subnet: flip to underground
;; fw: block you unless you have credentials
;; io: start and stop positions
;; log: another blocking tile
;; sec: spawn enemies
;; infra: another blocking tile
(local host-types [:db :app :account :subnet :firewall :io :log :security
                   :infra :trigger])
(fn host-type [tile] (if (= 16 tile) :fence (. host-types (% tile 16))))

;; for the dialog system, each dialog is represented using a table
;; * title
;; * choices: labels for the options you can choose
;; * choice: current selection
;; * select: callback for when you select one; takes the menu as arg

(local db-commands ["Dump query" "Inject SQL" "Wipe data" "Reject inodes"])
(fn db-command [tile]
  (or (. s.mission.db-commands tile)
      (. db-commands (% tile (# db-commands))) "Download data"))

(fn db-menu [cx cy]
  {:title (.. "Oracle Pro DB v18.53 [" (ip-for cx cy) "]")
   :choices  [(db-command (mget cx cy)) "Cancel"]
   :choice 1
   :select (fn [m]
             (when (= m.choice 1)
               (play-sfx 2)
               ;; TODO: change color after you've downloaded
               (tset s.mission.flags-needed (mget cx cy) true))
             (when (= m.choice 2) (play-sfx 3))
             (reset-dialog))})

;; TODO: Add some technobabble when loading credentials
(fn account-menu [cx cy]
  {:title (.. "OpenLDAP Server [" (ip-for cx cy) "]")
   :choices ["Download credentials" "Cancel"]
   :choice 1
   :select (fn [m]
             (when (= m.choice 1)
               (play-sfx 2)
               ;; TODO: change color after you've downloaded
               (tset s.mission.creds (+ 2 (mget cx cy)) true))
             (when (= m.choice 2) (play-sfx 3))
             (reset-dialog))})

(fn upix [x y c] (original-pix (- W x) (- H y) c))

(fn uline [x1 y1 x2 y2 c]
  (let [nx1 (- W x1) ny1 (- H y1)
        nx2 (- W x2) ny2 (- H y2)]
    (original-line nx1 ny1 nx2 ny2 c)))

(fn done-subnet []
  (if s.subnet?
      (set (rotation s.ph _G.pix _G.line) (values math.pi 0.2 upix uline))
      (set (rotation s.ph _G.pix _G.line) (values 0 0.5 original-pix original-line)))
  (global TIC modes.nav))

(fn toggle-subnet []
  (set s.subnet? (not s.subnet?))
  (global TIC (partial draw-rotated modes.nav-draw
                       (if s.subnet? math.pi tau)
                       (partial done-subnet))))

(fn subnet-menu [cx cy]
  {:title (.. "Subnet portal [" (ip-for cx cy) "]")
   :choices  [(if s.subnet? "Leave subnet" "Enter subnet") "Cancel"]
   :choice 1
   :select (fn [m]
             (when (= m.choice 1)
               (play-sfx 2)
               (toggle-subnet))
             (when (= m.choice 2) (play-sfx 3))
             (reset-dialog))})

(fn io-menu [cx cy]
  {:title (.. "I/O Tower [" (ip-for cx cy) "]")
   :choices ["Exit dataplane" "Cancel"]
   :choice 1
   :select (fn [m]
             (when (= 2 m.choice) (play-sfx 3) (reset-dialog))
             (when (= 1 m.choice)
               (if (mission-complete?)
                 (when (not= (mget cx cy) 6) ; first IO tower is entry
                   (play-sfx 2)
                   (let [mission-num-by-tile (// (mget cx cy) 16)]
                     (modes.start-mission mission-num-by-tile)
                     (modes.activate-chat))
                   (reset-dialog))
                 (set (m.choices m.select)
                      (values ["Mission incomplete."]
                              #(do (reset-dialog) (play-sfx 3)))))))})

(fn spawn-enemy [spawner]
  (table.insert s.enemies {:x spawner.x :y spawner.y :spd 0.3
                           :c 9 :spr spawner.spr : spawner}))

(fn unlocked? [cx cy] (. s.mission.creds (mget cx cy)))

(fn nav-pos-ok? [tx ty]
  (let [cx (// tx 8) cy (// ty 8)]
    (match (host-type (mget cx cy))
      nil true
      :trigger true
      :app (= (mget cx cy) 98)
      :firewall (unlocked? cx cy))))

(fn thrust [spd]
  (set s.vx (math.min max-spd (+ s.vx (* spd (math.cos s.r)))))
  (set s.vy (math.min max-spd (+ s.vy (* spd (math.sin s.r))))))

(fn attempt-connect []
  (let [tx (+ s.x (* 8 (math.cos s.r))) ty (+ s.y (* 8 (math.sin s.r)))
        cx (// tx 8) cy (// ty 8)
        tile (mget cx cy)
        menu (match (host-type tile)
               :db (if (. s.mission.flags-needed tile)
                       (do (play-sfx 3) false)
                       (db-menu cx cy))
               :account (if (. s.mission.creds (+ 2 tile))
                            (do (play-sfx 3) false)
                            (account-menu cx cy))
               :subnet (subnet-menu cx cy)
               :io (io-menu cx cy))]
    (when menu
      (set-dialog menu))))

(fn nav-input []
  (when (and (btn 5) (btnp 7)) ; cheat
    (modes.start-mission (+ s.mission.id 1))
    (modes.activate-chat))
  (if s.dialog
      (s.dialog)
      (do
        (when (btn 0) (thrust spd))
        (when (btn 1) (thrust (- spd)))
        (let [tspd (if s.subnet? (- tspd) tspd)]
          (when (btn 2) (set s.r (% (- s.r tspd) tau)))
          (when (btn 3) (set s.r (% (+ s.r tspd) tau))))
        (when (btnp 4) (attempt-connect))
        (when (btnp 5) (tt :x s.x :y s.y))
        (when (btnp 6) (set-dialog system-menu))
        (set (s.x s.vx s.y s.vy) (new-pos s.x s.y (* s.vx 0.8) (* s.vy 0.8)
                                          nav-pos-ok? 0.7)))))

(fn cast-n [n d]
  (- (* 8 (if (< 0 d) (+ 1 (math.floor (/ n 8))) (- (math.ceil (/ n 8)) 1) )) n))

(fn cast [x y cos sin]
  (let [ny (cast-n y sin)
        nyx (/ (* ny cos) sin)
        nx (cast-n x cos)
        nxy (/ (* nx sin) cos)]
    (if (< (+ (* nx nx) (* nxy nxy))
           (+ (* ny ny) (* nyx nyx)))
        (let [cx (+ x nx) cy (+ y nxy)]
          (values cx cy (mget (// (+ cx cos) 8) (// cy 8))))
        (let [cx (+ x nyx) cy (+ y ny)]
          (values cx cy (mget (// cx 8) (// (+ cy sin) 8)))))))

(fn bottom-for [h tile cut]
  (let [cut (or cut (if (= :account (host-type tile)) 0.7 1))]
    (+ MH (* h s.ph cut))))

(fn effective-tile [htype tile]
  (if (. {:firewall true :db true :account true} htype) 1
      (. {:security true :io true} htype) 86
      tile))

(fn top-for [h tile cut]
  (let [htype (host-type tile)
        cut (or cut (if (= :account htype) 0.7 1))]
    (- MH (* h (+ (// (effective-tile htype tile) 16) (- cut s.ph))))))

(fn draw-enemy-stripe [col lens-factor ix iy e]
  (let [h (/ 800 (dist s.x s.y ix iy))
        top (top-for h 0)
        bottom (bottom-for h 0)
        billboard-dist (dist e.bx e.by ix iy)
        tx billboard-dist
        ty (// e.spr 2)]
    (textri col top (+ col 1) top (+ 1 col) bottom
            tx ty tx ty tx (+ ty 8) false 0)
    (pix col 0 5)))

(fn draw-enemies [col lens-factor rx ry nrx nry old-dist new-dist]
  (when (= line original-line)
    (each [_ e (ipairs s.enemies)]
      (when (<= e.dist new-dist)
        (match (intersection s.x s.y nrx nry e.ax e.ay e.bx e.by)
          (ix iy) (draw-enemy-stripe col lens-factor ix iy e))))))

(local skip-pix-types {:trigger true :firewall true})

(fn wall-stripe [col h tile x y top]
  (let [bottom (bottom-for h tile)
        htype (host-type tile)]
    (match htype
      :firewall (let [mid (// (+ top bottom) 2)
                      p (+ mid (* (math.sin (/ col 8)) h 0.2))
                      c (if (. s.mission.creds tile) 14 5)]
                  (for [i (math.max top (- p 3)) (math.min (+ p 9) bottom) 2]
                    (pix col i c)))
      :db (let [cut (/ 1 (% col 32))
                t2 (top-for h 1 cut) b2 (bottom-for h 1 cut)]
            (line col top col bottom 1)
            (line col t2 col b2 10)
            (pix col top 15))
      :io (line col top col bottom (if (= 0 (% col 2)) 6 14))
      :security (do
                  (line col top col bottom 8)
                  (when (= 0 (% col 2))
                    (let [spawner (. s.mission.spawns tile)
                          progress (* (- bottom top) spawner.counter)]
                      (line col top col (- bottom progress) 9))))
      :account (line col top col bottom (+ 1 (% col 3)))
      :subnet (line col top col bottom (+ 4 (% col 2)))
      :trigger nil
      _ (line col top col bottom (% tile 16)))
    (when (not (. skip-pix-types htype))
      (pix col top 15)
      (pix col bottom 14))))

(fn keep-looking? [top tile]
  (let [htype (host-type tile)]
    (and (not= 16 tile)
         (or (= :firewall htype) (= nil htype) (= :trigger htype)
             s.subnet? (<= 0 top)))))

(fn draw-ray [col [sin cos] lens-factor rx ry x y limit old-dist]
  (when (< 0 limit)
    (let [(nrx nry tile) (cast rx ry cos sin)
          new-dist (dist nrx nry x y)
          h (/ 800 (* new-dist lens-factor))
          top (top-for h tile)]
      (when (keep-looking? top tile)
        (draw-ray col [sin cos] lens-factor nrx nry x y (- limit 1) new-dist))
      (match tile
        0 (draw-enemies col lens-factor rx ry nrx nry old-dist new-dist)
        16 (pix col (bottom-for h tile) 10) ; network boundary
        _ (wall-stripe col h tile nrx nry top))
      (when (and (= col MW) (not= tile 0))
        (set s.target [nrx nry tile])))))

(fn update-billboard [e]
  ;; each enemy has ax,ay and bx,by; the endpoints of their "billboard" plane
  (let [cer (- (/ math.pi 2) (math.atan2 (- s.y e.y) (- s.x e.x)))]
    (set (e.ax e.ay) (values (+ e.x (* 4 (math.cos cer)))
                             (- e.y (* 4 (math.sin cer)))))
    (set (e.bx e.by) (values (- e.x (* 4 (math.cos cer)))
                             (+ e.y (* 4 (math.sin cer)))))))

(fn enemy-pos-ok? [x y]
  (match (host-type (mget (// x 8) (// y 8)))
    nil true :security true :trigger true))

(fn update-enemy [e i]
  (set e.dist (dist s.x s.y e.x e.y))
  (when (and (< e.dist 6) (<= s.inv 0))
    (modes.transition-battle e)
    (table.remove s.enemies i)
    (when e.spawner
      (set e.spawner.counter 1)))
  (update-billboard e)
  ;; move the enemy
  (let [d (math.atan2 (- s.y e.y) (- s.x e.x))
        dx (* e.spd (math.cos d)) nx (+ dx e.x)
        dy (* e.spd (math.sin d)) ny (+ dy e.y)]
    (set (e.x e.vx e.y e.vy) (new-pos e.x e.y dx dy enemy-pos-ok? 0.4))))

(fn draw-hud []
  (match s.target
    [tx ty tile] (let [cx (// tx 8) cy (// ty 8)
                       ip (ip-for cx cy)
                       target-type (host-type tile)]
                   (when (and (not= target-type nil) (not= target-type :trigger)
                              (not= target-type :fence))
                     (print (: "TARGET: %s (%s)" :format ip target-type) 4 128))))
  (when (. s.msgs 1)
    (let [[msg _ color] (. s.msgs 1)]
      (print msg 4 4 (or color 15))))
  (rectb 230 4 6 128 5)
  (let [h (* (/ s.traced full-trace) 128)]
    (rect 230 (- 132 h) 6 h 5)))

(fn modes.nav-draw []
  (set s.startcol (if (= s.startcol 1) 0 1))
  (for [col s.startcol W s.interleave]
    (line col 0 col MH 10)
    (line col MH col H 0)
    (let [th (math.atan (/ (- col MW) 100))]
      (draw-ray col [(math.sin (+ s.r th)) (math.cos (+ s.r th))]
                (math.cos th) s.x s.y s.x s.y s.render 0)))
  (draw-hud))

(fn nav-update []
  (when s.mission.handler (s.mission.handler))
  (let [tile (mget (// s.x 8) (// s.y 8))]
    (when (. s.mission.triggers tile)
      ((. s.mission.triggers tile))))
  (when (and (not s.dialog) (not s.subnet?))
    (each [_ spawner (pairs s.mission.spawns)]
      (when (< 0 spawner.counter)
        (set spawner.counter (- spawner.counter 0.005))
        (when (< spawner.counter 0)
          ;; enemy death will set the counter back up
          (spawn-enemy spawner))))
    (for [i (# s.enemies) 1 -1]
      (update-enemy (. s.enemies i) i)))
  (set s.inv (math.max 0 (- s.inv 1)))
  (when (and (. s.msgs 1) (not s.dialog))
    (set s.msg-timer (+ s.msg-timer 1))
    (when (= s.msg-timer (or (. s.msgs 1 2) 60))
      (set s.msg-timer 0)
      (table.remove s.msgs 1))))

(fn modes.nav []
  (nav-update)
  (modes.nav-draw)
  (nav-input))

(local spawner-sprites
       {40 32 120 32 136 32 152 32 ; bug
        56 48 168 48 184 48 200 48 ; recognizer
        72 64 216 64 232 64 ; spectre
        88 80 248 80 ; exa
        104 96}) ; quadrec

(fn init-tile [cx cy tile]
  (let [x (+ (* cx 8) 4) y (+ (* cy 8) 4)]
    ;; one of every DB host tile needs to be downloaded
    (when (= :db (host-type tile))
      (tset s.mission.flags-needed tile false))
    (when (= :security (host-type tile))
      (assert (not (. s.mission.spawns tile))
              (.. "Duplicate security " cx " " cy))
      (tset s.mission.spawns tile
            {: x : y :counter (math.random 4) :spr (. spawner-sprites tile)}))
    (when (. enemy-types tile)
      (mset cx cy 0)
      (spawn-enemy {: x : y :spr tile}))))

(fn modes.activate-nav []
  (play-music 0)
  (global TIC modes.nav))

(fn modes.start-mission [mission-num]
  (set s.subnet? false)
  (done-subnet)
  (set s.mission (get-mission mission-num))
  (set (s.x s.y s.vx s.vy s.r) (values s.mission.start.x s.mission.start.y 0 0
                                       (or s.mission.start.r 0)))
  (set (s.traced s.msg-timer s.dialog s.enemies) (values full-trace 0 nil []))
  (while (. s.msgs 1) (table.remove s.msgs))
  (set s.mission.spawns {})
  (set s.mission.creds {})
  ;; each key here is a DB tile you need to visit to complete the mission
  (set s.mission.flags-needed {})
  ;; spawns are set as a table of x/y->spawn so we can look them up quickly when
  ;; rendering security towers
  (for [cx s.mission.bounds.min-x s.mission.bounds.max-x]
    (for [cy s.mission.bounds.min-y s.mission.bounds.max-y]
      (init-tile cx cy (mget cx cy)))))

(when (not _G.state)
  (modes.start-mission 4)
  (modes.activate-chat))
(set _G.state s)

;;;; win mode!

(var t 0)
(local (horiz spacing grid-color) (values 48 20 4))

(fn modes.win []
  (cls)
  (rect 0 12 W 12 1)
  (rect 0 24 W 12 2)
  (rect 0 36 W 12 3)
  (set t (+ t 1))
  (line 0 horiz W horiz grid-color)
  (for [y horiz H spacing]
    (let [y (+ y (math.fmod t spacing))
          d (- y horiz)
          y (+ y (math.log d))]
      (line 0 y W y grid-color)))
  (for [x 3 W spacing]
    (let [d (- (/ W 2) x)
          x-bottom (- (/ W 2) (* d 4))]
      (line x horiz x-bottom H grid-color)))
  (print "YOU WIN" 30 (math.min 100 (+ 10 (// t 2))) 15 true 4)
  (when (< 200 t)
    (print "By Emma Bukacek\n\n    and Phil Hagelberg" 40 28))
  (when (< 300 t)
    (print "Additional levels by Noah\n\n          and Zach Hagelberg" 50 60)))

;; <TILES>
;; 001:1111111111111111100011111011011110110111100011111111111111111111
;; 002:2222222222222222220022222022022220220222200002222022022220220222
;; 003:3333333333303333333033333330333333303333333033333330333333333333
;; 004:4444444440040404404404044004040440440400444444444444444444444444
;; 005:5555555555505555555055555550555555505555555055555550555555555555
;; 006:6666666660660066606066066060660660606606606600666666666666666666
;; 007:0777777707770077007070777770707777700700777770777777707077777000
;; 008:8888888888888888888888888888888888888888888888888888888888888888
;; 009:aaaaaaaea999999ea999999fa999999aa999999af999999af999999aeaaaaaaa
;; 010:fffffffff000000ff0fff00ff00f000ff00f000ff00f000ff000000fffffffff
;; 016:000000000000000000000000000ee000000ee000000000000000000000000000
;; 017:1111111111111111111111111111111111111111111111111111111111111111
;; 018:2222222222022022222222222222222222222222222222222222222222222222
;; 019:3333333333000333333330333333303333330033333033333300000333333333
;; 020:4444444444444444444444444444444444444444444444444444444444444444
;; 021:5555555555000555555550555555505555550055555055555500000555555555
;; 022:6666666060660066606066066060660660606606606600666666666666666666
;; 023:7777777777077077777777777777777777777777777777777777777777777777
;; 024:8888888888888888888888888888888888888888888888888888888888888888
;; 025:9999999999a99a99999999999999999999999999999999999999999999999999
;; 026:fffffffff000000ff0e0000ff000000ff000000ff000000ff000000fffffffff
;; 032:000ee00000e76e0000e66e000e0ee0e0e0e00e0ee0e00e0e00e00e0000000000
;; 033:1111111111111111111111111111111111111111111111111111111111111111
;; 034:2222222222022022222222222202222222222222222222222222222222222222
;; 035:3333333333000333333330333300033333333033330003333333333333333333
;; 036:4444444444444444444444444444444444444444444444444444444444444444
;; 037:5555555555000555555550555500055555555055550005555555555555555555
;; 038:6666666060660066606066006060660660606606606600666666666666666666
;; 039:7777777777077077777777777707777777777777777777777777777777777777
;; 040:8888888888000088808888888088888880880088808880888800008888888888
;; 041:9999999999a99a999999999999a9999999999999999999999999999999999999
;; 042:fffffffff000000ff0e0e00ff000000ff000000ff000000ff000000fffffffff
;; 048:7006600766666666600550066000000660000006670000766600006600000000
;; 049:1111111111111111111111111111111111111111111111111111111111111111
;; 050:2222222222022022222222222202202222222222222222222222222222222222
;; 051:3333333333333333303303333033033330000333333303333333033333333333
;; 052:4444444444444444444444444444444444444444444444444444444444444444
;; 053:5555555555555555505505555055055550000555555505555555055555555555
;; 054:6666666060660066606066006060660660606600606600666666666666666666
;; 055:7777777777077077777777777707707777777777777777777777777777777777
;; 056:8888888880000888808880888088808880000888808880888088808888888888
;; 057:9999999999a99a999999999999a99a9999999999999999999999999999999999
;; 058:fffffffff000000ff0e0e0eff000000ff000000ff000000ff000000fffffffff
;; 064:0000a000000aa00000aa0a00000aa00000055000005fe50005fffe5000555500
;; 065:1111111111111111111111111111111111111111111111111111111111111111
;; 066:2222222222022022222222222202202222222222220222222222222222222222
;; 067:3333333330000033303333333033333333003333333303333000333333333333
;; 068:4444444444444444444444444444444444444444444444444444444444444444
;; 069:5555555550000055505555555055555555005555555505555000555555555555
;; 070:6666666060660066606066006060660660606600606600666666666066666666
;; 071:7777777777077077777777777707707777777777770777777777777777777777
;; 072:8888888888888888880000888088888888000888888880888800088888888888
;; 073:9999999999a99a999999999999a99a999999999999a999999999999999999999
;; 074:fffffffff000000ff0e0e0eff000000ff0e0000ff000000ff000000fffffffff
;; 080:000ee0000ee22ee00127421002266220024664200e2223e0003ee30000e00e00
;; 081:1111111111111111111111111111111111111111111111111111111111111111
;; 082:2222222222022022222222222202202222222222220220222222222222222222
;; 083:3333333333000333303333333033333330000333303330333033303333000333
;; 084:4444444444444444444444444444444444444444444444444444444444444444
;; 085:5555555555000555505555555055555550000555505550555055505555000555
;; 086:6666666060660066606066006060660660606600606600666666666066666606
;; 087:7777777777077077777777777707707777777777770770777777777777777777
;; 088:8888888888888808800080888880088888800088880080088088888888888888
;; 089:9999999999a99a999999999999a99a999999999999a99a999999999999999999
;; 090:fffffffff000000ff0e0e0eff000000ff0e0e00ff000000ff000000fffffffff
;; 096:4007700477777777700880077000000770000007740000477700007700000000
;; 098:2222222222222222222222222000200222200222220000222002200222222222
;; 099:3333333330303033333333333030303333333333303333333333333333333333
;; 101:5555555550505055555555555050505555555555505555555555555555555555
;; 102:6666666060660066606066006060660660606600606600666666666066660606
;; 103:7777777770777077777777777077707777777777707770777777777770777777
;; 104:8888888880008808808808088088080880008808808808888088080888888888
;; 106:fffffffff000000ff0e0e0eff000000ff0e0e0eff000000ff000000fffffffff
;; 115:3333333330303303333333333030330333333333303033333333333333333333
;; 117:5555555550505505555555555050550555555555505055555555555555555555
;; 118:6666666060660066606066006060660660606600606600666666666066060606
;; 120:8888888088000088808888888088888880880088808880888800008888888888
;; 122:fffffffff000000ff0e0e0eff000000ff0e0e0eff000000ff0e0000fffffffff
;; 131:3333333330303303333333333030330333333333303033033333333333333333
;; 133:5555555550505505555555555050550555555555505055055555555555555555
;; 134:6666666060660066606066006060660660606600606600666666666006060606
;; 136:8888888088000088808888808088888880880088808880888800008888888888
;; 138:fffffffff000000ff0e0e0eff000000ff0e0e0eff000000ff0e0e00fffffffff
;; 147:3333333333333333333333333333333333333333333333333333333333333333
;; 149:5555555555555555555555555555555555555555555555555555555555555555
;; 150:6666666060660066606066006060660660606600006600666666666006060606
;; 152:8888888088000088808888808088888880880080808880888800008888888888
;; 154:fffffffff000000ff0e0e0eff000000ff0e0e0eff000000ff0e0e0efffffffff
;; 163:3333333333333333333333333333333333333333333333333333333333333333
;; 165:5555555555555555555555555555555555555555555555555555555555555555
;; 166:6666666060660066606066000060660660606600006600666666666006060606
;; 168:8888888080000888808880888088808880000888808880888088808888888888
;; 170:fffffffff000000ff070e0eff000000ff0e0e0eff000000ff0e0e0efffffffff
;; 179:3333333333333333333333333333333333333333333333333333333333333333
;; 181:5555555555555555555555555555555555555555555555555555555555555555
;; 182:6666666000660066606066000060660660606600006600666666666006060606
;; 184:8888888080000888808880808088808880000888808880888088808888888888
;; 186:fffffffff000000ff070707ff000000ff0e0e0eff000000ff0e0e0efffffffff
;; 195:3333333333333333333333333333333333333333333333333333333333333333
;; 197:5555555555555555555555555555555555555555555555555555555555555555
;; 198:6066666000660066606066000060660660606600006600666666666006060606
;; 200:8888888080000888808880808088808880000880808880888088808888888888
;; 202:fffffffff000000ff070707ff000000ff070e0eff000000ff0e0e0efffffffff
;; 211:3333333333333333333333333333333333333333333333333333333333333333
;; 213:5555555555555555555555555555555555555555555555555555555555555555
;; 214:6060666000660066606066000060660660606600006600666666666006060606
;; 216:8888888088888888880000888088888888000888888880888800088888888888
;; 218:fffffffff000000ff070707ff000000ff07070eff000000ff0e0e0efffffffff
;; 227:3333333333333333333333333333333333333333333333333333333333333333
;; 229:5555555555555555555555555555555555555555555555555555555555555555
;; 230:6060606000660066606066000060660660606600006600666666666606060606
;; 232:8888888088888888880000808088888888000888888880888800088888888888
;; 234:fffffffff000000ff070707ff000000ff070707ff000000ff0e0e0efffffffff
;; 243:3333333333333333333333333333333333333333333333333333333333333333
;; 245:5555555555555555555555555555555555555555555555555555555555555555
;; 248:8888888088888808800080888880088888800088880080088088888888888888
;; 250:fffffffff000000ff070707ff000000ff070707ff000000ff070e0efffffffff
;; </TILES>

;; <SPRITES>
;; 000:000ee00000e76e0000e66e000e0ee0e0e0e00e0ee0e00e0e00e00e0000000000
;; 014:00ffff000faffaf0faffffaffffaaffffffaafffffffffff0ffaaff000ffff00
;; 015:00ffff000faffaf0faffffaffffaaffffffaafffffffffaf0ffffaf000ffff00
;; 030:00eaaaaa00ea537a00ea537a00eaaaaa00eaeaea00eaaaaa00eaeaea00eeeeee
;; 031:aaaaae00aaccce00aaccce00aaaaae00aaaaae00aaaaae00aaba5e00eeeeee00
;; 239:e0e0e0e00e0e0e0ee0e0e0e00e0e0e0ee0e0e0e00e0e0e0ee0e0e0e00e0e0e0e
;; 255:6666666660000006600000066666666660666606600660066000000666666666
;; </SPRITES>

;; <MAP>
;; 000:010101010101010101010101010101010101014001010101010101010101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
;; 001:010000006021212121212121252525252121212625212121212121212121000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 002:010000000000000000000000000000a30000000025210021000000000021000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 003:010000002121212121212121212525002521212125212121522100630021000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 004:0100000050a1000000000050500025852500000000000000002100000021000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 005:012100212121000083000050500025252000000000000000002121212121000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 006:0121a2210000000000000050500000520000000000008400002101002101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 007:012100210000000000000050500000520000000000000000002101002101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 008:012100212150505050505050500000520000000000000000002101002101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 009:010000002100000000000000500000200000000000000000002101002101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 010:010082002100002100000000500090239000000000000000002101002101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 011:010000002100000000000000717171947171715252525252210101002101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 012:012100212100000000000000000090239000000000000000210100002101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 013:0121002100000000000000000000a610a600000000000000230100002101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 014:0121002121210000000000210000a6a6a600000000000000230100002101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 015:012100003021000000000000000000000000000000000000230100002101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 016:012121212121000000000000000000000000000000000000210100002101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 017:012121212100008700000000000076767600000000000000212121212101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 018:010000002100000000000072727273747571000000000000540000002101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 019:0100000050a4000000000000000076767600000000000000540000002101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 020:01000000210000000000000000000070000000a5a5a50000540000862101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 021:012131212121212121212121212121212121215151512121212121212101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 022:01010101010101010101010101010121218f00000000008a210100000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 023:010101010101010100000000000000012100000000000000210100000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 024:010000000000000000000000000000012100009292920000210100000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 025:010000000000000000000000000000012132212424242132210100000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 026:010000000000000000000000000000012121212121212121210100000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 027:010000000000000000000000000000010101010101010101010100000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 028:010000000000000000000000000000000000000000000101000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 029:010000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 030:010000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 031:010000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 032:010000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
;; 033:010101010101010101010101010101010101010101010101010101010101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
;; 034:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010101010101010120200101010101010101010101010101010101000000000000000000000000000000000000000000000000000000000000000000
;; 035:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000a000900000000000702287360071007200730000002000000000000000000000000000000000000000000000000000000000000000000000
;; 036:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016570707000500000000000713400200071007200730023232000000000000000000000000000000000000000000000000000000000000000000000
;; 037:0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100700000a1909000000000712200110071007200730020000000000000000000000000000000000000000000000000000000000000000000000000
;; 038:0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100700000000000700000000021532055205f235f235f23000000000000000000000000000000000000000000000000000000000000000000000000
;; 039:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010030000000700070000082005200000050005100520020000000000000000000000000000000000000000000000000000000000000000000000000
;; 040:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001007070707000007070702100220022542356235f205f20000000000000000000000000000000000000000000000000000000000000000000000000
;; 041:0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100840000510020207676203122a3220020002340200023000000000000000000000000000000000000000000000000000000000000000000000000
;; 042:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001009100322020208300008d210000220022002320200020230000000000000000000000000000000000000000000000000000000000000000000000
;; 043:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010071007310730000000000000000200022000023230000002000000000000000000000000000000000000000000000000000000000000000000000
;; 044:0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100910052a2730073737373732020200020730071232020200000000000000000000000000000000000000000000000000000000000000000000000
;; 045:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010091007153330000007395710000880089720072000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 046:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010076717100000000007354710000000000710073000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 047:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010091000071717100000000710000000000720072767600000000000000000000000000000000000000000000000000000000000000000000000000
;; 048:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010091913500000071717171710092929292730071105f00000000000000000000000000000000000000000000000000000000000000000000000000
;; 049:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001005f065f00000073950000550000000000720072767600000000000000000000000000000000000000000000000000000000000000000000000000
;; 050:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010091919100000073737373730000000000710073105f00000000000000000000000000000000000000000000000000000000000000000000000000
;; 051:0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100930000000000000000a4000000000000720072767600000000000000000000000000000000000000000000000000000000000000000000000000
;; 052:0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100935670567056705670567056705670569500950000765f765f760000000000000000000000000000000000000000000000000000000000000000
;; 053:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001005f057005700570057005700570057005950095000076107610760001000000000000000000000000000000000000000000000000000000000000
;; 054:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001009073207320732073207320732073207395a537959072722090767601000000000000000000000000000000000000000000000000000000000000
;; 055:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010090005000000000909073909000000006955795060000000000000001000000000000000000000000000000000000000000000000000000000000
;; 056:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010070002090000000000000000000002000000000002400009058909301000000000000000000000000000000000000000000000000000000000000
;; 057:0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100900050762020208e2020208f202020200000009000242490a8159001000000000000000000000000000000000000000000000000000000000000
;; 058:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001007000209000000000000000000000382094a724900091009158919001000000000000000000000000000000000000000000000000000000000000
;; 059:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010070005000000000000000000000000020000000909090000000009001000000000000000000000000000000000000000000000000000000000000
;; 060:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001002090709070707090909070907090902094a624900000000070009001000000000000000000000000000000000000000000000000000000000000
;; 061:0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100008b1020102010201020102010201020000000900000700070009001000000000000000000000000000000000000000000000000000000000000
;; 062:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000205f205f205f205f205f205f205f20000000900000700070009001000000000000000000000000000000000000000000000000000000000000
;; 063:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000020204090900000700070009001000000000000000000000000000000000000000000000000000000000000
;; 064:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001717171907090909070709070909070000000a900000000700070009001000000000000000000000000000000000000000000000000000000000000
;; 065:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010101010101010101010101010101010101010101010101010101010101000000000000000000000000000000000000000000000000000000000000
;; 068:010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 069:010000000000000000010000000000000000202000000000000000000100000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 070:010000000000000000010000000020202020202300000000220000200100000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 071:010000000000000000010000002000000020202000008700220000200100000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 072:010000000000000000010000002000100021212100000000220000202001000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 073:010101010101010101015555922000000000009200000000220000740001000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 074:010000000000000021210000920000000090902200000000000000740001000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 075:010000006000000000220000920000000000322200000000000000000001000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 076:010000000000000000220000000000000090902200000000000000002001000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 077:010075555555717171220000000000000070000000000000720000002001000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 078:010075000000000000510000000000002251000000000000720000002121212121010000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 079:010075000000000000510000000004000051000000000000727231707070740000010000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 080:010075000000717171220000000000000051000000000000727070723093000000010000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 081:010075000000000000225521555555200070000000000000207070000000000000010000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 082:010075920000000000220000069320207373737300000000002000000000000082010000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 083:010073920012000000919191919121217391902222000000005000000000000000010000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 084:010073920000000000000000002021000000000000000000007100000000600000010000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 085:010073000000000000919191919123008b008a0000000000007100727200000000010000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 086:010000210021000000000000002023000000000000000000009393000024210000010000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 087:010000210021212121717171711021000000232323000000009303010000212121010000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 088:010000210000000021909090901091010101250000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 089:010000002400060000000600000091000001000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 090:010000002400000000000000000091000001010101010101010101010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 091:010000939393000000860000600091000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 092:010000000000555524000000000091000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 093:010000000000000024213021212100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 094:010000000000000000242424000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 095:010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 096:010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 097:010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 098:010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 099:010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 100:010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 101:010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 119:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010101010101010101010101010101010101010101010101010101010101
;; 120:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000020002000a40075000000007200a500000000000000009001
;; 121:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000020000000720000700070000000a500000000009090000001
;; 122:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000084000054007000a40074310000007200a500000000909010910001
;; 123:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000054000000720000700070000000a5000000a6510200926201
;; 124:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000054007000a40073200000007200a500000000909070910001
;; 125:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001202054545420000000720000000070000000a500000000009090000001
;; 126:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000007000a40075700000007300a500000000000000009001
;; 127:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000007200010101010101010101010101010101010101
;; 128:0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000909090200000a200900000a100000000000000000020
;; 129:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a3a3a3a3a3a390220000550000a200920000a100000000000000002001
;; 130:0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000090100005550000a200940000a100000000000000a00020
;; 131:0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000170000000000090220000550000a200500000a100000000000000002001
;; 132:0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000122700000000000909090700000a200940000a100000000000000007001
;; 133:0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000124220000000000000000000000a200920000a100000000000000703001
;; 134:0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000125242200000000000000000000a200900000a100000000000000000001
;; 135:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010101010101010101010101010101010101010101010101010101010101
;; </MAP>

;; <WAVES>
;; 000:a9bcdeffffffecb97542100001234567
;; 001:778899aabbccddef0011223344556677
;; 002:789abcdefedcba987654321012345678
;; 003:ffffffffffffffff0000000000000000
;; 004:8a46000400040024df8a444844484468
;; 005:2246676556679bdff96dba5666655433
;; 006:0000122458bcdeffffeedcb952100000
;; 007:ffffbffffbffffb87400000400004004
;; </WAVES>

;; <SFX>
;; 000:4200b200f200f200f200f200f200f200f200f200f200f200f200f200f200f200f200f200f200f200f200f200f200f200f200f200f200f200f200f200500000000000
;; 001:400080009000b000d000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000600000000000
;; 002:900060004070407070009000b000e000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000500000000000
;; 003:800760058000c00cd008f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000c00000000000
;; 004:1f080ff40f972f047f01cf0edf0cdf09df08df08ef08ef08ef08ef08ef08ef08ff08ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00a70000000000
;; 005:0ff8ff000f00ff000f00df00df00df00df00df00df00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00c07000000000
;; 006:0708070a070c070e07f707f70ff507f40ff507f50ff607f70ff70707070007000700070007000700070007000700070007000700070007000700070020804a004a4a
;; 007:0f080f080f0c0f070f070f07f700f700f707077707f7f707877787f7f707a777a7f7f707c7f7f700f700f700f700f700f700f700f700f700f700f700d70000000000
;; 008:720e320702f70207020702075207a207d207e207e200e200e200f200f200f200f200f200f200f200f200f200f200f200f200f200f200f200f200f200f00000000000
;; 047:00b000b00050002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105000000000
;; 048:07f006f05680a640c600d740e740f740f740f740f740f740f740f740f740f740f740f740f740f740f740f740f740f740f740f740f740f740f740f740900000000000
;; 049:74f09f80bf00df00f400f400f400f400f400f400f400f400f400f400f400f400f400f400f400f400f400f400f400f400f400f400f400f400f400f400600000000000
;; 050:0fb00fb02f508f20af00bf00bf00cf00cf00cf00cf00df00df00df00df00ef00ef00ef00ef00ef00ef00ef00ef00ef00ef00ef00ef00ef00ef00ef00400000000000
;; 051:04f004000400040004001400140024003400340034003400340034003400340034003400340034003400340034003400340034003400340034003400205000000000
;; 052:22f022003200520052005200520052005200520052005200520052005200520052005200520052005200520052005200520052005200520052005200205000000000
;; 053:8300630033000300030013002300230033004300430043004300430043024303430443034301430d430b430d430e43004300430043004300430043005040000000db
;; 054:2300030003002300330043005300530063007300730083009300b300d300e300e300e300e300e300e300e300e300e300e300e300e300e300e300e300600000000000
;; 055:8200620032000200020012002200220032004200420042004200420042024203420442034201420d420b420d420e42004200420042004200420042003000000000db
;; 056:2f80108020304020500070008000c000c000d000e000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000400000000000
;; 058:04f00400000000000000000000002000300060008000a000b000b000c000d000e000e000e000e000f000f000f000f000f000f000f000f000f000f000100000000000
;; 059:e700e700e700d700d700d700d700c700c700b700b700a700a7009700970087008703770567056703570d570b570b570c5700570057005700570057004000000000fa
;; </SFX>

;; <PATTERNS>
;; 000:40080500081160081d60081d40082900082100081160081d40080500081160081d00081140082900000000081100000040080560081d60081d00000040082900081100000060081d40080500000060081d00000040082900000000000000000040080560081d60081d00000040082900081100000060081d40080500000060081d00000040082900000000000000000040080500000060081d00000040082900000060081d00000040080560081d60081d60081d40082900081160081d60081d
;; 001:4008050008110008010008114008050008210008014aa9054cc9050008114ff90500081140082900000000081100000040080500082160081d60081d40080560081d60081d4aa9054cc9050000004ff90500000040082900000000000000000040080560081d60081d60081d40082960081d60081d60081d40080500000060081d00000040082900000000000000000040080500000060081d000000400805b00887700887e00885400827000881000881000881000881000811000000000811
;; 002:700833000000100000700833000000100000409c33000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000700c33000000100831700833000000100831409c33000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 003:4008451008414008451008410008410000004008451008414008450000004889454bb9454ff945100841000841100841e00843000000e00843e00843e00843000000e00843e00843e00843000000e00843000000e00843000000e00843100841d00843000000d00843d00843d00843000000d00843d00843d00843100841d00843000000d00843000841000841000000c00843000000c00843000000c00843000000000841000000b00843000000b00843000000b00843000000000000000000
;; 004:b00879000000100000b00879000000100000700879000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b00879000000100831b00879000000100831700879000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 005:b0085b000000100000b0085b000000100000e09c5900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000090085b00000010083190085b000000100831e09c59000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 006:400859000000000000000000000821000000400859000000600859000000700859000000000000000000905c59000000002c51000000000000000851c01c59000000000851000851b00859000000900859000000700859000000000000000000d00859000000000000000000000000000000000000000000000000000000d00859000851b00859000000d00859000000e0085900000000000000000000000000000000000000000000085100000000000000000070085b000000000000000000
;; 007:40085b00000000000000000000082100000040085b100000e0085940085b10085100000070085b00000000085100000060085b00000000000000085100085100000000085100085110085100000060085b00000070085b00000090085b000000d07c5b00000000000000000000000000000050085b000000000000000000000851000851d0085b000000000851000000e0085b00000000000000000000000000000060085b00000000085100000000000000000070085d000000000000000000
;; 008:46696b00086176696b42296bb6696b72296be6696bb2296b66696be2296b46696b62296d76696b42296bb6696b72296b76696bb2296b66696b72296be6696b62296bb6696be2296b76696bb2296b66696b72296bb6696b62296b66696bb2296bd6696b00000056696bd2296b86696b52296bb6696b82296b86696bb2296b56696b82296bc6696b52296b56696dc2296b76696d52296bc6696d72296bb6696d00000096696db2296bf6696b92296bb6696bf2296b96696bb2296b66696b92296b
;; 009:e0086b000000100000e0086b000000100000b09c69000000000000000000000000000000e00c6bb0086b70086b60086be0086bb0086b70086b60086be0086bb0086b70086b60086be0086bb0086b70086b60086be0086bb0086b70086b60086be0086b000000100831e0086b000000100831b09c6b000000000861000000000000000000e00c6bb0086b70086b60086be0086bb0086b70086b60086be0086bb0086b70086b60086b000861000000000861000861000821000861000861000861
;; 010:40082b00081100081100081100081100000000081100000000081100000060081d00000040080500000064491d6bb91d4ff9270000000000000000000000000000000008910000001008910000006ee91d00000066691d6ff91d60081d00000060081d00000060081d00000040082d00000000081100000000081100082160081d00000060081d000000400805400805400827000000000000000000000000000000000000000000100821000000000000000000000000000000000000000000
;; 011:400847000000900845000000400845000000900845000000000841000000000000000000b00845000000000000000000c05c45000000000000000000000801000000000841000000000000000000400845000000c00845000000900845000841700845000000000000000000000841000000700c45000000000841000000000000000000000841000000000000000000700845000000000841000000000841000000000000000000800845000000000000000000000000000000000000000000
;; 012:d00879000000000841000000000841000000000871000000000841000000000000000000b00879000000000000000000405c7b000000000000000000000841000000000841000000e00879000000000000000000000841000000000841000000b00879000000000000000000000841000000000841000000000871000000000000000000000841000000000000000000c00879000000000841000000000841000000000000000000d00879000000000000000000000000000000000000000000
;; 013:bbb95b00000000085100000000000000000000000000000000000000000000000000000090085b000000000000000000b07c5b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060085b000000000000000000000000000000000000000000900c5b000000000000000000000000000000000000000000e0085b000000000000000000000000000000000000000000c0085b000000000000000000000851000000000000000000
;; 014:64491d00081168891d0008116cc91d0000006ff91d00000060081d00000000000000000040080500000064491d6bb91d4ff9270000000000000000000000000000000008910000001008910000006ee91d00000066691d6ff91d60081d00000060081d00000060081d00000060081d00000060081d00000060081d00082160081d00000060081d0000004008054008054008270000000000000000004008274008054779270000004aa9270000004cc9270000004ff929400829a00889400889
;; 017:a008a3000841a008a3000841000000a449a3000000a779a3000000a999a3000841aaa9a3000000add9a35ff9a5000000a008a3000841a008a3000000a889a3aff9a30008a1a008a3000000a008a3000841a008a30008a1a008a35008a5000000a008a38008a3a008a3000000a889a3aff9a3000000a008a3000000a008a3000841a008a3000000a008a35008a50008a1d999a3ccc9a3aff9a3000000000000a008a3000841a779a3000000a999a3000841acc9a3000841aff9a3500873000000
;; 018:5669b9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000405cb9000000000000000000000000000000000000000000f008b7000000000000000000e008b7000000000000000000d008b70000000000000000000000000000000000000000000008b10000000008b10000000008b10000000000000000001008b10000000000000000000008b1000000000000000000000000000000000000000000000000000000000000000000
;; 019:d669b9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c05cb90000000000000000000000000000000000000000000008b1000861b008b90000000008b1000000a008b9000000c08cbb000000000000000000800cbb000000a008bb0000000008b10000000008b10000000008b10000000000000000001008610000000000000000000008b1000000000000000000000000000000000000000000000000000000000000000000
;; 020:daa96dc0086da0086dd4496dc0086da0086dd1196dc0086da0086d00000000000000000000000000000000000000000079996d90086d40086f74496d90086d40086f71196d90086d40086f0000000000000000000008b10000000000000000000aa961c0086b40086d70086dd4496d40086d70086dd0086d41196d70086dd0086d0000000008b10000000000000000000008b10000000000000000000008b1000000000000000000a9996bd0086b000000a4496bd0086b000000a1196bd0086b
;; 021:a008a3000841a008a3000841000000a449a3000000a779a3000000a999a3000841aaa9a3000000add9a35ff9a5000000c008a3000841c008a30000000008a1c008a3000841c008a3000000e008a3000841e008a30008a1e008a3e008a5000000a008a38008a3a008a3000000a889a3aff9a3000000a008a3000000a008a3000841a008a3000000a008a35008a50008a1d999a3ccc9a3aff9a3000000000000a008a3000841a779a3000000a999a3000841acc9a3000841aff9a3500873000000
;; 022:5669b9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000410cbb000000000000000000000000000000000000000000600cb90000000000000000000008b1000000000000000000a008b70000000000000000000000000000000000000000000008b10000000008b10000000008b10000000000000000001008b10000000000000000000008b1000000000000000000000000000000000000000000000000000000000000000000
;; 023:d669b9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c10cbb000000000000000000000000000000d00cbb0008b19008bb0008610008b10000000008b10000000008b1000000d08cb90000000000000000000008b10000000008b10000000008610000000008b10000000008b10000000000000000001008610000000000000000000008b1000000000000000000000000000000000000000000000000000000000000000000
;; 024:daa96dc0086da0086dd4496dc0086da0086dd1196dc0086da0086d0000000008b100000000000000000000000000000079996d90086d40086f74496d90086d40086f71196d90086d40086f0000000000000000000008b1000000000000000000000861aaa96bd0086b50086da4496bd0086b50086da1196bd0086b50086d0008610000000008b10000000000000000000008b10000000000000000000008b100000000000000000059996b80086ba0086bd0086ba0086da3396dd0086da0086d
;; 047:400805000000000000000000400805000000000000000000400805000000000000000000400805000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 054:40000c70000ca00004100000c00008d00008a00002100000900008c00008500002100000900004400004000000100000400004000000100000000000409604000000100000000000000000000000400002100000407402000000000000000000400004100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; </PATTERNS>

;; <TRACKS>
;; 000:2100002d44102d44556d58560000000000000000000000000000000000000000000000000000000000000000000000006a0000
;; 001:1010001017001018422c0682b03000b03e43f03e431017421018422c0682000000000000000000000000000000000000000000
;; 002:0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004c0000
;; </TRACKS>

;; <PALETTE>
;; 000:200c2c04b2e20850ea3020baff1cffee0c59992885ce2ceaeae244de7d000000046daa2ceab699a16944aaa1aedeeed6
;; </PALETTE>