Si comincia svegliandosi sulla panchina dei vecchietti dopo una notte brava: gli occhi che si aprono a fatica, la piazza sfocata e doppia; e dal Barone il telefonino col sito di San Piero, che si apre a tutto schermo, e il Muro del Sanpierino vero coi messaggi del 2007, «Aggiorna» compreso (Andrea)
- Il risveglio (src/engine/risveglio.js): primo piano sopra la scena, con le battute mentre le palpebre si aprono e i vecchietti che danno la notizia del palio; «Salta» lo salta. - Il telefonino del Barone (src/engine/telefono.js): sale dal basso come il libro, la home di sanpiero50037.it dalla Wayback Machine nello schermo, il mattone del muro apre il muro. - Il muro (assets/muro, tools/muro.py): la pagina vera rifatta statica dal muro riesumato, coi 24 messaggi del dump (senza email né IP) e quelli del gioco, che arrivano con la storia; «Scrivi» spento. - Il gioco sgancia i service worker di altre app rimasti sul suo indirizzo (la Bussola su localhost:8080). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GiECd9RWGMKV7n3K1mdy8T
@@ -13,6 +13,7 @@ COPY assets/voices /usr/share/nginx/html/assets/voices
|
|||||||
COPY assets/credits /usr/share/nginx/html/assets/credits
|
COPY assets/credits /usr/share/nginx/html/assets/credits
|
||||||
COPY assets/effects /usr/share/nginx/html/assets/effects
|
COPY assets/effects /usr/share/nginx/html/assets/effects
|
||||||
COPY assets/closeups /usr/share/nginx/html/assets/closeups
|
COPY assets/closeups /usr/share/nginx/html/assets/closeups
|
||||||
|
COPY assets/muro /usr/share/nginx/html/assets/muro
|
||||||
COPY assets/favicon /usr/share/nginx/html/assets/favicon
|
COPY assets/favicon /usr/share/nginx/html/assets/favicon
|
||||||
COPY assets/video /usr/share/nginx/html/assets/video
|
COPY assets/video /usr/share/nginx/html/assets/video
|
||||||
|
|
||||||
|
|||||||
|
After Width: | Height: | Size: 239 KiB |
|
After Width: | Height: | Size: 130 KiB |
@@ -0,0 +1,57 @@
|
|||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Language" content="it">
|
||||||
|
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
|
||||||
|
<meta name="ProgId" content="FrontPage.Editor.Document">
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
|
||||||
|
<title>Responsabilità degli Iscritti</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
<center>
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="600">
|
||||||
|
<tr>
|
||||||
|
<td width="100%">
|
||||||
|
<p align="center" style="margin-top: 0; margin-bottom: 0"><b>
|
||||||
|
<font size="6" face="Arial">Responsabilità degli Iscritti</font></b></p>
|
||||||
|
<p align="center" style="margin-top: 0; margin-bottom: 0"> </p>
|
||||||
|
<p align="justify" style="margin-top: 0; margin-bottom: 0">
|
||||||
|
<font face="Arial">Si fa presente che lo <b>Staff di WWW.SANPIERO50037.IT</b>,
|
||||||
|
non effettuerà controllo preventivo sul contenuto dei commenti e degli
|
||||||
|
interventi sul "MURO DEL SANPIERINO", ma, <b><u>vista la possibilità di
|
||||||
|
risalire agli autori degli stessi</u></b>, si sentirà autorizzato alla
|
||||||
|
comunicazione di tali dati ai <b>Soggetti Interessati e all'Autorità
|
||||||
|
Giudiziaria</b> in caso di violazione di qualsiasi articolo del C.C. e del
|
||||||
|
C.P., si invita pertanto a prendere coscienza delle<b> responsabilità
|
||||||
|
civili e penali </b>che l'utente si assume in prima persona per il
|
||||||
|
contenuto di ciò che scrive.</font></p>
|
||||||
|
<p align="justify" style="margin-top: 0; margin-bottom: 0"> </p>
|
||||||
|
<p align="justify" style="margin-top: 0; margin-bottom: 0"><b>
|
||||||
|
<font face="Arial">E' pertanto necessario che tutti gli utenti garantiscano il contenuto:</font></b></p>
|
||||||
|
<p align="justify" style="margin-top: 0; margin-bottom: 0">
|
||||||
|
<font face="Arial"><b>1 -</b> Non sia volgare, diffamatorio e
|
||||||
|
pregiudizievole;</font></p>
|
||||||
|
<p align="justify" style="margin-top: 0; margin-bottom: 0">
|
||||||
|
<font face="Arial"><b>2 -</b> Non violi in alcun modo i diritti di terzi;</font></p>
|
||||||
|
<p align="justify" style="margin-top: 0; margin-bottom: 0">
|
||||||
|
<font face="Arial"><b>3 -</b> Non violi i diritti stabiliti dal
|
||||||
|
<a href="Privacy.htm">D.Lgs. 30.06.2003 n°196</a> e ogni altra normativa
|
||||||
|
in</font></p>
|
||||||
|
<p align="justify" style="margin-top: 0; margin-bottom: 0">
|
||||||
|
<font face="Arial"> materia di Privacy;</font></p>
|
||||||
|
<p align="justify" style="margin-top: 0; margin-bottom: 0">
|
||||||
|
<font face="Arial"><b>4 -</b> Non violi la vigente normativa in materia di
|
||||||
|
Pubblica Sicurezza e Buon Costume e/o altre norme imperative;</font></p>
|
||||||
|
<p align="justify" style="margin-top: 0; margin-bottom: 0">
|
||||||
|
<font face="Arial"><b>5 -</b> Non venga inserito per fini di "Spamming".</font></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</center>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p align="center"><a href="index.html" style="font: bold 14px Tahoma; color: #800000">« Torna al Muro</a></p></body>
|
||||||
|
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
|
||||||
|
<meta name="ProgId" content="FrontPage.Editor.Document">
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
|
||||||
|
<title>Guida al Muro del Sanpierino</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
<center>
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="1024">
|
||||||
|
<tr>
|
||||||
|
<td width="100%">
|
||||||
|
<p class="MsoNormal" align="center" style="text-align: center; margin-top: 0; margin-bottom: 0">
|
||||||
|
<b><span style="font-size: 22.0pt">Guida al Muro del Sanpierino</span></b></p>
|
||||||
|
<p class="MsoNormal" style="text-align: justify; margin-top: 0; margin-bottom: 0">
|
||||||
|
<b><u><span style="text-decoration: none; font-size: 18.0pt"> </span></u></b></p>
|
||||||
|
<p class="MsoNormal" style="text-align: justify; margin-top: 0; margin-bottom: 0">
|
||||||
|
<b><u><span style="font-size: 18.0pt">1 – Iscrizione</span></u></b></p>
|
||||||
|
<p class="MsoNormal" style="text-align: justify; margin-top: 0; margin-bottom: 0">
|
||||||
|
<span style="font-size: 14.0pt">Se vuoi scrivere un messaggio sul Muro del
|
||||||
|
Sanpierino adesso dovrai prima essere iscritto. Iscriversi è gratuito e
|
||||||
|
semplicissimo, sarà sufficiente andare sul Muro e cliccare sull’icona
|
||||||
|
“Scrivi”, da lì verrai inviato nella pagina di “Login” dove troverai il
|
||||||
|
tasto “Iscriviti”, cliccandolo ti troverai direttamente nella pagina
|
||||||
|
d’Iscrizione. Appena riceveremo la tua richiesta attiveremo il tuo account
|
||||||
|
e riceverai una mail, all’indirizzo inserito, a conferma dell’attivazione.
|
||||||
|
A quel punto potrai scrivere sempre e in qualunque momento sul Muro.</span></p>
|
||||||
|
<p class="MsoNormal" style="text-align: justify; margin-top: 0; margin-bottom: 0">
|
||||||
|
<span style="font-size: 14.0pt"> </span></p>
|
||||||
|
<p class="MsoNormal" style="text-align: justify; margin-top: 0; margin-bottom: 0">
|
||||||
|
<b><u><span style="font-size: 18.0pt">2 – Scrivere</span></u></b></p>
|
||||||
|
<p class="MsoNormal" style="text-align: justify; margin-top: 0; margin-bottom: 0">
|
||||||
|
<span style="font-size: 14.0pt">Per scrivere sul Muro sarà sufficiente
|
||||||
|
cliccare sul tasto “Scrivi” e inserire il proprio Nickname e Password (se
|
||||||
|
non si è iscritti segui le istruzioni al paragrafo 1- Iscrizione). Vi
|
||||||
|
troverete nella pagina di scrittura vera e propria dove potrete scegliere
|
||||||
|
se mantenere il vostro Nickname d’iscrizione o variarlo, se rendere
|
||||||
|
visibile il vostro indirizzo e-mail oppure no e ancora scegliere fra le
|
||||||
|
oltre 470 smiles disponibili e ancora variare l’aspetto grafico del vostro
|
||||||
|
messaggio consultando la pagiana di aiuto per la personalizzazione… tante
|
||||||
|
alternative che sicuramente saranno di vostro gradimento!</span></p>
|
||||||
|
<p class="MsoNormal" style="text-align: justify; margin-top: 0; margin-bottom: 0">
|
||||||
|
<span style="font-size: 14.0pt"> </span></p>
|
||||||
|
<p class="MsoNormal" style="text-align: justify; margin-top: 0; margin-bottom: 0">
|
||||||
|
<b><u><span style="font-size: 18.0pt">3 – Privacy & Responsabilità</span></u></b></p>
|
||||||
|
<p class="MsoNormal" style="text-align: justify; margin-top: 0; margin-bottom: 0">
|
||||||
|
<span style="font-size: 14.0pt">L’aspetto più importante di questo Nuovo
|
||||||
|
Muro del Sanpierino è proprio quello relativo alle Resposabilità che ogni
|
||||||
|
utente si assume nei post inseriti. Ogni Utente, pur facendo salva la
|
||||||
|
propria Privacy, non dovrà in alcun modo ledere gli altrui diritti e
|
||||||
|
quindi:</span></p>
|
||||||
|
<p style="text-align: justify; margin: 0 0cm">
|
||||||
|
<span style="font-size: 14.0pt"> <b>1 -</b> Non dovrà essere
|
||||||
|
volgare, diffamatorio e pregiudizievole;</span></p>
|
||||||
|
<p style="text-align: justify; text-indent: 35.4pt; margin: 0 0cm"><b>
|
||||||
|
<span style="font-size: 14.0pt">2 -</span></b><span style="font-size: 14.0pt">
|
||||||
|
Non dovrà violare in alcun modo i diritti di terzi;</span></p>
|
||||||
|
<p style="text-align: justify; text-indent: 35.4pt; margin: 0 0cm"><b>
|
||||||
|
<span style="font-size: 14.0pt">3 -</span></b><span style="font-size: 14.0pt">
|
||||||
|
Non dovrà violare i diritti stabiliti dal
|
||||||
|
<a href="http://www.sanpiero50037.it/spswall/Privacy.htm" style="color: blue; text-decoration: underline; text-underline: single">
|
||||||
|
D.Lgs. 30.06.2003 n°196</a> e ogni altra </span></p>
|
||||||
|
<p style="text-align: justify; text-indent: 35.4pt; margin: 0 0cm">
|
||||||
|
<span style="font-size: 14.0pt"> normativa in materia di Privacy;</span></p>
|
||||||
|
<p style="text-align: justify; margin-left: 35.4pt; margin-right: 0cm; margin-top: 0; margin-bottom: 0">
|
||||||
|
<b><span style="font-size: 14.0pt">4 -</span></b><span style="font-size: 14.0pt">
|
||||||
|
Non dovrà violare la vigente normativa in materia di Pubblica Sicurezza e
|
||||||
|
</span></p>
|
||||||
|
<p style="text-align: justify; margin-left: 35.4pt; margin-right: 0cm; margin-top: 0; margin-bottom: 0">
|
||||||
|
<b><span style="font-size: 14.0pt"> </span></b>
|
||||||
|
<span style="font-size: 14.0pt">Buon Costume e/o altre norme imperative;</span></p>
|
||||||
|
<p style="text-align: justify; text-indent: 35.4pt; margin: 0 0cm"><b>
|
||||||
|
<span style="font-size: 14.0pt">5 -</span></b><span style="font-size: 14.0pt">
|
||||||
|
Non dovrà inserire post per fini di "Spamming".</span></p>
|
||||||
|
<p style="text-align: justify; margin: 0 0cm">
|
||||||
|
<span style="font-size: 14.0pt">In caso di violazione di una delle regole
|
||||||
|
descritte qui sopra il messaggio verrà cancellato quanto prima e, in caso
|
||||||
|
di richiesta da parte del Soggetto interessato o dell’Autorità
|
||||||
|
Giudiziaria, verranno comunicati i suoi dati oltre, naturalmente, al
|
||||||
|
blocco dell’Utente che si renderà responsabile di tale messaggio. Per
|
||||||
|
tutti gli altri messaggi la Privacy dei nostri Utenti sarà tutelata come
|
||||||
|
descritto dal
|
||||||
|
<a href="http://www.sanpiero50037.it/spswall/Privacy.htm" style="color: blue; text-decoration: underline; text-underline: single">
|
||||||
|
D.Lgs. 30.06.2003 n°196</a>, tranne nei caso di violazione dei nostri Data
|
||||||
|
Base da attacchi esterni.</span></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</center>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p align="center"><a href="index.html" style="font: bold 14px Tahoma; color: #800000">« Torna al Muro</a></p></body>
|
||||||
|
|
||||||
|
</html>
|
||||||
|
After Width: | Height: | Size: 177 B |
|
After Width: | Height: | Size: 173 B |
|
After Width: | Height: | Size: 202 B |
|
After Width: | Height: | Size: 284 B |
|
After Width: | Height: | Size: 278 B |
|
After Width: | Height: | Size: 176 B |
|
After Width: | Height: | Size: 181 B |
|
After Width: | Height: | Size: 182 B |
|
After Width: | Height: | Size: 484 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 247 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 904 B |
|
After Width: | Height: | Size: 219 B |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 208 B |
|
After Width: | Height: | Size: 284 B |
|
After Width: | Height: | Size: 610 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 269 B |
|
After Width: | Height: | Size: 152 B |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 128 B |
|
After Width: | Height: | Size: 129 B |
|
After Width: | Height: | Size: 109 B |
|
After Width: | Height: | Size: 138 B |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 167 B |
|
After Width: | Height: | Size: 146 B |
|
After Width: | Height: | Size: 758 B |
|
After Width: | Height: | Size: 605 B |
|
After Width: | Height: | Size: 198 B |
|
After Width: | Height: | Size: 43 B |
|
After Width: | Height: | Size: 156 B |
|
After Width: | Height: | Size: 363 B |
|
After Width: | Height: | Size: 573 B |
|
After Width: | Height: | Size: 202 B |
|
After Width: | Height: | Size: 234 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 303 B |
|
After Width: | Height: | Size: 340 B |
|
After Width: | Height: | Size: 8.1 KiB |
@@ -0,0 +1,40 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="it" xml:lang="it">
|
||||||
|
<head>
|
||||||
|
<!-- Il Muro del Sanpierino (2007-2009, Manzolo e Baron De Duke) dentro il gioco, sul telefonino del Barone: lo stesso
|
||||||
|
markup di thewall.php, coi messaggi veri (tools/muro.py: niente email né IP) e quelli del gioco
|
||||||
|
(story.closeups.muro_sanpierino.messages, ognuno con la sua condizione). «Scrivi» è spento (Andrea, 31 ottobre). -->
|
||||||
|
<link rel="stylesheet" type="text/css" href="./muro.css" />
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<title>Il Muro del Sanpierino</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<table width="1024" border="0" align="center">
|
||||||
|
<td width="250"> </td>
|
||||||
|
<td width="524" align="center">
|
||||||
|
<a href="#" id="logo"><img class="imgnoborder" src="./img/logo_trasparente_obliquo.gif" alt="Return to Website" /></a>
|
||||||
|
</td>
|
||||||
|
<td width="250"> </td>
|
||||||
|
</table>
|
||||||
|
<div><br /></div>
|
||||||
|
<div class="divcenter">
|
||||||
|
<div class="divcenter">
|
||||||
|
<span class="title">Il Muro del Sanpierino</span><br />
|
||||||
|
<a href="./Responsabilita.htm"><span class="pblue">Responsabilita'</span></a>
|
||||||
|
<span class="pblack"> - </span>
|
||||||
|
<a href="./guida_al_muro_del_sanpierino.htm"><span class="pred">Guida al Muro<br /></span></a>
|
||||||
|
<span class="pnormal" id="count"></span>
|
||||||
|
<br />
|
||||||
|
<div class="bar"></div>
|
||||||
|
<div id="wall"></div>
|
||||||
|
<div class="bar"></div>
|
||||||
|
<div>
|
||||||
|
<p class="powered">Powered by</p>
|
||||||
|
<p><img src="./img/logomanzolo.jpg" alt=""/></p>
|
||||||
|
<p class="poweredby">Manzolo</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script type="module" src="./muro.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,162 @@
|
|||||||
|
{
|
||||||
|
"smiles": {
|
||||||
|
"[13_grin]": "13_grin.gif",
|
||||||
|
"[14_bigmouth]": "14_bigmouth.gif",
|
||||||
|
"[15_weeping]": "15_weeping.gif",
|
||||||
|
"[16_angry]": "16_angry.gif",
|
||||||
|
"[17_wink]": "17_wink.gif",
|
||||||
|
"[1_grin]": "1_grin.gif",
|
||||||
|
"[20_grumpy]": "20_grumpy.gif",
|
||||||
|
"[21_irked]": "21_irked.gif",
|
||||||
|
"[22_yikes]": "22_yikes.gif",
|
||||||
|
"[24_shocked]": "24_shocked.gif",
|
||||||
|
"[8-)]": "25_coolguy.gif",
|
||||||
|
"[28_spin]": "28_spin.gif",
|
||||||
|
"[ambulance]": "ambulance.gif",
|
||||||
|
"[banghead]": "banghead.gif",
|
||||||
|
"[beret]": "beret.gif",
|
||||||
|
"[bouncer]": "bouncer.gif",
|
||||||
|
"[bowtie]": "bowtie.gif",
|
||||||
|
"[detective]": "detective.gif",
|
||||||
|
"[duh2]": "duh2.gif",
|
||||||
|
"[fryingpan]": "fryingpan.gif",
|
||||||
|
"[highfive]": "highfive.gif",
|
||||||
|
"[paperbag]": "paperbag.gif",
|
||||||
|
"[shocking]": "shocking.gif",
|
||||||
|
"[simpsonhomer]": "simpsonhomer.gif",
|
||||||
|
"[splat]": "splat.gif",
|
||||||
|
"[surfing]": "surfing.gif",
|
||||||
|
"[thumbsup2]": "thumbsup2.gif",
|
||||||
|
"[tombstone]": "tombstone.gif",
|
||||||
|
"[trophy]": "trophy.gif",
|
||||||
|
"[user]": "user.gif",
|
||||||
|
"[vader2]": "vader2.gif",
|
||||||
|
"[wave2]": "wave2.gif",
|
||||||
|
"[weightlifter]": "weightlifter.gif",
|
||||||
|
"[wonderwoman]": "wonderwoman.gif",
|
||||||
|
"[yipes]": "yipes.gif",
|
||||||
|
"[pampa]": "pampa.gif"
|
||||||
|
},
|
||||||
|
"messages": [
|
||||||
|
{
|
||||||
|
"nick": "WWW.SANPIERO50037.IT X IL SOCIALE",
|
||||||
|
"date": "2007-11-14 22:48:20",
|
||||||
|
"text": "<br>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nick": "Porc@ontha$..!",
|
||||||
|
"date": "2007-11-14 22:24:36",
|
||||||
|
"text": "Eccomi anche io a sverginare il nuovo muro...[1_grin]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nick": "Baron De Duke",
|
||||||
|
"date": "2007-11-14 21:14:31",
|
||||||
|
"text": "<font color=#0000FF>X BANTU\r\nL'INDIRIZZO E-MAIL INSERITO NON E' VALIDO, PER CORTESIA CONTATTAMI VIA E-MAIL. GRAZIE</font>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nick": "Megy",
|
||||||
|
"date": "2007-11-14 19:04:25",
|
||||||
|
"text": "Ieri ed oggi,con la Ferrari è andato in pista un ragazzo di 38 anni,tedesco...dice prometta bene!!![15_weeping]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nick": "?",
|
||||||
|
"date": "2007-11-14 18:49:21",
|
||||||
|
"text": "Il problema del Reconquista è che non la buttano dentro nemmeno con le mani...tanto l'importante è divertirsi e che nessuno si faccia del male.[ambulance]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nick": "tetsuyaharada",
|
||||||
|
"date": "2007-11-14 17:37:19",
|
||||||
|
"text": "glazie pel il nuovo mulo"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nick": "manutd",
|
||||||
|
"date": "2007-11-14 16:50:29",
|
||||||
|
"text": "bravi ragazzi ottimo lavoro ci si deve sempre un po rompere le [bouncer][bouncer]però poi le cose vengon fuori [28_spin][28_spin][28_spin]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nick": "fraus",
|
||||||
|
"date": "2007-11-14 14:59:18",
|
||||||
|
"text": "Mariolino Sindaco![1_grin]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nick": "TeoNick",
|
||||||
|
"date": "2007-11-14 14:37:34",
|
||||||
|
"text": "Ma che tipo di Mariolino sei?"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nick": "Mariolino for President",
|
||||||
|
"date": "2007-11-14 12:04:12",
|
||||||
|
"text": "[14_bigmouth] effettivamente ci sarebbe da infamare, ma dato che vu siete voi che correte in campo lasciamo fare, se vi piace così!\r\nVolevo dire soltanto che quello che manca, non è il gioco, il fiato la panchina ecc ecc ecc, ma l'attaccamento alla maglia, mi parete un pò carenti di grinta, nessuno letica con nessuno, il piedino si tira sempre indietro (e non dite che il giorno dopo c'è da andà a lavorare che la un regge)ma soprattutto NESSUNO DICE NULLA ALL'ARBITRO, volete mettere le leticate di Manolo con conseguenti espulsioni? superiori.\r\nIn conclusione, va bene così, basta che vu vi diverta, ma dubito che il risultato non vi scossi! SEMPRE E COMUNQUE FORZA RECONQUISTA"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nick": "Reconquista",
|
||||||
|
"date": "2007-11-14 10:34:48",
|
||||||
|
"text": "Ovvia...su con le infamate!!!ce le meritiamo...[16_angry][16_angry][16_angry]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nick": "pizzu",
|
||||||
|
"date": "2007-11-14 10:21:32",
|
||||||
|
"text": "Finalmente il nuovo muro da imbrattare!! Complimenti per l'ottimo lavoro a Barone e Manzolo! [8-)]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nick": "Mariolino for President",
|
||||||
|
"date": "2007-11-14 08:51:48",
|
||||||
|
"text": "[22_yikes] MA CHE NEVA IN MONTAGNA?[17_wink]\r\nPENSIERO DEL MATTINO:\r\n\"Meglio vivere con due pensioni oggi, che con una soltanto domani\""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nick": "TeoNick",
|
||||||
|
"date": "2007-11-14 00:41:57",
|
||||||
|
"text": "Buonasera Muraioli! Ho un questito: è sempre censurato faenza? su quello vecchio UN si poteva [22_yikes][22_yikes][22_yikes][22_yikes][22_yikes]\r\n[yipes][wave2]\r\n\r\nP.s. Mariolino chi? secondo me l'è lui l'untore!![bouncer][bouncer]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nick": "Baron De Duke",
|
||||||
|
"date": "2007-11-14 00:32:47",
|
||||||
|
"text": "NONOSTANTE QUALCHE INGEGNOSO IMPAZIENTE... [simpsonhomer] ECCO A VOI IL \"NUOVO MURO DEL SANPIERINO\"!!![banghead]\r\n\r\nAVANTI CON GLI SPRAY!!!! [beret][splat][thumbsup2][wave2]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nick": "Manzolo (Welcome to the real world)",
|
||||||
|
"date": "2007-11-14 00:32:12",
|
||||||
|
"text": "Ci siamo!!!!\r\nCari paesani e non, il nuovo muro è online!!!\r\nOgni vostro suggerimento sarà prezioso per migliorare questo nostro spazio che da oggi perde la sua \"staticità\" [tombstone] ...\r\nFacciamolo crescere con idee e critiche...\r\nYour potential. Our passion!\r\n\r\nANDIAMO A PRENDERCI LA [trophy]\r\n\r\nIl presidente [surfing]\r\n\r\nP.s. sconfitta e sculo (per) ora si possono scrivere [24_shocked]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nick": "Cecchino",
|
||||||
|
"date": "2007-11-14 00:31:58",
|
||||||
|
"text": "Grandi ragazzi!! Manzolo ora ricordati che c'è da fissare la vacanza rider!! Pampa quest'anno ti svernicio!!"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nick": "?",
|
||||||
|
"date": "2007-11-13 23:19:45",
|
||||||
|
"text": "Reconquista...datevi foco!!![22_yikes]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nick": "coccinella",
|
||||||
|
"date": "2007-11-13 22:21:52",
|
||||||
|
"text": "buona idea questo nuovo muro, complimenti a gabry e al manzolo che si sono impegnati a rendere un po di vita a questo muro. ciao ciao"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nick": "Mariolino for President",
|
||||||
|
"date": "2007-11-13 17:04:04",
|
||||||
|
"text": "ma funziono?[22_yikes]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nick": "m.d.b.",
|
||||||
|
"date": "2007-11-13 10:24:51",
|
||||||
|
"text": "ovvia....m'è riuscito entrare....grande barone e grande manzolo, vediamo se ora si ripiglia ivvia con questo nuovo metodo!!!!\r\ndomenica s'è beccato, mi sa che sono io che porto s c u l o!"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nick": "Mariolino for President",
|
||||||
|
"date": "2007-11-13 09:23:34",
|
||||||
|
"text": "in attesa di nuove [16_angry]auguro allo staff buon lavoro ed un felice anno nuovo[22_yikes] fose sono un pò prematuro[24_shocked][15_weeping][13_grin][14_bigmouth][17_wink][21_irked][20_grumpy][pampa][pampa][wonderwoman][wonderwoman][weightlifter][shocking][fryingpan][duh2][detective]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nick": "Kiara",
|
||||||
|
"date": "2007-11-10 21:51:53",
|
||||||
|
"text": "CIAO MURO!COMPLIMENTI agli autori, barone e manzolo.... è stato uno sporco lavoro ma qualcuno lo doveva pur fare....[8-)]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nick": "Manzolo e Baron De Duke [surfing]",
|
||||||
|
"date": "2007-11-10 19:22:23",
|
||||||
|
"text": "IL DADO E' TRATTO!!! [highfive]<br>Finalmente possiamo presentarvi il rinnovato \"MURO DEL SANPIERINO\"! [8-)]<br>Da oggi i messaggi andranno nuovamente On-Line istantaneamente... l'unica cosa che vi chiediamo è una piccola iscrizione. [bowtie]<br>Facciamo presente che l'anonimato rimarrà garantito, unica eccezione sarà fatta quando i messaggi avranno contenuti in disaccordo con le condizioni espresse in fase di registrazione. Potrete consultare i casi nella pagina \"Responsabilità\" che troverete qui sopra. [paperbag]<br>Speriamo che il nostro lavoro sia di vostro gradimento e rimaniamo in attesa dei numerosi nuovi messaggi!!! [user]<br>The Wall is come back... Nothing is Impossible!!! [vader2]"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
body {text-align:center;margin:0 auto;padding:0px;background-color:#F7E1C0;font: 20px Arial; color: #800000; font-weight: bold; font-style: normal; text-decoration: none;}
|
||||||
|
.pagerbutton { text-align: center; padding:2px; border:1px solid #191E66;font:12px verdana,arial,helvetica;background-color: #DBE0F5;cursor:pointer; color: #191E66; }
|
||||||
|
.pagerbutton_over { background-color: #F2F4FA; color: #A1A1A1; }
|
||||||
|
.pagerbutton_disabled { cursor: default; padding:2px; color: #aaaaaa;}
|
||||||
|
|
||||||
|
.response { font: 14px Tahoma; color: #800000; font-weight: bold; font-style: italic; text-decoration: none; }
|
||||||
|
.title {font: 30px Tahoma; color: #800000; font-weight: bold; font-style: normal; text-decoration: none;}
|
||||||
|
.text { font: 20px Arial; color: #800000; font-weight: bold; font-style: normal; text-decoration: none; }
|
||||||
|
.question { font: 14px Tahoma; color: #002288; font-weight: bold; font-style: normal; text-decoration: none; }
|
||||||
|
.name { font: 24px Tahoma; color: #800000; font-weight: bold; font-style: normal; text-decoration: none; }
|
||||||
|
a { font: 12px Tahoma; color: #800000; font-weight: normal; font-style: normal; text-decoration: none; }
|
||||||
|
a:visited { font: 12px Tahoma; color: #800000; font-weight: normal; font-style: normal; text-decoration: none; }
|
||||||
|
a:hover { font: 12px Tahoma; color: #800000; font-weight: normal; font-style: normal; text-decoration: none; }
|
||||||
|
|
||||||
|
.divcenter {margin-right:auto;margin-left:auto;width:87%}
|
||||||
|
.pblue {font: 18px Tahoma; color: #0000A0;font-weight: bold;}
|
||||||
|
.pred {font: 18px Tahoma; color: #FF0000;font-weight: bold;}
|
||||||
|
.pblack {font: 18px Tahoma; color: #000000;font-weight: bold;}
|
||||||
|
.pnormal {font: 12px Tahoma; color: #800000;font-weight: bold;}
|
||||||
|
|
||||||
|
.powered {font: 12px Tahoma; color: #800000;font-weight: bold;}
|
||||||
|
.poweredby {font: 18px Tahoma; color: #800000;font-weight: bold;}
|
||||||
|
|
||||||
|
.spacer {border-top: 3px dotted #800000; margin-top: 10px; margin-bottom: 0px}
|
||||||
|
|
||||||
|
.td30 {width:30%}
|
||||||
|
.td70 {width:70%;text-align:right}
|
||||||
|
.tdcenter {text-align:center}
|
||||||
|
|
||||||
|
.imgnoborder {border:0px;}
|
||||||
|
.imgbar {border:0px;vertical-align:middle;}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
// Il Muro del Sanpierino nel telefonino del Barone: rifà quello che facevano thewall.php, drawbar.php,
|
||||||
|
// getsmile.php e messagebody.php. I messaggi del gioco (story.closeups.muro_sanpierino.messages) stanno in cima,
|
||||||
|
// quelli che valgono adesso (ognuno col suo `when`); sotto i messaggi veri del 2007. «Aggiorna» ricarica la pagina:
|
||||||
|
// se nel frattempo la storia è andata avanti, compaiono i messaggi nuovi.
|
||||||
|
import { check } from '../../src/engine/game.js';
|
||||||
|
|
||||||
|
const PER_PAGE = 50;
|
||||||
|
const game = (() => { try { return parent.game; } catch { return null; } })();
|
||||||
|
const def = game?.story.closeups.muro_sanpierino;
|
||||||
|
const { smiles, messages: real } = await (await fetch('./messaggi.json')).json();
|
||||||
|
const ours = (def?.messages ?? []).filter(m => check(m.when, game.state)).sort((a, b) => b.date.localeCompare(a.date));
|
||||||
|
const all = [...ours, ...real];
|
||||||
|
const from = Math.max(0, Number(new URLSearchParams(location.search).get('pag')) || 0);
|
||||||
|
|
||||||
|
// Gli smile come li metteva getsmile.php, e gli a capo.
|
||||||
|
const smile = text => Object.entries(smiles).reduce((t, [code, link]) => t.split(code).join(` <img src="./img/${link}" alt="" />`), text);
|
||||||
|
const body = m => smile(m.text).replace(/\r\n|\r|\n/g, '<br />');
|
||||||
|
const when = d => { const [day, hour] = d.split(' '), [y, mo, dd] = day.split('-'); return `${dd}/${mo}/${y}<br />${hour}`; };
|
||||||
|
|
||||||
|
document.getElementById('count').textContent = `(Messaggi lasciati sul muro: ${all.length})`;
|
||||||
|
document.getElementById('wall').innerHTML = all.slice(from, from + PER_PAGE).map(m => `
|
||||||
|
<p class="spacer"><img src="./img/spacer.gif" alt="" /></p>
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="padding:5px;">
|
||||||
|
<tr><td class="td30"><div class="question"></div></td><td class="td70"><div class="text">${when(m.date)}</div></td></tr>
|
||||||
|
<tr><td align="left"><div class="question">Chi Sei? </div><br /></td><td align="left"><div class="name"> ${smile(m.nick)}</div><br /></td></tr>
|
||||||
|
<tr><td align="left" valign="top"><div class="question">Messaggio </div><br /></td><td align="left"><div class="response"><p>${body(m)}</p><br /><br /></div></td></tr>
|
||||||
|
</table>`).join('');
|
||||||
|
|
||||||
|
// La barra coi pulsanti (drawbar.php): Inizio e Precedente spenti sulla prima pagina, Successiva e Ultima
|
||||||
|
// sull'ultima; «Scrivi» sempre spento.
|
||||||
|
const page = n => `./index.html${n > 0 ? '?pag=' + n : ''}`, last = Math.max(0, Math.floor((all.length - 1) / PER_PAGE) * PER_PAGE);
|
||||||
|
const buttons = [
|
||||||
|
['Inizio', 'pagefirst.gif', from > 0 && (() => location.href = page(0)), true],
|
||||||
|
['Precedente', 'pageback.gif', from > 0 && (() => location.href = page(from - PER_PAGE)), true],
|
||||||
|
['SCRIVI', 'postmessage.gif', null, true],
|
||||||
|
['Aggiorna', 'refresh.gif', () => location.reload(), true],
|
||||||
|
['Home', 'home.gif', () => game?.closeupHome(), true],
|
||||||
|
['Successiva', 'pageahead.gif', from < last && (() => location.href = page(from + PER_PAGE)), false],
|
||||||
|
['Ultima', 'pagelast.gif', from < last && (() => location.href = page(last)), false],
|
||||||
|
];
|
||||||
|
for (const bar of document.querySelectorAll('.bar')) {
|
||||||
|
const table = document.createElement('table'), tr = table.insertRow();
|
||||||
|
Object.assign(table, { width: '100%', border: 0, cellPadding: 0, cellSpacing: 5 });
|
||||||
|
for (const [label, icon, go, before] of buttons) {
|
||||||
|
const div = tr.insertCell().appendChild(document.createElement('div')), img = `<img class="imgbar" src="./img/${icon}" alt="" />`;
|
||||||
|
div.className = 'pagerbutton' + (go ? '' : ' pagerbutton_disabled');
|
||||||
|
div.innerHTML = before ? `${img} ${label}` : `${label} ${img}`;
|
||||||
|
if (go) {
|
||||||
|
div.onmouseover = () => { div.className = 'pagerbutton pagerbutton_over'; };
|
||||||
|
div.onmouseout = () => { div.className = 'pagerbutton'; };
|
||||||
|
div.onclick = go;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bar.replaceWith(table);
|
||||||
|
}
|
||||||
|
document.getElementById('logo').onclick = e => { e.preventDefault(); game?.closeupHome(); };
|
||||||
@@ -23,9 +23,9 @@
|
|||||||
"file": "andrea-aa668b37c2.mp3",
|
"file": "andrea-aa668b37c2.mp3",
|
||||||
"sec": 2.48
|
"sec": 2.48
|
||||||
},
|
},
|
||||||
"andrea|E stamattina, in piazza, è successo qualcosa...": {
|
"andrea|Ieri sera s'è fatto tardi. Molto tardi...": {
|
||||||
"file": "andrea-4ab41e1b8e.mp3",
|
"file": "andrea-03bff1514f.mp3",
|
||||||
"sec": 3.28
|
"sec": 2.92
|
||||||
},
|
},
|
||||||
"andrea|La colonna, il centro del paese. Da qui passa tutto: le notizie, il Palio, i pettegolezzi.": {
|
"andrea|La colonna, il centro del paese. Da qui passa tutto: le notizie, il Palio, i pettegolezzi.": {
|
||||||
"file": "andrea-c0e71bfd36.mp3",
|
"file": "andrea-c0e71bfd36.mp3",
|
||||||
@@ -199,18 +199,6 @@
|
|||||||
"file": "andrea-b444f5f09a.mp3",
|
"file": "andrea-b444f5f09a.mp3",
|
||||||
"sec": 2.6
|
"sec": 2.6
|
||||||
},
|
},
|
||||||
"andrea|Il palio è sparito! Il quadro che hanno dipinto i ragazzi delle medie.": {
|
|
||||||
"file": "andrea-f07440a0ee.mp3",
|
|
||||||
"sec": 4.48
|
|
||||||
},
|
|
||||||
"andrea|Lo tenevano a scuola: stamani la Gianna ha trovato il posto vuoto.": {
|
|
||||||
"file": "andrea-42f13445d4.mp3",
|
|
||||||
"sec": 4.08
|
|
||||||
},
|
|
||||||
"andrea|La festa è domani: se nessuno lo ritrova, salta tutto. Tocca a me.": {
|
|
||||||
"file": "andrea-69337973d0.mp3",
|
|
||||||
"sec": 5.94
|
|
||||||
},
|
|
||||||
"andrea|Quattro ragazzi che affilano canne di bambù col coltellino e ci legano le lenze.": {
|
"andrea|Quattro ragazzi che affilano canne di bambù col coltellino e ci legano le lenze.": {
|
||||||
"file": "andrea-98ff3bf0a3.mp3",
|
"file": "andrea-98ff3bf0a3.mp3",
|
||||||
"sec": 6.41
|
"sec": 6.41
|
||||||
@@ -1071,34 +1059,6 @@
|
|||||||
"file": "andrea-0bd1b0f32e.mp3",
|
"file": "andrea-0bd1b0f32e.mp3",
|
||||||
"sec": 8.7
|
"sec": 8.7
|
||||||
},
|
},
|
||||||
"andrea|Barone! Che ci fai qui?": {
|
|
||||||
"file": "andrea-83abae1419.mp3",
|
|
||||||
"sec": 2.91
|
|
||||||
},
|
|
||||||
"barondeduke|Aspetto uno che mi deve riportare le mutande.": {
|
|
||||||
"file": "barondeduke-3ea60b7083.mp3",
|
|
||||||
"sec": 4.12
|
|
||||||
},
|
|
||||||
"andrea|Le... mutande?": {
|
|
||||||
"file": "andrea-f83ef038f8.mp3",
|
|
||||||
"sec": 3.94
|
|
||||||
},
|
|
||||||
"barondeduke|Le ho perse a poker, ieri sera.": {
|
|
||||||
"file": "barondeduke-5542a06624.mp3",
|
|
||||||
"sec": 1.65
|
|
||||||
},
|
|
||||||
"barondeduke|Avevo due donne e due jack. Entra la terza donna, e penso: «Male male si divide».": {
|
|
||||||
"file": "barondeduke-d4ff967179.mp3",
|
|
||||||
"sec": 7.64
|
|
||||||
},
|
|
||||||
"andrea|E invece?": {
|
|
||||||
"file": "andrea-435306c242.mp3",
|
|
||||||
"sec": 0.67
|
|
||||||
},
|
|
||||||
"barondeduke|L'altro aveva colore.": {
|
|
||||||
"file": "barondeduke-238f525535.mp3",
|
|
||||||
"sec": 1.65
|
|
||||||
},
|
|
||||||
"andrea|Baldoria, con la maglia blucerchiata e un bandierone della Sampdoria grande come lui. Qui a San Piero.": {
|
"andrea|Baldoria, con la maglia blucerchiata e un bandierone della Sampdoria grande come lui. Qui a San Piero.": {
|
||||||
"file": "andrea-a85f0e0a9a.mp3",
|
"file": "andrea-a85f0e0a9a.mp3",
|
||||||
"sec": 6.47
|
"sec": 6.47
|
||||||
@@ -2491,6 +2451,46 @@
|
|||||||
"file": "vecchietto-c8eae2e59e.mp3",
|
"file": "vecchietto-c8eae2e59e.mp3",
|
||||||
"sec": 4.88
|
"sec": 4.88
|
||||||
},
|
},
|
||||||
|
"andrea|Barone! Che ci fai qui?": {
|
||||||
|
"file": "andrea-83abae1419.mp3",
|
||||||
|
"sec": 2.91
|
||||||
|
},
|
||||||
|
"andrea|Hai visto cosa c'era sul muro del Sanpierino?": {
|
||||||
|
"file": "andrea-e79919a1db.mp3",
|
||||||
|
"sec": 2.26
|
||||||
|
},
|
||||||
|
"andrea|Ci vediamo, Barone.": {
|
||||||
|
"file": "andrea-6fb991782a.mp3",
|
||||||
|
"sec": 1.02
|
||||||
|
},
|
||||||
|
"barondeduke|Aspetto uno che mi deve riportare le mutande.": {
|
||||||
|
"file": "barondeduke-3ea60b7083.mp3",
|
||||||
|
"sec": 4.12
|
||||||
|
},
|
||||||
|
"andrea|Le... mutande?": {
|
||||||
|
"file": "andrea-f83ef038f8.mp3",
|
||||||
|
"sec": 3.94
|
||||||
|
},
|
||||||
|
"barondeduke|Le ho perse a poker, ieri sera.": {
|
||||||
|
"file": "barondeduke-5542a06624.mp3",
|
||||||
|
"sec": 1.65
|
||||||
|
},
|
||||||
|
"barondeduke|Avevo due donne e due jack. Entra la terza donna, e penso: «Male male si divide».": {
|
||||||
|
"file": "barondeduke-d4ff967179.mp3",
|
||||||
|
"sec": 7.64
|
||||||
|
},
|
||||||
|
"andrea|E invece?": {
|
||||||
|
"file": "andrea-435306c242.mp3",
|
||||||
|
"sec": 0.67
|
||||||
|
},
|
||||||
|
"barondeduke|L'altro aveva colore.": {
|
||||||
|
"file": "barondeduke-238f525535.mp3",
|
||||||
|
"sec": 1.65
|
||||||
|
},
|
||||||
|
"barondeduke|Il muro? Aspetta, ce l'ho qui sul telefonino.": {
|
||||||
|
"file": "barondeduke-224533634d.mp3",
|
||||||
|
"sec": 3.72
|
||||||
|
},
|
||||||
"andrea|Ma che è sempre là, Borgo?": {
|
"andrea|Ma che è sempre là, Borgo?": {
|
||||||
"file": "andrea-73c12c835b.mp3",
|
"file": "andrea-73c12c835b.mp3",
|
||||||
"sec": 2.34
|
"sec": 2.34
|
||||||
@@ -3439,6 +3439,54 @@
|
|||||||
"file": "andrea-366c066d68.mp3",
|
"file": "andrea-366c066d68.mp3",
|
||||||
"sec": 2.28
|
"sec": 2.28
|
||||||
},
|
},
|
||||||
|
"andrea|«Il palio me lo sono ripreso io». Firmato: il Regolo. Alle tre di notte.": {
|
||||||
|
"file": "andrea-567eeb2111.mp3",
|
||||||
|
"sec": 6.11
|
||||||
|
},
|
||||||
|
"barondeduke|E sotto ci sono io, con le mutande. Nessuno ha risposto.": {
|
||||||
|
"file": "barondeduke-e54e591474.mp3",
|
||||||
|
"sec": 4.45
|
||||||
|
},
|
||||||
|
"andrea|Barone, il sito è tuo: non puoi vedere chi l'ha scritto?": {
|
||||||
|
"file": "andrea-2144daa6ff.mp3",
|
||||||
|
"sec": 3.36
|
||||||
|
},
|
||||||
|
"barondeduke|Potrei. Ma ci vuole il computer di casa. Il telefonino, più di così, non fa.": {
|
||||||
|
"file": "barondeduke-77e0c6cc1d.mp3",
|
||||||
|
"sec": 6.93
|
||||||
|
},
|
||||||
|
"andrea|Mmmh... che botta.": {
|
||||||
|
"file": "andrea-1438d29b12.mp3",
|
||||||
|
"sec": 2.06
|
||||||
|
},
|
||||||
|
"andrea|Ma... dove sono?": {
|
||||||
|
"file": "andrea-3c23967804.mp3",
|
||||||
|
"sec": 2.72
|
||||||
|
},
|
||||||
|
"andrea|Una panchina. In piazza. Coi vecchietti.": {
|
||||||
|
"file": "andrea-c24a2f247f.mp3",
|
||||||
|
"sec": 4
|
||||||
|
},
|
||||||
|
"vecchietta|Oh, s'è svegliato il bello addormentato! Bella nottata, eh?": {
|
||||||
|
"file": "vecchietta-b8cf548a6c.mp3",
|
||||||
|
"sec": 4.97
|
||||||
|
},
|
||||||
|
"vecchietto|Ma l'hai saputo? Il palio è sparito!": {
|
||||||
|
"file": "vecchietto-8b557de040.mp3",
|
||||||
|
"sec": 2.87
|
||||||
|
},
|
||||||
|
"andrea|Il palio? Il quadro che hanno dipinto i ragazzi delle medie?": {
|
||||||
|
"file": "andrea-ce8cefa019.mp3",
|
||||||
|
"sec": 4.21
|
||||||
|
},
|
||||||
|
"vecchietta|Lo tenevano a scuola: stamani la Gianna ha trovato il posto vuoto.": {
|
||||||
|
"file": "vecchietta-ad38926925.mp3",
|
||||||
|
"sec": 3.67
|
||||||
|
},
|
||||||
|
"andrea|La festa è domani: se nessuno lo ritrova, salta tutto. Tocca a me.": {
|
||||||
|
"file": "andrea-69337973d0.mp3",
|
||||||
|
"sec": 5.94
|
||||||
|
},
|
||||||
"andrea|Mahhh... è l'INGORGOOOO!!!": {
|
"andrea|Mahhh... è l'INGORGOOOO!!!": {
|
||||||
"file": "andrea-5694cd3779.mp3",
|
"file": "andrea-5694cd3779.mp3",
|
||||||
"sec": 3.74
|
"sec": 3.74
|
||||||
|
|||||||
@@ -99,6 +99,10 @@ si segna qui con la data e il punto di `src/story/story.js` dove sta; le persone
|
|||||||
- **Le mutande del Barone** (Andrea, 25 ottobre; ci pensa ancora): si ritrovano e gli si riportano, e lui in cambio
|
- **Le mutande del Barone** (Andrea, 25 ottobre; ci pensa ancora): si ritrovano e gli si riportano, e lui in cambio
|
||||||
dà qualcosa che serve alla storia. Proposta: appese come trofeo all'insegna del circolino di Campomigliaio
|
dà qualcosa che serve alla storia. Proposta: appese come trofeo all'insegna del circolino di Campomigliaio
|
||||||
(l'Arcu ci scherza), e in cambio due pile per la torcia della casetta, scarica.
|
(l'Arcu ci scherza), e in cambio due pile per la torcia della casetta, scarica.
|
||||||
|
- **Il sito del Barone e il Muro del Sanpierino** (Andrea, 31 ottobre): parlando col Barone, «Hai visto cosa hanno
|
||||||
|
scritto oggi sul muro del Sanpierino?»; si apre la home di sanpiero50037.it (schermata in arrivo da Andrea) e
|
||||||
|
cliccando sul Muro si apre il muro. Il muro vero è riesumato in `~/Workspaces/misc/spswall` (solo in locale).
|
||||||
|
Da decidere: i messaggi veri (nomi di persone vere, e il muro aprì a novembre 2007) o scritti per il gioco.
|
||||||
- **La racchetta del Tozzino** (Andrea, 25 ottobre): non la trova, Federer sta arrivando, ha paura di perdere e chiede
|
- **La racchetta del Tozzino** (Andrea, 25 ottobre): non la trova, Federer sta arrivando, ha paura di perdere e chiede
|
||||||
aiuto ad Andrea. Si potrebbe legare al poker del Barone (persa la stessa sera?). Serve un foglio sprite del Tozzino
|
aiuto ad Andrea. Si potrebbe legare al poker del Barone (persa la stessa sera?). Serve un foglio sprite del Tozzino
|
||||||
senza racchetta, più una posa con la racchetta ritrovata.
|
senza racchetta, più una posa con la racchetta ritrovata.
|
||||||
|
|||||||
@@ -18,6 +18,25 @@ Online su 50037.manzolo.it tutto fino agli effetti ambientali di Codex. Aperto,
|
|||||||
|
|
||||||
## Dove siamo arrivati
|
## Dove siamo arrivati
|
||||||
|
|
||||||
|
- **Il Muro del Sanpierino sul telefonino del Barone (31 ottobre)**: il Barone ora ha un dialogo a scelte (le
|
||||||
|
mutande, oppure «Hai visto cosa c'era sul muro del Sanpierino?»). Col muro tira fuori il telefonino, che sale dal
|
||||||
|
basso come il libro (primo piano `muro_sanpierino`, `src/engine/telefono.js`, telefonino di Codex); nello schermo la
|
||||||
|
home di sanpiero50037.it dalla Wayback Machine (31 dicembre 2007, senza la data in alto); un tocco la porta a tutto
|
||||||
|
schermo, e il mattone «Nuovo muro del Sanpierino» apre il muro: una pagina vera sopra la scena (`assets/muro`, iframe
|
||||||
|
`#muro`), rifatta da `tools/muro.py` dal muro riesumato (`~/Workspaces/misc/spswall`): stesso markup e CSS, i 24
|
||||||
|
messaggi veri del dump di novembre 2007 (Andrea: «quelli veri»; senza email né IP). I 654 ritrovati nella Wayback
|
||||||
|
Machine (2004-2012) restano solo nel muro riesumato in locale, separati dal gioco (Andrea, 31 ottobre). In
|
||||||
|
cima quelli del gioco (`messages` del primo piano, ognuno col suo `when`). «Scrivi» spento, niente email (Andrea);
|
||||||
|
«Aggiorna» ricarica e fa comparire i messaggi arrivati con la storia; «Home» torna alla home sul telefonino.
|
||||||
|
Test in `story.test.mjs`, prova `npm run browser:telefono`. [DA ANDREA] battute e messaggi del gioco, le cose del
|
||||||
|
2007-2008 sulla home (Ingorgo Sottozero, dicembre), e i **consensi** di chi ha scritto sul muro (i soprannomi dei 24
|
||||||
|
messaggi; per i 654 dell'archivio, se mai entrassero nel gioco: togliere cognomi e messaggi pesanti, e un modo per
|
||||||
|
chiedere di toglierli).
|
||||||
|
- **Il risveglio sulla panchina (31 ottobre)**: la partita non comincia più con Andrea in piedi in piazza ma col
|
||||||
|
risveglio dopo una notte brava (primo piano `risveglio`, `src/engine/risveglio.js`): visto da dentro gli occhi, le
|
||||||
|
palpebre si aprono a fatica e ricascano due volte, la piazza è sfocata e doppia e ondeggia, poi si schiarisce; si
|
||||||
|
è sulla panchina dei vecchietti, che danno la notizia del palio sparito. Il pulsante «Salta» lo salta. Test
|
||||||
|
`risveglio.test.mjs`, prova `npm run browser:risveglio`. [DA ANDREA] le battute, e l'ultima riga dell'introduzione.
|
||||||
- **L'Ingorgo Sonoro (30 ottobre, extra)**: in piazza il vecchio manifesto dell'Ingorgo (`manifesto_ingorgo`); guardandolo
|
- **L'Ingorgo Sonoro (30 ottobre, extra)**: in piazza il vecchio manifesto dell'Ingorgo (`manifesto_ingorgo`); guardandolo
|
||||||
si apre ingrandito (primo piano `poster`, `manifesto-ingorgo.png`: Codex dal manifesto vero del 2014, senza sponsor né
|
si apre ingrandito (primo piano `poster`, `manifesto-ingorgo.png`: Codex dal manifesto vero del 2014, senza sponsor né
|
||||||
data); toccandolo, «Quanto darei per essere all'Ingorgo stasera?!?», poi l'effetto speciale (primo piano `incanto`, `incanto.js`: fasci di
|
data); toccandolo, «Quanto darei per essere all'Ingorgo stasera?!?», poi l'effetto speciale (primo piano `incanto`, `incanto.js`: fasci di
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
<div id="app">
|
<div id="app">
|
||||||
<div id="stage">
|
<div id="stage">
|
||||||
<canvas id="scene" width="640" height="360" aria-label="La scena dell'avventura"></canvas>
|
<canvas id="scene" width="640" height="360" aria-label="La scena dell'avventura"></canvas>
|
||||||
|
<iframe id="muro" hidden title="Il Muro del Sanpierino"></iframe>
|
||||||
<div id="speech" aria-live="polite"></div>
|
<div id="speech" aria-live="polite"></div>
|
||||||
<button id="closeup-close" hidden title="Chiudi (Esc)">Chiudi</button>
|
<button id="closeup-close" hidden title="Chiudi (Esc)">Chiudi</button>
|
||||||
<div id="corner">
|
<div id="corner">
|
||||||
|
|||||||
@@ -17,11 +17,12 @@ server {
|
|||||||
|
|
||||||
# I moduli ES richiedono il MIME type corretto.
|
# I moduli ES richiedono il MIME type corretto.
|
||||||
types {
|
types {
|
||||||
text/html html;
|
text/html html htm;
|
||||||
text/css css;
|
text/css css;
|
||||||
application/javascript js mjs;
|
application/javascript js mjs;
|
||||||
application/json json map;
|
application/json json map;
|
||||||
image/png png;
|
image/png png;
|
||||||
|
image/gif gif;
|
||||||
image/webp webp;
|
image/webp webp;
|
||||||
audio/mpeg mp3;
|
audio/mpeg mp3;
|
||||||
image/svg+xml svg;
|
image/svg+xml svg;
|
||||||
@@ -39,7 +40,7 @@ server {
|
|||||||
location ~* \.(css|js|mjs|json)$ {
|
location ~* \.(css|js|mjs|json)$ {
|
||||||
add_header Cache-Control "no-cache";
|
add_header Cache-Control "no-cache";
|
||||||
}
|
}
|
||||||
location ~* \.(png|webp|jpg|mp3|mp4|woff2|ico)$ {
|
location ~* \.(png|gif|webp|jpg|mp3|mp4|woff2|ico)$ {
|
||||||
add_header Cache-Control $media_cache;
|
add_header Cache-Control $media_cache;
|
||||||
}
|
}
|
||||||
location = /index.html {
|
location = /index.html {
|
||||||
|
|||||||
@@ -16,6 +16,8 @@
|
|||||||
"browser:tressette": "node tests/tressette.browser.mjs",
|
"browser:tressette": "node tests/tressette.browser.mjs",
|
||||||
"browser:scopa": "node tests/scopa.browser.mjs",
|
"browser:scopa": "node tests/scopa.browser.mjs",
|
||||||
"browser:briscola": "node tests/briscola.browser.mjs",
|
"browser:briscola": "node tests/briscola.browser.mjs",
|
||||||
|
"browser:telefono": "node tests/telefono.browser.mjs",
|
||||||
|
"browser:risveglio": "node tests/risveglio.browser.mjs",
|
||||||
"browser:effects": "node tests/ambient.browser.mjs",
|
"browser:effects": "node tests/ambient.browser.mjs",
|
||||||
"serve": "python3 -m http.server 8000"
|
"serve": "python3 -m http.server 8000"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ import * as micro from './micro.js';
|
|||||||
import * as cerbottana from './cerbottana.js';
|
import * as cerbottana from './cerbottana.js';
|
||||||
import { newCorsa, updateCorsa } from './corsa.js';
|
import { newCorsa, updateCorsa } from './corsa.js';
|
||||||
import { newIncanto, updateIncanto } from './incanto.js';
|
import { newIncanto, updateIncanto } from './incanto.js';
|
||||||
|
import { newRisveglio, updateRisveglio } from './risveglio.js';
|
||||||
|
import { newTelefono, updateTelefono, tapTelefono } from './telefono.js';
|
||||||
import * as condor from './condor.js';
|
import * as condor from './condor.js';
|
||||||
import * as campana from './campana.js';
|
import * as campana from './campana.js';
|
||||||
import * as poker from './poker.js';
|
import * as poker from './poker.js';
|
||||||
@@ -312,6 +314,8 @@ export class Game {
|
|||||||
this.queue.unshift(...(this.story.closeups[c.id].tap ?? []));
|
this.queue.unshift(...(this.story.closeups[c.id].tap ?? []));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
// Il telefonino del Barone: un tocco apre il sito, e sul sito il link apre il muro.
|
||||||
|
if (this.story.closeups[c.id].type === 'telefono') return tapTelefono(c, this.story.closeups[c.id]);
|
||||||
if (this.story.closeups[c.id].type) return false; // torcia e minigiochi non si sfogliano
|
if (this.story.closeups[c.id].type) return false; // torcia e minigiochi non si sfogliano
|
||||||
if (c.step === 'cover') Object.assign(c, { step: 'title', t: 0 });
|
if (c.step === 'cover') Object.assign(c, { step: 'title', t: 0 });
|
||||||
else if (c.step === 'title') Object.assign(c, { step: 'turn', t: 0 });
|
else if (c.step === 'title') Object.assign(c, { step: 'turn', t: 0 });
|
||||||
@@ -352,6 +356,14 @@ export class Game {
|
|||||||
this.queue.unshift(...(def.complete ?? []));
|
this.queue.unshift(...(def.complete ?? []));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
// Il telefonino: chi ha visto il muro, chiudendo, lo commenta.
|
||||||
|
if (def?.type === 'telefono') { if (c.step === 'wall') this.queue.unshift(...(def.closing ?? [])); return true; }
|
||||||
|
// Il risveglio, saltato a metà (Esc), finisce comunque: le battute rimaste e poi quelle di dopo.
|
||||||
|
if (def?.type === 'risveglio') {
|
||||||
|
const left = (def.lines ?? []).slice(c.fired).map(({ at, ...e }) => e);
|
||||||
|
this.queue.unshift(...left, ...(def.complete ?? []));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
// I minigiochi: a partita finita (risultato deciso, anche se il conteggio si sta ancora mostrando) la battuta
|
// I minigiochi: a partita finita (risultato deciso, anche se il conteggio si sta ancora mostrando) la battuta
|
||||||
// di chi ha vinto; uscendo prima, quella di chi lascia.
|
// di chi ha vinto; uscendo prima, quella di chi lascia.
|
||||||
if (MINIGAMES[def?.type]) {
|
if (MINIGAMES[def?.type]) {
|
||||||
@@ -364,6 +376,13 @@ export class Game {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Il muro del telefonino (una pagina vera, assets/muro): «Home» torna alla home del sito.
|
||||||
|
closeupHome() {
|
||||||
|
const c = this.closeup;
|
||||||
|
if (!c || this.story.closeups[c.id].type !== 'telefono' || c.step !== 'wall') return false;
|
||||||
|
Object.assign(c, { step: 'site', t: 0 });
|
||||||
|
return true;
|
||||||
|
}
|
||||||
// Bocce e biliardo: si tiene premuto per caricare la forza e si lascia per tirare (mouse, dito o spazio).
|
// Bocce e biliardo: si tiene premuto per caricare la forza e si lascia per tirare (mouse, dito o spazio).
|
||||||
minigame() { const c = this.closeup; return c ? MINIGAMES[this.story.closeups[c.id].type] ?? null : null; }
|
minigame() { const c = this.closeup; return c ? MINIGAMES[this.story.closeups[c.id].type] ?? null : null; }
|
||||||
closeupPress(pointerId) { const m = this.minigame(); return !!m && !this.speech && !!m.press?.(this.closeup, pointerId); }
|
closeupPress(pointerId) { const m = this.minigame(); return !!m && !this.speech && !!m.press?.(this.closeup, pointerId); }
|
||||||
@@ -377,6 +396,8 @@ export class Game {
|
|||||||
const c = this.closeup;
|
const c = this.closeup;
|
||||||
const m = this.minigame();
|
const m = this.minigame();
|
||||||
if (m) return !!m.aim?.(c, [x, y]);
|
if (m) return !!m.aim?.(c, [x, y]);
|
||||||
|
// Sul sito del telefonino conta dove si tocca (il link del muro).
|
||||||
|
if (c && this.story.closeups[c.id].type === 'telefono') { c.aim = [x, y]; return true; }
|
||||||
if (!c || this.story.closeups[c.id].type !== 'torch' || !Number.isFinite(x) || !Number.isFinite(y)) return false;
|
if (!c || this.story.closeups[c.id].type !== 'torch' || !Number.isFinite(x) || !Number.isFinite(y)) return false;
|
||||||
c.beam = [Math.max(70, Math.min(570, x)), Math.max(65, Math.min(295, y))];
|
c.beam = [Math.max(70, Math.min(570, x)), Math.max(65, Math.min(295, y))];
|
||||||
return true;
|
return true;
|
||||||
@@ -527,6 +548,18 @@ export class Game {
|
|||||||
if (now === 'end') this.closeupClose();
|
if (now === 'end') this.closeupClose();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (this.story.closeups[c.id].type === 'telefono') {
|
||||||
|
updateTelefono(c, dt);
|
||||||
|
if (c.step === 'wall' && !c.lines && c.t >= CLOSEUP_PAUSE) c.lines = [...(this.story.closeups[c.id].comment ?? [])];
|
||||||
|
if (c.lines?.length) this.run(c.lines.shift());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.story.closeups[c.id].type === 'risveglio') {
|
||||||
|
const { due, end } = updateRisveglio(c, this.story.closeups[c.id], dt);
|
||||||
|
for (const e of due) this.run(e);
|
||||||
|
if (end) this.closeupClose();
|
||||||
|
return;
|
||||||
|
}
|
||||||
const m = this.minigame();
|
const m = this.minigame();
|
||||||
if (m) {
|
if (m) {
|
||||||
m.update(c, dt);
|
m.update(c, dt);
|
||||||
@@ -571,6 +604,8 @@ export class Game {
|
|||||||
: type === 'viaggio' ? { id: e.closeup, t: 0, age: 0, events: [], typed: 0 }
|
: type === 'viaggio' ? { id: e.closeup, t: 0, age: 0, events: [], typed: 0 }
|
||||||
: type === 'corsa' ? newCorsa(e.closeup)
|
: type === 'corsa' ? newCorsa(e.closeup)
|
||||||
: type === 'incanto' ? newIncanto(e.closeup)
|
: type === 'incanto' ? newIncanto(e.closeup)
|
||||||
|
: type === 'risveglio' ? newRisveglio(e.closeup)
|
||||||
|
: type === 'telefono' ? newTelefono(e.closeup)
|
||||||
: type === 'poster' ? { id: e.closeup, step: 'poster', t: 0, age: 0 }
|
: type === 'poster' ? { id: e.closeup, step: 'poster', t: 0, age: 0 }
|
||||||
// `level`: «Alla bona», «Seria» o «A fassi male», scelto nel dialogo con l'avversario.
|
// `level`: «Alla bona», «Seria» o «A fassi male», scelto nel dialogo con l'avversario.
|
||||||
// `decks`: il mazzo da usare quando il suo flag è acceso (briscola: le napoletane al posto delle toscane).
|
// `decks`: il mazzo da usare quando il suo flag è acceso (briscola: le napoletane al posto delle toscane).
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ import { drawCampana } from './campana-render.js';
|
|||||||
import { drawPoker } from './poker-render.js';
|
import { drawPoker } from './poker-render.js';
|
||||||
import { drawViaggio } from './viaggio.js';
|
import { drawViaggio } from './viaggio.js';
|
||||||
import { drawIncanto } from './incanto.js';
|
import { drawIncanto } from './incanto.js';
|
||||||
|
import { drawRisveglio } from './risveglio.js';
|
||||||
|
import { drawTelefono, telefonoHint } from './telefono.js';
|
||||||
import { drawBriscola } from './briscola-render.js';
|
import { drawBriscola } from './briscola-render.js';
|
||||||
import { drawTressette } from './tressette-render.js';
|
import { drawTressette } from './tressette-render.js';
|
||||||
import { drawScopa } from './scopa-render.js';
|
import { drawScopa } from './scopa-render.js';
|
||||||
@@ -178,7 +180,9 @@ export function render(ctx, game, { hover, spots, debug, time = performance.now(
|
|||||||
const andrea = sprites.get('andrea');
|
const andrea = sprites.get('andrea');
|
||||||
const drawAndreaNow = () => andrea ? drawSprite(ctx, andrea, game.pose(), s.x, s.y, game.scaleAt(s.y), s.facing)
|
const drawAndreaNow = () => andrea ? drawSprite(ctx, andrea, game.pose(), s.x, s.y, game.scaleAt(s.y), s.facing)
|
||||||
: drawAndrea(ctx, s.x, s.y, game.scaleAt(s.y), s.facing, game.walking ? game.stride / 6 : null);
|
: drawAndrea(ctx, s.x, s.y, game.scaleAt(s.y), s.facing, game.walking ? game.stride / 6 : null);
|
||||||
const queue = [{ y: s.y, draw: drawAndreaNow }];
|
// Durante il risveglio si guarda dagli occhi di Andrea: lui non si vede.
|
||||||
|
const pov = game.closeup && game.story.closeups?.[game.closeup.id]?.type === 'risveglio';
|
||||||
|
const queue = pov ? [] : [{ y: s.y, draw: drawAndreaNow }];
|
||||||
for (const p of game.people()) {
|
for (const p of game.people()) {
|
||||||
const sheet = sprites.get(p.who);
|
const sheet = sprites.get(p.who);
|
||||||
if (sheet) queue.push({ y: p.at[1], draw: () => drawSprite(ctx, sheet, game.personPose(p), ...p.at, game.scaleAt(p.at[1]), p.facing ?? 1, p.size) });
|
if (sheet) queue.push({ y: p.at[1], draw: () => drawSprite(ctx, sheet, game.personPose(p), ...p.at, game.scaleAt(p.at[1]), p.facing ?? 1, p.size) });
|
||||||
@@ -919,6 +923,15 @@ function drawCloseup(ctx, game, time) {
|
|||||||
}
|
}
|
||||||
// L'incantesimo va sopra la scena (con Andrea dentro), già disegnata.
|
// L'incantesimo va sopra la scena (con Andrea dentro), già disegnata.
|
||||||
if (def.type === 'incanto') { drawIncanto(ctx, c); return; }
|
if (def.type === 'incanto') { drawIncanto(ctx, c); return; }
|
||||||
|
// Il risveglio, visto da dentro gli occhi: anche lui sopra la scena già disegnata.
|
||||||
|
if (def.type === 'risveglio') { drawRisveglio(ctx, c); return; }
|
||||||
|
// Il telefonino del Barone: sale come il libro, e il sito nello schermo si allarga a tutta la scena.
|
||||||
|
if (def.type === 'telefono') {
|
||||||
|
const pic = src => { if (!backgrounds.has(src)) loadBackground(src); return backgrounds.get(src); };
|
||||||
|
drawTelefono(ctx, c, def, { phone: pic(def.phone), site: pic(def.site) }, time);
|
||||||
|
closeupHint(ctx, game.speech ? null : telefonoHint(c), time);
|
||||||
|
return;
|
||||||
|
}
|
||||||
// Il manifesto ingrandito: la scena si scurisce e lui viene avanti, poi l'invito a toccarlo.
|
// Il manifesto ingrandito: la scena si scurisce e lui viene avanti, poi l'invito a toccarlo.
|
||||||
if (def.type === 'poster') {
|
if (def.type === 'poster') {
|
||||||
if (!backgrounds.has(def.picture)) loadBackground(def.picture);
|
if (!backgrounds.has(def.picture)) loadBackground(def.picture);
|
||||||
@@ -1043,7 +1056,10 @@ function drawCloseup(ctx, game, time) {
|
|||||||
ctx.restore();
|
ctx.restore();
|
||||||
// Il suggerimento in alto, finché c'è qualcosa da sfogliare.
|
// Il suggerimento in alto, finché c'è qualcosa da sfogliare.
|
||||||
const hint = c.step === 'cover' ? 'Clic o tocco: apri il libro' : c.step === 'title' ? 'Clic o tocco: gira la pagina' : null;
|
const hint = c.step === 'cover' ? 'Clic o tocco: apri il libro' : c.step === 'title' ? 'Clic o tocco: gira la pagina' : null;
|
||||||
if (hint && !game.speech && c.age > 0.5) {
|
closeupHint(ctx, !game.speech && c.age > 0.5 ? hint : null, time);
|
||||||
|
}
|
||||||
|
function closeupHint(ctx, hint, time) {
|
||||||
|
if (hint) {
|
||||||
ctx.save();
|
ctx.save();
|
||||||
ctx.globalAlpha = 0.65 + 0.35 * Math.sin(time / 300);
|
ctx.globalAlpha = 0.65 + 0.35 * Math.sin(time / 300);
|
||||||
ctx.font = `7px ${FONT}`;
|
ctx.font = `7px ${FONT}`;
|
||||||
|
|||||||
@@ -0,0 +1,76 @@
|
|||||||
|
// Il risveglio (story.closeups, type 'risveglio'; Andrea, 31 ottobre: «si ritrova aprendo piano piano gli occhi su
|
||||||
|
// una panchina, come svegliato da una notte brava, con effetto annebbiato»). Sopra la scena di adesso, vista da
|
||||||
|
// dentro gli occhi: le palpebre si aprono a fatica, ricascano, si riaprono; tutto è sfocato e doppio, e ondeggia.
|
||||||
|
// Le battute (`lines`, ognuna col suo `at` in secondi) partono mentre gli occhi si aprono; mentre Andrea parla il
|
||||||
|
// tempo del risveglio si ferma (la battuta va letta), l'ondeggiare no. Unità: i pixel della scena 640×360.
|
||||||
|
|
||||||
|
// Quanto sono aperti gli occhi (0 chiusi, 1 aperti) nel tempo: tre tentativi, l'ultimo è quello buono.
|
||||||
|
const OPEN = [[0, 0], [1.4, 0], [2.1, 0.22], [2.5, 0.04], [2.9, 0.04], [3.8, 0.5], [4.15, 0.12], [4.45, 0.2], [5.6, 0.85], [5.85, 0.55], [6.9, 1]];
|
||||||
|
export const END = 8.2;
|
||||||
|
const clamp01 = k => Math.max(0, Math.min(1, k));
|
||||||
|
const smooth = k => k * k * (3 - 2 * k);
|
||||||
|
|
||||||
|
export function openness(t) {
|
||||||
|
for (let i = 1; i < OPEN.length; i++) {
|
||||||
|
const [t1, o1] = OPEN[i];
|
||||||
|
if (t <= t1) { const [t0, o0] = OPEN[i - 1]; return o0 + (o1 - o0) * smooth(clamp01((t - t0) / (t1 - t0))); }
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
// La nebbia: sfocatura e vista doppia, che si diradano fino a sparire alla fine.
|
||||||
|
export const haze = t => 1 - smooth(clamp01((t - 1.4) / (END - 1.6)));
|
||||||
|
|
||||||
|
export function newRisveglio(id) { return { id, t: 0, age: 0, fired: 0 }; }
|
||||||
|
|
||||||
|
// Il tempo che passa: torna le battute da dire adesso, e 'end' alla fine.
|
||||||
|
export function updateRisveglio(c, def, dt) {
|
||||||
|
c.t += dt;
|
||||||
|
const lines = def.lines ?? [], due = [];
|
||||||
|
while (c.fired < lines.length && c.t >= lines[c.fired].at) { const { at, ...e } = lines[c.fired++]; due.push(e); }
|
||||||
|
return { due, end: c.t >= END && c.fired >= lines.length };
|
||||||
|
}
|
||||||
|
|
||||||
|
let scratch = null;
|
||||||
|
export function drawRisveglio(ctx, c) {
|
||||||
|
const t = c.t, h = haze(t), open = openness(t), W = 640, H = 360;
|
||||||
|
ctx.save();
|
||||||
|
// La scena annebbiata: sfocata, e una seconda copia spostata che ondeggia (la vista doppia).
|
||||||
|
if (h > 0.01 && typeof document !== 'undefined') {
|
||||||
|
if (!scratch) { scratch = document.createElement('canvas'); scratch.width = W; scratch.height = H; }
|
||||||
|
const s = scratch.getContext('2d');
|
||||||
|
s.clearRect(0, 0, W, H);
|
||||||
|
s.drawImage(ctx.canvas, 0, 0, W, H);
|
||||||
|
const sway = 14 * h, dx = Math.sin(c.age * 1.3) * sway, dy = Math.sin(c.age * 0.9 + 1) * sway * 0.35;
|
||||||
|
ctx.filter = `blur(${(5 * h).toFixed(2)}px)`;
|
||||||
|
ctx.drawImage(scratch, 0, 0);
|
||||||
|
ctx.globalAlpha = 0.45 * h;
|
||||||
|
ctx.drawImage(scratch, dx, dy);
|
||||||
|
ctx.globalAlpha = 1;
|
||||||
|
ctx.filter = 'none';
|
||||||
|
// La luce del mattino che abbaglia.
|
||||||
|
ctx.fillStyle = `rgba(255,244,214,${0.22 * h})`;
|
||||||
|
ctx.fillRect(0, 0, W, H);
|
||||||
|
}
|
||||||
|
// Gli angoli scuri, che si aprono con gli occhi.
|
||||||
|
const v = ctx.createRadialGradient(W / 2, H / 2, 60 + 220 * open, W / 2, H / 2, 420);
|
||||||
|
v.addColorStop(0, 'rgba(10,2,4,0)');
|
||||||
|
v.addColorStop(1, `rgba(10,2,4,${0.85 * (1 - open * 0.75) * Math.max(h, 0.3)})`);
|
||||||
|
ctx.fillStyle = v;
|
||||||
|
ctx.fillRect(0, 0, W, H);
|
||||||
|
// Le palpebre: sopra e sotto, col bordo curvo e morbido; chiuse, si vede il rosso scuro della luce che passa.
|
||||||
|
if (open < 0.999) {
|
||||||
|
const gap = 200 * open, mid = H / 2, bulge = 70 + 60 * open;
|
||||||
|
ctx.filter = 'blur(6px)';
|
||||||
|
ctx.fillStyle = 'rgb(22,4,6)';
|
||||||
|
ctx.beginPath();
|
||||||
|
ctx.moveTo(-20, -20); ctx.lineTo(W + 20, -20); ctx.lineTo(W + 20, mid - gap + bulge);
|
||||||
|
ctx.quadraticCurveTo(W / 2, mid - gap - bulge, -20, mid - gap + bulge);
|
||||||
|
ctx.closePath(); ctx.fill();
|
||||||
|
ctx.beginPath();
|
||||||
|
ctx.moveTo(-20, H + 20); ctx.lineTo(W + 20, H + 20); ctx.lineTo(W + 20, mid + gap - bulge);
|
||||||
|
ctx.quadraticCurveTo(W / 2, mid + gap + bulge, -20, mid + gap - bulge);
|
||||||
|
ctx.closePath(); ctx.fill();
|
||||||
|
ctx.filter = 'none';
|
||||||
|
}
|
||||||
|
ctx.restore();
|
||||||
|
}
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
// Il telefonino del Barone (story.closeups, type 'telefono'; Andrea, 31 ottobre: «prenda il cellulare, nello stile
|
||||||
|
// di come si sfoglia la storia infinita, e quando si clicca viene a tutto schermo il sito di San Piero»).
|
||||||
|
// Come il libro: la scena si scurisce e le mani alzano il telefonino dal basso; nello schermo c'è il sito
|
||||||
|
// (`site`, un'immagine 16:9 della home di sanpiero50037.it). Un tocco: lo schermo si allarga a tutta la scena.
|
||||||
|
// Sul sito si tocca il link (`link`, in pixel dell'immagine del sito) e si apre il muro: una pagina vera
|
||||||
|
// (assets/muro, la mette main.js sopra la scena), che qui sotto lascia solo il fondo. A muro aperto partono le
|
||||||
|
// battute `comment`, e chiudendo `closing`. Unità: i pixel della scena 640×360.
|
||||||
|
|
||||||
|
export const RISE = 0.45, ZOOM = 0.55;
|
||||||
|
const W = 640, H = 360;
|
||||||
|
const clamp01 = k => Math.max(0, Math.min(1, k));
|
||||||
|
const ease = k => (1 - Math.cos(Math.PI * clamp01(k))) / 2;
|
||||||
|
|
||||||
|
export function newTelefono(id) { return { id, step: 'phone', t: 0, age: 0, aim: null }; }
|
||||||
|
|
||||||
|
// Il tempo: lo zoom finisce sul sito; a muro aperto, dopo un attimo, le battute (una alla volta, come il libro).
|
||||||
|
export function updateTelefono(c, dt) {
|
||||||
|
c.t += dt;
|
||||||
|
if (c.step === 'zoom' && c.t >= ZOOM) Object.assign(c, { step: 'site', t: 0 });
|
||||||
|
}
|
||||||
|
|
||||||
|
// Dove sta il link del muro sulla scena, a sito aperto: il riquadro `link` riportato da immagine a scena.
|
||||||
|
export function linkBox(def, site) {
|
||||||
|
const [x, y, w, h] = def.link, kx = W / site[0], ky = H / site[1];
|
||||||
|
return [x * kx, y * ky, w * kx, h * ky];
|
||||||
|
}
|
||||||
|
const inside = ([x, y, w, h], [px, py]) => px >= x && px <= x + w && py >= y && py <= y + h;
|
||||||
|
|
||||||
|
// Un tocco: sul telefonino apre il sito; sul sito, solo sul link, apre il muro. Torna true se è successo qualcosa.
|
||||||
|
export function tapTelefono(c, def) {
|
||||||
|
if (c.step === 'phone') { if (c.age < RISE) return false; Object.assign(c, { step: 'zoom', t: 0 }); return true; }
|
||||||
|
if (c.step === 'site' && c.aim && inside(linkBox(def, def.siteSize), c.aim)) { Object.assign(c, { step: 'wall', t: 0 }); return true; }
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Il riquadro dello schermo sulla scena, col telefonino che sale dal basso.
|
||||||
|
function phoneRect(def, img, age) {
|
||||||
|
const rise = 1 - clamp01(age / RISE), k = def.phoneScale ?? 1;
|
||||||
|
const w = img.width * k, h = img.height * k, x = Math.round((W - w) / 2), y = Math.round(H - h + 140 * rise * rise);
|
||||||
|
return { x, y, w, h, k };
|
||||||
|
}
|
||||||
|
|
||||||
|
export function drawTelefono(ctx, c, def, { phone, site }, time) {
|
||||||
|
ctx.save();
|
||||||
|
ctx.fillStyle = `rgba(8, 5, 12, ${Math.min(0.78, c.age / 0.35 * 0.78)})`;
|
||||||
|
ctx.fillRect(0, 0, W, H);
|
||||||
|
if (!phone || !site) { ctx.restore(); return; }
|
||||||
|
const p = phoneRect(def, phone, c.age), [sx, sy, sw, sh] = def.screen;
|
||||||
|
const screen = [p.x + sx * p.k, p.y + sy * p.k, sw * p.k, sh * p.k];
|
||||||
|
const z = c.step === 'phone' ? 0 : c.step === 'zoom' ? ease(c.t / ZOOM) : 1;
|
||||||
|
// Il telefonino, finché lo schermo non ha preso tutta la scena; poi sfuma.
|
||||||
|
if (z < 1) {
|
||||||
|
ctx.globalAlpha = 1 - z;
|
||||||
|
ctx.imageSmoothingEnabled = false;
|
||||||
|
ctx.drawImage(phone, p.x, p.y, p.w, p.h);
|
||||||
|
ctx.globalAlpha = 1;
|
||||||
|
}
|
||||||
|
// Il sito: dentro lo schermo, poi sempre più grande fino a tutta la scena. Lo schermo ha le sue proporzioni:
|
||||||
|
// il sito ci sta intero, centrato, sul fondo del sito.
|
||||||
|
const r = screen.map((v, i) => v + ([0, 0, W, H][i] - v) * z);
|
||||||
|
const fit = Math.min(r[2] / site.width, r[3] / site.height), dw = site.width * fit, dh = site.height * fit;
|
||||||
|
ctx.fillStyle = def.paper ?? '#f7e0c0';
|
||||||
|
ctx.fillRect(r[0], r[1], r[2], r[3]);
|
||||||
|
ctx.imageSmoothingEnabled = true;
|
||||||
|
ctx.drawImage(site, r[0] + (r[2] - dw) / 2, r[1] + (r[3] - dh) / 2, dw, dh);
|
||||||
|
// Sotto il muro (la pagina vera) resta il fondo del sito.
|
||||||
|
if (c.step === 'wall') { ctx.fillStyle = def.paper ?? '#f7e0c0'; ctx.fillRect(0, 0, W, H); }
|
||||||
|
// Il link da toccare: un riquadro che pulsa intorno al mattone del muro.
|
||||||
|
if (c.step === 'site') {
|
||||||
|
const [x, y, w, h] = linkBox(def, def.siteSize), pulse = 0.5 + 0.5 * Math.sin(time / 260);
|
||||||
|
ctx.strokeStyle = `rgba(255, 210, 90, ${0.5 + 0.5 * pulse})`;
|
||||||
|
ctx.lineWidth = 2 + pulse;
|
||||||
|
ctx.strokeRect(Math.round(x) - 2, Math.round(y) - 2, Math.round(w) + 4, Math.round(h) + 4);
|
||||||
|
}
|
||||||
|
ctx.imageSmoothingEnabled = false;
|
||||||
|
ctx.restore();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Il suggerimento in alto, finché c'è qualcosa da toccare.
|
||||||
|
export const telefonoHint = c => c.step === 'phone' && c.age > RISE ? 'Clic o tocco: guarda il sito'
|
||||||
|
: c.step === 'site' ? 'Clic o tocco sul Muro del Sanpierino' : null;
|
||||||
@@ -65,6 +65,10 @@ $('effects-volume').addEventListener('input', e => { ambience.configure({ volume
|
|||||||
showSound();
|
showSound();
|
||||||
window.music = music; // per i test nel browser
|
window.music = music; // per i test nel browser
|
||||||
|
|
||||||
|
// Il gioco non usa service worker: se ne è rimasto uno di un'altra app passata su questo indirizzo (la Bussola su
|
||||||
|
// localhost:8080, 31 ottobre), si sgancia, sennò intercetta le pagine aperte dal gioco (il muro nel telefonino).
|
||||||
|
navigator.serviceWorker?.getRegistrations().then(list => list.forEach(r => r.unregister())).catch(() => {});
|
||||||
|
|
||||||
fetch(versioned('assets/voices/index.json')).then(r => r.ok ? r.json() : {}).then(index => { voices.index = index; }).catch(() => {});
|
fetch(versioned('assets/voices/index.json')).then(r => r.ok ? r.json() : {}).then(index => { voices.index = index; }).catch(() => {});
|
||||||
window.voices = voices;
|
window.voices = voices;
|
||||||
let voiced = null;
|
let voiced = null;
|
||||||
@@ -75,7 +79,7 @@ function start(state, rione = null) {
|
|||||||
game = new Game(story, { state, onSave: data => storage && writeSave(storage, data), voiceTime: (who, text) => voices.seconds(who, text) });
|
game = new Game(story, { state, onSave: data => storage && writeSave(storage, data), voiceTime: (who, text) => voices.seconds(who, text) });
|
||||||
command = new Command(game);
|
command = new Command(game);
|
||||||
if (!state && rione) game.state.flags['rione:' + rione] = true;
|
if (!state && rione) game.state.flags['rione:' + rione] = true;
|
||||||
if (!state) game.go(story.start.scene, story.start.at);
|
if (!state) game.go(story.start.scene, story.start.at, story.start.face);
|
||||||
$('title').hidden = true;
|
$('title').hidden = true;
|
||||||
$('ending').hidden = true;
|
$('ending').hidden = true;
|
||||||
running = true;
|
running = true;
|
||||||
@@ -1094,7 +1098,14 @@ function updateUi() {
|
|||||||
setProp($('spots-button'), 'hidden', !running || !!game.closeup);
|
setProp($('spots-button'), 'hidden', !running || !!game.closeup);
|
||||||
setProp($('notebook-button'), 'hidden', !running || !story.notebook || !!game.closeup);
|
setProp($('notebook-button'), 'hidden', !running || !story.notebook || !!game.closeup);
|
||||||
setProp($('closeup-close'), 'hidden', !running || !game.closeup);
|
setProp($('closeup-close'), 'hidden', !running || !game.closeup);
|
||||||
setText($('closeup-close'), torch ? c.step === 'done' ? 'Continua' : 'Torna fuori' : mg ? c.step === 'result' ? mg.back : 'Lascia stare' : 'Chiudi');
|
// Il Muro del Sanpierino: a muro aperto sul telefonino del Barone, la pagina vera sopra la scena. Ogni volta che si
|
||||||
|
// riapre si ricarica (i messaggi nuovi della storia).
|
||||||
|
const muro = $('muro'), wall = running && c && story.closeups[c.id]?.type === 'telefono' && c.step === 'wall';
|
||||||
|
if (wall && muro.hidden) muro.src = versioned('assets/muro/index.html');
|
||||||
|
if (!wall && !muro.hidden) muro.src = 'about:blank';
|
||||||
|
setProp(muro, 'hidden', !wall);
|
||||||
|
if (wall) muro.style.setProperty('--muro-scale', String(canvas.clientWidth / 1067));
|
||||||
|
setText($('closeup-close'), torch ? c.step === 'done' ? 'Continua' : 'Torna fuori' : mg ? c.step === 'result' ? mg.back : 'Lascia stare' : c && story.closeups[c.id]?.type === 'risveglio' ? 'Salta' : 'Chiudi');
|
||||||
setProp($('panel'), 'inert', !!c);
|
setProp($('panel'), 'inert', !!c);
|
||||||
canvas.classList.toggle('torch', !!torch);
|
canvas.classList.toggle('torch', !!torch);
|
||||||
canvas.classList.toggle('bocce', !!mg);
|
canvas.classList.toggle('bocce', !!mg);
|
||||||
|
|||||||
@@ -64,7 +64,9 @@ export const story = {
|
|||||||
title: 'La Leggenda del Regolo',
|
title: 'La Leggenda del Regolo',
|
||||||
// La mappa (pulsante «Mappa»): ogni scena con `map: [x, y]` (percentuali della pianta) ci compare quando è
|
// La mappa (pulsante «Mappa»): ogni scena con `map: [x, y]` (percentuali della pianta) ci compare quando è
|
||||||
// stata visitata; le strade sono le uscite fra scene. Un posto nuovo entra con la sua riga `map`.
|
// stata visitata; le strade sono le uscite fra scene. Un posto nuovo entra con la sua riga `map`.
|
||||||
start: { scene: 'piazza', at: [250, 320] },
|
// Si comincia sulla panchina dei vecchietti, dopo una notte brava (Andrea, 31 ottobre): il risveglio è il primo
|
||||||
|
// piano `risveglio`, che parte entrando in piazza la prima volta.
|
||||||
|
start: { scene: 'piazza', at: [96, 328], face: 'left' },
|
||||||
// Le fasi del giorno (idea di Andrea, 24 ottobre): seguono la storia, non l'orologio. Il primo capitolo comincia
|
// Le fasi del giorno (idea di Andrea, 24 ottobre): seguono la storia, non l'orologio. Il primo capitolo comincia
|
||||||
// di pomeriggio; con le impronte del Regolo viene il tramonto, e quando Andrea ha la torcia è sera. Sulle scene
|
// di pomeriggio; con le impronte del Regolo viene il tramonto, e quando Andrea ha la torcia è sera. Sulle scene
|
||||||
// all'aperto un velo di colore (`tint`); luci ed effetti possono valere solo in certe fasi (`phase`).
|
// all'aperto un velo di colore (`tint`); luci ed effetti possono valere solo in certe fasi (`phase`).
|
||||||
@@ -120,7 +122,8 @@ export const story = {
|
|||||||
cardetole: 'Io corro per Cardetole, i verdi: gioco in casa.',
|
cardetole: 'Io corro per Cardetole, i verdi: gioco in casa.',
|
||||||
campomigliaio: 'Io corro per Campomigliaio, i blu.',
|
campomigliaio: 'Io corro per Campomigliaio, i blu.',
|
||||||
} },
|
} },
|
||||||
'E stamattina, in piazza, è successo qualcosa...',
|
// [DA ANDREA: la riga che porta al risveglio sulla panchina]
|
||||||
|
'Ieri sera s\'è fatto tardi. Molto tardi...',
|
||||||
],
|
],
|
||||||
// Colonna sonora di Andrea (fatta con Suno): titolo, paese, ricordi (fine e Trebbio).
|
// Colonna sonora di Andrea (fatta con Suno): titolo, paese, ricordi (fine e Trebbio).
|
||||||
// splash: la musichetta del cartello d'apertura (tools/jingle.py), suonata una volta sola.
|
// splash: la musichetta del cartello d'apertura (tools/jingle.py), suonata una volta sola.
|
||||||
@@ -340,6 +343,54 @@ export const story = {
|
|||||||
{ closeup: 'ingorgo' },
|
{ closeup: 'ingorgo' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
// Il Muro del Sanpierino sul telefonino del Barone (Andrea, 31 ottobre): sale come il libro, nello schermo la
|
||||||
|
// home di sanpiero50037.it (la Wayback Machine, 31 dicembre 2007, senza la data in alto); un tocco la porta a
|
||||||
|
// tutto schermo, e il mattone «Nuovo muro del Sanpierino» apre il muro: la pagina vera (assets/muro, fatta da
|
||||||
|
// tools/muro.py dal muro riesumato in ~/Workspaces/misc/spswall), coi messaggi veri del 2007 (Andrea: «quelli
|
||||||
|
// veri»; niente email, «Scrivi» spento) e sopra quelli del gioco qui sotto, ognuno con la sua condizione:
|
||||||
|
// «Aggiorna» ricarica, e la storia che va avanti ne fa comparire di nuovi. [DA ANDREA: messaggi e battute]
|
||||||
|
muro_sanpierino: {
|
||||||
|
type: 'telefono',
|
||||||
|
phone: 'assets/closeups/telefonino-barone.png', // Codex, prompts/closeups/telefonino-barone.txt
|
||||||
|
screen: [120, 25, 106, 142], // lo schermo, in pixel del telefonino
|
||||||
|
site: 'assets/closeups/sanpiero50037-home.png', siteSize: [1067, 600],
|
||||||
|
link: [48, 42, 302, 99], // il mattone del muro, in pixel del sito
|
||||||
|
paper: '#f7e1c0',
|
||||||
|
messages: [
|
||||||
|
{ nick: 'Uno di Cardetole', date: '2007-05-26 00:55:12', text: 'Quest\'anno il palio è nostro!!! [bouncer]\nGli altri rioni si preparino a piangere. [14_bigmouth]' },
|
||||||
|
{ nick: 'Baron De Duke', date: '2007-05-26 01:40:37', text: 'Chi ha trovato un paio di mutande, le riporti al circolino.\nSenza fare domande. [15_weeping]' },
|
||||||
|
{ nick: 'Il Regolo', date: '2007-05-26 03:12:08', text: 'IL PALIO ME LO SONO RIPRESO IO. [22_yikes]\nChi lo rivuole, venga a prenderselo. Se ha coraggio.' },
|
||||||
|
// Quelli che arrivano con la storia: si vedono riaprendo il muro, o con «Aggiorna».
|
||||||
|
{ when: 'indizio_regolo', nick: 'Uno che passava', date: '2007-05-26 18:20:44', text: 'Ma avete visto le impronte sotto la Fortezza??? Grandi come una pizza!!! [24_shocked]' },
|
||||||
|
{ when: 'casetta_aperta', nick: 'Il Regolo', date: '2007-05-26 21:03:51', text: 'Ho sentito che qualcuno ha trovato una torcia. Io ho sempre la luna. [28_spin]' },
|
||||||
|
],
|
||||||
|
comment: [
|
||||||
|
{ say: '«Il palio me lo sono ripreso io». Firmato: il Regolo. Alle tre di notte.' },
|
||||||
|
{ say: 'E sotto ci sono io, con le mutande. Nessuno ha risposto.', who: 'barondeduke', pose: 'facepalm' },
|
||||||
|
],
|
||||||
|
closing: [
|
||||||
|
{ say: 'Barone, il sito è tuo: non puoi vedere chi l\'ha scritto?' },
|
||||||
|
{ say: 'Potrei. Ma ci vuole il computer di casa. Il telefonino, più di così, non fa.', who: 'barondeduke', pose: 'shrug' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
// L'inizio della partita: Andrea apre gli occhi sulla panchina dei vecchietti, dopo una notte brava (Andrea,
|
||||||
|
// 31 ottobre). Le battute `lines` arrivano mentre gli occhi si aprono; `complete` a occhi aperti.
|
||||||
|
// [DA ANDREA: le battute sono provvisorie]
|
||||||
|
risveglio: {
|
||||||
|
type: 'risveglio',
|
||||||
|
lines: [
|
||||||
|
{ at: 0.8, say: 'Mmmh... che botta.' },
|
||||||
|
{ at: 3.0, say: 'Ma... dove sono?' },
|
||||||
|
{ at: 5.9, say: 'Una panchina. In piazza. Coi vecchietti.' },
|
||||||
|
],
|
||||||
|
complete: [
|
||||||
|
{ say: 'Oh, s\'è svegliato il bello addormentato! Bella nottata, eh?', who: 'vecchietta', pose: 'laugh' },
|
||||||
|
{ say: 'Ma l\'hai saputo? Il palio è sparito!', who: 'vecchietto', pose: 'point' },
|
||||||
|
{ say: 'Il palio? Il quadro che hanno dipinto i ragazzi delle medie?' },
|
||||||
|
{ say: 'Lo tenevano a scuola: stamani la Gianna ha trovato il posto vuoto.', who: 'vecchietta', pose: 'explain' },
|
||||||
|
{ say: 'La festa è domani: se nessuno lo ritrova, salta tutto. Tocca a me.' },
|
||||||
|
],
|
||||||
|
},
|
||||||
// L'incantesimo dell'Ingorgo Sonoro, dal manifesto in piazza: luci, cassa, lampo, ed è la notte della festa.
|
// L'incantesimo dell'Ingorgo Sonoro, dal manifesto in piazza: luci, cassa, lampo, ed è la notte della festa.
|
||||||
ingorgo: {
|
ingorgo: {
|
||||||
type: 'incanto',
|
type: 'incanto',
|
||||||
@@ -735,7 +786,7 @@ export const story = {
|
|||||||
id: 'verso_calimara', name: 'Via Calimara, verso la farmacia', box: [180, 334, 380, 26], at: [360, 354], exit: { scene: 'via_calimara', at: [365, 212], face: 'down' },
|
id: 'verso_calimara', name: 'Via Calimara, verso la farmacia', box: [180, 334, 380, 26], at: [360, 354], exit: { scene: 'via_calimara', at: [365, 212], face: 'down' },
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
enter: [{ if: '!intro', then: [{ set: 'intro' }, { say: 'Il palio è sparito! Il quadro che hanno dipinto i ragazzi delle medie.' }, { say: 'Lo tenevano a scuola: stamani la Gianna ha trovato il posto vuoto.' }, { say: 'La festa è domani: se nessuno lo ritrova, salta tutto. Tocca a me.' }] }],
|
enter: [{ if: '!intro', then: [{ set: 'intro' }, { closeup: 'risveglio' }] }],
|
||||||
},
|
},
|
||||||
fortezza: {
|
fortezza: {
|
||||||
name: 'Sotto le mura della Fortezza',
|
name: 'Sotto le mura della Fortezza',
|
||||||
@@ -2084,15 +2135,7 @@ export const story = {
|
|||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
look: [{ say: 'Il BaronDeDuke, col cappello da cowboy. Ha l\'aria di uno che aspetta qualcuno, e che spera non lo veda nessuno.' }],
|
look: [{ say: 'Il BaronDeDuke, col cappello da cowboy. Ha l\'aria di uno che aspetta qualcuno, e che spera non lo veda nessuno.' }],
|
||||||
talk: [
|
talk: [{ dialogue: 'barondeduke' }],
|
||||||
{ say: 'Barone! Che ci fai qui?' },
|
|
||||||
{ say: 'Aspetto uno che mi deve riportare le mutande.', who: 'barondeduke' },
|
|
||||||
{ say: 'Le... mutande?' },
|
|
||||||
{ say: 'Le ho perse a poker, ieri sera.', who: 'barondeduke', pose: 'facepalm' },
|
|
||||||
{ say: 'Avevo due donne e due jack. Entra la terza donna, e penso: «Male male si divide».', who: 'barondeduke', pose: 'cards' },
|
|
||||||
{ say: 'E invece?' },
|
|
||||||
{ say: 'L\'altro aveva colore.', who: 'barondeduke', pose: 'shrug' },
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@@ -3899,6 +3942,28 @@ export const story = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
// Il BaronDeDuke nella discesa verso la polisportiva: le mutande perse a poker, e il Muro del Sanpierino sul
|
||||||
|
// telefonino (Andrea, 31 ottobre: lui è il webmaster di sanpiero50037.it).
|
||||||
|
barondeduke: {
|
||||||
|
nodes: {
|
||||||
|
start: { options: [
|
||||||
|
{ text: 'Barone! Che ci fai qui?', then: [
|
||||||
|
{ say: 'Aspetto uno che mi deve riportare le mutande.', who: 'barondeduke' },
|
||||||
|
{ say: 'Le... mutande?' },
|
||||||
|
{ say: 'Le ho perse a poker, ieri sera.', who: 'barondeduke', pose: 'facepalm' },
|
||||||
|
{ say: 'Avevo due donne e due jack. Entra la terza donna, e penso: «Male male si divide».', who: 'barondeduke', pose: 'cards' },
|
||||||
|
{ say: 'E invece?' },
|
||||||
|
{ say: 'L\'altro aveva colore.', who: 'barondeduke', pose: 'shrug' },
|
||||||
|
] },
|
||||||
|
// [DA ANDREA: le battute sono provvisorie]
|
||||||
|
{ text: 'Hai visto cosa c\'era sul muro del Sanpierino?', next: 'end', then: [
|
||||||
|
{ say: 'Il muro? Aspetta, ce l\'ho qui sul telefonino.', who: 'barondeduke', pose: 'explain' },
|
||||||
|
{ closeup: 'muro_sanpierino' },
|
||||||
|
] },
|
||||||
|
{ text: 'Ci vediamo, Barone.', next: 'end' },
|
||||||
|
] },
|
||||||
|
},
|
||||||
|
},
|
||||||
// L'Arcu davanti al circolino (battute di Andrea, 25 ottobre). Lavora alla Casa dell'Armadio: «Armando» è apposta.
|
// L'Arcu davanti al circolino (battute di Andrea, 25 ottobre). Lavora alla Casa dell'Armadio: «Armando» è apposta.
|
||||||
arcu: {
|
arcu: {
|
||||||
nodes: {
|
nodes: {
|
||||||
|
|||||||
@@ -81,6 +81,12 @@ body { display: flex; justify-content: center; overflow-x: hidden; -webkit-tap-h
|
|||||||
font-size: clamp(10.08px, 1.66vw, 18.72px); font-weight: bold; line-height: 1.2; text-align: center;
|
font-size: clamp(10.08px, 1.66vw, 18.72px); font-weight: bold; line-height: 1.2; text-align: center;
|
||||||
text-shadow: 2px 0 #000, -2px 0 #000, 0 2px #000, 0 -2px #000, 2px 2px #000, -2px -2px #000; }
|
text-shadow: 2px 0 #000, -2px 0 #000, 0 2px #000, 0 -2px #000, 2px 2px #000, -2px -2px #000; }
|
||||||
#speech:empty { display: none; }
|
#speech:empty { display: none; }
|
||||||
|
#speech { z-index: 3; }
|
||||||
|
/* Il Muro del Sanpierino sul telefonino del Barone: la pagina vera (assets/muro) larga 1067 pixel come la home del
|
||||||
|
sito, rimpicciolita sulla scena da main.js (--muro-scale). */
|
||||||
|
#muro { position: absolute; left: 0; top: 0; width: 1067px; height: 600px; border: 0; z-index: 1; background: #f7e1c0;
|
||||||
|
transform: scale(var(--muro-scale, 0.6)); transform-origin: 0 0; }
|
||||||
|
#muro[hidden] { display: none; }
|
||||||
/* Il primo piano del libro si chiude da qui (o con Esc). */
|
/* Il primo piano del libro si chiude da qui (o con Esc). */
|
||||||
#closeup-close { position: absolute; right: 10px; bottom: 10px; z-index: 2; font: bold clamp(10px, 1.5vw, 15px) var(--font);
|
#closeup-close { position: absolute; right: 10px; bottom: 10px; z-index: 2; font: bold clamp(10px, 1.5vw, 15px) var(--font);
|
||||||
padding: .45em 1.2em; border-radius: 6px; border: 0; cursor: pointer; color: var(--bg); background: var(--accent); }
|
padding: .45em 1.2em; border-radius: 6px; border: 0; cursor: pointer; color: var(--bg); background: var(--accent); }
|
||||||
|
|||||||
@@ -7,7 +7,8 @@ export function settle(game, { maxSteps = 20000, explore = false } = {}) {
|
|||||||
game.skip();
|
game.skip();
|
||||||
}
|
}
|
||||||
// Un primo piano aperto aspetta il giocatore (sfogliare, chiudere): qui ci si ferma e decide il test.
|
// Un primo piano aperto aspetta il giocatore (sfogliare, chiudere): qui ci si ferma e decide il test.
|
||||||
if (game.closeup && !game.speech && game.reach <= 0) {
|
// Il risveglio dell'inizio no: va avanti da solo, come una battuta.
|
||||||
|
if (game.closeup && !game.speech && game.reach <= 0 && game.story.closeups[game.closeup.id].type !== 'risveglio') {
|
||||||
if (!explore || game.story.closeups[game.closeup.id].type !== 'torch') return said;
|
if (!explore || game.story.closeups[game.closeup.id].type !== 'torch') return said;
|
||||||
exploreTorch(game);
|
exploreTorch(game);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
// Il risveglio sulla panchina nel browser vero: Nuova partita, l'introduzione, gli occhi che si aprono annebbiati.
|
||||||
|
// npm run browser:risveglio — schermate in /tmp/regolo-risveglio.
|
||||||
|
import { chromium } from 'playwright';
|
||||||
|
import { mkdirSync } from 'node:fs';
|
||||||
|
import assert from 'node:assert/strict';
|
||||||
|
import { staticServer } from './helpers.mjs';
|
||||||
|
|
||||||
|
const out = process.env.OUT ?? '/tmp/regolo-risveglio';
|
||||||
|
mkdirSync(out, { recursive: true });
|
||||||
|
const server = await staticServer();
|
||||||
|
let browser;
|
||||||
|
const errors = [];
|
||||||
|
try {
|
||||||
|
browser = await chromium.launch({ args: ['--autoplay-policy=no-user-gesture-required', '--use-gl=angle', '--use-angle=swiftshader', '--enable-unsafe-swiftshader'] });
|
||||||
|
const page = await browser.newPage({ viewport: { width: 1280, height: 860 } });
|
||||||
|
page.on('pageerror', e => { errors.push(e.message); console.log('ERR', e.message); });
|
||||||
|
await page.goto(`http://127.0.0.1:${server.port}/`);
|
||||||
|
await page.click('#splash'); await page.click('#new-game'); await page.click('#rione [data-rione="campomigliaio"]'); await page.click('#skip-intro');
|
||||||
|
await page.waitForFunction(() => game.closeup?.id === 'risveglio', null, { timeout: 10000 });
|
||||||
|
await page.waitForFunction(() => document.getElementById('closeup-close').textContent === 'Salta', null, { timeout: 5000 });
|
||||||
|
// Le battute si saltano solo per far correre il tempo fino ai momenti da fotografare.
|
||||||
|
for (const [t, name] of [[0.5, '0-buio'], [2.1, '1-primo-tentativo'], [3.8, '2-secondo'], [5.6, '3-quasi'], [7.2, '4-aperti']]) {
|
||||||
|
await page.waitForFunction(at => { if (game.speech && game.closeup) game.skip(); return !game.closeup || game.closeup.t >= at; }, t, { timeout: 30000, polling: 50 });
|
||||||
|
await page.screenshot({ path: `${out}/${name}.png` });
|
||||||
|
}
|
||||||
|
await page.waitForFunction(() => !game.closeup && game.state.flags.intro, null, { timeout: 15000 });
|
||||||
|
await page.screenshot({ path: `${out}/5-vecchietti.png` });
|
||||||
|
assert.deepEqual(errors, []);
|
||||||
|
console.log(`ok: schermate in ${out}`);
|
||||||
|
} finally { await browser?.close(); server.kill(); }
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
import test from 'node:test';
|
||||||
|
import assert from 'node:assert/strict';
|
||||||
|
import { openness, haze, END } from '../src/engine/risveglio.js';
|
||||||
|
import { Game } from '../src/engine/game.js';
|
||||||
|
import { story } from '../src/story/story.js';
|
||||||
|
import { settle } from './helpers.mjs';
|
||||||
|
|
||||||
|
test('il risveglio: gli occhi chiusi, due tentativi che ricascano, poi aperti; la nebbia si dirada', () => {
|
||||||
|
assert.equal(openness(0), 0);
|
||||||
|
assert.ok(openness(2.1) > 0.15 && openness(2.7) < 0.1, 'il primo tentativo ricasca');
|
||||||
|
assert.ok(openness(3.8) > openness(4.15), 'il secondo pure');
|
||||||
|
assert.equal(openness(END), 1);
|
||||||
|
assert.equal(haze(0), 1);
|
||||||
|
assert.equal(haze(END), 0);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('la partita comincia sulla panchina: le battute a occhi semichiusi, poi i vecchietti col palio sparito', () => {
|
||||||
|
const g = new Game(story);
|
||||||
|
g.go(story.start.scene, story.start.at, story.start.face);
|
||||||
|
g.update(0);
|
||||||
|
assert.equal(g.closeup?.id, 'risveglio');
|
||||||
|
const said = [];
|
||||||
|
for (let i = 0; i < 2000 && (g.closeup || g.speech || g.queue.length); i++) {
|
||||||
|
if (g.speech) { said.push([g.speech.who, g.closeup ? openness(g.closeup.t) : 1]); g.skip(); }
|
||||||
|
g.update(0.05);
|
||||||
|
}
|
||||||
|
assert.deepEqual(said.slice(0, 3).map(s => s[0]), ['andrea', 'andrea', 'andrea']);
|
||||||
|
assert.ok(said[0][1] < 0.05, 'la prima battuta a occhi chiusi');
|
||||||
|
assert.ok(said.some(([who]) => who === 'vecchietto'), 'il vecchietto dà la notizia');
|
||||||
|
assert.ok(g.state.flags.intro && !g.closeup);
|
||||||
|
// Rientrando in piazza non si risveglia più.
|
||||||
|
g.go('via_cipriani'); settle(g); g.go('piazza'); g.update(0);
|
||||||
|
assert.equal(g.closeup, null);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('saltando il risveglio (Esc) le battute arrivano lo stesso', () => {
|
||||||
|
const g = new Game(story);
|
||||||
|
g.go(story.start.scene, story.start.at);
|
||||||
|
g.update(0);
|
||||||
|
assert.ok(g.closeupClose());
|
||||||
|
const said = settle(g).map(s => s.text);
|
||||||
|
assert.ok(said.includes('Mmmh... che botta.') && said.some(t => t.includes('Il palio è sparito')));
|
||||||
|
});
|
||||||
@@ -545,11 +545,33 @@ test('gli amici in giro: l\'Arcu al circolino, il Tozzino al cancello del tennis
|
|||||||
ask('Ci si becca da i\' Trappola, ai\' Barrettino!');
|
ask('Ci si becca da i\' Trappola, ai\' Barrettino!');
|
||||||
assert.equal(g.dialogue, null);
|
assert.equal(g.dialogue, null);
|
||||||
assert.ok(talk('carza', 'tozzino').includes('tozzino: E chi sennò? Ha chiamato ora: s\'è fermato a Pratolino a mettere le catene. A breve arriva.'));
|
assert.ok(talk('carza', 'tozzino').includes('tozzino: E chi sennò? Ha chiamato ora: s\'è fermato a Pratolino a mettere le catene. A breve arriva.'));
|
||||||
const baron = talk('polisportiva', 'barondeduke');
|
talk('polisportiva', 'barondeduke');
|
||||||
|
const baron = ask('Barone! Che ci fai qui?');
|
||||||
assert.ok(baron.includes('barondeduke: Avevo due donne e due jack. Entra la terza donna, e penso: «Male male si divide».'));
|
assert.ok(baron.includes('barondeduke: Avevo due donne e due jack. Entra la terza donna, e penso: «Male male si divide».'));
|
||||||
assert.equal(baron.at(-1), 'barondeduke: L\'altro aveva colore.');
|
assert.equal(baron.at(-1), 'barondeduke: L\'altro aveva colore.');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('il Muro del Sanpierino sul telefonino del Barone: sale, il sito a tutto schermo, il link apre il muro', async () => {
|
||||||
|
const { RISE, ZOOM, linkBox } = await import('../src/engine/telefono.js');
|
||||||
|
const g = new Game(story);
|
||||||
|
settle(g); g.go('polisportiva'); settle(g); g.act('talk', 'barondeduke'); settle(g);
|
||||||
|
g.choose(g.options().findIndex(o => o.text.includes('muro del Sanpierino'))); settle(g);
|
||||||
|
assert.equal(g.closeup?.id, 'muro_sanpierino');
|
||||||
|
const def = story.closeups.muro_sanpierino;
|
||||||
|
assert.ok(!g.closeupTap(), 'mentre sale, un tocco non conta');
|
||||||
|
g.update(RISE); assert.ok(g.closeupTap()); assert.equal(g.closeup.step, 'zoom');
|
||||||
|
for (let i = 0; i < 20; i++) g.update(ZOOM / 10);
|
||||||
|
assert.equal(g.closeup.step, 'site');
|
||||||
|
g.closeupAim([600, 340]); assert.ok(!g.closeupTap(), 'fuori dal link non succede niente');
|
||||||
|
const [x, y, w, h] = linkBox(def, def.siteSize);
|
||||||
|
g.closeupAim([x + w / 2, y + h / 2]); assert.ok(g.closeupTap()); assert.equal(g.closeup.step, 'wall');
|
||||||
|
const said = [];
|
||||||
|
for (let i = 0; i < 400 && (g.speech || !g.closeup.lines || g.closeup.lines.length); i++) { if (g.speech) { said.push(g.speech.text); g.skip(); } g.update(0.05); }
|
||||||
|
assert.ok(said[0].includes('Firmato: il Regolo'));
|
||||||
|
g.closeupClose();
|
||||||
|
assert.ok(settle(g).some(s => s.text.includes('il sito è tuo')), 'chiudendo, il commento');
|
||||||
|
});
|
||||||
|
|
||||||
test('i tentativi sbagliati hanno una risposta loro, non quella generica', () => {
|
test('i tentativi sbagliati hanno una risposta loro, non quella generica', () => {
|
||||||
const g = new Game(story);
|
const g = new Game(story);
|
||||||
settle(g);
|
settle(g);
|
||||||
|
|||||||
@@ -0,0 +1,57 @@
|
|||||||
|
// Il Muro del Sanpierino sul telefonino del Barone, nel browser vero: il telefonino che sale, il sito a tutto
|
||||||
|
// schermo, il clic sul mattone del muro. npm run browser:telefono — schermate in /tmp/regolo-telefono.
|
||||||
|
import { chromium } from 'playwright';
|
||||||
|
import { mkdirSync } from 'node:fs';
|
||||||
|
import assert from 'node:assert/strict';
|
||||||
|
import { staticServer } from './helpers.mjs';
|
||||||
|
|
||||||
|
const out = process.env.OUT ?? '/tmp/regolo-telefono';
|
||||||
|
mkdirSync(out, { recursive: true });
|
||||||
|
const server = await staticServer();
|
||||||
|
let browser;
|
||||||
|
const errors = [];
|
||||||
|
try {
|
||||||
|
browser = await chromium.launch({ args: ['--autoplay-policy=no-user-gesture-required', '--use-gl=angle', '--use-angle=swiftshader', '--enable-unsafe-swiftshader'] });
|
||||||
|
const page = await browser.newPage({ viewport: { width: 1280, height: 860 } });
|
||||||
|
page.on('pageerror', e => { errors.push(e.message); console.log('ERR', e.message); });
|
||||||
|
await page.goto(`http://127.0.0.1:${server.port}/`);
|
||||||
|
await page.click('#splash'); await page.click('#new-game'); await page.click('#rione [data-rione="campomigliaio"]'); await page.click('#skip-intro');
|
||||||
|
await page.evaluate(async () => {
|
||||||
|
const { settle } = await import('/tests/helpers.mjs');
|
||||||
|
settle(game); game.go('polisportiva'); settle(game);
|
||||||
|
game.act('talk', 'barondeduke'); settle(game);
|
||||||
|
game.choose(game.options().findIndex(o => o.text.includes('muro del Sanpierino'))); settle(game);
|
||||||
|
});
|
||||||
|
await page.waitForFunction(() => game.closeup?.id === 'muro_sanpierino' && game.closeup.age > 1.2, null, { timeout: 15000 });
|
||||||
|
await page.screenshot({ path: `${out}/1-telefonino.png` });
|
||||||
|
const box = await page.locator('#scene').boundingBox(), k = box.width / 640;
|
||||||
|
const click = ([x, y]) => page.mouse.click(box.x + x * k, box.y + y * k);
|
||||||
|
await click([320, 180]);
|
||||||
|
await page.waitForFunction(() => game.closeup.step === 'site', null, { timeout: 5000 });
|
||||||
|
await page.waitForTimeout(300);
|
||||||
|
await page.screenshot({ path: `${out}/2-sito.png` });
|
||||||
|
const link = await page.evaluate(async () => { const t = await import('/src/engine/telefono.js'); const d = story => story.closeups.muro_sanpierino; const def = d(game.story); const [x, y, w, h] = t.linkBox(def, def.siteSize); return [x + w / 2, y + h / 2]; });
|
||||||
|
await click(link);
|
||||||
|
await page.waitForFunction(() => game.closeup.step === 'wall', null, { timeout: 8000 });
|
||||||
|
// Il muro è la pagina vera: i messaggi del gioco in cima, sotto quelli del 2007; «Scrivi» spento, niente email.
|
||||||
|
const frame = page.frameLocator('#muro');
|
||||||
|
await frame.locator('.name').first().waitFor({ timeout: 10000 });
|
||||||
|
assert.match(await frame.locator('.name').first().textContent(), /Il Regolo/);
|
||||||
|
assert.ok((await frame.locator('.name').allTextContents()).some(t => t.includes('Kiara')), 'i messaggi veri del 2007');
|
||||||
|
assert.match(await frame.locator('.pagerbutton', { hasText: 'SCRIVI' }).first().getAttribute('class'), /disabled/);
|
||||||
|
assert.equal(await frame.locator('a[href^="mailto:"]').count(), 0);
|
||||||
|
await page.waitForTimeout(500);
|
||||||
|
await page.screenshot({ path: `${out}/3-muro.png` });
|
||||||
|
// La storia va avanti: «Aggiorna» fa comparire il messaggio nuovo.
|
||||||
|
await page.evaluate(() => { game.speech = null; game.closeup.lines = []; game.state.flags.indizio_regolo = true; });
|
||||||
|
await frame.locator('.pagerbutton', { hasText: 'Aggiorna' }).first().click();
|
||||||
|
await page.waitForTimeout(800);
|
||||||
|
assert.match(await frame.locator('.name').first().textContent(), /Uno che passava/);
|
||||||
|
await page.screenshot({ path: `${out}/4-aggiornato.png` });
|
||||||
|
// «Home» torna alla home del sito sul telefonino.
|
||||||
|
await frame.locator('.pagerbutton', { hasText: 'Home' }).first().click();
|
||||||
|
await page.waitForFunction(() => game.closeup.step === 'site', null, { timeout: 5000 });
|
||||||
|
await page.waitForSelector('#muro', { state: 'hidden', timeout: 3000 });
|
||||||
|
assert.deepEqual(errors, []);
|
||||||
|
console.log(`ok: schermate in ${out}`);
|
||||||
|
} finally { await browser?.close(); server.kill(); }
|
||||||
@@ -13,7 +13,8 @@ const voci = JSON.parse(readFileSync(new URL('../tools/voci.json', import.meta.u
|
|||||||
test('le battute si trovano ovunque: introduzione, scene, oggetti, dialoghi e rami if', () => {
|
test('le battute si trovano ovunque: introduzione, scene, oggetti, dialoghi e rami if', () => {
|
||||||
const lines = voiceLines(story), has = (who, part) => lines.some(l => l.who === who && l.text.includes(part));
|
const lines = voiceLines(story), has = (who, part) => lines.some(l => l.who === who && l.text.includes(part));
|
||||||
assert.ok(has('andrea', 'Fine maggio 2007'), 'introduzione');
|
assert.ok(has('andrea', 'Fine maggio 2007'), 'introduzione');
|
||||||
assert.ok(has('andrea', 'Il palio è sparito!'), 'ingresso in una scena, dentro un if');
|
assert.ok(has('vecchietto', 'Il palio è sparito!'), 'primo piano del risveglio, a occhi aperti');
|
||||||
|
assert.ok(has('andrea', 'che botta'), 'primo piano del risveglio, mentre gli occhi si aprono');
|
||||||
assert.ok(has('vecchietta', 'cadde dal cielo'), 'dialogo, con chi parla');
|
assert.ok(has('vecchietta', 'cadde dal cielo'), 'dialogo, con chi parla');
|
||||||
assert.ok(has('castello', 'vicino alle sue impronte'), 'ramo else annidato');
|
assert.ok(has('castello', 'vicino alle sue impronte'), 'ramo else annidato');
|
||||||
assert.ok(has('andrea', 'pagina sola'), 'azione di un oggetto');
|
assert.ok(has('andrea', 'pagina sola'), 'azione di un oggetto');
|
||||||
@@ -61,15 +62,16 @@ test('il castello e il leone hanno voci diverse da tutti gli altri', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('il fumetto resta a schermo almeno quanto la voce', () => {
|
test('il fumetto resta a schermo almeno quanto la voce', () => {
|
||||||
const g = new Game(story, { voiceTime: (who, text) => (text.startsWith('Il palio') ? 9 : undefined) });
|
// La prima battuta della partita è quella del risveglio, mentre gli occhi si aprono.
|
||||||
|
const g = new Game(story, { voiceTime: (who, text) => (text.startsWith('Mmmh') ? 9 : undefined) });
|
||||||
g.go(story.start.scene, story.start.at);
|
g.go(story.start.scene, story.start.at);
|
||||||
g.update(0.05);
|
for (let i = 0; i < 40 && !g.speech; i++) g.update(0.05);
|
||||||
assert.ok(g.speech.text.startsWith('Il palio'));
|
assert.ok(g.speech.text.startsWith('Mmmh'));
|
||||||
assert.ok(g.speech.left > 9, 'la voce lunga allunga il fumetto');
|
assert.ok(g.speech.left > 9, 'la voce lunga allunga il fumetto');
|
||||||
settle(g);
|
settle(g);
|
||||||
const quiet = new Game(story);
|
const quiet = new Game(story);
|
||||||
quiet.go(story.start.scene, story.start.at);
|
quiet.go(story.start.scene, story.start.at);
|
||||||
quiet.update(0.05);
|
for (let i = 0; i < 40 && !quiet.speech; i++) quiet.update(0.05);
|
||||||
assert.ok(quiet.speech.left < 9, 'senza voce vale la durata di lettura');
|
assert.ok(quiet.speech.left < 9, 'senza voce vale la durata di lettura');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,80 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Il Muro del Sanpierino dentro il gioco (Andrea, 31 ottobre): dal dump del muro vero riesumato
|
||||||
|
(~/Workspaces/misc/spswall) prepara assets/muro/ per la pagina statica del telefonino del Barone.
|
||||||
|
|
||||||
|
- messaggi.json: i messaggi veri (soprannome, data, testo), con gli accenti rimessi a posto. Niente email né IP.
|
||||||
|
Solo quelli del dump (i primi 24, novembre 2007): i 654 ritrovati nella Wayback Machine restano nel muro riesumato
|
||||||
|
(spswall/archivio/importa.py), fuori dal gioco (Andrea, 31 ottobre).
|
||||||
|
- img/: solo gli smile usati e le icone della pagina; muro.css è il CSS originale; le due pagine di testo, com'erano.
|
||||||
|
|
||||||
|
python3 tools/muro.py [percorso del dump] [cartella www del muro]
|
||||||
|
"""
|
||||||
|
import json, re, shutil, sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
ROOT = Path(__file__).resolve().parent.parent
|
||||||
|
SPS = Path.home() / 'Workspaces/misc/spswall'
|
||||||
|
DUMP = Path(sys.argv[1]) if len(sys.argv) > 1 else SPS / 'db/01-spswall.sql'
|
||||||
|
WWW = Path(sys.argv[2]) if len(sys.argv) > 2 else SPS / 'www'
|
||||||
|
OUT = ROOT / 'assets/muro'
|
||||||
|
# Le icone della pagina, oltre agli smile.
|
||||||
|
PAGE = ['logo_trasparente_obliquo.gif', 'spacer.gif', 'pagefirst.gif', 'pageback.gif', 'postmessage.gif', 'refresh.gif',
|
||||||
|
'home.gif', 'pageahead.gif', 'pagelast.gif', 'logomanzolo.jpg']
|
||||||
|
|
||||||
|
|
||||||
|
def rows(sql, table):
|
||||||
|
"""Le righe di INSERT INTO `table` del dump di phpMyAdmin, come liste di valori."""
|
||||||
|
m = re.search(r'INSERT INTO `%s` \(([^)]*)\) VALUES\s*(.*?);\n' % table, sql, re.S)
|
||||||
|
cols = [c.strip(' `') for c in m.group(1).split(',')]
|
||||||
|
body, out, row, val, i, quoted = m.group(2), [], [], '', 0, False
|
||||||
|
while i < len(body):
|
||||||
|
ch = body[i]
|
||||||
|
if quoted:
|
||||||
|
if ch == '\\': val += {'n': '\n', 'r': '\r', 't': '\t', '0': ''}.get(body[i + 1], body[i + 1]); i += 2; continue
|
||||||
|
if ch == "'" and body[i + 1:i + 2] == "'": val += "'"; i += 2; continue
|
||||||
|
if ch == "'": quoted = False
|
||||||
|
else: val += ch
|
||||||
|
elif ch == "'": quoted = True
|
||||||
|
elif ch == '(': row, val = [], ''
|
||||||
|
elif ch == ',': row.append(val.strip()); val = ''
|
||||||
|
elif ch == ')': row.append(val.strip()); out.append(dict(zip(cols, row)))
|
||||||
|
elif not ch.isspace(): val += ch
|
||||||
|
i += 1
|
||||||
|
return out
|
||||||
|
|
||||||
|
|
||||||
|
def fix(text):
|
||||||
|
"""Il muro scriveva UTF-8 su una connessione latin1: nel dump gli accenti sono «Ã¨». Si rimettono a posto."""
|
||||||
|
for enc in ('latin1', 'cp1252'):
|
||||||
|
try: return text.encode(enc).decode('utf8')
|
||||||
|
except (UnicodeEncodeError, UnicodeDecodeError): pass
|
||||||
|
return text
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
sql = DUMP.read_text('utf8')
|
||||||
|
smiles = {r['codsml']: r['linksml'] for r in rows(sql, 'tpsmiles')}
|
||||||
|
# Le immagini prese da fuori (http://...) non si caricano: il vecchio dominio oggi può essere di chiunque.
|
||||||
|
outside = lambda t: re.sub(r'<img[^>]*src="?http[^>]*>', '', t, flags=re.I)
|
||||||
|
messages = [{'nick': fix(r['nikute']), 'date': r['datmsg'], 'text': outside(fix(r['desmsg']))} for r in rows(sql, 'tpmsgute')]
|
||||||
|
messages.sort(key=lambda m: m['date'], reverse=True)
|
||||||
|
# Gli smile usati: dai messaggi veri e da quelli del gioco (story.closeups.muro_sanpierino.messages).
|
||||||
|
ours = (ROOT / 'src/story/story.js').read_text('utf8')
|
||||||
|
used = {code: link for code, link in smiles.items() if code in ours or any(code in m['text'] or code in m['nick'] for m in messages)}
|
||||||
|
shutil.rmtree(OUT / 'img', ignore_errors=True)
|
||||||
|
(OUT / 'img').mkdir(parents=True)
|
||||||
|
pictures = {n for m in messages for n in re.findall(r'src="\./img/([^"]+)"', m['text'] + m['nick'])}
|
||||||
|
for name in PAGE + sorted(set(used.values()) | pictures):
|
||||||
|
shutil.copy(WWW / 'imgwall' / name, OUT / 'img' / name)
|
||||||
|
shutil.copy(WWW / 'class/thewall.css', OUT / 'muro.css')
|
||||||
|
# Le due pagine di testo, com'erano; in fondo un link per tornare al muro (nel telefonino non c'è il «Indietro»).
|
||||||
|
for page in ('Responsabilita.htm', 'guida_al_muro_del_sanpierino.htm'):
|
||||||
|
html = (WWW / page).read_bytes()
|
||||||
|
back = b'<p align="center"><a href="index.html" style="font: bold 14px Tahoma; color: #800000">« Torna al Muro</a></p>'
|
||||||
|
(OUT / page).write_bytes(re.sub(rb'</body>', back + b'</body>', html, count=1, flags=re.I))
|
||||||
|
(OUT / 'messaggi.json').write_text(json.dumps({'smiles': used, 'messages': messages}, ensure_ascii=False, indent=1) + '\n')
|
||||||
|
print(f'{len(messages)} messaggi, {len(used)} smile -> {OUT.relative_to(ROOT)}')
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||