2020-01-10 01:10:09 +02:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
< html >
< head >
2020-04-14 19:56:54 +03:00
< title > Figures Template< / title >
2020-05-03 03:20:55 +03:00
< link href = "../docs-assets/Breadcrumbs.css" rel = "stylesheet" rev = "stylesheet" type = "text/css" >
2020-03-19 02:11:25 +02:00
< meta name = "viewport" content = "width=device-width initial-scale=1" >
2020-01-10 01:10:09 +02:00
< meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" >
< meta http-equiv = "Content-Language" content = "en-gb" >
2020-05-03 03:01:21 +03:00
2020-05-03 03:20:55 +03:00
< link href = "../docs-assets/Contents.css" rel = "stylesheet" rev = "stylesheet" type = "text/css" >
< link href = "../docs-assets/Progress.css" rel = "stylesheet" rev = "stylesheet" type = "text/css" >
< link href = "../docs-assets/Navigation.css" rel = "stylesheet" rev = "stylesheet" type = "text/css" >
< link href = "../docs-assets/Fonts.css" rel = "stylesheet" rev = "stylesheet" type = "text/css" >
< link href = "../docs-assets/Base.css" rel = "stylesheet" rev = "stylesheet" type = "text/css" >
< link href = "../docs-assets/Colours.css" rel = "stylesheet" rev = "stylesheet" type = "text/css" >
2020-04-14 19:56:54 +03:00
2020-01-10 01:10:09 +02:00
< / head >
2020-05-03 03:01:21 +03:00
< body class = "commentary-font" >
2020-03-19 02:11:25 +02:00
< nav role = "navigation" >
2020-04-14 19:56:54 +03:00
< h1 > < a href = "../index.html" >
< img src = "../docs-src/Figures/Inform.png" height = 72" >
< / a > < / h1 >
< ul > < li > < a href = "../compiler.html" > compiler tools< / a > < / li >
2020-03-19 02:11:25 +02:00
< li > < a href = "../other.html" > other tools< / a > < / li >
2020-04-14 19:56:54 +03:00
< li > < a href = "../extensions.html" > extensions and kits< / a > < / li >
2020-03-19 02:11:25 +02:00
< li > < a href = "../units.html" > unit test tools< / a > < / li >
2020-04-14 19:56:54 +03:00
< / ul > < h2 > Extensions< / h2 > < ul >
< li > < a href = "../basic_inform/index.html" > basic_inform< / a > < / li >
< li > < a href = "../standard_rules/index.html" > standard_rules< / a > < / li >
< / ul > < h2 > Kits< / h2 > < ul >
2020-03-19 02:11:25 +02:00
< li > < a href = "../BasicInformKit/index.html" > BasicInformKit< / a > < / li >
< li > < a href = "../BasicInformExtrasKit/index.html" > BasicInformExtrasKit< / a > < / li >
< li > < a href = "../CommandParserKit/index.html" > CommandParserKit< / a > < / li >
< li > < a href = "../EnglishLanguageKit/index.html" > EnglishLanguageKit< / a > < / li >
2020-04-14 19:56:54 +03:00
< li > < a href = "index.html" > < span class = "selectedlink" > WorldModelKit< / span > < / a > < / li >
2020-03-19 02:11:25 +02:00
2020-04-14 19:56:54 +03:00
< / ul >
2020-03-19 02:11:25 +02:00
< / nav >
< main role = "main" >
2020-05-03 03:01:21 +03:00
<!-- Weave of 'Figures Template' generated by Inweb -->
< div class = "breadcrumbs" >
< ul class = "crumbs" > < li > < a href = "../index.html" > Home< / a > < / li > < li > < a href = "../extensions.html" > Kits< / a > < / li > < li > < a href = "index.html" > WorldModelKit< / a > < / li > < li > < b > Figures Template< / b > < / li > < / ul > < / div >
< p class = "purpose" > To display figures and play sound effects.< / p >
2020-01-10 01:10:09 +02:00
2020-04-16 01:49:59 +03:00
< ul class = "toc" > < li > < a href = "S-fgr.html#SP1" > § 1. Resource Usage< / a > < / li > < li > < a href = "S-fgr.html#SP2" > § 2. Figures< / a > < / li > < li > < a href = "S-fgr.html#SP3" > § 3. Sound Effects< / a > < / li > < / ul > < hr class = "tocbar" >
2020-01-10 01:10:09 +02:00
2020-05-03 03:01:21 +03:00
< p class = "commentary firstcommentary" > < a id = "SP1" > < / a > < b > § 1. Resource Usage. < / b > We record whether pictures or sounds have been used before by storing
2020-01-10 01:10:09 +02:00
single byte flags in the following array. (The extra 5 values allow for the
fact that it can be legal to use low undeclared sound effect resource
numbers in the Z-machine for short beeps, though this is deprecated in I7.)
< / p >
2020-05-03 03:01:21 +03:00
< p class = "commentary" > Pictures and sounds are identified within blorb archives by resource ID
2020-01-10 01:10:09 +02:00
numbers which count upwards from 1 in order of creation, but can mix
pictures and sounds freely. (For instance, 1 might be a picture, 2 and 3
sound effects, then 4 a picture again, etc.) ID number 1 is in fact always
a picture: it means the cover art, and is the I6 representation of the
value "figure of cover".
< / p >
2020-05-03 03:01:21 +03:00
< pre class = "displayed-code all-displayed-code code-font" >
< span class = "reserved-syntax" > Array< / span > < span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > ResourceUsageFlags< / span > < span class = "plain-syntax" > -> (< / span > < span class = "identifier-syntax" > ICOUNT_FIGURE_NAME< / span > < span class = "plain-syntax" > + < / span > < span class = "identifier-syntax" > ICOUNT_SOUND_NAME< / span > < span class = "plain-syntax" > + < / span > < span class = "constant-syntax" > 5< / span > < span class = "plain-syntax" > );< / span >
2020-01-10 01:10:09 +02:00
< / pre >
2020-05-03 03:01:21 +03:00
< p class = "commentary firstcommentary" > < a id = "SP2" > < / a > < b > § 2. Figures. < / b > < / p >
2020-01-10 01:10:09 +02:00
2020-05-03 03:01:21 +03:00
< pre class = "displayed-code all-displayed-code code-font" >
< span class = "plain-syntax" > [ < / span > < span class = "identifier-syntax" > DisplayFigure< / span > < span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > resource_ID< / span > < span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > one_time< / span > < span class = "plain-syntax" > ;< / span >
< span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > if< / span > < span class = "plain-syntax" > ((< / span > < span class = "identifier-syntax" > one_time< / span > < span class = "plain-syntax" > ) & & (< / span > < span class = "identifier-syntax" > ResourceUsageFlags< / span > < span class = "plain-syntax" > -> < / span > < span class = "identifier-syntax" > resource_ID< / span > < span class = "plain-syntax" > )) < / span > < span class = "reserved-syntax" > return< / span > < span class = "plain-syntax" > ;< / span >
< span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > ResourceUsageFlags< / span > < span class = "plain-syntax" > -> < / span > < span class = "identifier-syntax" > resource_ID< / span > < span class = "plain-syntax" > = < / span > < span class = "reserved-syntax" > true< / span > < span class = "plain-syntax" > ;< / span >
< span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > print< / span > < span class = "plain-syntax" > < / span > < span class = "string-syntax" > "^"< / span > < span class = "plain-syntax" > ; < / span > < span class = "identifier-syntax" > VM_Picture< / span > < span class = "plain-syntax" > (< / span > < span class = "identifier-syntax" > resource_ID< / span > < span class = "plain-syntax" > ); < / span > < span class = "reserved-syntax" > print< / span > < span class = "plain-syntax" > < / span > < span class = "string-syntax" > "^"< / span > < span class = "plain-syntax" > ;< / span >
< span class = "plain-syntax" > ];< / span >
2020-01-10 01:10:09 +02:00
< / pre >
2020-05-03 03:01:21 +03:00
< p class = "commentary firstcommentary" > < a id = "SP3" > < / a > < b > § 3. Sound Effects. < / b > < / p >
2020-01-10 01:10:09 +02:00
2020-05-03 03:01:21 +03:00
< pre class = "displayed-code all-displayed-code code-font" >
< span class = "plain-syntax" > [ < / span > < span class = "identifier-syntax" > PlaySound< / span > < span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > resource_ID< / span > < span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > one_time< / span > < span class = "plain-syntax" > ;< / span >
< span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > if< / span > < span class = "plain-syntax" > (< / span > < span class = "identifier-syntax" > resource_ID< / span > < span class = "plain-syntax" > == < / span > < span class = "constant-syntax" > 0< / span > < span class = "plain-syntax" > ) < / span > < span class = "reserved-syntax" > return< / span > < span class = "plain-syntax" > ; < / span > < span class = "comment-syntax" > The "silence" non-sound effect< / span >
< span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > if< / span > < span class = "plain-syntax" > ((< / span > < span class = "identifier-syntax" > one_time< / span > < span class = "plain-syntax" > ) & & (< / span > < span class = "identifier-syntax" > ResourceUsageFlags< / span > < span class = "plain-syntax" > -> < / span > < span class = "identifier-syntax" > resource_ID< / span > < span class = "plain-syntax" > )) < / span > < span class = "reserved-syntax" > return< / span > < span class = "plain-syntax" > ;< / span >
< span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > ResourceUsageFlags< / span > < span class = "plain-syntax" > -> < / span > < span class = "identifier-syntax" > resource_ID< / span > < span class = "plain-syntax" > = < / span > < span class = "reserved-syntax" > true< / span > < span class = "plain-syntax" > ;< / span >
< span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > VM_SoundEffect< / span > < span class = "plain-syntax" > (< / span > < span class = "identifier-syntax" > resource_ID< / span > < span class = "plain-syntax" > );< / span >
< span class = "plain-syntax" > ];< / span >
2020-01-10 01:10:09 +02:00
< / pre >
2020-05-03 03:01:21 +03:00
< nav role = "progress" > < div class = "progresscontainer" >
< ul class = "progressbar" > < li class = "progressprev" > < a href = "S-act2.html" > ❮ < / a > < / li > < li class = "progresssection" > < a href = "S-msc.html" > msc< / a > < / li > < li class = "progresssection" > < a href = "S-gll.html" > gll< / a > < / li > < li class = "progresssection" > < a href = "S-zmc.html" > zmc< / a > < / li > < li class = "progresssection" > < a href = "S-lgh.html" > lgh< / a > < / li > < li class = "progresssection" > < a href = "S-lst.html" > lst< / a > < / li > < li class = "progresssection" > < a href = "S-ord.html" > ord< / a > < / li > < li class = "progresssection" > < a href = "S-act.html" > act< / a > < / li > < li class = "progresssection" > < a href = "S-act2.html" > act2< / a > < / li > < li class = "progresscurrent" > fgr< / li > < li class = "progresssection" > < a href = "S-otf.html" > otf< / a > < / li > < li class = "progresssection" > < a href = "S-prn.html" > prn< / a > < / li > < li class = "progresssection" > < a href = "S-wrl.html" > wrl< / a > < / li > < li class = "progresssection" > < a href = "S-mpr.html" > mpr< / a > < / li > < li class = "progresssection" > < a href = "S-rtp.html" > rtp< / a > < / li > < li class = "progresssection" > < a href = "S-tm.html" > tm< / a > < / li > < li class = "progresssection" > < a href = "S-tst.html" > tst< / a > < / li > < li class = "progresssection" > < a href = "S-chr.html" > chr< / a > < / li > < li class = "progresssection" > < a href = "S-str.html" > str< / a > < / li > < li class = "progressnext" > < a href = "S-otf.html" > ❯ < / a > < / li > < / ul > < / div >
< / nav > <!-- End of weave -->
2020-01-10 01:10:09 +02:00
2020-03-19 02:11:25 +02:00
< / main >
2020-01-10 01:10:09 +02:00
< / body >
< / html >