diff --git a/abad.lua b/abad.lua index 5b7115b..4b5786c 100644 --- a/abad.lua +++ b/abad.lua @@ -36,16 +36,16 @@ end function abad_hurt(howmuch) if abad.hurting == 0 and abad.respawning==0 then - play(audio_abad_hit) + playsnd(audio_abad_hit) abad.energia=abad.energia-howmuch if abad.energia<=0 then abad.vides=abad.vides-1 if abad.vides==0 then --final de la partida dead.start() - play(audio_game_over) + playmus(audio_game_over) else - play(audio_life_lost) + playmus(audio_life_lost) abad.energia=40 abad.hab=abad.safe.hab abad.x=abad.safe.x @@ -88,13 +88,13 @@ function abad_state_normal() abad.update=abad_state_jumping abad.step=0 abad.jumpfwd=false - play(audio_abad_jump) + playsnd(audio_abad_jump) elseif btn(KEY_DOWN) then abad.update=abad_state_crouch elseif btn(KEY_Z) then abad.respawning=240 elseif btnp(KEY_SPACE) and cacau.hab==-1 then - play(audio_abad_shot) + playsnd(audio_abad_shot) abad.update=abad_state_fire abad.wait=0 cacau.init(abad.hab,abad.x+8,abad.y+8,abad.flip) @@ -162,7 +162,7 @@ function abad_state_walking() abad.wait=0 abad.step=(abad.step+1)%2 if abad.step==0 then - play(audio_abad_step[abad.mustep]) + playsnd(audio_abad_step[abad.mustep]) abad.mustep = abad.mustep + 1 if abad.mustep == 5 then abad.mustep=1 end end @@ -182,7 +182,7 @@ function abad_state_walking() abad.update=abad_state_jumping abad.step=0 abad.jumpfwd=true - play(audio_abad_jump) + playsnd(audio_abad_jump) return elseif btn(KEY_DOWN) then abad.update=abad_state_crouch @@ -244,7 +244,7 @@ function abad_state_jumping() end elseif abad.step>6 then abad.update=abad_state_falling - play(audio_abad_fall) + playsnd(audio_abad_fall) end abad.step=abad.step+1 end diff --git a/audio.lua b/audio.lua index dccbe42..e639491 100644 --- a/audio.lua +++ b/audio.lua @@ -1,16 +1,20 @@ -audio_main_song="t7l1cl0rv2cv4o3l1gl0rv2gv4o4l1cl0rv2cv4l1d#l0rv2d#v4l1dl0rv2dv4o3l1gl0rv2gv4o4l1dl0rv2dv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v2cv1c" -audio_abad_jump="v1l1rl0c#dd#eff#gg#" -audio_abad_fall="v1l1rl0g#gf#fed#dc#" -audio_abad_step={"t9w2v2l1o3c#", "t9w2v2l1o4c#", "t9w2v2l1o3g#", "t9w2v2l1o4c#"} -audio_switch="t5v3o7l0ev4rv5o0a#aa#aa#aa#a" -audio_abad_hit="t5v3o3l0cv2cv1c" -audio_abad_shot="t5v1o5l0d#o4a#d#" -audio_hit="t5l0v3nv2nv1n" -audio_low="t5l0v3n" -audio_text_abad="t9v1l0o4d#" -audio_text_premiere="t9v1l0o5a#" -audio_text_elalien="t9v1o3l0g#o5c#" -audio_text_batman="t9v1o2l0ag#" -audio_life_lost="t5l1v3c#v2o5c#v1o4c#o5c#v3o3g#v2o4g#v1o3g#o4g#v3o3ev2o4ev1o3eo4ev3o3g#v2o4g#v1o3g#o4g#v3o3c#v2o4c#v1o3c#o4c#" -audio_game_over="t5l0v3c#v2o5c#v1o4c#o5c#v3l1ro3l0g#v2o4g#v3o3gv2o4gv3o3g#v2o4g#v3o3av2o4av1o3ao4av3l1ro3l0g#v2o4g#v1o3g#o4g#v3l1rv4l4rv3l0cv2o5cv1o4co5crv3ro4c#v2o5c#v1o4c#o5c#" -audio_final="t9v4l0o2fco1f#o0g#l6ro2l0fv3fv2fv1fv4l4rl0rv1rv4fv3fv2fv1fv4fco1f#o0g#l3ro2l0fco1f#o0g#l3ro2l0fv3fv2fv1fl6r=" \ No newline at end of file +audio_main_song="mus_menu.ogg" +audio_song_batman="mus_batm.ogg" +audio_song_premiere="mus_prem.ogg" +audio_song_elalien="mus_alie.ogg" +audio_life_lost="mus_life.ogg" +audio_game_over="mus_over.ogg" +audio_final=audio_main_song + +audio_abad_jump="snd_ajmp.wav" +audio_abad_fall="snd_afal.wav" +audio_abad_hit="snd_ahit.wav" +audio_abad_shot="snd_asht.wav" +audio_abad_step={"snd_ast1.wav", "snd_ast2.wav", "snd_ast3.wav", "snd_ast2.wav"} +audio_switch="snd_swch.wav" +audio_hit="snd_hit.wav" +audio_low="snd_low.wav" +audio_text_abad="snd_txta.wav" +audio_text_premiere="snd_txtp.wav" +audio_text_elalien="snd_txte.wav" +audio_text_batman="snd_txtb.wav" diff --git a/bambolla.lua b/bambolla.lua index 2df9cc4..ee3c972 100644 --- a/bambolla.lua +++ b/bambolla.lua @@ -79,7 +79,7 @@ function bambolla.update_normal() end bambolla.y=28-abs(sin(bambolla.x*0.1))*24 if bambolla.hab==abad.hab and bambolla.y>25.2 then - play(audio_low) + playsnd(audio_low) end if bambolla.hab==abad.hab then if cacau.hab==bambolla.hab and aabb(bambolla,cacau) then @@ -89,7 +89,7 @@ function bambolla.update_normal() bambolla.y=bambolla.y+8 bambolla.dx=0 bambolla.dy=-4 - play(audio_hit) + playsnd(audio_hit) end if aabb(bambolla,abad) then abad_hurt(1) diff --git a/final.lua b/final.lua index 55e2728..f6cc6d0 100644 --- a/final.lua +++ b/final.lua @@ -8,7 +8,7 @@ function final_init() abad.update = abad_nop _update=update_final next_actor() - play(audio_final) + playmus(audio_final) local r,g,b=getcolor(15) setcolor(17,r,g,b) --fade.fadein() @@ -36,9 +36,9 @@ function update_final() if btnp(KEY_M) then mute = not mute if mute then - stopchirp() + stopmusic() else - play(audio_final) + playmus(audio_final) end end @@ -144,9 +144,9 @@ function update_final2() if btnp(KEY_M) then mute = not mute if mute then - stopchirp() + stopmusic() else - play(audio_final) + playmus(audio_final) end end final_count=final_count+1 diff --git a/game.lua b/game.lua index 31723b1..e808216 100644 --- a/game.lua +++ b/game.lua @@ -20,9 +20,16 @@ function remove_actor(actor) end end -function play(song) +function playmus(song,volume) if not mute then - playchirp(song) + playmusic(song,volume) + end +end + +function playsnd(sound,volume) + if not mute then + --print(sound) + playsound(sound,volume) end end @@ -125,10 +132,10 @@ function game_init(menu) menu_count=0 menu_change_room=300 menu_room=rnd(60) - play(audio_main_song) + playmus(audio_main_song) else _update=update_game - stopchirp() + stopmusic() end --fade.fadein() end @@ -207,8 +214,6 @@ function update_game() abad.hab=abad.hab-10 elseif btnp(KEY_RETURN) then mode=modes.playing - --mapa_do_backup() - --play(audio_main_song); elseif btnp(KEY_S) and (btn(KEY_LCTRL) or btn(KEY_LGUI)) then _update=update_dialog elseif btnp(KEY_C) then @@ -354,9 +359,9 @@ function update_menu() elseif btnp(KEY_M) then mute = not mute if mute then - stopchirp() + stopmusic() else - play(audio_main_song) + playmus(audio_main_song) end end end diff --git a/gota.lua b/gota.lua index aeab46c..e17f5cb 100644 --- a/gota.lua +++ b/gota.lua @@ -22,7 +22,7 @@ function gota:update_normal() self.cx=self.x+2 self.dx=0 self.dy=-4 - if self.hab==abad.hab then play(audio_low) end + if self.hab==abad.hab then playsnd(audio_low) end end else --self.flip=not self.flip diff --git a/imp.lua b/imp.lua index aa00e03..d7fede7 100644 --- a/imp.lua +++ b/imp.lua @@ -73,7 +73,7 @@ function imp.update() imp.x=imp.x-2 if imp.x==78 then fireball.init(imp.hab,imp.x+8,imp.y+4,imp.flip) - play(audio_hit) + playsnd(audio_hit) imp.flip=not imp.flip elseif imp.x==-12 then imp.reset() @@ -82,7 +82,7 @@ function imp.update() imp.x=imp.x+2 if imp.x==4 then fireball.init(imp.hab,imp.x+8,imp.y+4,imp.flip) - play(audio_hit) + playsnd(audio_hit) imp.flip=not imp.flip elseif imp.x==92 then imp.reset() diff --git a/intro.lua b/intro.lua index c2fc34e..1cf9249 100644 --- a/intro.lua +++ b/intro.lua @@ -30,9 +30,6 @@ function intro_intro() end function intro_update() - --print("intro_update") - --play(audio_main_song) - --game_init(true) if btnp(KEY_ESCAPE) then game_init(true) fade.fadeoutin() @@ -95,7 +92,7 @@ function intro_update() start_scene(scenes.intro_04,58) intro_step=intro_step+1 elseif intro_step==8 then - play(audio_main_song) + playmus(audio_main_song) game_init(true) fade.fadeoutin() end diff --git a/main.lua b/main.lua index 3bc79ff..59862c9 100644 --- a/main.lua +++ b/main.lua @@ -8,6 +8,22 @@ function _init() back=newsurf(128,96) fade.init() + audio_text_abad = loadsound(audio_text_abad) + audio_text_premiere = loadsound(audio_text_premiere) + audio_text_elalien = loadsound(audio_text_elalien) + audio_text_batman = loadsound(audio_text_batman) + audio_abad_jump = loadsound(audio_abad_jump) + audio_abad_fall = loadsound(audio_abad_fall) + audio_abad_hit = loadsound(audio_abad_hit) + audio_abad_shot = loadsound(audio_abad_shot) + audio_abad_step[1] = loadsound(audio_abad_step[1]) + audio_abad_step[2] = loadsound(audio_abad_step[2]) + audio_abad_step[3] = loadsound(audio_abad_step[3]) + audio_abad_step[4] = audio_abad_step[2] + audio_switch = loadsound(audio_switch) + audio_hit = loadsound(audio_hit) + audio_low = loadsound(audio_low) + --game_init() intro_init() --final_init() diff --git a/mus_alie.ogg b/mus_alie.ogg new file mode 100644 index 0000000..64c7fc6 Binary files /dev/null and b/mus_alie.ogg differ diff --git a/mus_batm.ogg b/mus_batm.ogg new file mode 100644 index 0000000..2bbc50b Binary files /dev/null and b/mus_batm.ogg differ diff --git a/mus_life.ogg b/mus_life.ogg new file mode 100644 index 0000000..64dad73 Binary files /dev/null and b/mus_life.ogg differ diff --git a/mus_menu.ogg b/mus_menu.ogg new file mode 100644 index 0000000..d9782ab Binary files /dev/null and b/mus_menu.ogg differ diff --git a/mus_over.ogg b/mus_over.ogg new file mode 100644 index 0000000..8974871 Binary files /dev/null and b/mus_over.ogg differ diff --git a/mus_prem.ogg b/mus_prem.ogg new file mode 100644 index 0000000..a154343 Binary files /dev/null and b/mus_prem.ogg differ diff --git a/scenes.lua b/scenes.lua index 94bc26a..603bc75 100644 --- a/scenes.lua +++ b/scenes.lua @@ -1,127 +1,127 @@ scenes={ intro_01= { - {x=3,y=0,flip=false,audio=audio_text_abad,text={"Ah!, que bo!","Nit de Netflix amb","un bon bol de cacaus!"},die=20}, + {x=3,y=0,flip=false,audio="abad",text={"Ah!, que bo!","Nit de Netflix amb","un bon bol de cacaus!"},die=20}, }, intro_02= { - {x=3,y=0,flip=false,audio=audio_text_abad,text={"Eh! On està el","bol de cacaus???",""},die=20}, + {x=3,y=0,flip=false,audio="abad",text={"Eh! On està el","bol de cacaus???",""},die=20}, }, intro_03= { - {x=4,y=48,flip=true,audio=audio_text_batman,text={"ME'L HE ENDUT JO!!!", "S'HAN ACABAT ELS","CACAUS PA TU!"},die=20}, - {x=3,y=0,flip=false,audio=audio_text_abad,text={"Qué??","Però perqué???",""},die=20}, - {x=4,y=48,flip=true,audio=audio_text_batman,text={"Estás com una vaca!","Has de deixar de menjar", "eixes gorrinades"},die=20}, - {x=4,y=48,flip=true,audio=audio_text_batman,text={"Mira'm a mí. Estic","tot buenorro i faig", "esport"},die=20}, - {x=3,y=0,flip=false,audio=audio_text_abad,text={"Esport?????","I una merda!!","He de cuidar la panxa!"},die=20}, - {x=4,y=48,flip=true,audio=audio_text_batman,text={"Pos t'aguantes.","Ja pots despedir-te", "dels cacaus..."},die=20}, + {x=4,y=48,flip=true,audio="batman",musica=audio_song_batman,text={"ME'L HE ENDUT JO!!!", "S'HAN ACABAT ELS","CACAUS PA TU!"},die=20}, + {x=3,y=0,flip=false,audio="abad",text={"Qué??","Però perqué???",""},die=20}, + {x=4,y=48,flip=true,audio="batman",text={"Estás com una vaca!","Has de deixar de menjar", "eixes gorrinades"},die=20}, + {x=4,y=48,flip=true,audio="batman",text={"Mira'm a mí. Estic","tot buenorro i faig", "esport"},die=20}, + {x=3,y=0,flip=false,audio="abad",text={"Esport?????","I una merda!!","He de cuidar la panxa!"},die=20}, + {x=4,y=48,flip=true,audio="batman",text={"Pos t'aguantes.","Ja pots despedir-te", "dels cacaus..."},die=20}, }, intro_04= { - {x=3,y=0,flip=false,audio=audio_text_abad,text={"Serà mamó...","",""},die=20}, + {x=3,y=0,flip=false,audio="abad",text={"Serà mamó...","",""},die=20}, }, abad_inici={ - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Se va a enterar eixe","imbècil de Batman","quan el pille..."}}, - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Gonna per el GPS","per a trobarlo.",""}}, - {x=4,y=0,flip=false,audio=audio_text_abad,text={"I igual hi ha","algú més per ací","que em puga ajudar."}}, + {x=4,y=0,flip=false,audio="abad",text={"Se va a enterar eixe","imbècil de Batman","quan el pille..."}}, + {x=4,y=0,flip=false,audio="abad",text={"Gonna per el GPS","per a trobarlo.",""}}, + {x=4,y=0,flip=false,audio="abad",text={"I igual hi ha","algú més per ací","que em puga ajudar."}}, }, abad_corfes={ - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Osti, està ple de","monstruacos.",""}}, - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Pos al que s'acoste","s'endurà una corfa","de cacau al cap!"}}, - {x=4,y=0,flip=false,audio=audio_text_abad,text={"I si van altets","igual val la pena","ajupir-se..."}} + {x=4,y=0,flip=false,audio="abad",text={"Osti, està ple de","monstruacos.",""}}, + {x=4,y=0,flip=false,audio="abad",text={"Pos al que s'acoste","s'endurà una corfa","de cacau al cap!"}}, + {x=4,y=0,flip=false,audio="abad",text={"I si van altets","igual val la pena","ajupir-se..."}} }, abad_portes={ - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Qui ha tancat totes","les portes?",""}}, - {x=4,y=0,flip=false,audio=audio_text_abad,text={"A saber on està","cada interruptor","per a obrir-les..."}}, + {x=4,y=0,flip=false,audio="abad",text={"Qui ha tancat totes","les portes?",""}}, + {x=4,y=0,flip=false,audio="abad",text={"A saber on està","cada interruptor","per a obrir-les..."}}, }, abad_porta_casa={ - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Vaja, la porta de","casa també està","tancada."}}, - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Però he de eixir!","Batman viu en la","casa de davant!"}}, + {x=4,y=0,flip=false,audio="abad",text={"Vaja, la porta de","casa també està","tancada."}}, + {x=4,y=0,flip=false,audio="abad",text={"Però he de eixir!","Batman viu en la","casa de davant!"}}, }, abad_porta_batman={ - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Be, era de esperar","que Batman tinguera","la porta tancada."}}, - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Crec que hi havia","un passadis secret","del meu sotan al seu."}}, + {x=4,y=0,flip=false,audio="abad",text={"Be, era de esperar","que Batman tinguera","la porta tancada."}}, + {x=4,y=0,flip=false,audio="abad",text={"Crec que hi havia","un passadis secret","del meu sotan al seu."}}, }, gps_trobat={ - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Ale, ja tinc el GPS.","Ara puc trobar tot","el que necessite..."}}, - {x=4,y=0,flip=false,audio=audio_text_abad,text={"polsant les tecles","del 1 al 5",""}}, + {x=4,y=0,flip=false,audio="abad",text={"Ale, ja tinc el GPS.","Ara puc trobar tot","el que necessite..."}}, + {x=4,y=0,flip=false,audio="abad",text={"polsant les tecles","del 1 al 5",""}}, }, premiere_intro={ - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Premiere??","Qué fas per ma casa?",""}}, - {x=69,y=20,flip=true,audio=audio_text_premiere,text={"Porca miseria!!","l'uomo pipistrello!!","m'ha llevatto il gorro!"}}, - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Pipistrello??","Això ques??",""}}, - {x=69,y=20,flip=true,audio=audio_text_premiere,text={"Il batmano!!","Incontrame il gorro","per l'amore d'un porco!"}}, - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Tinc faena. A mi m'ha","furtat els cacaus i","he de trobarlos."}}, - {x=69,y=20,flip=true,audio=audio_text_premiere,text={"Lei tenne in su quarto!","Io tengo micha clave!","Achudame i t'achudo!"}} + {x=4,y=0,flip=false,audio="abad",musica=audio_song_premiere,text={"Premiere??","Qué fas per ma casa?",""}}, + {x=69,y=20,flip=true,audio="premiere",text={"Porca miseria!!","l'uomo pipistrello!!","m'ha llevatto il gorro!"}}, + {x=4,y=0,flip=false,audio="abad",text={"Pipistrello??","Això ques??",""}}, + {x=69,y=20,flip=true,audio="premiere",text={"Il batmano!!","Incontrame il gorro","per l'amore d'un porco!"}}, + {x=4,y=0,flip=false,audio="abad",text={"Tinc faena. A mi m'ha","furtat els cacaus i","he de trobarlos."}}, + {x=69,y=20,flip=true,audio="premiere",text={"Lei tenne in su quarto!","Io tengo micha clave!","Achudame i t'achudo!"}} }, premiere_intro_gorro={ - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Premiere??","Qué fas per ma casa?",""}}, - {x=69,y=20,flip=true,audio=audio_text_premiere,text={"Porca miseria!!","l'uomo pipistrello!!","m'ha llevatto il gorro!"}}, - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Pipistrello??","Això... be, te igual","Ací el tens, atontat."}}, - {x=69,y=20,flip=true,audio=audio_text_premiere,text={"Per fortuna!","Grazie mille!","Come podo achudarte?"}}, - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Pos Batman m'ha furtat","els cacaus. Supose que","els te amagats."}}, - {x=69,y=20,flip=true,audio=audio_text_premiere,text={"In lo suo quarto!","Io tengo micha clave!","Tenne, tenne!!"}} + {x=4,y=0,flip=false,audio="abad",musica=audio_song_premiere,text={"Premiere??","Qué fas per ma casa?",""}}, + {x=69,y=20,flip=true,audio="premiere",text={"Porca miseria!!","l'uomo pipistrello!!","m'ha llevatto il gorro!"}}, + {x=4,y=0,flip=false,audio="abad",text={"Pipistrello??","Això... be, te igual","Ací el tens, atontat."}}, + {x=69,y=20,flip=true,audio="premiere",text={"Per fortuna!","Grazie mille!","Come podo achudarte?"}}, + {x=4,y=0,flip=false,audio="abad",text={"Pos Batman m'ha furtat","els cacaus. Supose que","els te amagats."}}, + {x=69,y=20,flip=true,audio="premiere",text={"In lo suo quarto!","Io tengo micha clave!","Tenne, tenne!!"}} }, premiere_gorro={ - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Tin, el ditxos gorro.","",""}}, - {x=69,y=20,flip=true,audio=audio_text_premiere,text={"Bravissimo!","Che giornatta","fantastica! Figo!"}}, - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Tu si que eres un","figo. On està eixa","mitja clau?"}}, - {x=69,y=20,flip=true,audio=audio_text_premiere,text={"Giusto! Aquí tenne!","Buona fortuna per","la tua avventura!"}}, - {x=69,y=20,flip=true,audio=audio_text_premiere,text={"E NON TOCARE il","Batmano! Sei molto","poderoso!"}} + {x=4,y=0,flip=false,audio="abad",musica=audio_song_premiere,text={"Tin, el ditxos gorro.","",""}}, + {x=69,y=20,flip=true,audio="premiere",text={"Bravissimo!","Che giornatta","fantastica! Figo!"}}, + {x=4,y=0,flip=false,audio="abad",text={"Tu si que eres un","figo. On està eixa","mitja clau?"}}, + {x=69,y=20,flip=true,audio="premiere",text={"Giusto! Aquí tenne!","Buona fortuna per","la tua avventura!"}}, + {x=69,y=20,flip=true,audio="premiere",text={"E NON TOCARE il","Batmano! Sei molto","poderoso!"}} }, gorro_trobat_nointro={ - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Mira, el gorro","de Premiere.","Millor l'agafe."}} + {x=4,y=0,flip=false,audio="abad",text={"Mira, el gorro","de Premiere.","Millor l'agafe."}} }, gorro_trobat={ - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Mira, el gorro","de Premiere.","A la saca."}} + {x=4,y=0,flip=false,audio="abad",text={"Mira, el gorro","de Premiere.","A la saca."}} }, elalien_intro={ - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Que passa alien?","A tu també t'ha","putejat el Batman?"}}, - {x=3,y=16,flip=true,audio=audio_text_elalien,text={"CAGUEN L'OU!!","ESTAVA JO TAN TRANQUIL","PODANT AL MEU GOS..."}}, - {x=3,y=16,flip=true,audio=audio_text_elalien,text={"...I QUAN NO MIRABA","M'HA FURTAT EL","MARANÀ!!!"}}, - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Es...taves podant","a un gos...?",""}}, - {x=3,y=16,flip=true,audio=audio_text_elalien,text={"EN JUPITER NO POTS","DEIXAR QUE LI CREIXEN","MES DE 12 PATES!!"}}, - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Uh... clar...","A mi m'ha furtat","els cacaus."}}, - {x=3,y=16,flip=true,audio=audio_text_elalien,text={"ELS TÉ EN LA SEUA","HABITACIÓ SEGUR.","TROBA EL BERENAR..."}}, - {x=3,y=16,flip=true,audio=audio_text_elalien,text={"...I JO ET DONARÉ","LA MEITAT DE LA CLAU","PER A ENTRAR."}} + {x=4,y=0,flip=false,audio="abad",musica=audio_song_elalien,text={"Que passa alien?","A tu també t'ha","putejat el Batman?"}}, + {x=3,y=16,flip=true,audio="elalien",text={"CAGUEN L'OU!!","ESTAVA JO TAN TRANQUIL","PODANT AL MEU GOS..."}}, + {x=3,y=16,flip=true,audio="elalien",text={"...I QUAN NO MIRABA","M'HA FURTAT EL","MARANÀ!!!"}}, + {x=4,y=0,flip=false,audio="abad",text={"Es...taves podant","a un gos...?",""}}, + {x=3,y=16,flip=true,audio="elalien",text={"EN JUPITER NO POTS","DEIXAR QUE LI CREIXEN","MES DE 12 PATES!!"}}, + {x=4,y=0,flip=false,audio="abad",text={"Uh... clar...","A mi m'ha furtat","els cacaus."}}, + {x=3,y=16,flip=true,audio="elalien",text={"ELS TÉ EN LA SEUA","HABITACIÓ SEGUR.","TROBA EL BERENAR..."}}, + {x=3,y=16,flip=true,audio="elalien",text={"...I JO ET DONARÉ","LA MEITAT DE LA CLAU","PER A ENTRAR."}} }, elalien_intro_peu={ - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Que passa alien?","A tu també t'ha","putejat el Batman?"}}, - {x=3,y=16,flip=true,audio=audio_text_elalien,text={"CAGUEN L'OU!!","ESTAVA JO TAN TRANQUIL","PODANT AL MEU GOS..."}}, - {x=3,y=16,flip=true,audio=audio_text_elalien,text={"...I QUAN NO MIRABA","M'HA FURTAT EL","MARANÀ!!!"}}, - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Podant...? be, te","igual. Açò deu ser","el teu berenar."}}, - {x=3,y=16,flip=true,audio=audio_text_elalien,text={"OSTI QUE BÓ!!!","GRACIES AUELO!","A TU QUE T'HA FET?"}}, - {x=4,y=0,flip=false,audio=audio_text_abad,text={"M'ha furtat els cacaus.","Segur que els té","al seu quarto."}}, - {x=3,y=16,flip=true,audio=audio_text_elalien,text={"SEGUR! PERO JO TINC","LA MEITAT DE LA CLAU.","TIN, I SORT!"}} + {x=4,y=0,flip=false,audio="abad",musica=audio_song_elalien,text={"Que passa alien?","A tu també t'ha","putejat el Batman?"}}, + {x=3,y=16,flip=true,audio="elalien",text={"CAGUEN L'OU!!","ESTAVA JO TAN TRANQUIL","PODANT AL MEU GOS..."}}, + {x=3,y=16,flip=true,audio="elalien",text={"...I QUAN NO MIRABA","M'HA FURTAT EL","MARANÀ!!!"}}, + {x=4,y=0,flip=false,audio="abad",text={"Podant...? be, te","igual. Açò deu ser","el teu berenar."}}, + {x=3,y=16,flip=true,audio="elalien",text={"OSTI QUE BÓ!!!","GRACIES AUELO!","A TU QUE T'HA FET?"}}, + {x=4,y=0,flip=false,audio="abad",text={"M'ha furtat els cacaus.","Segur que els té","al seu quarto."}}, + {x=3,y=16,flip=true,audio="elalien",text={"SEGUR! PERO JO TINC","LA MEITAT DE LA CLAU.","TIN, I SORT!"}} }, elalien_peu={ - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Ací tens...","Uff, que peste fa...",""}}, - {x=3,y=16,flip=true,audio=audio_text_elalien,text={"GRACIES!!!","SÍ, EH? QUE","SUCOSET I BÓ."}}, - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Clar...","Be, i eixa","mitja clau?"}}, - {x=3,y=16,flip=true,audio=audio_text_elalien,text={"TIN! QUAN TINGUES","ELS CACAUS, PEGA-LI","CACAUÀ A BATMAN!"}}, + {x=4,y=0,flip=false,audio="abad",musica=audio_song_elalien,text={"Ací tens...","Uff, que peste fa...",""}}, + {x=3,y=16,flip=true,audio="elalien",text={"GRACIES!!!","SÍ, EH? QUE","SUCOSET I BÓ."}}, + {x=4,y=0,flip=false,audio="abad",text={"Clar...","Be, i eixa","mitja clau?"}}, + {x=3,y=16,flip=true,audio="elalien",text={"TIN! QUAN TINGUES","ELS CACAUS, PEGA-LI","CACAUÀ A BATMAN!"}}, }, peu_trobat_nointro={ - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Un peu podrit??","Qué asco!! Segur","que és d'el alien."}} + {x=4,y=0,flip=false,audio="abad",text={"Un peu podrit??","Qué asco!! Segur","que és d'el alien."}} }, peu_trobat={ - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Joer, açò deu ser","el berenar d'el alien.","Ecs..."}} + {x=4,y=0,flip=false,audio="abad",text={"Joer, açò deu ser","el berenar d'el alien.","Ecs..."}} }, habitacio_batman={ - {x=4,y=0,flip=false,audio=audio_text_abad,text={"L'habitació de Batman!","Segur que els cacaus","estàn ahí dins."}}, - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Però necessite","una clau...",""}} + {x=4,y=0,flip=false,audio="abad",text={"L'habitació de Batman!","Segur que els cacaus","estàn ahí dins."}}, + {x=4,y=0,flip=false,audio="abad",text={"Però necessite","una clau...",""}} }, bol_trobat={ - {x=4,y=0,flip=false,audio=audio_text_abad,text={"PER FI, JA TINC","ELS MEUS CACAUS!!!","OLE!! OLE!!"}}, - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Se va a enterar","Batman ara quan","el pille..."}}, - {x=4,y=0,flip=false,audio=audio_text_abad,text={"Ara si que li puc","pegar una bona","cacauà..."}} + {x=4,y=0,flip=false,audio="abad",text={"PER FI, JA TINC","ELS MEUS CACAUS!!!","OLE!! OLE!!"}}, + {x=4,y=0,flip=false,audio="abad",text={"Se va a enterar","Batman ara quan","el pille..."}}, + {x=4,y=0,flip=false,audio="abad",text={"Ara si que li puc","pegar una bona","cacauà..."}} }, final= { - {x=4,y=48,flip=true,audio=audio_text_batman,text={"AI!", "M'has fet mal!!!",""},die=20}, - {x=3,y=0,flip=false,audio=audio_text_abad,text={"Aixó per furtar-me","el bol de cacaus,","imbèsil"},die=20}, - {x=4,y=48,flip=true,audio=audio_text_batman,text={"Cert, esta me la","mereixia... però", "mira que be estàs!"},die=20}, - {x=4,y=48,flip=true,audio=audio_text_batman,text={"Amb el que t'ha","costat pillar-me", "t'has ficat en forma"},die=20}, - {x=3,y=0,flip=false,audio=audio_text_abad,text={"No me vingues en","tonteries,","mamarratxo."},die=20}, - {x=3,y=0,flip=false,audio=audio_text_abad,text={"Creus que no he","notat que falta mig","bol de cacaus?"},die=20}, - {x=4,y=48,flip=true,audio=audio_text_batman,text={"Jejejeje, es que","estàn molt bons!", ""},die=20}, - {x=4,y=48,flip=true,audio=audio_text_batman,text={"Però si vols te","done del meu bol", "de tramussos."},die=20}, - {x=3,y=0,flip=false,audio=audio_text_abad,text={"TRAMUSSOS...","",""},die=10}, - {x=3,y=0,flip=false,audio=audio_text_abad,text={"M'atreviré a","passar l'última","frontera...?"},die=40}, + {x=4,y=48,flip=true,audio="batman",musica=audio_song_batman,text={"AI!", "M'has fet mal!!!",""},die=20}, + {x=3,y=0,flip=false,audio="abad",text={"Aixó per furtar-me","el bol de cacaus,","imbèsil"},die=20}, + {x=4,y=48,flip=true,audio="batman",text={"Cert, esta me la","mereixia... però", "mira que be estàs!"},die=20}, + {x=4,y=48,flip=true,audio="batman",text={"Amb el que t'ha","costat pillar-me", "t'has ficat en forma"},die=20}, + {x=3,y=0,flip=false,audio="abad",text={"No me vingues en","tonteries,","mamarratxo."},die=20}, + {x=3,y=0,flip=false,audio="abad",text={"Creus que no he","notat que falta mig","bol de cacaus?"},die=20}, + {x=4,y=48,flip=true,audio="batman",text={"Jejejeje, es que","estàn molt bons!", ""},die=20}, + {x=4,y=48,flip=true,audio="batman",text={"Però si vols te","done del meu bol", "de tramussos."},die=20}, + {x=3,y=0,flip=false,audio="abad",text={"TRAMUSSOS...","",""},die=10}, + {x=3,y=0,flip=false,audio="abad",text={"M'atreviré a","passar l'última","frontera...?"},die=40}, }, } @@ -139,11 +139,27 @@ function start_scene(scene,offset) scenes.wait=0 scenes.offset=28 scenes.die=scenes.current_scene[scenes.dnum].die or 0 + if scene[1].musica then + --print(scene[1].musica) + playmus(scenes.current_scene[scenes.dnum].musica, 64) + end if offset then scenes.offset=offset end old_update=_update _update=update_scene end +function playtext(snd) + if snd=="abad" then + playsnd(audio_text_abad) + elseif snd=="batman" then + playsnd(audio_text_batman) + elseif snd=="premiere" then + playsnd(audio_text_premiere) + elseif snd=="elalien" then + playsnd(audio_text_elalien) + end +end + function draw_scene() local txt_x = not scenes.current_scene[scenes.dnum].flip and 38 or 8 camera(0,-scenes.offset) @@ -180,7 +196,7 @@ function draw_scene() if scenes.char<#scenes.current_scene[scenes.dnum].text[1] then scenes.step=scenes.step-1 scenes.char=scenes.char+1 - play(scenes.current_scene[scenes.dnum].audio) + playtext(scenes.current_scene[scenes.dnum].audio) else scenes.char=1 end @@ -189,7 +205,7 @@ function draw_scene() if scenes.char<#scenes.current_scene[scenes.dnum].text[2] then scenes.step=scenes.step-1 scenes.char=scenes.char+1 - play(scenes.current_scene[scenes.dnum].audio) + playtext(scenes.current_scene[scenes.dnum].audio) else scenes.char=1 end @@ -198,7 +214,7 @@ function draw_scene() if scenes.char<#scenes.current_scene[scenes.dnum].text[3] then scenes.step=scenes.step-1 scenes.char=scenes.char+1 - play(scenes.current_scene[scenes.dnum].audio) + playtext(scenes.current_scene[scenes.dnum].audio) else scenes.char=1 end @@ -231,6 +247,7 @@ function update_scene() scenes.die=scenes.die-1 if scenes.die==0 then if scenes.dnum==#scenes.current_scene then + stopmusic() if batman.endgame then final_init() fade.fadeoutin() @@ -255,6 +272,7 @@ function update_scene() elseif btnp(KEY_SPACE) then if scenes.step>8 then if scenes.dnum==#scenes.current_scene then + stopmusic() if batman.endgame then final_init() fade.fadeoutin() diff --git a/snd_afal.wav b/snd_afal.wav new file mode 100644 index 0000000..6449fe3 Binary files /dev/null and b/snd_afal.wav differ diff --git a/snd_ahit.wav b/snd_ahit.wav new file mode 100644 index 0000000..fd4ce34 Binary files /dev/null and b/snd_ahit.wav differ diff --git a/snd_ajmp.wav b/snd_ajmp.wav new file mode 100644 index 0000000..f02e3ae Binary files /dev/null and b/snd_ajmp.wav differ diff --git a/snd_asht.wav b/snd_asht.wav new file mode 100644 index 0000000..f2ba81e Binary files /dev/null and b/snd_asht.wav differ diff --git a/snd_ast1.wav b/snd_ast1.wav new file mode 100644 index 0000000..273fa8c Binary files /dev/null and b/snd_ast1.wav differ diff --git a/snd_ast2.wav b/snd_ast2.wav new file mode 100644 index 0000000..44f2b7b Binary files /dev/null and b/snd_ast2.wav differ diff --git a/snd_ast3.wav b/snd_ast3.wav new file mode 100644 index 0000000..268454d Binary files /dev/null and b/snd_ast3.wav differ diff --git a/snd_hit.wav b/snd_hit.wav new file mode 100644 index 0000000..94b1a84 Binary files /dev/null and b/snd_hit.wav differ diff --git a/snd_low.wav b/snd_low.wav new file mode 100644 index 0000000..0ca68f2 Binary files /dev/null and b/snd_low.wav differ diff --git a/snd_swch.wav b/snd_swch.wav new file mode 100644 index 0000000..e814d37 Binary files /dev/null and b/snd_swch.wav differ diff --git a/snd_txta.wav b/snd_txta.wav new file mode 100644 index 0000000..0ce527a Binary files /dev/null and b/snd_txta.wav differ diff --git a/snd_txtb.wav b/snd_txtb.wav new file mode 100644 index 0000000..25f0f05 Binary files /dev/null and b/snd_txtb.wav differ diff --git a/snd_txte.wav b/snd_txte.wav new file mode 100644 index 0000000..e8ec855 Binary files /dev/null and b/snd_txte.wav differ diff --git a/snd_txtp.wav b/snd_txtp.wav new file mode 100644 index 0000000..9ae6447 Binary files /dev/null and b/snd_txtp.wav differ diff --git a/switches.lua b/switches.lua index 1acc394..b017149 100644 --- a/switches.lua +++ b/switches.lua @@ -20,11 +20,11 @@ function switches.start(hab,tile) if switches.cooldown>0 then return end mapa_set_tile_by_index(hab,tile,57) switches.current_list=switches[hab+1][tile] - print(tile) + --print(tile) switches.current_index=2 switches.wait=0 switches.cooldown=60 - play(audio_switch) + playsnd(audio_switch) end function switches.update() diff --git a/work/Menu.it b/work/Menu.it deleted file mode 100644 index 8c1e531..0000000 Binary files a/work/Menu.it and /dev/null differ diff --git a/work/game.it b/work/game.it deleted file mode 100644 index bf4d9fa..0000000 Binary files a/work/game.it and /dev/null differ diff --git a/work/intro.it b/work/intro.it deleted file mode 100644 index a9436ee..0000000 Binary files a/work/intro.it and /dev/null differ