181 Commits

Author SHA1 Message Date
4ac7496eff Trabajando en la sección de juego y el jugador 2022-10-02 20:23:06 +02:00
b6225d2d2f Trabajando en el jugador 2022-09-29 20:15:41 +02:00
a148c38ef8 Modificados ficheros .ani del jugador 2022-09-29 19:07:39 +02:00
902d901698 Trabajando en el jugador 2022-09-29 18:17:30 +02:00
a1bdb6add3 Merge branch 'master' of https://gitea.sustancia.synology.me/JailDesigner/coffee_crisis 2022-09-29 18:07:58 +02:00
0063a2ede5 Optimizado TITLE, aun queda por hacer 2022-09-29 17:49:43 +02:00
e46a346d20 Trabajando con las animaciones del jugador 2022-09-29 14:02:13 +02:00
15b73f1d2c TITULO bastante avanzado, se deja para el final ya que falta ver elmodo demo y demas 2022-09-29 11:22:29 +02:00
fd90a3c66c Corregido el bug de la asignacion de items del menu de la intro 2022-09-28 22:23:26 +02:00
3d75fae393 Error raro en el constructor del menu 2022-09-28 21:12:26 +02:00
6df5d484bc No se pq no funciona al cargar los items del menu 2022-09-28 20:26:35 +02:00
e2298dc2b2 Ya empieza a funcionar la INTRO 2022-09-28 19:41:12 +02:00
c213124193 Trabajando en la INTRO 2022-09-28 18:52:19 +02:00
2209ed5f97 Trabajando en el TITULO 2022-09-28 14:03:45 +02:00
1552f6385c INTRO optimizada y revisada 2022-09-28 11:48:01 +02:00
072a488de6 Ya funciona la INTRO 2022-09-28 09:48:55 +02:00
8b2459dc35 Trabajando en la INTRO 2022-09-27 22:39:27 +02:00
10882780e5 Revisada la clase DIRECTOR 2022-09-27 19:34:13 +02:00
96ee1fdbe5 Eliminado el fichero coffeedrop 2022-09-27 19:04:25 +02:00
50e31a3db3 LOGO funcional 2022-09-27 19:03:24 +02:00
740e495ad0 Ya compila 2022-09-27 14:02:16 +02:00
2528969801 He quitado todos lo errores. No va a funcionar 2022-09-27 13:35:39 +02:00
8d56912765 Actualizando el código 2022-09-27 13:06:04 +02:00
c8bebfd2d9 Me voy a la cama. Sigo con la reescritura de todo el código 2022-09-26 22:25:46 +02:00
35e7abcd3c se va la luz 2022-09-26 18:18:27 +02:00
b092d3f86a Trabajando en la reescritura del código 2022-09-26 14:06:44 +02:00
837bcbd1da menudo berenjenal. sigo con la integracion con las ultimas versiones de mis librerias 2022-09-26 11:18:50 +02:00
26bc47d9f6 Actualizando las librerias a la ultima versión 2022-09-26 10:34:45 +02:00
9e089e9092 Añadiendo la clase asset 2022-09-26 10:17:54 +02:00
25616e1e6c Ya permite continuar 2022-09-25 23:16:20 +02:00
ed67e429d8 Trabajando en poder continuar la partida al morir 2022-09-25 22:45:09 +02:00
4ebd034b59 Cambiado un poco el outline de la fuente nokia_big2 2022-09-25 22:24:41 +02:00
38f3e2e4d3 Limpieza de código no usado 2022-09-25 21:27:12 +02:00
6493b73f4f Cambiados NULL por nullptr 2022-09-25 21:22:59 +02:00
6637ba9f10 Actualizado a la última versión de ltexture 2022-09-25 21:11:17 +02:00
a74c8d5122 Eliminado codigo sin usar 2022-09-25 20:17:06 +02:00
4df0db088f Organización de código 2022-09-25 20:10:31 +02:00
27cb772933 corregido el offset de la m en nokia_big2 2022-09-25 19:40:39 +02:00
778b07cce1 Modificado el texto al cambiar de pantalla. Quitado texto no usado 2022-09-25 19:38:03 +02:00
1fa5c75466 Actualizado README.md 2022-09-25 19:01:13 +02:00
0b00acf31b Cambiado el numero de versión 2022-09-25 18:59:35 +02:00
2979a6752c Limpieza de código. Añadida la última versión de jail_audio 2022-09-25 18:44:58 +02:00
f6494e69c8 Cambiado el idioma por defecto a valenciano 2022-08-21 10:10:09 +02:00
5167a5857d Cambiada la frecuencia a 48000Hz de dos pistas de audio 2022-08-21 10:05:38 +02:00
28fe1130cf Merge branch 'master' of https://gitea.sustancia.synology.me/JailDesigner/coffee_crisis 2022-08-07 12:53:41 +02:00
e92b7eab4e limpieza de archivos 2022-08-07 12:53:14 +02:00
14f7a79927 Actualizar 'README.md' 2022-08-05 23:13:55 +02:00
4f6a6a4918 Actualizar 'Makefile' 2021-09-20 13:48:59 +02:00
f5b35cee6b Trabajando en la versión de opendingux 2021-09-17 20:55:36 +02:00
454791fe96 Añadidos modos en pantalla completa para el escalado entero y mantener la relación de aspecto 2021-09-15 11:48:57 +02:00
3f165be114 Commit para seguir en otro ordenador 2021-09-15 06:37:54 +02:00
778672a6f5 Commit para seguir en otro ordenador 2021-09-14 22:52:25 +02:00
8c919abc9d Trabajando en el escalado entero y el tamaño personalizable de la ventana de renderizado a traves de las opciones 2021-09-14 21:15:52 +02:00
7e37da3999 Restituido ballong.png a los colores originales 2021-09-14 17:03:13 +02:00
842d5dd56b Limpieza de código 2021-09-11 09:06:53 +02:00
ea3f16b8ac Añadida la clase screen al código 2021-09-10 23:52:58 +02:00
3fe0861e4f Trabajando en integrar la clase screen 2021-09-10 23:04:52 +02:00
b28d798545 Actualizado el numero de versión 2021-09-10 20:55:46 +02:00
bdf092d46e Limpieza de código. Modificada la fuente nokiabig2. Puestas ayudas para los dos jugadores. Cambiado el tamaño del mensaje de juego completado 2021-09-10 20:46:24 +02:00
09421a093d Limpieza de código 2021-09-10 14:02:29 +02:00
a7d7cdd047 Modificados los graficos de los globos y del jugador 1. Rebajada la dificultad de las últimas pantallas descendiendo el nivel de amenaza 2021-09-10 10:55:01 +02:00
bffefcad77 clean up and fixes 2021-09-06 18:05:40 +02:00
b408de5fa0 new makefile 2021-09-06 17:29:23 +02:00
f70145a0bf new makefile 2021-09-06 17:21:54 +02:00
02c7790835 updated nokia_big2.png 2021-09-06 17:00:35 +02:00
2d10e640bd updated stb_image.h 2021-09-03 20:00:40 +02:00
737829cb68 fixing warnings 2021-09-03 19:53:22 +02:00
d3f17bc93a Release 2.0 2021-09-03 19:21:26 +02:00
b7490ed1c1 Preparing release 2.0 2021-09-03 12:58:54 +02:00
836deb720d new logo.png 2021-09-03 12:47:16 +02:00
7e9a1cb049 bug fixes 2021-09-02 10:07:54 +02:00
f928195a05 bug fixes 2021-09-01 22:58:50 +02:00
84b09a4987 Bug fixes 2021-09-01 19:26:34 +02:00
f0b9a1d134 Fixed offset from render messages with nokia font 2021-09-01 19:10:00 +02:00
64369921ec bug fixes 2021-09-01 17:23:12 +02:00
70ae7f67a9 Merge branch 'master' of https://gitea.sustancia.synology.me/JailDesigner/coffee_crisis 2021-09-01 16:54:41 +02:00
2ea86ef39f added font nokia2 2021-09-01 16:54:19 +02:00
658bb71441 bug fixes 2021-09-01 14:04:34 +02:00
0b996ea321 Working on support for various controllers 2021-08-31 21:36:09 +02:00
cf072424c6 Working on support for various controllers 2021-08-31 21:30:55 +02:00
42c0f19c68 Working on support for various controllers 2021-08-31 21:05:04 +02:00
8d1cabb288 updated some pngs 2021-08-31 18:00:55 +02:00
87aeaab6b8 bug fixes 2021-08-31 17:09:30 +02:00
ad5fb0fc22 Working on support for various controllers 2021-08-31 13:56:03 +02:00
8e6d546b97 Start to work on support for various controllers 2021-08-31 10:18:13 +02:00
f916381a9b added gamecontrollersDB.txt 2021-08-31 07:23:27 +02:00
fd94aea99b added gamecontrollerdb.txt 2021-08-30 22:24:39 +02:00
cda4d3a566 added gamecontrollerdb.txt 2021-08-30 22:24:16 +02:00
22ca349171 Improved menu class 2021-08-30 20:58:57 +02:00
74c08884ae Improving menu class. Selector flickers when selecting 2021-08-30 17:16:53 +02:00
005eab5694 Reduced checkFileList function 2021-08-30 14:06:33 +02:00
56dd646dde Centered new/translated GetReady text 2021-08-30 13:37:28 +02:00
eb7f534b3b menu selector now resizes smooth 2021-08-30 12:39:11 +02:00
384cfa7156 Solved 1P death music. Some tweaks to bg.png 2021-08-29 22:55:19 +02:00
224b176108 Dual input for P1 done 2021-08-29 22:03:48 +02:00
02b528ea8c Start to work on dual input for P1 2021-08-29 19:54:18 +02:00
4de3d69bb8 Powerup face blinking 2021-08-29 16:22:19 +02:00
c373d10720 added nokia_big font 2021-08-29 13:42:26 +02:00
88e5303d28 options menu completed 2021-08-29 13:35:19 +02:00
697e5d796f menu class improved 2021-08-29 00:54:05 +02:00
0baf73b9ae working on options menu, almost done 2021-08-28 23:45:29 +02:00
0341a0fe9d working on options menu, almost done 2021-08-28 23:17:00 +02:00
e9fcacd7c6 working on options menu 2021-08-28 21:43:47 +02:00
502835453a added difficulty (speed and points) 2021-08-28 19:51:32 +02:00
914b9e4123 fixing bugs 2021-08-28 18:26:45 +02:00
946ab62c30 writer class completed 2021-08-28 13:21:10 +02:00
13be9df131 text2 class converted to writer class 2021-08-28 12:57:13 +02:00
a54d71c990 lang class 2021-08-28 12:23:04 +02:00
cc8ef6e927 working on text notifications 2021-08-28 00:55:27 +02:00
3f53ba333b working on text notifications 2021-08-27 22:40:48 +02:00
aac11d05aa updated title.png 2021-08-27 16:49:15 +02:00
acbdcf2fc1 Working on title cosmetics 2021-08-27 16:48:10 +02:00
c12a7dc885 updated title.png 2021-08-27 16:25:10 +02:00
ff0102256c enhancing title screen 2021-08-27 13:54:57 +02:00
75031038c8 working on CM collider 2021-08-27 12:44:02 +02:00
70324570c8 bug hunting coffee machine on windows 2021-08-27 12:32:34 +02:00
5d6047b642 bug hunting coffee machine on windows 2021-08-27 08:58:54 +02:00
97d5140ef9 bug hunting coffee machine on windows 2021-08-27 08:33:21 +02:00
dafba0648f bug fix 2021-08-26 22:44:19 +02:00
d240f8123c fixing some bugs 2021-08-26 20:49:49 +02:00
3cb822ee6c working on new text engine 2021-08-26 18:14:56 +02:00
6d2fd16ec2 working on new font engine 2021-08-26 13:59:46 +02:00
e93aba2522 working on new font engine 2021-08-26 13:59:25 +02:00
5768c1f7a2 renamed fonts.png 2021-08-26 07:39:27 +02:00
30c8a31a48 moved fonts.png to new folder 2021-08-26 07:31:31 +02:00
a2a6262ffe working on new font engine 2021-08-25 22:35:54 +02:00
dbd22fa719 new font added 2021-08-25 20:00:59 +02:00
5bb5022ebf fix bullet owner bug 2021-08-25 17:59:40 +02:00
3440dea0a5 working on game controller 2021-08-25 13:34:40 +02:00
36eaf1de4f working on game controller 2021-08-25 12:02:18 +02:00
c3d560a9b6 working on game controller input 2021-08-24 20:52:32 +02:00
09cee79122 working on game controller input 2021-08-24 20:28:27 +02:00
03cbc67cfb working on game controller input 2021-08-24 20:20:08 +02:00
23d9bb0e3d working on game controller input 2021-08-24 20:15:20 +02:00
f9d6917770 working on game controller input 2021-08-24 20:12:28 +02:00
bf45482c10 working on game controller input 2021-08-24 20:06:34 +02:00
39a59336e4 working on game controller input 2021-08-24 19:56:25 +02:00
7c0201f913 working on game controller input 2021-08-24 17:57:21 +02:00
b61fd84e22 working on 2p 2021-08-24 13:01:33 +02:00
52ea512eab working on 2p 2021-08-23 21:53:54 +02:00
Sergio Valor
26ac51b1be working on 2players 2021-08-23 13:44:05 +02:00
fb1ff3c97a working on 2players 2021-08-23 08:11:24 +02:00
943fb7bf27 working on 2players 2021-08-22 19:50:55 +02:00
2fd4334259 added poerup and helper 2021-08-22 16:15:10 +02:00
eb8f84a4b8 added player2 gfx 2021-08-22 09:41:38 +02:00
e793e08e85 added player2 gfx 2021-08-22 09:41:17 +02:00
837306f16e added power up on the player 2021-08-21 20:39:48 +02:00
182631b2b7 repository cleanup 2021-08-21 14:46:00 +02:00
5cc9b16d59 repository cleanup 2021-08-21 14:45:14 +02:00
6224ed2779 repository cleanup 2021-08-21 14:42:38 +02:00
fc3a4efc5f repositoty cleanup 2021-08-21 14:41:01 +02:00
2be1e566b2 repository cleanup 2021-08-21 14:40:37 +02:00
017f691841 update readme.md 2021-08-21 12:54:41 +02:00
43c5ddcd1e Update readme.md 2021-08-21 12:53:47 +02:00
ef9f855785 repository cleanup 2021-08-21 12:50:57 +02:00
a70402ab5e repository cleanup 2021-08-21 11:12:21 +02:00
91bed82fd2 repository cleanup 2021-08-21 11:11:48 +02:00
90812f2140 Game end completed 2021-05-21 21:08:43 +02:00
0c0b677474 working on endgame 2021-05-21 10:34:34 +02:00
63bae5c504 update 2021-05-18 20:34:27 +02:00
5847c79ffb added support for text with ñ and ç 2021-04-28 21:04:01 +02:00
176d0d4f90 multi lang support 2021-04-27 22:28:00 +02:00
a0e94035db bugfixed initEnemyFormations 2021-04-22 12:10:47 +02:00
9b5eaf36e1 bughunting 2021-04-22 09:58:24 +02:00
f97291110f debuging memory leaks 2021-04-21 21:20:20 +02:00
e9ff516b1d working on class sections 2021-04-17 23:46:14 +02:00
2330820a15 "How to play" added 2021-04-05 19:07:33 +02:00
36bb6b8fe8 working on "How to play" 2021-04-05 17:56:15 +02:00
d84137daa7 Throw coffe with rotation and time stop with clock sound 2021-04-04 12:31:48 +02:00
4980c0f712 Throw coffee with rotate and clock sound on time stopped 2021-04-04 12:31:08 +02:00
b8cc628dd7 Merge pull request 'Soport per a OpenDingux' (#11) from JailDoctor/coffee_crisis_opendingux_dev:master into master
Reviewed-on: https://sustancia.synology.me:3000/JailDesigner/coffee_crisis/pulls/11
2021-04-01 11:44:42 +00:00
b663916a59 Cagades arregleited; generation script cleanup 2021-04-01 13:39:47 +02:00
6c1c6cbc42 minor type corrected 2021-04-01 13:26:16 +02:00
bcb012fc65 Basic opendingux support 2021-04-01 13:15:34 +02:00
67acc46222 updated sync.sh 2021-03-17 16:50:10 +01:00
8099e6dab6 v1.4 2021-03-17 13:51:01 +01:00
965ed711f7 v1.4 2021-03-17 12:34:11 +01:00
a3e608b01e before change player animation 2021-02-26 22:48:52 +01:00
765b64c29c code reorganized 2021-02-26 17:51:46 +01:00
190f1e9a47 bugfix: player could fire and get items after death 2021-02-20 19:04:13 +01:00
a8eff04d6a added .gitignore 2021-02-19 09:37:58 +01:00
156 changed files with 16118 additions and 7692 deletions

5
.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
.vscode
*.DS_Store
bin
data/config.bin
data/score.bin

View File

@@ -1,6 +1,13 @@
executable = coffee_crisis
macos:
mkdir -p bin
g++ -std=c++11 -Wall -O2 source/*.cpp -o bin/coffee_crisis_macos -lSDL2
g++ -std=c++11 -Wall -O2 source/*.cpp -o bin/$(executable)_macos -lSDL2
linux:
mkdir -p bin
g++ -std=c++11 -Wall -O2 source/*.cpp -o bin/coffee_crisis_linux -lSDL2
g++ source/*.cpp -std=c++11 -Os -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -o bin/$(executable)_linux
strip -s -R .comment -R .gnu.version bin/$(executable)_linux --strip-unneeded
opendingux:
mkdir -p bin
/opt/gcw0-toolchain/usr/bin/mipsel-linux-gcc -D GCWZERO -O2 -std=c++11 -I/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT -lSDL2 -lSDL2_mixer -lstdc++ source/*.cpp -o bin/$(executable)_opendingux
/opt/gcw0-toolchain/usr/bin/mksquashfs ./default.gcw0.desktop ./icon.png ./bin ./data ./media coffee_crisis.opk -all-root -noappend -no-exports -no-xattrs

View File

@@ -1,6 +1,6 @@
# Coffee Crisis
Coffe Crisis es un juego arcade que pondrá a prueba tus reflejos. Realizado entre el verano de 2020 y el invierno de 2021. Intenta conseguir todos los puntos que puedas con una sola vida y ayuda a Bal1 a defender la UPV ante la invasión de la cafeína.
Coffee Crisis es un juego arcade que pondrá a prueba tus reflejos. Empezado durante el verano de 2020 y terminado un año despues, en el verano de 2021. Intenta conseguir todos los puntos que puedas con una sola vida a traves de los 10 niveles de juego y ayuda a Bal1 a defender la UPV de la invasión de la cafeína esférica y saltarina.
## Compilar
@@ -8,10 +8,10 @@ Para compilar el código se necesitan tener las librerías SDL instaladas en el
En Linux:
```bash
sudo apt install lib-SDL2 g++
sudo apt install libsdl2-dev g++
```
En macos es más facil instalarlas con [brew](https://brew.sh):
En macOS se pueden instalar fácilmente con [brew](https://brew.sh):
```bash
brew install sdl2 g++
```
@@ -23,21 +23,31 @@ En Linux:
make linux
```
En macos:
En macOS:
```bash
make macos
```
## Como ejecutar
Para ejecutar el juego hay que escribir en la terminal la orden que se muestra a continuación.
En Linux:
```bash
./bin/coffee_crisis
bin/coffee_crisis_linux
```
En macOS:
```bash
bin/coffee_crisis_macos
```
En macOS tambien puedes hacer doble click sobre el archivo coffee_crisis_macos que hay en la carpeta bin
## Agradecimientos
A los jailers y a la jail. Y entre ellos, a JailDoctor por estar siempre ahí apoyándonos/obligándonos a sacar un Jailgame más.
Y por supuesto a ti por estar aquí.
## License
Buscar una licencia para que quiera haga con el código lo que le de la gana, menos sacar beneficio económico... que si lo hacen me expliquen como.
## Licencia
Usa el código para lo que quieras: aprender, reirte, curiosear... excepto para sacar beneficio económico. Si lo consigues, por favor avísame y vamos a medias.

BIN
data/config/config.bin Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

BIN
data/config/score.bin Normal file

Binary file not shown.

BIN
data/font/8bithud.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

194
data/font/8bithud.txt Normal file
View File

@@ -0,0 +1,194 @@
# box width
8
# box height
8
# 32 espacio ( )
2
# 33 !
2
# 34 "
5
# 35 #
6
# 36 $
6
# 37 %
6
# 38 &
6
# 39 '
2
# 40 (
3
# 41 )
3
# 42 *
4
# 43 +
3
# 44 ,
2
# 45 -
3
# 46 .
2
# 47 /
4
# 48 0
6
# 49 1
6
# 50 2
6
# 51 3
6
# 52 4
6
# 53 5
6
# 54 6
6
# 55 7
6
# 56 8
6
# 57 9
6
# 58 :
2
# 59 ;
2
# 60 <
4
# 61 =
3
# 62 >
4
# 63 ?
6
# 64 @
8
# 65 A
6
# 66 B
6
# 67 C
6
# 68 D
6
# 69 E
6
# 70 F
6
# 71 G
6
# 72 H
6
# 73 I
6
# 74 J
6
# 75 K
6
# 76 L
6
# 77 M
6
# 78 N
6
# 79 O
6
# 80 P
6
# 81 Q
6
# 82 R
6
# 83 S
6
# 84 T
6
# 85 U
6
# 86 V
5
# 87 W
6
# 88 X
6
# 89 Y
6
# 90 Z
6
# 91 [
3
# 92 \
5
# 93 ]
3
# 94 ^
4
# 95 _
6
# 96 `
2
# 97 a
5
# 98 b
5
# 99 c
5
# 100 d
5
# 101 e
5
# 102 f
5
# 103 g
5
# 104 h
5
# 105 i
4
# 106 j
5
# 107 k
5
# 108 l
5
# 109 m
6
# 110 n
5
# 111 o
5
# 112 p
5
# 113 q
5
# 114 r
5
# 115 s
5
# 116 t
4
# 117 u
5
# 118 v
5
# 119 w
6
# 120 x
4
# 121 y
4
# 122 z
5
# 123 {
3
# 124 |
2
# 125 }
3
# 126 ~
3

BIN
data/font/nokia.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

194
data/font/nokia.txt Normal file
View File

@@ -0,0 +1,194 @@
# box width
10
# box height
10
# 32 espacio ( )
5
# 33 !
4
# 34 "
5
# 35 #
7
# 36 $
7
# 37 %
8
# 38 &
8
# 39 '
3
# 40 (
5
# 41 )
5
# 42 *
7
# 43 +
7
# 44 ,
4
# 45 -
6
# 46 .
4
# 47 /
5
# 48 0
7
# 49 1
5
# 50 2
7
# 51 3
7
# 52 4
7
# 53 5
7
# 54 6
7
# 55 7
7
# 56 8
7
# 57 9
7
# 58 :
4
# 59 ;
4
# 60 <
6
# 61 =
6
# 62 >
6
# 63 ?
7
# 64 @
8
# 65 A
7
# 66 B
7
# 67 C
7
# 68 D
7
# 69 E
7
# 70 F
7
# 71 G
7
# 72 H
7
# 73 I
4
# 74 J
6
# 75 K
8
# 76 L
6
# 77 M
9
# 78 N
8
# 79 O
8
# 80 P
7
# 81 Q
8
# 82 R
7
# 83 S
6
# 84 T
8
# 85 U
7
# 86 V
8
# 87 W
9
# 88 X
8
# 89 Y
8
# 90 Z
7
# 91 [
4
# 92 \
5
# 93 ]
4
# 94 ^
5
# 95 _
8
# 96 `
4
# 97 a
7
# 98 b
7
# 99 c
6
# 100 d
7
# 101 e
7
# 102 f
5
# 103 g
7
# 104 h
7
# 105 i
4
# 106 j
5
# 107 k
7
# 108 l
4
# 109 m
10
# 110 n
7
# 111 o
7
# 112 p
7
# 113 q
7
# 114 r
6
# 115 s
6
# 116 t
5
# 117 u
7
# 118 v
7
# 119 w
9
# 120 x
7
# 121 y
7
# 122 z
7
# 123 { -> ñ
7
# 124 | -> ç
7
# 125 }
0
# 126 ~
0

BIN
data/font/nokia2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

194
data/font/nokia2.txt Normal file
View File

@@ -0,0 +1,194 @@
# box width
10
# box height
10
# 32 espacio ( )
5
# 33 !
4
# 34 "
5
# 35 #
7
# 36 $
7
# 37 %
8
# 38 &
8
# 39 '
3
# 40 (
5
# 41 )
5
# 42 *
7
# 43 +
7
# 44 ,
4
# 45 -
6
# 46 .
4
# 47 /
5
# 48 0
7
# 49 1
5
# 50 2
7
# 51 3
7
# 52 4
7
# 53 5
7
# 54 6
7
# 55 7
7
# 56 8
7
# 57 9
7
# 58 :
4
# 59 ;
4
# 60 <
6
# 61 =
6
# 62 >
6
# 63 ?
7
# 64 @
8
# 65 A
7
# 66 B
7
# 67 C
7
# 68 D
7
# 69 E
7
# 70 F
7
# 71 G
7
# 72 H
7
# 73 I
4
# 74 J
6
# 75 K
8
# 76 L
6
# 77 M
9
# 78 N
8
# 79 O
8
# 80 P
7
# 81 Q
8
# 82 R
7
# 83 S
6
# 84 T
8
# 85 U
7
# 86 V
8
# 87 W
9
# 88 X
8
# 89 Y
8
# 90 Z
7
# 91 [
4
# 92 \
5
# 93 ]
4
# 94 ^
5
# 95 _
8
# 96 `
4
# 97 a
7
# 98 b
7
# 99 c
6
# 100 d
7
# 101 e
7
# 102 f
5
# 103 g
7
# 104 h
7
# 105 i
4
# 106 j
5
# 107 k
7
# 108 l
4
# 109 m
10
# 110 n
7
# 111 o
7
# 112 p
7
# 113 q
7
# 114 r
6
# 115 s
6
# 116 t
5
# 117 u
7
# 118 v
7
# 119 w
9
# 120 x
7
# 121 y
7
# 122 z
7
# 123 { -> ñ
7
# 124 | -> ç
7
# 125 }
0
# 126 ~
0

BIN
data/font/nokia_big2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

194
data/font/nokia_big2.txt Normal file
View File

@@ -0,0 +1,194 @@
# box width
20
# box height
20
# 32 espacio ( )
8
# 33 !
8
# 34 "
10
# 35 #
14
# 36 $
14
# 37 %
16
# 38 &
16
# 39 '
6
# 40 (
10
# 41 )
10
# 42 *
14
# 43 +
14
# 44 ,
8
# 45 -
12
# 46 .
8
# 47 /
10
# 48 0
14
# 49 1
10
# 50 2
14
# 51 6
14
# 52 8
14
# 53 10
14
# 54 12
14
# 55 14
14
# 56 16
14
# 57 18
14
# 58 :
8
# 59 ;
8
# 60 <
12
# 61 =
12
# 62 >
12
# 63 ?
14
# 64 @
16
# 65 A
14
# 66 B
14
# 67 C
14
# 68 D
14
# 69 E
14
# 70 F
14
# 71 G
14
# 72 H
14
# 73 I
8
# 74 J
12
# 75 K
16
# 76 L
12
# 77 M
18
# 78 N
16
# 79 O
16
# 80 P
14
# 81 Q
16
# 82 R
14
# 83 S
12
# 84 T
16
# 85 U
14
# 86 V
16
# 87 W
18
# 88 X
16
# 89 Y
16
# 90 Z
14
# 91 [
8
# 92 \
10
# 93 ]
8
# 94 ^
10
# 95 _
16
# 96 `
8
# 97 a
14
# 98 b
14
# 99 c
12
# 100 d
14
# 101 e
14
# 102 f
10
# 103 g
14
# 104 h
14
# 105 i
8
# 106 j
10
# 107 k
14
# 108 l
8
# 109 m
20
# 110 n
14
# 111 o
14
# 112 p
14
# 113 q
14
# 114 r
12
# 115 s
12
# 116 t
10
# 117 u
14
# 118 v
14
# 119 w
18
# 120 x
14
# 121 y
14
# 122 z
14
# 123 { -> ñ
14
# 124 | -> ç
14
# 125 }
0
# 126 ~
0

BIN
data/font/smb2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

194
data/font/smb2.txt Normal file
View File

@@ -0,0 +1,194 @@
# box width
8
# box height
8
# 32 espacio ( )
7
# 33 !
7
# 34 "
7
# 35 #
7
# 36 $
7
# 37 %
7
# 38 &
7
# 39 '
7
# 40 (
7
# 41 )
7
# 42 *
7
# 43 +
7
# 44 ,
7
# 45 -
7
# 46 .
7
# 47 /
7
# 48 0
7
# 49 1
7
# 50 2
7
# 51 3
7
# 52 4
7
# 53 5
7
# 54 6
7
# 55 7
7
# 56 8
7
# 57 9
7
# 58 :
7
# 59 ;
7
# 60 <
7
# 61 =
7
# 62 >
7
# 63 ?
7
# 64 @
7
# 65 A
7
# 66 B
7
# 67 C
7
# 68 D
7
# 69 E
7
# 70 F
7
# 71 G
7
# 72 H
7
# 73 I
7
# 74 J
7
# 75 K
7
# 76 L
7
# 77 M
7
# 78 N
7
# 79 O
7
# 80 P
7
# 81 Q
7
# 82 R
7
# 83 S
7
# 84 T
7
# 85 U
7
# 86 V
7
# 87 W
7
# 88 X
7
# 89 Y
7
# 90 Z
7
# 91 [
7
# 92 \
7
# 93 ]
7
# 94 ^
7
# 95 _
7
# 96 `
7
# 97 a
7
# 98 b
7
# 99 c
7
# 100 d
7
# 101 e
7
# 102 f
7
# 103 g
7
# 104 h
7
# 105 i
7
# 106 j
7
# 107 k
7
# 108 l
7
# 109 m
7
# 110 n
7
# 111 o
7
# 112 p
7
# 113 q
7
# 114 r
7
# 115 s
7
# 116 t
7
# 117 u
7
# 118 v
7
# 119 w
7
# 120 x
7
# 121 y
7
# 122 z
7
# 123 {
7
# 124 |
7
# 125 }
7
# 126 ~
7

BIN
data/font/smb2_big.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

194
data/font/smb2_big.txt Normal file
View File

@@ -0,0 +1,194 @@
# box width
16
# box height
16
# 32 espacio ( )
16
# 33 !
16
# 34 "
16
# 35 #
16
# 36 $
16
# 37 %
16
# 38 &
16
# 39 '
16
# 40 (
16
# 41 )
16
# 42 *
16
# 43 +
16
# 44 ,
16
# 45 -
16
# 46 .
16
# 47 /
16
# 48 0
16
# 49 1
16
# 50 2
16
# 51 3
16
# 52 4
16
# 53 5
16
# 54 6
16
# 55 7
16
# 56 8
16
# 57 9
16
# 58 :
16
# 59 ;
16
# 60 <
16
# 61 =
16
# 62 >
16
# 63 ?
16
# 64 @
16
# 65 A
16
# 66 B
16
# 67 C
16
# 68 D
16
# 69 E
16
# 70 F
16
# 71 G
16
# 72 H
16
# 73 I
16
# 74 J
16
# 75 K
16
# 76 L
16
# 77 M
16
# 78 N
16
# 79 O
16
# 80 P
16
# 81 Q
16
# 82 R
16
# 83 S
16
# 84 T
16
# 85 U
16
# 86 V
16
# 87 W
16
# 88 X
16
# 89 Y
16
# 90 Z
16
# 91 [
16
# 92 \
16
# 93 ]
16
# 94 ^
16
# 95 _
16
# 96 `
16
# 97 a
16
# 98 b
16
# 99 c
16
# 100 d
16
# 101 e
16
# 102 f
16
# 103 g
16
# 104 h
16
# 105 i
16
# 106 j
16
# 107 k
16
# 108 l
16
# 109 m
16
# 110 n
16
# 111 o
16
# 112 p
16
# 113 q
16
# 114 r
16
# 115 s
16
# 116 t
16
# 117 u
16
# 118 v
16
# 119 w
16
# 120 x
16
# 121 y
16
# 122 z
16
# 123 {
16
# 124 |
16
# 125 }
16
# 126 ~
16

BIN
data/gfx/balloon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

BIN
data/gfx/bullet.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 644 B

BIN
data/gfx/game_bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 795 B

After

Width:  |  Height:  |  Size: 795 B

BIN
data/gfx/intro.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
data/gfx/items.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
data/gfx/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -0,0 +1,86 @@
frameWidth=24
frameHeight=24
[animation]
name=walk
speed=5
loop=0
frames=0,1,2,3
[/animation]
[animation]
name=stand
speed=10
loop=0
frames=4,5,6,7
[/animation]
[animation]
name=walk_1C
speed=5
loop=0
frames=8,9,10,11
[/animation]
[animation]
name=stand_1C
speed=10
loop=0
frames=12,13,14,15
[/animation]
[animation]
name=walk_2C
speed=5
loop=0
frames=16,17,18,19
[/animation]
[animation]
name=stand_2C
speed=10
loop=0
frames=20,21,22,23
[/animation]
[animation]
name=sideshoot
speed=5
loop=0
frames=24,25,26,27
[/animation]
[animation]
name=centershoot
speed=10
loop=0
frames=28,29,30,31
[/animation]
[animation]
name=sideshoot_1C
speed=5
loop=0
frames=32,33,34,35
[/animation]
[animation]
name=centershoot_1C
speed=10
loop=0
frames=36,37,38,39
[/animation]
[animation]
name=sideshoot_2C
speed=5
loop=0
frames=40,41,42,43
[/animation]
[animation]
name=centershoot_2C
speed=10
loop=0
frames=44,45,46,47
[/animation]

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@@ -0,0 +1,9 @@
frameWidth=24
frameHeight=24
[animation]
name=default
speed=5
loop=0
frames=0,1,2,3
[/animation]

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -0,0 +1,114 @@
frameWidth=24
frameHeight=24
[animation]
name=walk
speed=5
loop=0
frames=0,1,2,3
[/animation]
[animation]
name=stand
speed=10
loop=0
frames=4,5,6,7
[/animation]
[animation]
name=walk_1C
speed=5
loop=0
frames=8,9,10,11
[/animation]
[animation]
name=stand_1C
speed=10
loop=0
frames=12,13,14,15
[/animation]
[animation]
name=walk_pwr
speed=5
loop=0
frames=16,17,18,19
[/animation]
[animation]
name=stand_pwr
speed=10
loop=0
frames=20,21,22,23
[/animation]
[animation]
name=walk_1C_pwr
speed=5
loop=0
frames=24,25,26,27
[/animation]
[animation]
name=stand_1C_pwr
speed=10
loop=0
frames=28,29,30,31
[/animation]
[animation]
name=sideshoot
speed=5
loop=0
frames=32,33,34,35
[/animation]
[animation]
name=centershoot
speed=10
loop=0
frames=36,37,38,39
[/animation]
[animation]
name=sideshoot_1C
speed=5
loop=0
frames=40,41,42,43
[/animation]
[animation]
name=centershoot_1C
speed=10
loop=0
frames=44,45,46,47
[/animation]
[animation]
name=sideshoot_pwr
speed=5
loop=0
frames=48,49,50,51
[/animation]
[animation]
name=centershoot_pwr
speed=10
loop=0
frames=52,53,54,55
[/animation]
[animation]
name=sideshoot_1C_pwr
speed=5
loop=0
frames=56,57,58,59
[/animation]
[animation]
name=centershoot_1C_pwr
speed=10
loop=0
frames=60,61,62,63
[/animation]

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -0,0 +1,16 @@
frameWidth=24
frameHeight=24
[animation]
name=walk
speed=5
loop=0
frames=0,1,2,3
[/animation]
[animation]
name=stand
speed=10
loop=0
frames=4,5,6,7
[/animation]

Binary file not shown.

After

Width:  |  Height:  |  Size: 529 B

BIN
data/gfx/player2_body.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

BIN
data/gfx/player2_death.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
data/gfx/player2_head.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
data/gfx/player2_legs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 654 B

BIN
data/gfx/title_bg_tile.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 899 B

BIN
data/gfx/title_coffee.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
data/gfx/title_crisis.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

9
data/gfx/title_dust.ani Normal file
View File

@@ -0,0 +1,9 @@
frameWidth=16
frameHeight=16
[animation]
name=default
speed=8
loop=-1
frames=0,1,2,3,4,5,6
[/animation]

BIN
data/gfx/title_dust.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

BIN
data/gfx/title_gradient.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

160
data/lang/ba_BA.txt Normal file
View File

@@ -0,0 +1,160 @@
## 0 - MENU DEL TITULO
JUGAR
## 1 - MENU DEL TITULO
OPCIONS
## 2 - MENU DEL TITULO
INSTRUCCIONS
## 3 - MENU DEL TITULO
EIXIR
## 4 - MENU DE OPCIONES
FINESTRA
## 5 - MENU DE OPCIONES
PANTALLA COMPLETA
## 6 - MENU DE OPCIONES
PANTALLA COMPLETA FALSA
## 7 - MENU DE OPCIONES
TAMANY DE FINESTRA
## 8 - MENU DE OPCIONES
IDIOMA
## 9 - MENU DE OPCIONES
[ ACEPTAR ]
## 10 - MENU DE OPCIONES
[ CANCELAR ]
## 11 - INSTRUCCIONES
OBJECTIU
## 12 - INSTRUCCIONES
HAS D'EXPLOTAR
## 13 - INSTRUCCIONES
TANTS GLOBUS COM PUGUES
## 14 - INSTRUCCIONES
LA DIFICULTAT AUGMENTA
## 15 - INSTRUCCIONES
A MESURA QUE VAS PUNTUANT
## 16 - INSTRUCCIONES
OBJECTES
## 17 - INSTRUCCIONES
1.000 PUNTS
## 18 - INSTRUCCIONES
2.500 PUNTS
## 19 - INSTRUCCIONES
5.000 PUNTS
## 20 - INSTRUCCIONES
PARA EL TEMPS
## 21 - INSTRUCCIONES
VIDA EXTRA
## 22 - INSTRUCCIONES
PREM UNA TECLA PER A TORNAR
## 23 - TITULO
PREM QUALSEVOL TECLA
## 24 - MENU SELECCION DE IDIOMA
ESPA{OL (ESPANYOL)
## 25 - MENU SELECCION DE IDIOMA
BALOONCIA
## 26 - MENU SELECCION DE IDIOMA
ENGLISH (ANGLES)
## 27 - INTRO
Un dia qualsevol de l'any 2000
## 28 - INTRO
Tot esta tranquil a la UPV
## 29 - INTRO
Fins que un desaprensiu...
## 30 - INTRO
HEY! ME ANE A FERME UN CORTAET...
## 31 - INTRO
UAAAAAAAAAAAAA!!!
## 32 - INTRO
Espera un moment...
## 33 - INTRO
Si resulta que no tinc solt!
## 34 - INTRO
MERDA DE MAQUINA!
## 35 - INTRO
Blop... blop... blop...
## 36 - TEXTOS DEL JUEGO
Temps detes:
## 37 - TEXTOS DEL JUEGO
D E M O
## 38 - TEXTOS DEL JUEGO
fases mes!
## 39 -
## 40 -
## 41 -
## 42 -
## 43 - PANTALLA DE GAME OVER
FI DEL JOC
## 44 - PANTALLA DE GAME OVER
ELS TEUS PUNTS:
## 45 - PANTALLA DE GAME OVER
CONTINUAR?
## 46 - MENU DE PAUSA
CONTINUAR
## 47 - MENU DE PAUSA
EIXIR DEL JOC
## 48 - MENU GAME OVER
SI
## 49 - MENU GAME OVER
NO
## 50 - TEXTO DE COMPLETAR EL JUEGO
Felicitats!!
## 51 - MENU DEL TITULO
1 JUGADOR
## 52 - MENU DEL TITULO
2 JUGADORS
## 53 MARCADOR
jugador 1
## 54 MARCADOR
jugador 2
## 55 MARCADOR
mult
## 56 MARCADOR
max. puntuacio
## 57 MARCADOR
fase
## 58 - MENU DE OPCIONES
MODE DE VISUALITZACIO
## 59 - MENU DE OPCIONES
DIFICULTAT
## 60 - MENU DE OPCIONES
FILTRE
## 61 - MENU DE OPCIONES
SINC. VERTICAL
## 62 - MENU DE OPCIONES
CONTROLS DEL JUGADOR 1
## 63 - MENU DE OPCIONES
CONTROLS DEL JUGADOR 2
## 64 -
## 65 -
## 66 - MENU DE OPCIONES
FACIL
## 67 - MENU DE OPCIONES
NORMAL
## 68 - MENU DE OPCIONES
DIFICIL
## 69 - MENU DE OPCIONES
TECLAT
## 70 - MENU DE OPCIONES
MANDO
## 71 - MENU DE OPCIONES
LINEAL
## 72 - MENU DE OPCIONES
NEAREST
## 73 - MENU DE OPCIONES
ACTIVADA
## 74 - MENU DE OPCIONES
DESACTIVADA
## 75 - JUEGO
Endavant!
## 76 - JUEGO
1.000.000 de punts!
## 77 - PANTALLA DE GAME OVER
PUNTS J1:
## 78 - PANTALLA DE GAME OVER
PUNTS J2:
## 79 - TEXTOS DEL JUEGO
Ultima fase!

160
data/lang/en_UK.txt Normal file
View File

@@ -0,0 +1,160 @@
## 0 - MENU DEL TITULO
PLAY
## 1 - MENU DEL TITULO
OPTIONS
## 2 - MENU DEL TITULO
HOW TO PLAY
## 3 - MENU DEL TITULO
QUIT
## 4 - MENU DE OPCIONES
WINDOW
## 5 - MENU DE OPCIONES
FULLSCREEN
## 6 - MENU DE OPCIONES
FAKE FULLSCREEN
## 7 - MENU DE OPCIONES
WINDOW SIZE
## 8 - MENU DE OPCIONES
LANGUAGE
## 9 - MENU DE OPCIONES
[ ACCEPT ]
## 10 - MENU DE OPCIONES
[ CANCEL ]
## 11 - INSTRUCCIONES
OBJECTIVE
## 12 - INSTRUCCIONES
YOU HAVE TO POP AS MANY
## 13 - INSTRUCCIONES
BALLOONS AS YOU CAN
## 14 - INSTRUCCIONES
DIFFICULTY WILL BE INCREASED
## 15 - INSTRUCCIONES
AS YOU SCORE POINTS
## 16 - INSTRUCCIONES
ITEMS
## 17 - INSTRUCCIONES
1.000 POINTS
## 18 - INSTRUCCIONES
2.500 POINTS
## 19 - INSTRUCCIONES
5.000 POINTS
## 20 - INSTRUCCIONES
TIME STOPPER
## 21 - INSTRUCCIONES
EXTRA HIT
## 22 - INSTRUCCIONES
PRESS ANY KEY TO RETURN
## 23 - TITULO
PRESS ANY KEY
## 24 - MENU SELECCION DE IDIOMA
ESPA{OL (SPANISH)
## 25 - MENU SELECCION DE IDIOMA
BALOONCIA (VALENCIAN)
## 26 - MENU SELECCION DE IDIOMA
ENGLISH
## 27 - INTRO
Any day of the year 2000
## 28 - INTRO
Everything is quiet at the UPV
## 29 - INTRO
Until a bastard arrives...
## 30 - INTRO
YO! GONNA TAKE A CAFELITO...
## 31 - INTRO
AAAAAAAARGHHHH!!!
## 32 - INTRO
Wait a moment...
## 33 - INTRO
I don't have any loose!
## 34 - INTRO
FUCKING MACHINE!
## 35 - INTRO
Blop... blop... blop...
## 36 - TEXTOS DEL JUEGO
Time stopped:
## 37 - TEXTOS DEL JUEGO
D E M O
## 38 - TEXTOS DEL JUEGO
stages left!
## 39 -
## 40 -
## 41 -
## 42 -
## 43 - PANTALLA DE GAME OVER
GAME OVER
## 44 - PANTALLA DE GAME OVER
YOUR SCORE:
## 45 - PANTALLA DE GAME OVER
CONTINUE?
## 46 - MENU DE PAUSA
CONTINUE
## 47 - MENU DE PAUSA
LEAVE GAME
## 48 - MENU GAME OVER
YES
## 49 - MENU GAME OVER
NO
## 50 - TEXTO DE COMPLETAR EL JUEGO
Congratulations!!
## 51 - MENU DEL TITULO
1 PLAYER
## 52 - MENU DEL TITULO
2 PLAYERS
## 53 - MARCADOR
player 1
## 54 - MARCADOR
player 2
## 55 - MARCADOR
mult
## 56 - MARCADOR
high score
## 57 - MARCADOR
stage
## 58 - MENU DE OPCIONES
DISPLAY MODE
## 59 - MENU DE OPCIONES
DIFFICULTY
## 60 - MENU DE OPCIONES
FILTER
## 61 - MENU DE OPCIONES
VSYNC
## 62 - MENU DE OPCIONES
PLAYER 1 CONTROLS
## 63 - MENU DE OPCIONES
PLAYER 2 CONTROLS
## 64 -
## 65 -
## 66 - MENU DE OPCIONES
EASY
## 67 - MENU DE OPCIONES
NORMAL
## 68 - MENU DE OPCIONES
HARD
## 69 - MENU DE OPCIONES
KEYBOARD
## 70 - MENU DE OPCIONES
GAME CONTROLLER
## 71 - MENU DE OPCIONES
LINEAL
## 72 - MENU DE OPCIONES
NEAREST
## 73 - MENU DE OPCIONES
ON
## 74 - MENU DE OPCIONES
OFF
## 75 - JUEGO
Get Ready!
## 76 - JUEGO
1.000.000 points!
## 77 - PANTALLA DE GAME OVER
PLAYER1 SCORE:
## 78 - PANTALLA DE GAME OVER
PLAYER2 SCORE:
## 79 - TEXTOS DEL JUEGO
Last stage!

160
data/lang/es_ES.txt Normal file
View File

@@ -0,0 +1,160 @@
## 0 - MENU DEL TITULO
JUGAR
## 1 - MENU DEL TITULO
OPCIONES
## 2 - MENU DEL TITULO
INSTRUCCIONES
## 3 - MENU DEL TITULO
SALIR
## 4 - MENU DE OPCIONES
VENTANA
## 5 - MENU DE OPCIONES
PANTALLA COMPLETA
## 6 - MENU DE OPCIONES
PANTALLA COMPLETA FALSA
## 7 - MENU DE OPCIONES
TAMA{O DE VENTANA
## 8 - MENU DE OPCIONES
IDIOMA
## 9 - MENU DE OPCIONES
[ ACEPTAR ]
## 10 - MENU DE OPCIONES
[ CANCELAR ]
## 11 - INSTRUCCIONES
OBJETIVO
## 12 - INSTRUCCIONES
TIENES QUE EXPLOTAR
## 13 - INSTRUCCIONES
TANTOS GLOBOS COMO PUEDAS
## 14 - INSTRUCCIONES
LA DIFICULTAD SE INCREMENTA
## 15 - INSTRUCCIONES
A MEDIDA QUE VAS PUNTUANDO
## 16 - INSTRUCCIONES
OBJETOS
## 17 - INSTRUCCIONES
1.000 PUNTOS
## 18 - INSTRUCCIONES
2.500 PUNTOS
## 19 - INSTRUCCIONES
5.000 PUNTOS
## 20 - INSTRUCCIONES
DETIENE EL TIEMPO
## 21 - INSTRUCCIONES
VIDA EXTRA
## 22 - INSTRUCCIONES
PULSA UNA TECLA PARA VOLVER
## 23 - TITULO
PULSA CUALQUIER TECLA
## 24 - MENU SELECCION DE IDIOMA
ESPA{OL
## 25 - MENU SELECCION DE IDIOMA
BALOONCIA (VALENCIANO)
## 26 - MENU SELECCION DE IDIOMA
ENGLISH (INGLES)
## 27 - INTRO
Un dia cualquiera del a{o 2000
## 28 - INTRO
Todo esta tranquilo en la UPV
## 29 - INTRO
Hasta que un desaprensivo...
## 30 - INTRO
HEY! VOY A SACARME UN TALLADET...
## 31 - INTRO
UAAAAAAAAAAAAA!!!
## 32 - INTRO
Espera un momento...
## 33 - INTRO
Si no llevo suelto encima!
## 34 - INTRO
MIERDA DE MAQUINA!
## 35 - INTRO
Blop... blop... blop...
## 36 - TEXTOS DEL JUEGO
Tiempo:
## 37 - TEXTOS DEL JUEGO
D E M O
## 38 - TEXTOS DEL JUEGO
fases mas!
## 39 -
## 40 -
## 41 -
## 42 -
## 43 - PANTALLA DE GAME OVER
FIN DE JUEGO
## 44 - PANTALLA DE GAME OVER
TU PUNTUACION:
## 45 - PANTALLA DE GAME OVER
CONTINUAR?
## 46 - MENU DE PAUSA
CONTINUAR
## 47 - MENU DE PAUSA
SALIR DEL JUEGO
## 48 - MENU GAME OVER
SI
## 49 - MENU GAME OVER
NO
## 50 - TEXTO DE COMPLETAR EL JUEGO
Felicidades!!
## 51 - MENU DEL TITULO
1 JUGADOR
## 52 - MENU DEL TITULO
2 JUGADORES
## 53 - MARCADOR
jugador 1
## 54 - MARCADOR
jugador 2
## 55 - MARCADOR
mult
## 56 - MARCADOR
max. puntuacion
## 57 - MARCADOR
FASE
## 58 - MENU DE OPCIONES
MODO DE VISUALIZACION
## 59 - MENU DE OPCIONES
DIFICULTAD
## 60 - MENU DE OPCIONES
FILTRO
## 61 - MENU DE OPCIONES
SINC. VERTICAL
## 62 - MENU DE OPCIONES
CONTROLES DEL JUGADOR 1
## 63 - MENU DE OPCIONES
CONTROLES DEL JUGADOR 2
## 64 -
## 65 -
## 66 - MENU DE OPCIONES
FACIL
## 67 - MENU DE OPCIONES
NORMAL
## 68 - MENU DE OPCIONES
DIFICIL
## 69 - MENU DE OPCIONES
TECLADO
## 70 - MENU DE OPCIONES
MANDO
## 71 - MENU DE OPCIONES
LINEAL
## 72 - MENU DE OPCIONES
NEAREST
## 73 - MENU DE OPCIONES
ACTIVADA
## 74 - MENU DE OPCIONES
DESACTIVADA
## 75 - JUEGO
Adelante!
## 76 - JUEGO
1.000.000 de puntos!
## 77 - PANTALLA DE GAME OVER
PUNTUACION J1:
## 78 - PANTALLA DE GAME OVER
PUNTUACION J2:
## 79 - TEXTOS DEL JUEGO
Ultima fase!

30
data/menu/gameover.men Normal file
View File

@@ -0,0 +1,30 @@
font_png=smb2.png
font_txt=smb2.txt
sound_cancel=menu_cancel.wav
sound_accept=menu_select.wav
sound_move=menu_move.wav
name=GAME OVER
x=0
y=112
backgroundType=0
backgroundColor=0,0,0,255
areElementsCenteredOnX=true
isCenteredOnX=true
centerX=128
selector_color=84,110,122,0
selector_text_color=255,122,0
defaultActionWhenCancel=1
[item]
text=SI
hPaddingDown=2
[/item]
[item]
text=NO
[/item]

109
data/menu/options.men Normal file
View File

@@ -0,0 +1,109 @@
font_png=smb2.png
font_txt=smb2.txt
sound_cancel=menu_cancel.wav
sound_accept=menu_select.wav
sound_move=menu_move.wav
name=OPTIONS
x=0
y=116
backgroundType=0
backgroundColor=48,48,64,192
areElementsCenteredOnX=true
isCenteredOnX=true
centerX=128
isCenteredOnY=true
centerY=96
selector_color=229,28,35,255
selector_text_color=255,180,0
defaultActionWhenCancel=13
[item]
text=DIFFICULTY
hPaddingDown=7
[/item]
[item]
text=PLAYER 1 CONTROLS
hPaddingDown=2
selectable=true
greyed=false
linkedDown=true
[/item]
[item]
text=KEYBOARD
hPaddingDown=7
selectable=false
greyed=false
[/item]
[item]
text=PLAYER 2 CONTROLS
hPaddingDown=2
selectable=true
greyed=false
linkedDown=true
[/item]
[item]
text=GAME CONTROLLER
hPaddingDown=7
selectable=false
greyed=false
[/item]
[item]
text=LANGUAGE
hPaddingDown=7
[/item]
[item]
text=DISPLAY MODE
hPaddingDown=2
selectable=true
greyed=false
linkedDown=true
[/item]
[item]
text=WINDOW
hPaddingDown=7
selectable=false
greyed=false
[/item]
[item]
text=WINDOW SIZE
hPaddingDown=2
[/item]
[item]
text=FILTER
hPaddingDown=2
[/item]
[item]
text=VSYNC
hPaddingDown=7
[/item]
[item]
text=HOW TO PLAY
hPaddingDown=7
[/item]
[item]
text=ACCEPT
hPaddingDown=2
[/item]
[item]
text=CANCEL
[/item]

30
data/menu/pause.men Normal file
View File

@@ -0,0 +1,30 @@
font_png=smb2.png
font_txt=smb2.txt
sound_cancel=menu_cancel.wav
sound_accept=menu_select.wav
sound_move=menu_move.wav
name=PAUSE
x=0
y=96
backgroundType=1
backgroundColor=41,57,65,240
areElementsCenteredOnX=true
isCenteredOnX=true
centerX=128
selector_color=255,122,0,255
selector_text_color=255,255,255
defaultActionWhenCancel=0
[item]
text=SI
hPaddingDown=2
[/item]
[item]
text=NO
[/item]

40
data/menu/title.men Normal file
View File

@@ -0,0 +1,40 @@
font_png=smb2.png
font_txt=smb2.txt
sound_cancel=menu_cancel.wav
sound_accept=menu_select.wav
sound_move=menu_move.wav
name=TITLE
x=0
y=116
backgroundType=0
backgroundColor=48,48,64,192
areElementsCenteredOnX=true
isCenteredOnX=true
centerX=128
selector_color=229,28,35,0
selector_text_color=255,180,0
defaultActionWhenCancel=3
[item]
text=1 PLAYER
hPaddingDown=2
[/item]
[item]
text=2 PLAYERS
hPaddingDown=7
[/item]
[item]
text=OPTIONS
hPaddingDown=7
[/item]
[item]
text=QUIT
[/item]

BIN
data/music/playing.ogg Normal file

Binary file not shown.

BIN
data/music/title.ogg Normal file

Binary file not shown.

BIN
data/sound/clock.wav Normal file

Binary file not shown.

BIN
data/sound/powerball.wav Normal file

Binary file not shown.

BIN
data/sound/stage_change.wav Normal file

Binary file not shown.

BIN
media/.DS_Store vendored

Binary file not shown.

BIN
media/gfx/.DS_Store vendored

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 672 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 785 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

BIN
media/music/.DS_Store vendored

Binary file not shown.

View File

@@ -1,10 +0,0 @@
playing.ogg
ARCADE GOBLINS
https://soundimage.org/chiptunes-3/
title.ogg
ARCADE STORIES
https://soundimage.org/chiptunes-3/
intro.ogg
JailDoctor

Binary file not shown.

Binary file not shown.

View File

@@ -1,60 +0,0 @@
bullet.wav
Gun11.wav
http://www.themotionmonkey.co.uk/free-resources/retro-arcade-sounds/
balloon.wav
Impact3.wav
http://www.themotionmonkey.co.uk/free-resources/retro-arcade-sounds/
player_collision.wav
Impact5.wav
http://www.themotionmonkey.co.uk/free-resources/retro-arcade-sounds/
title.wav
Explosion2.wav
http://www.themotionmonkey.co.uk/free-resources/retro-arcade-sounds/
menu_select.wav
kenney_digitalaudio/powerUp2.ogg
www.kenney.nl
menu_move.wav
kenney_uiaudio/switch11.ogg
www.kenney.nl
hiscore.wav
kenney_digitalaudio/powerUp1.ogg
www.kenney.nl
itemdrop.wav
kenney_digitalaudio/PowerUp10.ogg
www.kenney.nl
itempickup.wav
kenney_digitalaudio/PowerUp7.ogg
www.kenney.nl
coffeeout.wav
kenney_digitalaudio/lowDown.ogg
www.kenney.nl
stage_change.wav
kenney_digitalaudio/phaserUp2.ogg
www.kenney.nl
menu_cancel.wav
kenney_digitalaudio/lowRandom.ogg
kenney_digitalaudio/pepSound1.ogg <-
www.kenney.nl
bubble1.wav
JailDoctor
bubble2.wav
JailDoctor
bubble3.wav
JailDoctor
bubble4.wav
JailDoctor

Binary file not shown.

BIN
source/.DS_Store vendored

Binary file not shown.

View File

@@ -1,112 +1,351 @@
#include "const.h"
#include "animatedsprite.h"
#include <iostream>
// Constructor
AnimatedSprite::AnimatedSprite()
AnimatedSprite::AnimatedSprite(LTexture *texture, SDL_Renderer *renderer, std::string file)
{
init(nullptr, nullptr);
// Copia los punteros
setTexture(texture);
setRenderer(renderer);
// Carga las animaciones
if (file != "")
{
load(file);
}
// Inicializa variables
currentAnimation = 0;
}
// Destructor
AnimatedSprite::~AnimatedSprite()
{
init(nullptr, nullptr);
for (auto &a : animation)
{
a.frames.clear();
}
animation.clear();
}
// Iniciador
void AnimatedSprite::init(LTexture *texture, SDL_Renderer *renderer)
// Obtiene el indice de la animación a partir del nombre
int AnimatedSprite::getIndex(std::string name)
{
mRenderer = renderer;
mTexture = texture;
for (Uint8 i = 0; i < 20; i++)
int index = -1;
for (auto a : animation)
{
mAnimation[i].numFrames = 0;
mAnimation[i].speed = 0;
mAnimation[i].loop = true;
for (Uint8 j = 0; i < 20; i++)
index++;
if (a.name == name)
{
mAnimation[i].frames[j].x = 0;
mAnimation[i].frames[j].y = 0;
mAnimation[i].frames[j].w = 0;
mAnimation[i].frames[j].h = 0;
return index;
}
}
mCurrentFrame = 0;
mAnimationCounter = 0;
printf("** Warning: could not find \"%s\" animation\n", name.c_str());
return -1;
}
// Calcula el frame correspondiente a la animación
void AnimatedSprite::animate(int index)
void AnimatedSprite::animate()
{
// Calculamos el frame actual a partir del contador
mCurrentFrame = mAnimationCounter / mAnimation[index].speed;
// Si alcanzamos el final de la animación, reiniciamos el contador de la animación
// en función de la variable loop
if (mCurrentFrame >= mAnimation[index].numFrames)
if (!enabled || animation.at(currentAnimation).speed == 0)
{
if (mAnimation[index].loop)
{
mAnimationCounter = 0;
return;
}
// Calcula el frame actual a partir del contador
animation.at(currentAnimation).currentFrame = animation.at(currentAnimation).counter / animation.at(currentAnimation).speed;
// Si alcanza el final de la animación, reinicia el contador de la animación
// en función de la variable loop y coloca el nuevo frame
if (animation.at(currentAnimation).currentFrame >= (int)animation.at(currentAnimation).frames.size())
{
if (animation.at(currentAnimation).loop == -1)
{ // Si no hay loop, deja el último frame
animation.at(currentAnimation).currentFrame = animation.at(currentAnimation).frames.size();
animation.at(currentAnimation).completed = true;
}
else
{
mCurrentFrame = mAnimation[index].numFrames;
{ // Si hay loop, vuelve al frame indicado
animation.at(currentAnimation).counter = 0;
animation.at(currentAnimation).currentFrame = animation.at(currentAnimation).loop;
}
}
// En caso contrario
else
{
// Escogemos el frame correspondiente de la animación
setSpriteClip(mAnimation[index].frames[mCurrentFrame]);
// Escoge el frame correspondiente de la animación
setSpriteClip(animation.at(currentAnimation).frames.at(animation.at(currentAnimation).currentFrame));
// Incrementamos el contador de la animacion
++mAnimationCounter;
// Incrementa el contador de la animacion
animation.at(currentAnimation).counter++;
}
}
// Establece el frame actual de la animación
void AnimatedSprite::setCurrentFrame(Uint8 num)
void AnimatedSprite::setCurrentFrame(int num)
{
mCurrentFrame = num;
// Descarta valores fuera de rango
if (num >= (int)animation.at(currentAnimation).frames.size())
{
num = 0;
}
// Cambia el valor de la variable
animation.at(currentAnimation).counter = animation.at(currentAnimation).speed * num;
// Escoge el frame correspondiente de la animación
setSpriteClip(animation.at(currentAnimation).frames.at(animation.at(currentAnimation).currentFrame));
}
// Establece el valor del contador
void AnimatedSprite::setAnimationCounter(Uint16 num)
void AnimatedSprite::setAnimationCounter(std::string name, int num)
{
mAnimationCounter = num;
animation.at(getIndex(name)).counter = num;
}
// Establece la velocidad de una animación
void AnimatedSprite::setAnimationSpeed(std::string name, int speed)
{
animation.at(getIndex(name)).counter = speed;
}
// Establece la velocidad de una animación
void AnimatedSprite::setAnimationSpeed(int index, int speed)
{
animation.at(index).counter = speed;
}
// Establece si la animación se reproduce en bucle
void AnimatedSprite::setAnimationLoop(std::string name, int loop)
{
animation.at(getIndex(name)).loop = loop;
}
// Establece si la animación se reproduce en bucle
void AnimatedSprite::setAnimationLoop(int index, int loop)
{
animation.at(index).loop = loop;
}
// Establece el valor de la variable
void AnimatedSprite::setAnimationCompleted(std::string name, bool value)
{
animation.at(getIndex(name)).completed = value;
}
// OLD - Establece el valor de la variable
void AnimatedSprite::setAnimationCompleted(int index, bool value)
{
animation.at(index).completed = value;
}
// Comprueba si ha terminado la animación
bool AnimatedSprite::animationIsCompleted()
{
return animation.at(currentAnimation).completed;
}
// Devuelve el rectangulo de una animación y frame concreto
SDL_Rect AnimatedSprite::getAnimationClip(std::string name, Uint8 index)
{
return animation.at(getIndex(name)).frames.at(index);
}
// Devuelve el rectangulo de una animación y frame concreto
SDL_Rect AnimatedSprite::getAnimationClip(int indexA, Uint8 indexF)
{
return animation.at(indexA).frames.at(indexF);
}
// Carga la animación desde un fichero
bool AnimatedSprite::load(std::string filePath)
{
int framesPerRow = 0;
int frameWidth = 0;
int frameHeight = 0;
int maxTiles = 0;
// Indicador de éxito en la carga
bool success = true;
const std::string filename = filePath.substr(filePath.find_last_of("\\/") + 1);
std::ifstream file(filePath);
std::string line;
// El fichero se puede abrir
if (file.good())
{
// Procesa el fichero linea a linea
printf("Reading file %s\n", filename.c_str());
while (std::getline(file, line))
{
// Si la linea contiene el texto [animation] se realiza el proceso de carga de una animación
if (line == "[animation]")
{
t_animation buffer;
buffer.counter = 0;
buffer.currentFrame = 0;
buffer.completed = false;
do
{
std::getline(file, line);
// Encuentra la posición del caracter '='
int pos = line.find("=");
// Procesa las dos subcadenas
if (pos != (int)line.npos)
{
if (line.substr(0, pos) == "name")
{
buffer.name = line.substr(pos + 1, line.length());
}
else if (line.substr(0, pos) == "speed")
{
buffer.speed = std::stoi(line.substr(pos + 1, line.length()));
}
else if (line.substr(0, pos) == "loop")
{
buffer.loop = std::stoi(line.substr(pos + 1, line.length()));
}
else if (line.substr(0, pos) == "frames")
{
// Se introducen los valores separados por comas en un vector
std::stringstream ss(line.substr(pos + 1, line.length()));
std::string tmp;
SDL_Rect rect = {0, 0, frameWidth, frameHeight};
while (getline(ss, tmp, ','))
{
// Comprueba que el tile no sea mayor que el maximo indice permitido
const int numTile = std::stoi(tmp) > maxTiles ? 0 : std::stoi(tmp);
rect.x = (numTile % framesPerRow) * frameWidth;
rect.y = (numTile / framesPerRow) * frameHeight;
buffer.frames.push_back(rect);
}
}
else
{
printf("Warning: file %s, unknown parameter \"%s\"\n", filename.c_str(), line.substr(0, pos).c_str());
success = false;
}
}
} while (line != "[/animation]");
// Añade la animación al vector de animaciones
animation.push_back(buffer);
}
// En caso contrario se parsea el fichero para buscar las variables y los valores
else
{
// Encuentra la posición del caracter '='
int pos = line.find("=");
// Procesa las dos subcadenas
if (pos != (int)line.npos)
{
if (line.substr(0, pos) == "framesPerRow")
{
framesPerRow = std::stoi(line.substr(pos + 1, line.length()));
}
else if (line.substr(0, pos) == "frameWidth")
{
frameWidth = std::stoi(line.substr(pos + 1, line.length()));
}
else if (line.substr(0, pos) == "frameHeight")
{
frameHeight = std::stoi(line.substr(pos + 1, line.length()));
}
else
{
printf("Warning: file %s, unknown parameter \"%s\"\n", filename.c_str(), line.substr(0, pos).c_str());
success = false;
}
// Normaliza valores
if (framesPerRow == 0 && frameWidth > 0)
{
framesPerRow = texture->getWidth() / frameWidth;
}
if (maxTiles == 0 && frameWidth > 0 && frameHeight > 0)
{
const int w = texture->getWidth() / frameWidth;
const int h = texture->getHeight() / frameHeight;
maxTiles = w * h;
}
}
}
}
// Cierra el fichero
printf("Closing file %s\n\n", filename.c_str());
file.close();
}
// El fichero no se puede abrir
else
{
printf("Warning: Unable to open %s file\n", filename.c_str());
success = false;
}
// Pone un valor por defecto
setPos({0, 0, frameWidth, frameHeight});
return success;
}
// Establece la animacion actual
void AnimatedSprite::setCurrentAnimation(std::string name)
{
const int newAnimation = getIndex(name);
if (currentAnimation != newAnimation)
{
currentAnimation = newAnimation;
animation.at(currentAnimation).currentFrame = 0;
animation.at(currentAnimation).counter = 0;
animation.at(currentAnimation).completed = false;
}
}
// Establece la animacion actual
void AnimatedSprite::setCurrentAnimation(int index)
{
const int newAnimation = index;
if (currentAnimation != newAnimation)
{
currentAnimation = newAnimation;
animation.at(currentAnimation).currentFrame = 0;
animation.at(currentAnimation).counter = 0;
animation.at(currentAnimation).completed = false;
}
}
// Actualiza las variables del objeto
void AnimatedSprite::update()
{
animate();
MovingSprite::update();
}
// Establece el rectangulo para un frame de una animación
void AnimatedSprite::setAnimationFrames(Uint8 index_animation, Uint8 index_frame, int x, int y, int w, int h)
{
mAnimation[index_animation].frames[index_frame].x = x;
mAnimation[index_animation].frames[index_frame].y = y;
mAnimation[index_animation].frames[index_frame].w = w;
mAnimation[index_animation].frames[index_frame].h = h;
animation.at(index_animation).frames.push_back({x, y, w, h});
}
// Establece la velocidad de una animación
void AnimatedSprite::setAnimationSpeed(Uint8 index, Uint8 speed)
// OLD - Establece el contador para todas las animaciones
void AnimatedSprite::setAnimationCounter(int value)
{
mAnimation[index].speed = speed;
}
// Establece el numero de frames de una animación
void AnimatedSprite::setAnimationNumFrames(Uint8 index, Uint8 num)
{
mAnimation[index].numFrames = num;
}
// Establece si la animación se reproduce en bucle
void AnimatedSprite::setAnimationLoop(Uint8 index, bool loop)
{
mAnimation[index].loop = loop;
}
// Devuelve el rectangulo de una animación y frame concreto
SDL_Rect AnimatedSprite::getAnimationClip(Uint8 index_animation, Uint8 index_frame)
{
return mAnimation[index_animation].frames[index_frame];
for (auto &a : animation)
{
a.counter = value;
}
}

View File

@@ -1,6 +1,11 @@
#pragma once
#include "ifdefs.h"
#include <SDL2/SDL.h>
#include "movingsprite.h"
#include <vector>
#include <string>
#include <sstream>
#include <fstream>
#ifndef ANIMATEDSPRITE_H
#define ANIMATEDSPRITE_H
@@ -8,57 +13,73 @@
// Clase AnimatedSprite
class AnimatedSprite : public MovingSprite
{
private:
struct t_animation
{
std::string name; // Nombre de la animacion
std::vector<SDL_Rect> frames; // Cada uno de los frames que componen la animación
int speed; // Velocidad de la animación
int loop; // Indica a que frame vuelve la animación al terminar. -1 para que no vuelva
bool completed; // Indica si ha finalizado la animación
int currentFrame; // Frame actual
int counter; // Contador para las animaciones
};
std::vector<t_animation> animation; // Vector con las diferentes animaciones
int currentAnimation; // Animacion activa
public:
// Constructor
AnimatedSprite();
AnimatedSprite(LTexture *texture = nullptr, SDL_Renderer *renderer = nullptr, std::string file = "");
// Destructor
~AnimatedSprite();
// Iniciador
void init(LTexture *texture, SDL_Renderer *renderer);
// Calcula el frame correspondiente a la animación
void animate(int index);
// Calcula el frame correspondiente a la animación actual
void animate();
// Establece el frame actual de la animación
void setCurrentFrame(Uint8 num);
void setCurrentFrame(int num);
// Establece el valor del contador
void setAnimationCounter(Uint16 num);
// Establece el rectangulo para un frame de una animación
void setAnimationFrames(Uint8 index_animation, Uint8 index_frame, int x, int y, int w, int h);
void setAnimationCounter(std::string name, int num);
// Establece la velocidad de una animación
void setAnimationSpeed(Uint8 index, Uint8 speed);
void setAnimationSpeed(std::string name, int speed);
void setAnimationSpeed(int index, int speed);
// Establece el numero de frames de una animación
void setAnimationNumFrames(Uint8 index, Uint8 num);
// Establece el frame al que vuelve la animación al finalizar
void setAnimationLoop(std::string name, int loop);
void setAnimationLoop(int index, int loop);
// Establece si la animación se reproduce en bucle
void setAnimationLoop(Uint8 index, bool loop);
// Establece el valor de la variable
void setAnimationCompleted(std::string name, bool value);
void setAnimationCompleted(int index, bool value);
// Comprueba si ha terminado la animación
bool animationIsCompleted();
// Devuelve el rectangulo de una animación y frame concreto
SDL_Rect getAnimationClip(Uint8 index_animation, Uint8 index_frame);
SDL_Rect getAnimationClip(std::string name, Uint8 index);
SDL_Rect getAnimationClip(int indexA, Uint8 indexF);
private:
struct sAnimation
{
SDL_Rect frames[20]; // Hasta 20 frames
Uint8 numFrames;
Uint8 speed;
bool loop;
};
// Vector con las diferentes animaciones y los diferentes frames de cada animación
sAnimation mAnimation[20]; // Hasta 20 animaciones
// Obtiene el indice de la animación a partir del nombre
int getIndex(std::string name);
// Frame actual
Uint8 mCurrentFrame;
// Carga la animación desde un fichero
bool load(std::string filePath);
// Contador para las animaciones
Uint16 mAnimationCounter;
// Establece la animacion actual
void setCurrentAnimation(std::string name = "default");
void setCurrentAnimation(int index = 0);
// Actualiza las variables del objeto
void update();
// OLD - Establece el rectangulo para un frame de una animación
void setAnimationFrames(Uint8 index_animation, Uint8 index_frame, int x, int y, int w, int h);
// OLD - Establece el contador para todas las animaciones
void setAnimationCounter(int value);
};
#endif
#endif

160
source/asset.cpp Normal file
View File

@@ -0,0 +1,160 @@
#include "asset.h"
// Constructor
Asset::Asset(std::string path)
{
executablePath = path;
longest_name = 0;
}
// Destructor
Asset::~Asset()
{
}
// Añade un elemento a la lista
void Asset::add(std::string file, enum assetType_e type, bool required)
{
item_t temp;
temp.file = executablePath + file;
temp.type = type;
temp.required = required;
fileList.push_back(temp);
const std::string filename = file.substr(file.find_last_of("\\/") + 1);
longest_name = SDL_max(longest_name, filename.size());
}
// Devuelve el fichero de un elemento de la lista a partir de una cadena
std::string Asset::get(std::string text)
{
for (auto f : fileList)
{
if (f.file.find(text) != std::string::npos)
{
return f.file;
}
}
printf("Warning: file %s not found\n", text.c_str());
return "";
}
// Comprueba que existen todos los elementos
bool Asset::check()
{
bool success = true;
printf("\n** Checking files.\n");
// Comprueba la lista de ficheros clasificandolos por tipo
for (int type = 0; type < t_maxAssetType; ++type)
{
// Comprueba si hay ficheros de ese tipo
bool any = false;
for (auto f : fileList)
{
if ((f.required) && (f.type == type))
{
any = true;
}
}
// Si hay ficheros de ese tipo, comprueba si existen
if (any)
{
printf("\n>> %s FILES\n", getTypeName(type).c_str());
for (auto f : fileList)
{
if ((f.required) && (f.type == type))
{
success &= checkFile(f.file);
}
}
}
}
// Resultado
if (success)
{
printf("\n** All files OK.\n\n");
}
else
{
printf("\n** A file is missing. Exiting.\n\n");
}
return success;
}
// Comprueba que existe un fichero
bool Asset::checkFile(std::string path)
{
bool success = false;
std::string result = "ERROR";
// 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");
if (file != nullptr)
{
result = "OK";
success = true;
SDL_RWclose(file);
}
const std::string s = "Checking file %-" + std::to_string(longest_name) + "s [" + result + "]\n";
printf(s.c_str(), filename.c_str());
return success;
}
// Devuelve el nombre del tipo de recurso
std::string Asset::getTypeName(int type)
{
switch (type)
{
case t_bitmap:
return "BITMAP";
break;
case t_music:
return "MUSIC";
break;
case t_sound:
return "SOUND";
break;
case t_font:
return "FONT";
break;
case t_lang:
return "LANG";
break;
case t_data:
return "DATA";
break;
case t_room:
return "ROOM";
break;
case t_enemy:
return "ENEMY";
break;
case t_item:
return "ITEM";
break;
default:
return "ERROR";
break;
}
}

64
source/asset.h Normal file
View File

@@ -0,0 +1,64 @@
#pragma once
#include <SDL2/SDL.h>
#include <string>
#include <vector>
#ifndef ASSET_H
#define ASSET_H
enum assetType_e
{
t_bitmap,
t_music,
t_sound,
t_font,
t_lang,
t_data,
t_room,
t_enemy,
t_item,
t_maxAssetType
};
// Clase Asset
class Asset
{
private:
// Estructura para definir un item
struct item_t
{
std::string file; // Ruta del fichero desde la raiz del directorio
enum assetType_e type; // Indica el tipo de recurso
bool required; // Indica si es un fichero que debe de existir
};
int longest_name; // Contiene la longitud del nombre de fichero mas largo
std::vector<item_t> fileList;
std::string executablePath;
// Comprueba que existe un fichero
bool checkFile(std::string path);
// Devuelve el nombre del tipo de recurso
std::string getTypeName(int type);
public:
// Constructor
Asset(std::string path);
// Destructor
~Asset();
// Añade un elemento a la lista
void add(std::string file, enum assetType_e type, bool required = true);
// Devuelve un elemento de la lista a partir de una cadena
std::string get(std::string text);
// Comprueba que existen todos los elementos
bool check();
};
#endif

Some files were not shown because too many files have changed in this diff Show More