Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d33d2e4a09 | |||
| d9174dcdb9 | |||
| 22f7204e08 | |||
| 06fab0d457 | |||
| f180f88068 | |||
| 4109d6c938 | |||
| 9c2264ca75 | |||
| c59739c7ba | |||
| 4a430c0d5b | |||
| 5a7f637f4b | |||
| c63298b555 | |||
| 82aa91bead | |||
| f4129e109a | |||
| 5e8714697d | |||
| dd4355051f | |||
| 160b212a43 | |||
| 69d3b076d7 | |||
| 3817a01712 |
13
Makefile
@@ -2,7 +2,7 @@ executable = jaildoctors_dilemma
|
||||
source = source/*.cpp source/common/*.cpp
|
||||
appName = JailDoctor's Dilemma
|
||||
releaseFolder = jdd_release
|
||||
version = v1.06.1
|
||||
version = v1.06.2
|
||||
|
||||
# Release names
|
||||
windowsRelease = $(executable)-$(version)-win32-x64.zip
|
||||
@@ -33,9 +33,9 @@ windows_release:
|
||||
powershell if (Test-Path "$(releaseFolder)\data\room\standard.tsx") {Remove-Item "$(releaseFolder)\data\room\standard.tsx" -Recurse -Force}
|
||||
|
||||
# Copy root files
|
||||
powershell Copy-Item "LICENSE" -Destination "$(releaseFolder)"
|
||||
powershell Copy-Item "LICENSE.txt" -Destination "$(releaseFolder)"
|
||||
powershell Copy-Item "README.md" -Destination "$(releaseFolder)"
|
||||
powershell Copy-Item "release\SDL2.dll" -Destination "$(releaseFolder)"
|
||||
powershell Copy-Item "release\*.dll" -Destination "$(releaseFolder)"
|
||||
|
||||
# Build
|
||||
g++ $(source) -std=c++11 -Wall -Os -lmingw32 -lws2_32 -lSDL2main -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o "$(releaseFolder)/$(executable).exe"
|
||||
@@ -80,9 +80,12 @@ macos_release:
|
||||
# Copy files
|
||||
cp release/*.icns "$(releaseFolder)/$(appName).app/Contents/Resources"
|
||||
cp release/Info.plist "$(releaseFolder)/$(appName).app/Contents"
|
||||
cp LICENSE "$(releaseFolder)"
|
||||
cp LICENSE.txt "$(releaseFolder)"
|
||||
cp README.md "$(releaseFolder)"
|
||||
|
||||
# Create links
|
||||
ln -s /Applications "$(releaseFolder)"/Applications
|
||||
|
||||
# Build INTEL
|
||||
clang++ $(source) -D MACOS_BUNDLE -std=c++11 -Wall -Os -framework SDL2 -F ./Frameworks -ffunction-sections -fdata-sections -o "$(releaseFolder)/$(appName).app/Contents/MacOS/$(executable)" -rpath @executable_path/../Frameworks/ -target x86_64-apple-macos10.12
|
||||
|
||||
@@ -120,7 +123,7 @@ linux_release:
|
||||
|
||||
# Copy data
|
||||
cp -R data "$(releaseFolder)"
|
||||
cp LICENSE "$(releaseFolder)"
|
||||
cp LICENSE.txt "$(releaseFolder)"
|
||||
cp README.md "$(releaseFolder)"
|
||||
|
||||
# Delete data
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# JailDoctor's Dilemma (v1.06.1)
|
||||
# JailDoctor's Dilemma (v1.06.2)
|
||||
|
||||
JailDoc es un Jailer. A los Jailers les gusta empezar proyectos. A nadie le gusta terminarlos. Los Jailers viven en la Jail. A la Jail va uno a empezar proyectos. A la Jail va uno a enseñar sus proyectos. A la Jail va uno a aprender como empezar nuevos proyectos. A la Jail va uno a ayudar a sus compañeros a que empiecen nuevos proyectos.
|
||||
|
||||
@@ -40,7 +40,7 @@ El juego permite tanto el uso del teclado como de un mando de control. Las tecla
|
||||
|
||||
|
||||
|
||||
- **Cursores**: Para mover a izquierda o derecha a JailDoc y para saltar
|
||||
- **Cursores**: Para mover a izquierda o derecha a JailDoc y para saltar. En el fichero de configuración se pueden cambiar las teclas por otras opciones prefijadas: O, P para moverse y Q para saltar o A, D para moverse y W para saltar.
|
||||
|
||||
- **Tecla M**: Activa o desactiva la música
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 310 B After Width: | Height: | Size: 310 B |
|
Before Width: | Height: | Size: 122 B After Width: | Height: | Size: 122 B |
|
Before Width: | Height: | Size: 205 B After Width: | Height: | Size: 205 B |
|
Before Width: | Height: | Size: 189 B After Width: | Height: | Size: 189 B |
|
Before Width: | Height: | Size: 351 B After Width: | Height: | Size: 351 B |
|
Before Width: | Height: | Size: 323 B After Width: | Height: | Size: 323 B |
|
Before Width: | Height: | Size: 378 B After Width: | Height: | Size: 378 B |
|
Before Width: | Height: | Size: 139 B After Width: | Height: | Size: 139 B |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 129 B |
@@ -9,8 +9,8 @@ roomLeft=0
|
||||
roomRight=02.room
|
||||
|
||||
[enemy]
|
||||
tileSetFile=jailer.png
|
||||
animation=jailer.ani
|
||||
tileSetFile=jailer_#1.png
|
||||
animation=jailer_#1.ani
|
||||
width=16
|
||||
height=16
|
||||
x=1
|
||||
@@ -25,8 +25,8 @@ color=white
|
||||
[/enemy]
|
||||
|
||||
[enemy]
|
||||
tileSetFile=jailer3.png
|
||||
animation=jailer3.ani
|
||||
tileSetFile=jailer_#3.png
|
||||
animation=jailer_#3.ani
|
||||
width=16
|
||||
height=16
|
||||
x=4
|
||||
@@ -41,8 +41,8 @@ color=white
|
||||
[/enemy]
|
||||
|
||||
[enemy]
|
||||
tileSetFile=jailer.png
|
||||
animation=jailer.ani
|
||||
tileSetFile=jailer_#1.png
|
||||
animation=jailer_#1.ani
|
||||
width=16
|
||||
height=16
|
||||
x=7
|
||||
@@ -57,8 +57,8 @@ color=white
|
||||
[/enemy]
|
||||
|
||||
[enemy]
|
||||
tileSetFile=jailer2.png
|
||||
animation=jailer2.ani
|
||||
tileSetFile=jailer_#2.png
|
||||
animation=jailer_#2.ani
|
||||
width=16
|
||||
height=16
|
||||
x=10
|
||||
@@ -73,8 +73,8 @@ color=white
|
||||
[/enemy]
|
||||
|
||||
[enemy]
|
||||
tileSetFile=jailer.png
|
||||
animation=jailer.ani
|
||||
tileSetFile=jailer_#1.png
|
||||
animation=jailer_#1.ani
|
||||
width=16
|
||||
height=16
|
||||
x=13
|
||||
@@ -89,8 +89,8 @@ color=white
|
||||
[/enemy]
|
||||
|
||||
[enemy]
|
||||
tileSetFile=printer.png
|
||||
animation=printer.ani
|
||||
tileSetFile=elsa.png
|
||||
animation=elsa.ani
|
||||
width=16
|
||||
height=16
|
||||
x=3
|
||||
@@ -105,8 +105,8 @@ color=white
|
||||
[/enemy]
|
||||
|
||||
[enemy]
|
||||
tileSetFile=printer.png
|
||||
animation=printer.ani
|
||||
tileSetFile=elsa.png
|
||||
animation=elsa.ani
|
||||
width=16
|
||||
height=16
|
||||
x=6
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
0,0,0,0,0,0,0,0,531,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,
|
||||
0,0,0,0,0,0,0,0,0,531,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,
|
||||
0,0,0,0,0,0,0,0,0,0,349,349,349,349,349,349,349,349,349,349,349,538,0,0,0,0,0,0,0,0,0,17,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,41,41,41,41,349,349,349,349,349,349,349,349,349,349,0,0,349,349,349
|
||||
563,563,563,563,563,563,563,563,563,563,0,0,0,41,41,41,41,349,349,349,349,349,349,349,349,349,349,0,0,349,349,349
|
||||
</data>
|
||||
</layer>
|
||||
</map>
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
25,0,0,0,527,25,25,25,25,25,25,25,25,25,25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,25,25,25,0,0,0,0,0,0,0,0,0,0,0,251,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,527,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,527,25,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,551,0,0,0,0,0,0,0,0,0,527,25,25,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,25,25,0,0,0,0,0,25,25,25,25,25,
|
||||
25,25,25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,251,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,395,395,395,395,395,371,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,0,0,0,0,0,0,0,
|
||||
25,25,25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,25,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,251,0,0,0,0,0,25,25,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,
|
||||
0,0,0,0,395,395,395,395,395,371,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,0,0,0,0,0,0,25,
|
||||
0,0,0,0,0,0,0,0,0,323,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
25,25,551,0,0,0,0,0,0,347,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25
|
||||
|
||||
@@ -30,7 +30,7 @@ flip=true
|
||||
[enemy]
|
||||
tileSetFile=bat.png
|
||||
animation=bat.ani
|
||||
width=9
|
||||
width=8
|
||||
height=7
|
||||
x=14
|
||||
y=2
|
||||
@@ -46,7 +46,7 @@ color=bright_blue
|
||||
[enemy]
|
||||
tileSetFile=bat.png
|
||||
animation=bat.ani
|
||||
width=9
|
||||
width=8
|
||||
height=7
|
||||
x=10
|
||||
y=10
|
||||
@@ -62,7 +62,7 @@ color=cyan
|
||||
[enemy]
|
||||
tileSetFile=bat.png
|
||||
animation=bat.ani
|
||||
width=9
|
||||
width=8
|
||||
height=7
|
||||
x=15
|
||||
y=1
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
116,0,0,0,377,377,377,0,0,0,0,0,0,115,114,115,114,0,0,0,0,0,377,377,377,377,0,0,0,0,140,116,
|
||||
140,0,0,0,0,0,0,0,0,0,0,377,0,114,115,114,115,0,0,377,0,0,0,0,0,0,0,0,0,0,116,140,
|
||||
116,0,0,0,0,0,0,0,0,0,0,0,0,115,114,115,114,0,0,0,0,0,0,0,0,0,431,432,114,115,140,116,
|
||||
140,0,0,0,0,0,0,0,377,0,0,0,0,114,115,114,115,0,0,0,0,0,0,431,432,431,432,431,432,0,116,140,
|
||||
140,0,0,0,0,0,0,377,377,0,0,0,0,114,115,114,115,0,0,0,0,0,0,431,432,431,432,431,432,0,116,140,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,377,115,114,115,114,0,0,377,0,0,0,0,0,0,0,0,0,0,140,116,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,114,115,114,115,0,0,0,0,0,0,0,0,0,0,0,0,0,116,140,
|
||||
114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,0,0,114,115,114,115,114,115
|
||||
|
||||
@@ -9,8 +9,8 @@ roomLeft=39.room
|
||||
roomRight=37.room
|
||||
|
||||
[enemy]
|
||||
tileSetFile=arounder_stop.png
|
||||
animation=arounder_stop.ani
|
||||
tileSetFile=stopped_arounder.png
|
||||
animation=stopped_arounder.ani
|
||||
width=7
|
||||
height=8
|
||||
x=9
|
||||
@@ -25,8 +25,8 @@ color=white
|
||||
[/enemy]
|
||||
|
||||
[enemy]
|
||||
tileSetFile=arounder_stop.png
|
||||
animation=arounder_stop.ani
|
||||
tileSetFile=stopped_arounder.png
|
||||
animation=stopped_arounder.ani
|
||||
width=7
|
||||
height=8
|
||||
x=18
|
||||
@@ -41,8 +41,8 @@ color=white
|
||||
[/enemy]
|
||||
|
||||
[enemy]
|
||||
tileSetFile=arounder_walk.png
|
||||
animation=arounder_walk.ani
|
||||
tileSetFile=walking_arounder.png
|
||||
animation=walking_arounder.ani
|
||||
width=5
|
||||
height=8
|
||||
x=12
|
||||
@@ -75,8 +75,8 @@ flip=true
|
||||
[/enemy]
|
||||
|
||||
[enemy]
|
||||
tileSetFile=arounder_fly.png
|
||||
animation=arounder_fly.ani
|
||||
tileSetFile=flying_arounder.png
|
||||
animation=flying_arounder.ani
|
||||
width=7
|
||||
height=7
|
||||
x=3
|
||||
|
||||
@@ -27,8 +27,8 @@ color=white
|
||||
[/enemy]
|
||||
|
||||
[enemy]
|
||||
tileSetFile=arounder_fly.png
|
||||
animation=arounder_fly.ani
|
||||
tileSetFile=flying_arounder.png
|
||||
animation=flying_arounder.ani
|
||||
width=7
|
||||
height=7
|
||||
x=9
|
||||
@@ -44,8 +44,8 @@ flip=true
|
||||
[/enemy]
|
||||
|
||||
[enemy]
|
||||
tileSetFile=arounder_fly.png
|
||||
animation=arounder_fly.ani
|
||||
tileSetFile=flying_arounder.png
|
||||
animation=flying_arounder.ani
|
||||
width=7
|
||||
height=7
|
||||
x=15
|
||||
@@ -61,8 +61,8 @@ flip=true
|
||||
[/enemy]
|
||||
|
||||
[enemy]
|
||||
tileSetFile=arounder_fly.png
|
||||
animation=arounder_fly.ani
|
||||
tileSetFile=flying_arounder.png
|
||||
animation=flying_arounder.ani
|
||||
width=7
|
||||
height=7
|
||||
x=22
|
||||
@@ -78,8 +78,8 @@ flip=true
|
||||
[/enemy]
|
||||
|
||||
[enemy]
|
||||
tileSetFile=arounder_fly.png
|
||||
animation=arounder_fly.ani
|
||||
tileSetFile=flying_arounder.png
|
||||
animation=flying_arounder.ani
|
||||
width=7
|
||||
height=7
|
||||
x=16
|
||||
|
||||
@@ -25,8 +25,8 @@ color=red
|
||||
[/enemy]
|
||||
|
||||
[enemy]
|
||||
tileSetFile=arounder_walk.png
|
||||
animation=arounder_walk.ani
|
||||
tileSetFile=walking_arounder.png
|
||||
animation=walking_arounder.ani
|
||||
width=5
|
||||
height=8
|
||||
x=10
|
||||
@@ -42,8 +42,8 @@ flip=true
|
||||
[/enemy]
|
||||
|
||||
[enemy]
|
||||
tileSetFile=arounder_walk.png
|
||||
animation=arounder_walk.ani
|
||||
tileSetFile=walking_arounder.png
|
||||
animation=walking_arounder.ani
|
||||
width=5
|
||||
height=8
|
||||
x=15
|
||||
@@ -59,8 +59,8 @@ flip=true
|
||||
[/enemy]
|
||||
|
||||
[enemy]
|
||||
tileSetFile=arounder_walk.png
|
||||
animation=arounder_walk.ani
|
||||
tileSetFile=walking_arounder.png
|
||||
animation=walking_arounder.ani
|
||||
width=5
|
||||
height=8
|
||||
x=20
|
||||
@@ -76,8 +76,8 @@ flip=true
|
||||
[/enemy]
|
||||
|
||||
[enemy]
|
||||
tileSetFile=arounder_walk.png
|
||||
animation=arounder_walk.ani
|
||||
tileSetFile=walking_arounder.png
|
||||
animation=walking_arounder.ani
|
||||
width=5
|
||||
height=8
|
||||
x=14
|
||||
|
||||
@@ -25,8 +25,8 @@ color=bright_cyan
|
||||
[/enemy]
|
||||
|
||||
[enemy]
|
||||
tileSetFile=arounder_stop.png
|
||||
animation=arounder_stop.ani
|
||||
tileSetFile=stopped_arounder.png
|
||||
animation=stopped_arounder.ani
|
||||
width=7
|
||||
height=8
|
||||
x=8
|
||||
@@ -41,8 +41,8 @@ color=bright_cyan
|
||||
[/enemy]
|
||||
|
||||
[enemy]
|
||||
tileSetFile=arounder_stop.png
|
||||
animation=arounder_stop.ani
|
||||
tileSetFile=stopped_arounder.png
|
||||
animation=stopped_arounder.ani
|
||||
width=7
|
||||
height=8
|
||||
x=11
|
||||
@@ -57,8 +57,8 @@ color=bright_cyan
|
||||
[/enemy]
|
||||
|
||||
[enemy]
|
||||
tileSetFile=arounder_stop.png
|
||||
animation=arounder_stop.ani
|
||||
tileSetFile=stopped_arounder.png
|
||||
animation=stopped_arounder.ani
|
||||
width=7
|
||||
height=8
|
||||
x=24
|
||||
@@ -73,8 +73,8 @@ color=bright_cyan
|
||||
[/enemy]
|
||||
|
||||
[enemy]
|
||||
tileSetFile=arounder_walk.png
|
||||
animation=arounder_walk.ani
|
||||
tileSetFile=walking_arounder.png
|
||||
animation=walking_arounder.ani
|
||||
width=5
|
||||
height=8
|
||||
x=12
|
||||
@@ -90,8 +90,8 @@ flip=true
|
||||
[/enemy]
|
||||
|
||||
[enemy]
|
||||
tileSetFile=arounder_walk.png
|
||||
animation=arounder_walk.ani
|
||||
tileSetFile=walking_arounder.png
|
||||
animation=walking_arounder.ani
|
||||
width=5
|
||||
height=8
|
||||
x=14
|
||||
@@ -107,8 +107,8 @@ flip=true
|
||||
[/enemy]
|
||||
|
||||
[enemy]
|
||||
tileSetFile=arounder_walk.png
|
||||
animation=arounder_walk.ani
|
||||
tileSetFile=walking_arounder.png
|
||||
animation=walking_arounder.ani
|
||||
width=5
|
||||
height=8
|
||||
x=14
|
||||
|
||||
@@ -11,8 +11,8 @@ itemColor1=red
|
||||
itemColor2=yellow
|
||||
|
||||
[enemy]
|
||||
tileSetFile=jb_alien.png
|
||||
animation=jb_alien.ani
|
||||
tileSetFile=jailbattle_alien.png
|
||||
animation=jailbattle_alien.ani
|
||||
width=13
|
||||
height=15
|
||||
x=10
|
||||
@@ -28,8 +28,8 @@ flip=true
|
||||
[/enemy]
|
||||
|
||||
[enemy]
|
||||
tileSetFile=jb_alien.png
|
||||
animation=jb_alien.ani
|
||||
tileSetFile=jailbattle_alien.png
|
||||
animation=jailbattle_alien.ani
|
||||
width=13
|
||||
height=15
|
||||
x=25
|
||||
@@ -45,8 +45,8 @@ flip=true
|
||||
[/enemy]
|
||||
|
||||
[enemy]
|
||||
tileSetFile=jb_human.png
|
||||
animation=jb_human.ani
|
||||
tileSetFile=jailbattle_human.png
|
||||
animation=jailbattle_human.ani
|
||||
width=11
|
||||
height=13
|
||||
x=7
|
||||
@@ -62,8 +62,8 @@ flip=true
|
||||
[/enemy]
|
||||
|
||||
[enemy]
|
||||
tileSetFile=jb_human.png
|
||||
animation=jb_human.ani
|
||||
tileSetFile=jailbattle_human.png
|
||||
animation=jailbattle_human.ani
|
||||
width=11
|
||||
height=13
|
||||
x=18
|
||||
|
||||
@@ -11,8 +11,8 @@ itemColor1=white
|
||||
itemColor2=green
|
||||
|
||||
[enemy]
|
||||
tileSetFile=jb_human.png
|
||||
animation=jb_human.ani
|
||||
tileSetFile=jailbattle_human.png
|
||||
animation=jailbattle_human.ani
|
||||
width=11
|
||||
height=13
|
||||
x=17
|
||||
@@ -28,8 +28,8 @@ flip=true
|
||||
[/enemy]
|
||||
|
||||
[enemy]
|
||||
tileSetFile=jb_human.png
|
||||
animation=jb_human.ani
|
||||
tileSetFile=jailbattle_human.png
|
||||
animation=jailbattle_human.ani
|
||||
width=11
|
||||
height=13
|
||||
x=2
|
||||
@@ -45,8 +45,8 @@ flip=true
|
||||
[/enemy]
|
||||
|
||||
[enemy]
|
||||
tileSetFile=jb_alien.png
|
||||
animation=jb_alien.ani
|
||||
tileSetFile=jailbattle_alien.png
|
||||
animation=jailbattle_alien.ani
|
||||
width=11
|
||||
height=13
|
||||
x=24
|
||||
|
||||
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
@@ -23,11 +23,11 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.4.3</string>
|
||||
<string>1.0.6.2</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0.6</string>
|
||||
<string>1.0.6.2</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
|
||||
BIN
release/libgcc_s_seh-1.dll
Normal file
BIN
release/libstdc++-6.dll
Normal file
BIN
release/libwinpthread-1.dll
Normal file
@@ -114,7 +114,7 @@ bool Asset::checkFile(std::string path)
|
||||
|
||||
// Comprueba si existe el fichero
|
||||
const std::string filename = path.substr(path.find_last_of("\\/") + 1);
|
||||
SDL_RWops *file = SDL_RWFromFile(path.c_str(), "r+b");
|
||||
SDL_RWops *file = SDL_RWFromFile(path.c_str(), "rb");
|
||||
|
||||
if (file != nullptr)
|
||||
{
|
||||
|
||||
@@ -4,11 +4,12 @@
|
||||
#include <iostream>
|
||||
|
||||
// Constructor
|
||||
Notify::Notify(SDL_Renderer *renderer, std::string bitmapFile, std::string textFile, std::string soundFile)
|
||||
Notify::Notify(SDL_Renderer *renderer, std::string bitmapFile, std::string textFile, std::string soundFile, options_t *options)
|
||||
{
|
||||
// Inicializa variables
|
||||
this->renderer = renderer;
|
||||
bgColor = {64, 64, 64};
|
||||
this->options = options;
|
||||
bgColor = options->notifications.color;
|
||||
waitTime = 300;
|
||||
|
||||
// Crea objetos
|
||||
@@ -54,7 +55,14 @@ void Notify::update()
|
||||
const float step = ((float)notifications.at(i).counter / notifications.at(i).travelDist);
|
||||
const int alpha = 255 * step;
|
||||
|
||||
if (options->notifications.posV == pos_top)
|
||||
{
|
||||
notifications.at(i).rect.y++;
|
||||
}
|
||||
else
|
||||
{
|
||||
notifications.at(i).rect.y--;
|
||||
}
|
||||
notifications.at(i).texture->setAlpha(alpha);
|
||||
|
||||
if (notifications.at(i).rect.y == notifications.at(i).y)
|
||||
@@ -79,7 +87,14 @@ void Notify::update()
|
||||
const float step = (notifications.at(i).counter / (float)notifications.at(i).travelDist);
|
||||
const int alpha = 255 * (1 - step);
|
||||
|
||||
if (options->notifications.posV == pos_top)
|
||||
{
|
||||
notifications.at(i).rect.y--;
|
||||
}
|
||||
else
|
||||
{
|
||||
notifications.at(i).rect.y++;
|
||||
}
|
||||
notifications.at(i).texture->setAlpha(alpha);
|
||||
|
||||
if (notifications.at(i).rect.y == notifications.at(i).y - notifications.at(i).travelDist)
|
||||
@@ -111,24 +126,67 @@ void Notify::clearFinishedNotifications()
|
||||
// Muestra una notificación de texto por pantalla;
|
||||
void Notify::showText(std::string text)
|
||||
{
|
||||
// Crea constantes
|
||||
// Inicializa variables
|
||||
const int width = this->text->lenght(text) + (this->text->getCharacterSize() * 2);
|
||||
const int height = this->text->getCharacterSize() * 2;
|
||||
const int despH = this->text->getCharacterSize() / 2;
|
||||
const int despV = despH;
|
||||
const int travelDist = height + despV;
|
||||
const int offset = (int)notifications.size() > 0 ? notifications.back().y + travelDist : despV;
|
||||
const int padding = (this->text->getCharacterSize() / 2);
|
||||
|
||||
// Posición horizontal
|
||||
int despH = 0;
|
||||
if (options->notifications.posH == pos_left)
|
||||
{
|
||||
despH = padding;
|
||||
}
|
||||
else if (options->notifications.posH == pos_middle)
|
||||
{
|
||||
despH = ((options->screen.windowWidth * options->windowSize) / 2 - (width / 2));
|
||||
}
|
||||
else
|
||||
{
|
||||
despH = (options->screen.windowWidth * options->windowSize) - width - padding;
|
||||
}
|
||||
|
||||
// Posición vertical
|
||||
int despV = 0;
|
||||
if (options->notifications.posV == pos_top)
|
||||
{
|
||||
despV = padding;
|
||||
}
|
||||
else
|
||||
{
|
||||
despV = (options->screen.windowHeight * options->windowSize) - height - padding;
|
||||
}
|
||||
|
||||
const int travelDist = height + padding;
|
||||
|
||||
// Offset
|
||||
int offset = 0;
|
||||
if (options->notifications.posV == pos_top)
|
||||
{
|
||||
offset = (int)notifications.size() > 0 ? notifications.back().y + travelDist : despV;
|
||||
}
|
||||
else
|
||||
{
|
||||
offset = (int)notifications.size() > 0 ? notifications.back().y - travelDist : despV;
|
||||
}
|
||||
|
||||
// Crea la notificacion
|
||||
notification_t n;
|
||||
|
||||
// inicializa variables
|
||||
// Inicializa variables
|
||||
n.y = offset;
|
||||
n.travelDist = travelDist;
|
||||
n.counter = 0;
|
||||
n.state = ns_rising;
|
||||
n.text = text;
|
||||
if (options->notifications.posV == pos_top)
|
||||
{
|
||||
n.rect = {despH, offset - travelDist, width, height};
|
||||
}
|
||||
else
|
||||
{
|
||||
n.rect = {despH, offset + travelDist, width, height};
|
||||
}
|
||||
|
||||
// Crea la textura
|
||||
n.texture = new Texture(renderer);
|
||||
@@ -137,7 +195,7 @@ void Notify::showText(std::string text)
|
||||
SDL_SetRenderDrawColor(renderer, bgColor.r, bgColor.g, bgColor.b, 255);
|
||||
SDL_RenderClear(renderer);
|
||||
n.texture->setBlendMode(SDL_BLENDMODE_BLEND);
|
||||
this->text->writeDX(TXT_CENTER | TXT_STROKE, width / 2, despV, text, 1, {255, 255, 255}, 1, {0, 0, 0});
|
||||
this->text->writeDX(TXT_CENTER | TXT_STROKE, width / 2, padding, text, 1, {255, 255, 255}, 1, {0, 0, 0});
|
||||
SDL_SetRenderTarget(renderer, nullptr);
|
||||
|
||||
// Crea el sprite
|
||||
@@ -147,8 +205,11 @@ void Notify::showText(std::string text)
|
||||
notifications.push_back(n);
|
||||
|
||||
// Reproduce el sonido de la notificación
|
||||
if (options->notifications.sound)
|
||||
{
|
||||
JA_PlaySound(sound);
|
||||
}
|
||||
}
|
||||
|
||||
// Indica si hay notificaciones activas
|
||||
bool Notify::active()
|
||||
|
||||
@@ -51,6 +51,7 @@ private:
|
||||
SDL_Renderer *renderer; // El renderizador de la ventana
|
||||
Texture *texture; // Textura para la fuente de las notificaciones
|
||||
Text *text; // Objeto para dibujar texto
|
||||
options_t *options; // Variable con todas las opciones del programa
|
||||
|
||||
// Variables
|
||||
color_t bgColor; // Color de fondo de las notificaciones
|
||||
@@ -69,7 +70,7 @@ public:
|
||||
void update();
|
||||
|
||||
// Constructor
|
||||
Notify(SDL_Renderer *renderer, std::string bitmapFile, std::string textFile, std::string soundFile);
|
||||
Notify(SDL_Renderer *renderer, std::string bitmapFile, std::string textFile, std::string soundFile, options_t *options);
|
||||
|
||||
// Destructor
|
||||
~Notify();
|
||||
|
||||
@@ -12,12 +12,12 @@ Screen::Screen(SDL_Window *window, SDL_Renderer *renderer, Asset *asset, options
|
||||
this->asset = asset;
|
||||
|
||||
// Crea los objetos
|
||||
notify = new Notify(renderer, asset->get("smb2.png"), asset->get("smb2.txt"), asset->get("notify.wav"));
|
||||
notify = new Notify(renderer, asset->get("smb2.png"), asset->get("smb2.txt"), asset->get("notify.wav"), options);
|
||||
|
||||
gameCanvasWidth = options->gameWidth;
|
||||
gameCanvasHeight = options->gameHeight;
|
||||
borderWidth = options->gameWidth * options->borderSize;
|
||||
borderHeight = options->gameHeight * options->borderSize;
|
||||
borderWidth = options->borderWidth * 2;
|
||||
borderHeight = options->borderHeight * 2;
|
||||
notificationLogicalWidth = gameCanvasWidth;
|
||||
notificationLogicalHeight = gameCanvasHeight;
|
||||
|
||||
@@ -167,8 +167,10 @@ void Screen::setVideoMode(int videoMode)
|
||||
SDL_RenderSetLogicalSize(renderer, windowWidth, windowHeight);
|
||||
}
|
||||
|
||||
// Actualiza el valor de la variable
|
||||
// Actualiza las opciones
|
||||
options->videoMode = videoMode;
|
||||
options->screen.windowWidth = windowWidth;
|
||||
options->screen.windowHeight = windowHeight;
|
||||
|
||||
// Establece el tamaño de las notificaciones
|
||||
setNotificationSize();
|
||||
@@ -201,9 +203,15 @@ void Screen::setBlendMode(SDL_BlendMode blendMode)
|
||||
}
|
||||
|
||||
// Establece el tamaño del borde
|
||||
void Screen::setBorderSize(float s)
|
||||
void Screen::setBorderWidth(int s)
|
||||
{
|
||||
options->borderSize = s;
|
||||
options->borderWidth = s;
|
||||
}
|
||||
|
||||
// Establece el tamaño del borde
|
||||
void Screen::setBorderHeight(int s)
|
||||
{
|
||||
options->borderHeight = s;
|
||||
}
|
||||
|
||||
// Establece si se ha de ver el borde en el modo ventana
|
||||
|
||||
@@ -101,7 +101,8 @@ public:
|
||||
void setBlendMode(SDL_BlendMode blendMode);
|
||||
|
||||
// Establece el tamaño del borde
|
||||
void setBorderSize(float s);
|
||||
void setBorderWidth(int s);
|
||||
void setBorderHeight(int s);
|
||||
|
||||
// Establece si se ha de ver el borde en el modo ventana
|
||||
void setBorderEnabled(bool value);
|
||||
|
||||
@@ -54,6 +54,33 @@ enum palette_e
|
||||
p_zxarne
|
||||
};
|
||||
|
||||
// Posiciones de las notificaciones
|
||||
enum not_pos_e
|
||||
{
|
||||
pos_top,
|
||||
pos_bottom,
|
||||
pos_left,
|
||||
pos_middle,
|
||||
pos_right
|
||||
};
|
||||
|
||||
// Tipos de control de teclado
|
||||
enum ctrl_schem_e
|
||||
{
|
||||
ctrl_cursor,
|
||||
ctrl_opqa,
|
||||
ctrl_wasd
|
||||
};
|
||||
|
||||
// Estructura para las opciones de las notificaciones
|
||||
struct op_notification_t
|
||||
{
|
||||
not_pos_e posH; // Ubicación de las notificaciones en pantalla
|
||||
not_pos_e posV; // Ubicación de las notificaciones en pantalla
|
||||
bool sound; // Indica si las notificaciones suenan
|
||||
color_t color; // Color de las notificaciones
|
||||
};
|
||||
|
||||
// Estructura para saber la seccion y subseccion del programa
|
||||
struct section_t
|
||||
{
|
||||
@@ -89,6 +116,13 @@ struct op_stats_t
|
||||
std::string worstNightmare; // Habitación con más muertes acumuladas
|
||||
};
|
||||
|
||||
// Estructura con opciones de la pantalla
|
||||
struct op_screen_t
|
||||
{
|
||||
int windowWidth; // Ancho de la ventana
|
||||
int windowHeight; // Alto de la ventana
|
||||
};
|
||||
|
||||
// Estructura con todas las opciones de configuración del programa
|
||||
struct options_t
|
||||
{
|
||||
@@ -102,12 +136,16 @@ struct options_t
|
||||
bool integerScale; // Indica si el escalado de la imagen ha de ser entero en el modo a pantalla completa
|
||||
bool keepAspect; // Indica si se ha de mantener la relación de aspecto al poner el modo a pantalla completa
|
||||
bool borderEnabled; // Indica si ha de mostrar el borde en el modo de ventana
|
||||
float borderSize; // Porcentaje de borde que se añade a lo ventana
|
||||
int borderWidth; // Cantidad de pixels que se añade en el borde de la ventana
|
||||
int borderHeight; // Cantidad de pixels que se añade en el borde de la ventana
|
||||
palette_e palette; // Paleta de colores a usar en el juego
|
||||
bool console; // Indica si ha de mostrar información por la consola de texto
|
||||
cheat_t cheat; // Contiene trucos y ventajas para el juego
|
||||
op_stats_t stats; // Datos con las estadisticas de juego
|
||||
online_t online; // Datos del servicio online
|
||||
op_notification_t notifications; // Opciones relativas a las notificaciones;
|
||||
op_screen_t screen; // Opciones relativas a la clase screen
|
||||
ctrl_schem_e keys; // Teclas usadas para jugar
|
||||
};
|
||||
|
||||
// Calcula el cuadrado de la distancia entre dos puntos
|
||||
|
||||
@@ -133,6 +133,20 @@ void Credits::checkEventHandler()
|
||||
// Inicializa los textos
|
||||
void Credits::iniTexts()
|
||||
{
|
||||
std::string keys = "";
|
||||
if (options->keys == ctrl_cursor)
|
||||
{
|
||||
keys = "CURSORS";
|
||||
}
|
||||
else if (options->keys == ctrl_opqa)
|
||||
{
|
||||
keys = "O,P AND Q";
|
||||
}
|
||||
else
|
||||
{
|
||||
keys = "A,D AND W";
|
||||
}
|
||||
|
||||
texts.clear();
|
||||
texts.push_back({"", stringToColor(options->palette, "white")});
|
||||
texts.push_back({"INSTRUCTIONS:", stringToColor(options->palette, "yellow")});
|
||||
@@ -145,9 +159,9 @@ void Credits::iniTexts()
|
||||
|
||||
texts.push_back({"KEYS:", stringToColor(options->palette, "yellow")});
|
||||
texts.push_back({"", stringToColor(options->palette, "white")});
|
||||
texts.push_back({"CURSORS TO MOVE AND JUMP", stringToColor(options->palette, "white")});
|
||||
texts.push_back({keys + " TO MOVE AND JUMP", stringToColor(options->palette, "white")});
|
||||
texts.push_back({"M TO TURN ON/OFF THE MUSIC", stringToColor(options->palette, "white")});
|
||||
texts.push_back({"P TO PAUSE THE GAME", stringToColor(options->palette, "white")});
|
||||
texts.push_back({"H TO HOLD/PAUSE THE GAME", stringToColor(options->palette, "white")});
|
||||
texts.push_back({"F1-F4 TO CHANGE WINDOWS SIZE", stringToColor(options->palette, "white")});
|
||||
texts.push_back({"F TO SWITCH TO FULLSCREEN", stringToColor(options->palette, "white")});
|
||||
texts.push_back({"B TO SWITCH THE BORDER SCREEN", stringToColor(options->palette, "white")});
|
||||
|
||||
@@ -18,7 +18,7 @@ Director::Director(int argc, char *argv[])
|
||||
section.subsection = SUBSECTION_LOGO_TO_INTRO;
|
||||
|
||||
#ifdef DEBUG
|
||||
section.name = SECTION_PROG_LOGO;
|
||||
section.name = SECTION_PROG_GAME;
|
||||
#endif
|
||||
|
||||
// Crea e inicializa las opciones del programa
|
||||
@@ -57,9 +57,6 @@ Director::Director(int argc, char *argv[])
|
||||
screen->setBorderColor(borderColor);
|
||||
debug = new Debug(renderer, screen, asset);
|
||||
music = JA_LoadMusic(asset->get("title.ogg").c_str());
|
||||
|
||||
// Inicializa los servicios online
|
||||
//initOnline();
|
||||
}
|
||||
|
||||
Director::~Director()
|
||||
@@ -112,10 +109,13 @@ void Director::initOptions()
|
||||
// Crea el puntero a la estructura de opciones
|
||||
options = new options_t;
|
||||
|
||||
// Version
|
||||
// Version del archivo de configuración
|
||||
options->configVersion = "v1.06.1";
|
||||
|
||||
// Opciones dee video
|
||||
// Opciones de control
|
||||
options->keys = ctrl_cursor;
|
||||
|
||||
// Opciones de video
|
||||
options->gameWidth = GAMECANVAS_WIDTH;
|
||||
options->gameHeight = GAMECANVAS_HEIGHT;
|
||||
options->videoMode = 0;
|
||||
@@ -125,7 +125,8 @@ void Director::initOptions()
|
||||
options->integerScale = true;
|
||||
options->keepAspect = true;
|
||||
options->borderEnabled = true;
|
||||
options->borderSize = 0.2f;
|
||||
options->borderWidth = 32;
|
||||
options->borderHeight = 24;
|
||||
options->palette = p_zxspectrum;
|
||||
|
||||
// Estos valores no se guardan en el fichero de configuraci´ón
|
||||
@@ -147,6 +148,12 @@ void Director::initOptions()
|
||||
options->online.gameID = "jaildoctors_dilemma";
|
||||
#endif
|
||||
options->online.jailerID = "";
|
||||
|
||||
// Opciones de las notificaciones
|
||||
options->notifications.posV = pos_top;
|
||||
options->notifications.posH = pos_left;
|
||||
options->notifications.sound = true;
|
||||
options->notifications.color = {64, 64, 64};
|
||||
}
|
||||
|
||||
// Comprueba los parametros del programa
|
||||
@@ -306,6 +313,21 @@ bool Director::saveConfig()
|
||||
file << "## VERSION\n";
|
||||
file << "configVersion=" + options->configVersion + "\n";
|
||||
|
||||
file << "\n## CONTROL OPTIONS\n";
|
||||
file << "## keys = CURSOR | OPQA | WASD\n";
|
||||
if (options->keys == ctrl_cursor)
|
||||
{
|
||||
file << "keys=CURSOR\n";
|
||||
}
|
||||
else if (options->keys == ctrl_opqa)
|
||||
{
|
||||
file << "keys=OPQA\n";
|
||||
}
|
||||
else if (options->keys == ctrl_wasd)
|
||||
{
|
||||
file << "keys=WASD\n";
|
||||
}
|
||||
|
||||
file << "\n## VISUAL OPTIONS\n";
|
||||
if (options->videoMode == 0)
|
||||
{
|
||||
@@ -337,7 +359,8 @@ bool Director::saveConfig()
|
||||
file << "integerScale=" + boolToString(options->integerScale) + "\n";
|
||||
file << "keepAspect=" + boolToString(options->keepAspect) + "\n";
|
||||
file << "borderEnabled=" + boolToString(options->borderEnabled) + "\n";
|
||||
file << "borderSize=" + std::to_string(options->borderSize) + "\n";
|
||||
file << "borderWidth=" + std::to_string(options->borderWidth) + "\n";
|
||||
file << "borderHeight=" + std::to_string(options->borderHeight) + "\n";
|
||||
file << "palette=" + std::to_string(options->palette) + "\n";
|
||||
|
||||
file << "\n## ONLINE OPTIONS\n";
|
||||
@@ -346,6 +369,33 @@ bool Director::saveConfig()
|
||||
file << "port=" + std::to_string(options->online.port) + "\n";
|
||||
file << "jailerID=" + options->online.jailerID + "\n";
|
||||
|
||||
file << "\n## NOTIFICATION OPTIONS\n";
|
||||
file << "## notifications.posV = pos_top | pos_bottom\n";
|
||||
if (options->notifications.posV == pos_top)
|
||||
{
|
||||
file << "notifications.posV=pos_top\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
file << "notifications.posV=pos_bottom\n";
|
||||
}
|
||||
|
||||
file << "## notifications.posH = pos_left | pos_middle | pos_right\n";
|
||||
if (options->notifications.posH == pos_left)
|
||||
{
|
||||
file << "notifications.posH=pos_left\n";
|
||||
}
|
||||
else if (options->notifications.posH == pos_middle)
|
||||
{
|
||||
file << "notifications.posH=pos_middle\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
file << "notifications.posH=pos_right\n";
|
||||
}
|
||||
|
||||
file << "notifications.sound=" + boolToString(options->notifications.sound) + "\n";
|
||||
|
||||
// Cierra el fichero
|
||||
file.close();
|
||||
|
||||
@@ -510,9 +560,9 @@ void Director::loadResources(section_t section)
|
||||
textureList.push_back("abad.png");
|
||||
textureList.push_back("abad_bell.png");
|
||||
textureList.push_back("amstrad_cs.png");
|
||||
textureList.push_back("arounder_fly.png");
|
||||
textureList.push_back("arounder_stop.png");
|
||||
textureList.push_back("arounder_walk.png");
|
||||
textureList.push_back("flying_arounder.png");
|
||||
textureList.push_back("stopped_arounder.png");
|
||||
textureList.push_back("walking_arounder.png");
|
||||
textureList.push_back("arounders_door.png");
|
||||
textureList.push_back("arounders_machine.png");
|
||||
textureList.push_back("bat.png");
|
||||
@@ -534,11 +584,11 @@ void Director::loadResources(section_t section)
|
||||
textureList.push_back("diskette.png");
|
||||
textureList.push_back("dong.png");
|
||||
textureList.push_back("guitar.png");
|
||||
textureList.push_back("jb_alien.png");
|
||||
textureList.push_back("jb_human.png");
|
||||
textureList.push_back("jailer.png");
|
||||
textureList.push_back("jailer2.png");
|
||||
textureList.push_back("jailer3.png");
|
||||
textureList.push_back("jailbattle_alien.png");
|
||||
textureList.push_back("jailbattle_human.png");
|
||||
textureList.push_back("jailer_#1.png");
|
||||
textureList.push_back("jailer_#2.png");
|
||||
textureList.push_back("jailer_#3.png");
|
||||
textureList.push_back("jeannine.png");
|
||||
textureList.push_back("lamp.png");
|
||||
textureList.push_back("lord_abad.png");
|
||||
@@ -546,7 +596,7 @@ void Director::loadResources(section_t section)
|
||||
textureList.push_back("matatunos.png");
|
||||
textureList.push_back("mummy.png");
|
||||
textureList.push_back("paco.png");
|
||||
textureList.push_back("printer.png");
|
||||
textureList.push_back("elsa.png");
|
||||
textureList.push_back("qvoid.png");
|
||||
textureList.push_back("sam.png");
|
||||
textureList.push_back("sigmasua.png");
|
||||
@@ -573,9 +623,9 @@ void Director::loadResources(section_t section)
|
||||
animationList.push_back("abad.ani");
|
||||
animationList.push_back("abad_bell.ani");
|
||||
animationList.push_back("amstrad_cs.ani");
|
||||
animationList.push_back("arounder_fly.ani");
|
||||
animationList.push_back("arounder_stop.ani");
|
||||
animationList.push_back("arounder_walk.ani");
|
||||
animationList.push_back("flying_arounder.ani");
|
||||
animationList.push_back("stopped_arounder.ani");
|
||||
animationList.push_back("walking_arounder.ani");
|
||||
animationList.push_back("arounders_door.ani");
|
||||
animationList.push_back("arounders_machine.ani");
|
||||
animationList.push_back("bat.ani");
|
||||
@@ -597,11 +647,11 @@ void Director::loadResources(section_t section)
|
||||
animationList.push_back("diskette.ani");
|
||||
animationList.push_back("dong.ani");
|
||||
animationList.push_back("guitar.ani");
|
||||
animationList.push_back("jb_alien.ani");
|
||||
animationList.push_back("jb_human.ani");
|
||||
animationList.push_back("jailer.ani");
|
||||
animationList.push_back("jailer2.ani");
|
||||
animationList.push_back("jailer3.ani");
|
||||
animationList.push_back("jailbattle_alien.ani");
|
||||
animationList.push_back("jailbattle_human.ani");
|
||||
animationList.push_back("jailer_#1.ani");
|
||||
animationList.push_back("jailer_#2.ani");
|
||||
animationList.push_back("jailer_#3.ani");
|
||||
animationList.push_back("jeannine.ani");
|
||||
animationList.push_back("lamp.ani");
|
||||
animationList.push_back("lord_abad.ani");
|
||||
@@ -609,7 +659,7 @@ void Director::loadResources(section_t section)
|
||||
animationList.push_back("matatunos.ani");
|
||||
animationList.push_back("mummy.ani");
|
||||
animationList.push_back("paco.ani");
|
||||
animationList.push_back("printer.ani");
|
||||
animationList.push_back("elsa.ani");
|
||||
animationList.push_back("qvoid.ani");
|
||||
animationList.push_back("sam.ani");
|
||||
animationList.push_back("sigmasua.ani");
|
||||
@@ -684,9 +734,9 @@ void Director::loadResources(section_t section)
|
||||
textureList.push_back("abad.png");
|
||||
textureList.push_back("aerojailer.png");
|
||||
textureList.push_back("amstrad_cs.png");
|
||||
textureList.push_back("arounder_fly.png");
|
||||
textureList.push_back("arounder_stop.png");
|
||||
textureList.push_back("arounder_walk.png");
|
||||
textureList.push_back("flying_arounder.png");
|
||||
textureList.push_back("stopped_arounder.png");
|
||||
textureList.push_back("walking_arounder.png");
|
||||
textureList.push_back("arounder.png");
|
||||
textureList.push_back("arounders_door.png");
|
||||
textureList.push_back("arounders_machine.png");
|
||||
@@ -709,11 +759,11 @@ void Director::loadResources(section_t section)
|
||||
textureList.push_back("dong.png");
|
||||
textureList.push_back("guitar.png");
|
||||
textureList.push_back("heavy.png");
|
||||
textureList.push_back("jailer.png");
|
||||
textureList.push_back("jailer2.png");
|
||||
textureList.push_back("jailer3.png");
|
||||
textureList.push_back("jb_alien.png");
|
||||
textureList.push_back("jb_human.png");
|
||||
textureList.push_back("jailer_#1.png");
|
||||
textureList.push_back("jailer_#2.png");
|
||||
textureList.push_back("jailer_#3.png");
|
||||
textureList.push_back("jailbattle_alien.png");
|
||||
textureList.push_back("jailbattle_human.png");
|
||||
textureList.push_back("jeannine.png");
|
||||
textureList.push_back("lamp.png");
|
||||
textureList.push_back("lord_abad.png");
|
||||
@@ -721,7 +771,7 @@ void Director::loadResources(section_t section)
|
||||
textureList.push_back("mummy.png");
|
||||
textureList.push_back("paco.png");
|
||||
textureList.push_back("pepe_rosita_job.png");
|
||||
textureList.push_back("printer.png");
|
||||
textureList.push_back("elsa.png");
|
||||
textureList.push_back("qvoid.png");
|
||||
textureList.push_back("robot.png");
|
||||
textureList.push_back("sam.png");
|
||||
@@ -765,9 +815,9 @@ void Director::loadResources(section_t section)
|
||||
animationList.push_back("abad.ani");
|
||||
animationList.push_back("aerojailer.ani");
|
||||
animationList.push_back("amstrad_cs.ani");
|
||||
animationList.push_back("arounder_fly.ani");
|
||||
animationList.push_back("arounder_stop.ani");
|
||||
animationList.push_back("arounder_walk.ani");
|
||||
animationList.push_back("flying_arounder.ani");
|
||||
animationList.push_back("stopped_arounder.ani");
|
||||
animationList.push_back("walking_arounder.ani");
|
||||
animationList.push_back("arounder.ani");
|
||||
animationList.push_back("arounders_door.ani");
|
||||
animationList.push_back("arounders_machine.ani");
|
||||
@@ -790,11 +840,11 @@ void Director::loadResources(section_t section)
|
||||
animationList.push_back("dong.ani");
|
||||
animationList.push_back("guitar.ani");
|
||||
animationList.push_back("heavy.ani");
|
||||
animationList.push_back("jailer.ani");
|
||||
animationList.push_back("jailer2.ani");
|
||||
animationList.push_back("jailer3.ani");
|
||||
animationList.push_back("jb_alien.ani");
|
||||
animationList.push_back("jb_human.ani");
|
||||
animationList.push_back("jailer_#1.ani");
|
||||
animationList.push_back("jailer_#2.ani");
|
||||
animationList.push_back("jailer_#3.ani");
|
||||
animationList.push_back("jailbattle_alien.ani");
|
||||
animationList.push_back("jailbattle_human.ani");
|
||||
animationList.push_back("jeannine.ani");
|
||||
animationList.push_back("lamp.ani");
|
||||
animationList.push_back("lord_abad.ani");
|
||||
@@ -802,7 +852,7 @@ void Director::loadResources(section_t section)
|
||||
animationList.push_back("mummy.ani");
|
||||
animationList.push_back("paco.ani");
|
||||
animationList.push_back("pepe_rosita_job.ani");
|
||||
animationList.push_back("printer.ani");
|
||||
animationList.push_back("elsa.ani");
|
||||
animationList.push_back("qvoid.ani");
|
||||
animationList.push_back("robot.ani");
|
||||
animationList.push_back("sam.ani");
|
||||
@@ -976,6 +1026,22 @@ bool Director::setOptions(options_t *options, std::string var, std::string value
|
||||
options->configVersion = value;
|
||||
}
|
||||
|
||||
else if (var == "keys")
|
||||
{
|
||||
if (value == "OPQA")
|
||||
{
|
||||
options->keys = ctrl_opqa;
|
||||
}
|
||||
else if (value == "WASD")
|
||||
{
|
||||
options->keys = ctrl_wasd;
|
||||
}
|
||||
else
|
||||
{
|
||||
options->keys = ctrl_cursor;
|
||||
}
|
||||
}
|
||||
|
||||
else if (var == "videoMode")
|
||||
{
|
||||
if (value == "SDL_WINDOW_FULLSCREEN_DESKTOP")
|
||||
@@ -1033,13 +1099,14 @@ bool Director::setOptions(options_t *options, std::string var, std::string value
|
||||
options->borderEnabled = stringToBool(value);
|
||||
}
|
||||
|
||||
else if (var == "borderSize")
|
||||
else if (var == "borderWidth")
|
||||
{
|
||||
options->borderSize = std::stof(value);
|
||||
if (options->borderSize < 0.0f || options->borderSize > 0.5f)
|
||||
{
|
||||
options->borderSize = 0.1f;
|
||||
options->borderWidth = std::stoi(value);
|
||||
}
|
||||
|
||||
else if (var == "borderHeight")
|
||||
{
|
||||
options->borderHeight = std::stoi(value);
|
||||
}
|
||||
|
||||
else if (var == "palette")
|
||||
@@ -1081,6 +1148,39 @@ bool Director::setOptions(options_t *options, std::string var, std::string value
|
||||
options->online.jailerID = value;
|
||||
}
|
||||
|
||||
else if (var == "notifications.posH")
|
||||
{
|
||||
if (value == "pos_left")
|
||||
{
|
||||
options->notifications.posH = pos_left;
|
||||
}
|
||||
else if (value == "pos_middle")
|
||||
{
|
||||
options->notifications.posH = pos_middle;
|
||||
}
|
||||
else
|
||||
{
|
||||
options->notifications.posH = pos_right;
|
||||
}
|
||||
}
|
||||
|
||||
else if (var == "notifications.posV")
|
||||
{
|
||||
if (value == "pos_top")
|
||||
{
|
||||
options->notifications.posV = pos_top;
|
||||
}
|
||||
else
|
||||
{
|
||||
options->notifications.posV = pos_bottom;
|
||||
}
|
||||
}
|
||||
|
||||
else if (var == "notifications.sound")
|
||||
{
|
||||
options->notifications.sound = stringToBool(value);
|
||||
}
|
||||
|
||||
else if (var == "" || var.substr(0, 1) == "#")
|
||||
{
|
||||
}
|
||||
@@ -1103,10 +1203,26 @@ void Director::initInput()
|
||||
input->discoverGameController();
|
||||
|
||||
// Asigna inputs a teclas
|
||||
if (options->keys == ctrl_cursor)
|
||||
{
|
||||
input->bindKey(INPUT_UP, SDL_SCANCODE_UP);
|
||||
input->bindKey(INPUT_DOWN, SDL_SCANCODE_DOWN);
|
||||
input->bindKey(INPUT_LEFT, SDL_SCANCODE_LEFT);
|
||||
input->bindKey(INPUT_RIGHT, SDL_SCANCODE_RIGHT);
|
||||
}
|
||||
else if (options->keys == ctrl_opqa)
|
||||
{
|
||||
input->bindKey(INPUT_UP, SDL_SCANCODE_Q);
|
||||
input->bindKey(INPUT_LEFT, SDL_SCANCODE_O);
|
||||
input->bindKey(INPUT_RIGHT, SDL_SCANCODE_P);
|
||||
}
|
||||
else if (options->keys == ctrl_wasd)
|
||||
{
|
||||
input->bindKey(INPUT_UP, SDL_SCANCODE_W);
|
||||
input->bindKey(INPUT_LEFT, SDL_SCANCODE_A);
|
||||
input->bindKey(INPUT_RIGHT, SDL_SCANCODE_D);
|
||||
}
|
||||
|
||||
input->bindKey(INPUT_DOWN, SDL_SCANCODE_DOWN);
|
||||
input->bindKey(INPUT_ACCEPT, SDL_SCANCODE_RETURN);
|
||||
input->bindKey(INPUT_CANCEL, SDL_SCANCODE_ESCAPE);
|
||||
input->bindKey(INPUT_BUTTON_1, SDL_SCANCODE_SPACE);
|
||||
@@ -1165,8 +1281,8 @@ bool Director::initSDL()
|
||||
int incH = 0;
|
||||
if (options->borderEnabled)
|
||||
{
|
||||
incW = options->gameWidth * options->borderSize;
|
||||
incH = options->gameHeight * options->borderSize;
|
||||
incW = options->borderWidth * 2;
|
||||
incH = options->borderHeight * 2;
|
||||
}
|
||||
|
||||
window = SDL_CreateWindow(WINDOW_CAPTION, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, (options->gameWidth + incW) * options->windowSize, (options->gameHeight + incH) * options->windowSize, SDL_WINDOW_SHOWN | SDL_WINDOW_ALLOW_HIGHDPI);
|
||||
@@ -1377,12 +1493,12 @@ bool Director::setFileList()
|
||||
asset->add(prefix + "/data/enemies/abad.png", t_bitmap);
|
||||
asset->add(prefix + "/data/enemies/amstrad_cs.ani", t_data);
|
||||
asset->add(prefix + "/data/enemies/amstrad_cs.png", t_bitmap);
|
||||
asset->add(prefix + "/data/enemies/arounder_fly.ani", t_data);
|
||||
asset->add(prefix + "/data/enemies/arounder_fly.png", t_bitmap);
|
||||
asset->add(prefix + "/data/enemies/arounder_stop.ani", t_data);
|
||||
asset->add(prefix + "/data/enemies/arounder_stop.png", t_bitmap);
|
||||
asset->add(prefix + "/data/enemies/arounder_walk.ani", t_data);
|
||||
asset->add(prefix + "/data/enemies/arounder_walk.png", t_bitmap);
|
||||
asset->add(prefix + "/data/enemies/flying_arounder.ani", t_data);
|
||||
asset->add(prefix + "/data/enemies/flying_arounder.png", t_bitmap);
|
||||
asset->add(prefix + "/data/enemies/stopped_arounder.ani", t_data);
|
||||
asset->add(prefix + "/data/enemies/stopped_arounder.png", t_bitmap);
|
||||
asset->add(prefix + "/data/enemies/walking_arounder.ani", t_data);
|
||||
asset->add(prefix + "/data/enemies/walking_arounder.png", t_bitmap);
|
||||
asset->add(prefix + "/data/enemies/arounders_door.ani", t_data);
|
||||
asset->add(prefix + "/data/enemies/arounders_door.png", t_bitmap);
|
||||
asset->add(prefix + "/data/enemies/arounders_machine.ani", t_data);
|
||||
@@ -1425,16 +1541,16 @@ bool Director::setFileList()
|
||||
asset->add(prefix + "/data/enemies/guitar.png", t_bitmap);
|
||||
asset->add(prefix + "/data/enemies/heavy.ani", t_data);
|
||||
asset->add(prefix + "/data/enemies/heavy.png", t_bitmap);
|
||||
asset->add(prefix + "/data/enemies/jailer.ani", t_data);
|
||||
asset->add(prefix + "/data/enemies/jailer.png", t_bitmap);
|
||||
asset->add(prefix + "/data/enemies/jailer2.ani", t_data);
|
||||
asset->add(prefix + "/data/enemies/jailer2.png", t_bitmap);
|
||||
asset->add(prefix + "/data/enemies/jailer3.ani", t_data);
|
||||
asset->add(prefix + "/data/enemies/jailer3.png", t_bitmap);
|
||||
asset->add(prefix + "/data/enemies/jb_alien.ani", t_data);
|
||||
asset->add(prefix + "/data/enemies/jb_alien.png", t_bitmap);
|
||||
asset->add(prefix + "/data/enemies/jb_human.ani", t_data);
|
||||
asset->add(prefix + "/data/enemies/jb_human.png", t_bitmap);
|
||||
asset->add(prefix + "/data/enemies/jailer_#1.ani", t_data);
|
||||
asset->add(prefix + "/data/enemies/jailer_#1.png", t_bitmap);
|
||||
asset->add(prefix + "/data/enemies/jailer_#2.ani", t_data);
|
||||
asset->add(prefix + "/data/enemies/jailer_#2.png", t_bitmap);
|
||||
asset->add(prefix + "/data/enemies/jailer_#3.ani", t_data);
|
||||
asset->add(prefix + "/data/enemies/jailer_#3.png", t_bitmap);
|
||||
asset->add(prefix + "/data/enemies/jailbattle_alien.ani", t_data);
|
||||
asset->add(prefix + "/data/enemies/jailbattle_alien.png", t_bitmap);
|
||||
asset->add(prefix + "/data/enemies/jailbattle_human.ani", t_data);
|
||||
asset->add(prefix + "/data/enemies/jailbattle_human.png", t_bitmap);
|
||||
asset->add(prefix + "/data/enemies/jeannine.ani", t_data);
|
||||
asset->add(prefix + "/data/enemies/jeannine.png", t_bitmap);
|
||||
asset->add(prefix + "/data/enemies/lamp.ani", t_data);
|
||||
@@ -1447,8 +1563,8 @@ bool Director::setFileList()
|
||||
asset->add(prefix + "/data/enemies/mummy.png", t_bitmap);
|
||||
asset->add(prefix + "/data/enemies/paco.ani", t_data);
|
||||
asset->add(prefix + "/data/enemies/paco.png", t_bitmap);
|
||||
asset->add(prefix + "/data/enemies/printer.ani", t_data);
|
||||
asset->add(prefix + "/data/enemies/printer.png", t_bitmap);
|
||||
asset->add(prefix + "/data/enemies/elsa.ani", t_data);
|
||||
asset->add(prefix + "/data/enemies/elsa.png", t_bitmap);
|
||||
asset->add(prefix + "/data/enemies/qvoid.ani", t_data);
|
||||
asset->add(prefix + "/data/enemies/qvoid.png", t_bitmap);
|
||||
asset->add(prefix + "/data/enemies/robot.ani", t_data);
|
||||
|
||||
@@ -295,7 +295,7 @@ void Ending2::iniSpriteList()
|
||||
spriteList.push_back("spark");
|
||||
spriteList.push_back("code");
|
||||
spriteList.push_back("paco");
|
||||
spriteList.push_back("printer");
|
||||
spriteList.push_back("elsa");
|
||||
spriteList.push_back("z80");
|
||||
|
||||
spriteList.push_back("bell");
|
||||
@@ -304,9 +304,9 @@ void Ending2::iniSpriteList()
|
||||
spriteList.push_back("amstrad_cs");
|
||||
spriteList.push_back("breakout");
|
||||
|
||||
spriteList.push_back("arounder_fly");
|
||||
spriteList.push_back("arounder_stop");
|
||||
spriteList.push_back("arounder_walk");
|
||||
spriteList.push_back("flying_arounder");
|
||||
spriteList.push_back("stopped_arounder");
|
||||
spriteList.push_back("walking_arounder");
|
||||
spriteList.push_back("arounders_door");
|
||||
spriteList.push_back("arounders_machine");
|
||||
|
||||
@@ -324,12 +324,12 @@ void Ending2::iniSpriteList()
|
||||
spriteList.push_back("dimallas");
|
||||
spriteList.push_back("guitar");
|
||||
|
||||
spriteList.push_back("jb_alien");
|
||||
spriteList.push_back("jb_human");
|
||||
spriteList.push_back("jailbattle_alien");
|
||||
spriteList.push_back("jailbattle_human");
|
||||
|
||||
spriteList.push_back("jailer");
|
||||
spriteList.push_back("jailer2");
|
||||
spriteList.push_back("jailer3");
|
||||
spriteList.push_back("jailer_#1");
|
||||
spriteList.push_back("jailer_#2");
|
||||
spriteList.push_back("jailer_#3");
|
||||
spriteList.push_back("bry");
|
||||
spriteList.push_back("upv_student");
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ Game::Game(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *as
|
||||
ticksSpeed = 15;
|
||||
board.lives = 9;
|
||||
#ifdef DEBUG
|
||||
board.lives = 0;
|
||||
board.lives = 9;
|
||||
#endif
|
||||
board.items = 0;
|
||||
board.rooms = 1;
|
||||
@@ -146,7 +146,7 @@ void Game::checkEventHandler()
|
||||
board.music ? JA_ResumeMusic() : JA_PauseMusic();
|
||||
break;
|
||||
|
||||
case SDL_SCANCODE_P:
|
||||
case SDL_SCANCODE_H:
|
||||
switchPause();
|
||||
break;
|
||||
|
||||
|
||||