{deck}
version:1
card:0
size:[512,342]
name:"utena.deck"

{fonts}
olympiad_italic:"%%[encoded data, 5256 characters]"

{card:menu}
{widgets}
button1:{"type":"button","size":[163,34],"pos":[184,181],"script":"menu.0","text":"deck the world's shell"}
button2:{"type":"button","size":[163,34],"pos":[184,233],"script":"menu.1","text":"chicken the world's cage"}
field1:{"type":"field","size":[353,129],"pos":[80,33],"value":{"text":["The \"utena\" module contains two routines which each play a 3 second transition animation and then go[] to a card:\n\n","utena.text[dest text rot]\nutena.frame[dest rot]","\n\n- \"dest\" is any first argument to go[], such as a card or card name.\n- \"text\" is a string, which may contain newlines.\n- \"rot\" is any decorative image you'd like to use instead of a rose (optional).\n\nutena.text[] expects to have the \"olympiad_italic\" font available."],"font":["","mono",""],"arg":["","",""]}}
button3:{"type":"button","size":[163,34],"pos":[184,285],"script":"menu.2","text":"bug the world's egg"}

{script:menu.0}
on click do
 deck.locked:1
 utena.text[chicken "Become like rose petals,\nblowing free!"]
 go["Back"]
 deck.locked:0
end
{end}

{script:menu.1}
on click do
 deck.locked:1
 utena.frame[chicken]
 go["Back"]
 deck.locked:0
end
{end}

{script:menu.2}
on click do
 deck.locked:1
 utena.frame[eggbug image[ "%%IMG2AIgAfgD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A7wEUAHEBGwBpAQcMEQELAGMBCAwVAQwAXgEGDBsBCwBbAQUMHwELAFcBBQwjAQsAVAEFDCYBCgBRAQUMKgEKAE4BBQwtAQkATAEEDDABCgBJAQQMNAEIAEcBBAw2AQgARQEEDDkBBgBEAQQMDgEDDCoBBgBDAQMMDgEFDBIBBQwTAQYAQQEDDA0BCAwPAQgMEgEGAAcBBwAyAQQMDQEGIAIBAQwNAQcgAQECDBIBBgADAQ0ALwEDDA0BByACAQEMDQEGIAIBAgwTAQUAAQEQAC4BAwwNAQcgAgEBDA0BBiACAQIMEwEXACwBBAwOAQUgAQEDDA0BByABAQIMFAEXACsBBAwOAQkMDQEJDBUBCiAIAQYAKgEDDBABBww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AP8A/wD/AP8A/wD/AHY="
 ]]
 go["Back"]
 deck.locked:0
end
{end}

{card:chicken}
image:"%%[encoded data, 29196 characters]"

{card:eggbug}
image:"%%[encoded data, 142660 characters]"

{module:utena}
description:"iconic anime transitions for Decker."
version:1
{script}
rose:image["%%IMG2AJQAigD/AP8A/wD/AP8A/wD/AP8AZwEIAIYBEAB9AR0AcgEVIAQBCgBvARIgDgEHAGwBCyAZAQUAaQEJIB8BCQBiAQggCQEOIAsBDQBcAQcgCAETIAcBEgBXAQggBwEXIAQBFQBJAQUABgEHIAYBCiALAQYgAgEZAEcBECAFAQogEAEEIAEBBiAHAQ4ARQECIAIBCyAEAQogEwEJIAsBDQBEAQIgBQEGIAMBCiAVAQkgDgELAEMBAiAHAQQgAQEKIBgBCyANAQoAQgECIAcBDSAaAQ0gDQEJAEEBAiAHAQwgFgETIA8BBgBBAQIgBwELIBMBGSAPAQUAPwEDIAcBCiAQAR4gEAEEAD4BAiAIAQkgDgEjIA8BBAA8AQMgBwEJIA0BJiAQAQIAOwEDIAgBCCAMAQ0gCQETIBABAgA6AQIgCAEIIAwBCyAQARAgEAECADgBAiAJAQggCwEKIBQBDyAQAQIANgECIAoBByALAQkgGQENIA4BAwA1AQIgCwEHIAoBCSAbAQ0gDQECADUBAyALAQYgCgEJIB0BDSALAQMANQECIAsBByAKAQggHwEMIAsBAgA1AQMgCwEGIAoBCCAhAQwgCQEDADQBAyAMAQUgCwEHICMBDCAHAQMANAEDIA0BBSAKAQggJAELIAYBBAAzAQQgCwEHIAoBCCAkAQwgBQEDADMBBCAMAQcgCQEIIAMBBiAdAQsgBAEEADIBBCAMAQcgCgETIBsBCyAEAQUAMAEFIAsBCCAKAQkgAwEHIBsBCyAEAQUAMAEEIAwBAiABAQUgCgEGIAgBBiAbAQogBQEFAC4BBCAMAQMgAQEFIAoBBCALAQYgAQEGIBMBCyAEAQUALgEEIAwBAyABAQUgCgEDIA0BDiARAQsgBAEFAC4BAyAMAQMgAgEFIAoBAiAQ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AQgAJwEFIAYBCSATAR8gCwEDIAUBEwAoAQUgBwEIIBQBHSAMAQMgCAEQACgBBSAHAQkgFQEaIA0BAyAKAQ0AKQEGIAcBCCAWARcgDwECIAwBCwAqAQYgBwEJIBcBFCAOAQEgAgEBIAwBCgAsAQUgBwEKIBoBDSARAQIgDwEHAC4BBiAHAQogNwECIA8BCAAuAQUgBwEKIDcBAiAPAQgALgEGIAcBCiA1AQMgDwEIAC4BByAGAQsgMwEEIA8BCAAvAQYgBwEMIDABBSAPAQgAMAEGIAcBDCAvAQUgDgEJADEBBiAHAQwgLQEFIA8BCQAxAQcgBwEOICkBBiAPAQkAMgEGIAgBECAlAQYgDwEKADIBByAJARAgIwEGIA4BCwAyAQggCgERIB4BByAOAQwAMwEIIAoBEyAaAQcgDwEMADQBCCALARQgFAEJIA8BDAA2AQggCwEaIAoBCyAPAQwAOAEJIAgBLyAQAQsAOgEKIAUBLyARAQoAPAE7IBMBCQA/ATggFAEGAEQBNSAFAQwgBAEFAEgBLyAGARAgAgEEAEwBAwAEAQkgAwEWIAgBESACAQQAUwEJICABEyABAQQAUwEJIB4BGgBTAQkgHQEbAFMBCiAbARsAVAEKIBoBEQADAQgAVAELIBgBEAAHAQYAVQEMIBQBEAAJAQUAVgEOIBEBDwALAQQAWAEOIA4BEAALAQIAXAEPIAoBEABsAREgBQERAG4BJQBxASEAdAEeAHgBGgB9ARMAggEOAP8A/wD/AP8A/wD/AP8A/wD/AP8AJw=="]
frame:image["%%[encoded data, 25368 characters]"]

on utena dest rot bg do
 rot:rose unless rot
 o:rot.size/2
 p0:((    85),(    66))-o
 p1:((    85),(342-66))-o
 p2:((512-85),(342-66))-o
 p3:((512-85),(    66))-o
 go[dest on trans c a b t do
  bg[c b]
  c.paste[frame (0,0) 1]
  r:rot.copy[].rotate[t*3*pi] c.paste[r p0 1]
  r.transform["vert"]         c.paste[r p1 1]
  r.transform["horiz"]        c.paste[r p2 1]
  r.transform["vert"]         c.paste[r p3 1]
 end 180]
end

module.text:on goText dest text rot do
 utena[dest rot on background c b do
  c.pattern:1
  c.rect[0,0 c.size]
  c.pattern:0
  c.font:"olympiad_italic"
  c.text[text c.size/2 "center"]
 end]
end

module.frame:on goFrame dest rot do
 utena[dest rot on background c b do
  c.paste[b]
 end]
end
{end}

