10 Commits

Author SHA1 Message Date
b95650cee0 - Reestructuració 2023-01-13 19:16:34 +01:00
22be7de746 - [FIX] Pause reactivated 2023-01-13 16:55:53 +01:00
ecb36d8483 - [FIX] Prevent exiting the final scene with ESC 2023-01-13 14:55:37 +01:00
b7e3a3c78b - Trace removed 2023-01-13 14:34:42 +01:00
e7e3c235fe - [FIX] Sometimes stuck on "life lost" scene
- [FIX] No shot sound if walking
2023-01-13 14:33:32 +01:00
3300a4d93b - [FIX]Al acabar el joc, tornava amb el mapa tal qual, sense resetejar. 2023-01-13 14:27:41 +01:00
6f0b00442d - Ortografia
- Indicador de "pulsa tecla per a seguir"
- Es pot seguir pulsant qualsevol tecla
2023-01-13 14:24:21 +01:00
3d9cbaef3d - segon teleport
- tecles debug llevades
2023-01-13 14:23:28 +01:00
a5f8703830 - Game over and life lost music plays only once. 2023-01-13 13:21:54 +01:00
8019332de1 - Implementat el teleport desde l'habitació secreta ;) 2023-01-12 20:03:41 +01:00
54 changed files with 155 additions and 48 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.DS_STORE

44
bin/Info.plist Normal file
View File

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>19H2</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>cacaus</string>
<key>CFBundleExecutable</key>
<string>cacaus</string>
<key>CFBundleIconFile</key>
<string>cacaus</string>
<key>CFBundleIconName</key>
<string>cacaus</string>
<key>CFBundleIdentifier</key>
<string>net.jailers.cacaus</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>cacaus</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.8</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0.8</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>LSMinimumSystemVersion</key>
<string>10.12</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>Copyright 2023 JailDoctor</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>SUPublicDSAKeyFile</key>
<string>dsa_pub.pem</string>
</dict>
</plist>

BIN
bin/cacaus.icns Normal file

Binary file not shown.

View File

@@ -43,14 +43,17 @@ function abad_hurt(howmuch)
if abad.vides==0 then if abad.vides==0 then
--final de la partida --final de la partida
dead.start() dead.start()
playmus(audio_game_over) playmus(audio_game_over,0)
else else
playmus(audio_life_lost) playmus(audio_life_lost,0)
abad.energia=40 abad.energia=40
abad.hab=abad.safe.hab abad.hab=abad.safe.hab
abad.x=abad.safe.x abad.x=abad.safe.x
abad.y=abad.safe.y abad.y=abad.safe.y
abad.hurting=60 abad.hurting=60
abad.update=abad_state_normal
abad.bb.y=0
abad.bb.h=16
abad.respawning=240 abad.respawning=240
cls(3) cls(3)
end end
@@ -195,6 +198,7 @@ function abad_state_walking()
elseif btn(KEY_DOWN) then elseif btn(KEY_DOWN) then
abad.update=abad_state_crouch abad.update=abad_state_crouch
elseif btn(KEY_SPACE) and cacau.hab==-1 then elseif btn(KEY_SPACE) and cacau.hab==-1 then
playsnd(audio_abad_shot)
abad.update=abad_state_fire abad.update=abad_state_fire
abad.wait=0 abad.wait=0
cacau.init(abad.hab,abad.x+8,abad.y+8,abad.flip) cacau.init(abad.hab,abad.x+8,abad.y+8,abad.flip)

View File

@@ -151,6 +151,7 @@ function update_final2()
end end
final_count=final_count+1 final_count=final_count+1
if final_count==200 or btnp(KEY_SPACE) or btnp(KEY_RETURN) then if final_count==200 or btnp(KEY_SPACE) or btnp(KEY_RETURN) then
game_exit()
game_init(true) game_init(true)
fade.fadeoutin() fade.fadeoutin()
end end

View File

@@ -20,16 +20,16 @@ function remove_actor(actor)
end end
end end
function playmus(song,volume) function playmus(song,loop)
if not mute then if not mute then
playmusic(song,volume) playmusic(song,loop)
end end
end end
function playsnd(sound,volume) function playsnd(sound,volume)
if not mute then if not mute then
--print(sound) --print(sound)
playsound(sound,volume) return playsound(sound,volume)
end end
end end
@@ -115,6 +115,11 @@ function game_init(menu)
table.insert(actors,trigger.new(56,32,32,triggers.escena_abad_porta_batman)) table.insert(actors,trigger.new(56,32,32,triggers.escena_abad_porta_batman))
table.insert(actors,trigger.new(19,32,32,triggers.escena_habitacio_batman)) table.insert(actors,trigger.new(19,32,32,triggers.escena_habitacio_batman))
table.insert(actors,trigger.new(14,40,32,triggers.teleport_a))
table.insert(actors,trigger.new(67,8,32,triggers.teleport_b))
table.insert(actors,trigger.new(29,40,32,triggers.teleport_c))
table.insert(actors,trigger.new(61,8,32,triggers.teleport_d))
score.create() score.create()
cameras[0]=gps cameras[0]=gps
@@ -286,22 +291,25 @@ function update_game()
fireball.update() fireball.update()
switches.update() switches.update()
local hx = abad.hab%10 --local hx = abad.hab%10
local hy = flr(abad.hab/10) --local hy = flr(abad.hab/10)
if btnp(KEY_RETURN) then --if btnp(KEY_RETURN) then
mode=modes.editing -- mode=modes.editing
mapa_restore_backup() -- mapa_restore_backup()
elseif btn(KEY_LSHIFT) and btnp(KEY_RIGHT) and hx<9 then --elseif btn(KEY_LSHIFT) and btnp(KEY_RIGHT) and hx<9 then
abad.hab=abad.hab+1 -- abad.hab=abad.hab+1
elseif btn(KEY_LSHIFT) and btnp(KEY_LEFT) and hx>0 then --elseif btn(KEY_LSHIFT) and btnp(KEY_LEFT) and hx>0 then
abad.hab=abad.hab-1 -- abad.hab=abad.hab-1
elseif btn(KEY_LSHIFT) and btnp(KEY_DOWN) and hy<7 then --elseif btn(KEY_LSHIFT) and btnp(KEY_DOWN) and hy<7 then
abad.hab=abad.hab+10 -- abad.hab=abad.hab+10
elseif btn(KEY_LSHIFT) and btnp(KEY_UP) and hy>0 then --elseif btn(KEY_LSHIFT) and btnp(KEY_UP) and hy>0 then
abad.hab=abad.hab-10 -- abad.hab=abad.hab-10
elseif btnp(KEY_M) then --elseif btnp(KEY_M) then
mute = not mute -- mute = not mute
elseif btnp(KEY_ESCAPE) then --elseif btnp(KEY_ESCAPE) then
-- pause()
--end
if btnp(KEY_ESCAPE) then
pause() pause()
end end
if abad.objects.gps~=nil then if abad.objects.gps~=nil then

View File

@@ -1,15 +1,15 @@
scenes={ scenes={
intro_01= { intro_01= {
{x=3,y=0,flip=false,audio="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!, què bo!","Nit de Netflix amb","un bon bol de cacaus!"},die=20},
}, },
intro_02= { intro_02= {
{x=3,y=0,flip=false,audio="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= { intro_03= {
{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=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=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={"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=4,y=48,flip=true,audio="batman",text={"Mira'm a mi. 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=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}, {x=4,y=48,flip=true,audio="batman",text={"Pos t'aguantes.","Ja pots despedir-te", "dels cacaus..."},die=20},
}, },
@@ -40,7 +40,7 @@ scenes={
}, },
gps_trobat={ gps_trobat={
{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={"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",""}}, {x=4,y=0,flip=false,audio="abad",text={"polsant les tecles","de l'1 al 5",""}},
}, },
premiere_intro={ premiere_intro={
{x=4,y=0,flip=false,audio="abad",musica=audio_song_premiere,text={"Premiere??","Qué fas per ma casa?",""}}, {x=4,y=0,flip=false,audio="abad",musica=audio_song_premiere,text={"Premiere??","Qué fas per ma casa?",""}},
@@ -141,7 +141,7 @@ function start_scene(scene,offset)
scenes.die=scenes.current_scene[scenes.dnum].die or 0 scenes.die=scenes.current_scene[scenes.dnum].die or 0
if scene[1].musica then if scene[1].musica then
--print(scene[1].musica) --print(scene[1].musica)
playmus(scenes.current_scene[scenes.dnum].musica, 64) playmus(scenes.current_scene[scenes.dnum].musica)
end end
if offset then scenes.offset=offset end if offset then scenes.offset=offset end
old_update=_update old_update=_update
@@ -243,7 +243,9 @@ function update_scene()
if scenes.wait==6 then if scenes.wait==6 then
scenes.wait=0 scenes.wait=0
draw_scene() draw_scene()
if scenes.step>8 and scenes.die>0 then if scenes.step>8 then
--print(scenes.die)
if scenes.die>0 then
scenes.die=scenes.die-1 scenes.die=scenes.die-1
if scenes.die==0 then if scenes.die==0 then
if scenes.dnum==#scenes.current_scene then if scenes.dnum==#scenes.current_scene then
@@ -260,17 +262,28 @@ function update_scene()
scenes.step=2 scenes.step=2
end end
end end
else
if flr(time()*2)%2==0 then
sspr(104,88,7,5,118,56)
else
rectfill(118,56,125,61,12)
end
end
end end
end end
if btnp(KEY_ESCAPE) then if btnp(KEY_ESCAPE) and (scenes.current_scene~=scenes.final) then
if scenes.current_scene[scenes.dnum].die then if scenes.current_scene[scenes.dnum].die then
game_init(true) game_init(true)
else else
pause() pause()
end end
elseif btnp(KEY_SPACE) then elseif btnp(KEY_M) then
mute = not mute
end
if scenes.step>8 then if scenes.step>8 then
if btnp(KEY_SPACE) or btnp(KEY_DOWN) or btnp(KEY_UP) or btnp(KEY_LEFT) or btnp(KEY_RIGHT) or btnp(KEY_RETURN) then
if scenes.dnum==#scenes.current_scene then if scenes.dnum==#scenes.current_scene then
stopmusic() stopmusic()
if batman.endgame then if batman.endgame then
@@ -283,10 +296,8 @@ function update_scene()
scenes.dnum=scenes.dnum+1 scenes.dnum=scenes.dnum+1
scenes.step=2 scenes.step=2
end end
else end
elseif btnp(KEY_SPACE) then
scenes.step=8 scenes.step=8
end end
elseif btnp(KEY_M) then
mute = not mute
end
end end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -68,3 +68,41 @@ function triggers:escena_habitacio_batman()
end end
end end
end end
function triggers:teleport_a()
abad.teleport=true
playsnd(audio_hit)
cls(14)
imp.reset()
abad.hab=67
abad.x=24
end
function triggers:teleport_b()
if abad.teleport then
playsnd(audio_hit)
cls(14)
imp.reset()
abad.hab=14
abad.x=16
end
end
function triggers:teleport_c()
abad.teleport2=true
playsnd(audio_hit)
cls(14)
imp.reset()
abad.hab=61
abad.x=24
end
function triggers:teleport_d()
if abad.teleport2 then
playsnd(audio_hit)
cls(14)
imp.reset()
abad.hab=29
abad.x=24
end
end