Compare commits
177 Commits
v1.3beta1
...
a1bdb6add3
| Author | SHA1 | Date | |
|---|---|---|---|
| a1bdb6add3 | |||
| 0063a2ede5 | |||
| e46a346d20 | |||
| 15b73f1d2c | |||
| fd90a3c66c | |||
| 3d75fae393 | |||
| 6df5d484bc | |||
| e2298dc2b2 | |||
| c213124193 | |||
| 2209ed5f97 | |||
| 1552f6385c | |||
| 072a488de6 | |||
| 8b2459dc35 | |||
| 10882780e5 | |||
| 96ee1fdbe5 | |||
| 50e31a3db3 | |||
| 740e495ad0 | |||
| 2528969801 | |||
| 8d56912765 | |||
| c8bebfd2d9 | |||
| 35e7abcd3c | |||
| b092d3f86a | |||
| 837bcbd1da | |||
| 26bc47d9f6 | |||
| 9e089e9092 | |||
| 25616e1e6c | |||
| ed67e429d8 | |||
| 4ebd034b59 | |||
| 38f3e2e4d3 | |||
| 6493b73f4f | |||
| 6637ba9f10 | |||
| a74c8d5122 | |||
| 4df0db088f | |||
| 27cb772933 | |||
| 778b07cce1 | |||
| 1fa5c75466 | |||
| 0b00acf31b | |||
| 2979a6752c | |||
| f6494e69c8 | |||
| 5167a5857d | |||
| 28fe1130cf | |||
| e92b7eab4e | |||
| 14f7a79927 | |||
| 4f6a6a4918 | |||
| f5b35cee6b | |||
| 454791fe96 | |||
| 3f165be114 | |||
| 778672a6f5 | |||
| 8c919abc9d | |||
| 7e37da3999 | |||
| 842d5dd56b | |||
| ea3f16b8ac | |||
| 3fe0861e4f | |||
| b28d798545 | |||
| bdf092d46e | |||
| 09421a093d | |||
| a7d7cdd047 | |||
| bffefcad77 | |||
| b408de5fa0 | |||
| f70145a0bf | |||
| 02c7790835 | |||
| 2d10e640bd | |||
| 737829cb68 | |||
| d3f17bc93a | |||
| b7490ed1c1 | |||
| 836deb720d | |||
| 7e9a1cb049 | |||
| f928195a05 | |||
| 84b09a4987 | |||
| f0b9a1d134 | |||
| 64369921ec | |||
| 70ae7f67a9 | |||
| 2ea86ef39f | |||
| 658bb71441 | |||
| 0b996ea321 | |||
| cf072424c6 | |||
| 42c0f19c68 | |||
| 8d1cabb288 | |||
| 87aeaab6b8 | |||
| ad5fb0fc22 | |||
| 8e6d546b97 | |||
| f916381a9b | |||
| fd94aea99b | |||
| cda4d3a566 | |||
| 22ca349171 | |||
| 74c08884ae | |||
| 005eab5694 | |||
| 56dd646dde | |||
| eb7f534b3b | |||
| 384cfa7156 | |||
| 224b176108 | |||
| 02b528ea8c | |||
| 4de3d69bb8 | |||
| c373d10720 | |||
| 88e5303d28 | |||
| 697e5d796f | |||
| 0baf73b9ae | |||
| 0341a0fe9d | |||
| e9fcacd7c6 | |||
| 502835453a | |||
| 914b9e4123 | |||
| 946ab62c30 | |||
| 13be9df131 | |||
| a54d71c990 | |||
| cc8ef6e927 | |||
| 3f53ba333b | |||
| aac11d05aa | |||
| acbdcf2fc1 | |||
| c12a7dc885 | |||
| ff0102256c | |||
| 75031038c8 | |||
| 70324570c8 | |||
| 5d6047b642 | |||
| 97d5140ef9 | |||
| dafba0648f | |||
| d240f8123c | |||
| 3cb822ee6c | |||
| 6d2fd16ec2 | |||
| e93aba2522 | |||
| 5768c1f7a2 | |||
| 30c8a31a48 | |||
| a2a6262ffe | |||
| dbd22fa719 | |||
| 5bb5022ebf | |||
| 3440dea0a5 | |||
| 36eaf1de4f | |||
| c3d560a9b6 | |||
| 09cee79122 | |||
| 03cbc67cfb | |||
| 23d9bb0e3d | |||
| f9d6917770 | |||
| bf45482c10 | |||
| 39a59336e4 | |||
| 7c0201f913 | |||
| b61fd84e22 | |||
| 52ea512eab | |||
|
|
26ac51b1be | ||
| fb1ff3c97a | |||
| 943fb7bf27 | |||
| 2fd4334259 | |||
| eb8f84a4b8 | |||
| e793e08e85 | |||
| 837306f16e | |||
| 182631b2b7 | |||
| 5cc9b16d59 | |||
| 6224ed2779 | |||
| fc3a4efc5f | |||
| 2be1e566b2 | |||
| 017f691841 | |||
| 43c5ddcd1e | |||
| ef9f855785 | |||
| a70402ab5e | |||
| 91bed82fd2 | |||
| 90812f2140 | |||
| 0c0b677474 | |||
| 63bae5c504 | |||
| 5847c79ffb | |||
| 176d0d4f90 | |||
| a0e94035db | |||
| 9b5eaf36e1 | |||
| f97291110f | |||
| e9ff516b1d | |||
| 2330820a15 | |||
| 36bb6b8fe8 | |||
| d84137daa7 | |||
| 4980c0f712 | |||
| b8cc628dd7 | |||
| b663916a59 | |||
| 6c1c6cbc42 | |||
| bcb012fc65 | |||
| 67acc46222 | |||
| 8099e6dab6 | |||
| 965ed711f7 | |||
| a3e608b01e | |||
| 765b64c29c | |||
| 190f1e9a47 | |||
| a8eff04d6a |
5
.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
.vscode
|
||||
*.DS_Store
|
||||
bin
|
||||
data/config.bin
|
||||
data/score.bin
|
||||
11
Makefile
@@ -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
|
||||
24
README.md
@@ -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
1144
data/config/gamecontrollerdb.txt
Normal file
BIN
data/config/score.bin
Normal file
BIN
data/font/8bithud.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
194
data/font/8bithud.txt
Normal 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
|
After Width: | Height: | Size: 2.0 KiB |
194
data/font/nokia.txt
Normal 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
|
After Width: | Height: | Size: 2.4 KiB |
194
data/font/nokia2.txt
Normal 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
|
After Width: | Height: | Size: 8.1 KiB |
194
data/font/nokia_big2.txt
Normal 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
|
After Width: | Height: | Size: 1.3 KiB |
194
data/font/smb2.txt
Normal 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
|
After Width: | Height: | Size: 2.2 KiB |
194
data/font/smb2_big.txt
Normal 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
|
After Width: | Height: | Size: 57 KiB |
BIN
data/gfx/bullet.png
Normal file
|
After Width: | Height: | Size: 644 B |
BIN
data/gfx/game_bg.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 795 B After Width: | Height: | Size: 795 B |
BIN
data/gfx/intro.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
data/gfx/items.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
data/gfx/logo.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
9
data/gfx/new_player1_body.ani
Normal 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/new_player1_body.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
9
data/gfx/new_player1_death.ani
Normal 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/new_player1_death.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
9
data/gfx/new_player1_head.ani
Normal 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/new_player1_head.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
9
data/gfx/new_player1_legs.ani
Normal 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/new_player1_legs.png
Normal file
|
After Width: | Height: | Size: 529 B |
BIN
data/gfx/player2_body.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
data/gfx/player2_death.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
data/gfx/player2_head.png
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
data/gfx/player2_legs.png
Normal file
|
After Width: | Height: | Size: 654 B |
BIN
data/gfx/title_bg_tile.png
Normal file
|
After Width: | Height: | Size: 899 B |
BIN
data/gfx/title_coffee.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
data/gfx/title_crisis.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
9
data/gfx/title_dust.ani
Normal 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
|
After Width: | Height: | Size: 212 B |
BIN
data/gfx/title_gradient.png
Normal file
|
After Width: | Height: | Size: 67 KiB |
160
data/lang/ba_BA.txt
Normal 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
@@ -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
@@ -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!
|
||||
109
data/menu/options.men
Normal 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]
|
||||
40
data/menu/title.men
Normal 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
BIN
data/music/title.ogg
Normal file
BIN
data/sound/clock.wav
Normal file
BIN
data/sound/powerball.wav
Normal file
BIN
data/sound/stage_change.wav
Normal file
BIN
media/.DS_Store
vendored
BIN
media/gfx/.DS_Store
vendored
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 348 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 146 B |
|
Before Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 672 B |
|
Before Width: | Height: | Size: 785 B |
|
Before Width: | Height: | Size: 3.6 KiB |
BIN
media/music/.DS_Store
vendored
@@ -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
|
||||
@@ -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
|
||||
BIN
source/.DS_Store
vendored
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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
@@ -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
@@ -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
|
||||
242
source/balloon.h
@@ -1,23 +1,156 @@
|
||||
#pragma once
|
||||
#include "struct.h"
|
||||
|
||||
#include <SDL2/SDL.h>
|
||||
#include "utils.h"
|
||||
#include "animatedsprite.h"
|
||||
#include <vector>
|
||||
|
||||
#ifndef BALLOON_H
|
||||
#define BALLOON_H
|
||||
|
||||
// Clase globo
|
||||
// Cantidad de elementos del vector con los valores de la deformación del globo al rebotar
|
||||
#define MAX_BOUNCE 10
|
||||
|
||||
// Tipos de globo
|
||||
#define BALLOON_1 1
|
||||
#define BALLOON_2 2
|
||||
#define BALLOON_3 3
|
||||
#define BALLOON_4 4
|
||||
#define HEXAGON_1 5
|
||||
#define HEXAGON_2 6
|
||||
#define HEXAGON_3 7
|
||||
#define HEXAGON_4 8
|
||||
#define POWER_BALL 9
|
||||
|
||||
// Puntos de globo
|
||||
#define BALLOON_SCORE_1 50
|
||||
#define BALLOON_SCORE_2 100
|
||||
#define BALLOON_SCORE_3 200
|
||||
#define BALLOON_SCORE_4 400
|
||||
|
||||
// Tamaños de globo
|
||||
#define BALLOON_SIZE_1 1
|
||||
#define BALLOON_SIZE_2 2
|
||||
#define BALLOON_SIZE_3 3
|
||||
#define BALLOON_SIZE_4 4
|
||||
|
||||
// Clases de globo
|
||||
#define BALLOON_CLASS 0
|
||||
#define HEXAGON_CLASS 1
|
||||
|
||||
// Velocidad del globo
|
||||
#define BALLOON_VELX_POSITIVE 0.7f
|
||||
#define BALLOON_VELX_NEGATIVE -0.7f
|
||||
|
||||
// Indice para las animaciones de los globos
|
||||
#define BALLOON_MOVING_ANIMATION 0
|
||||
#define BALLOON_POP_ANIMATION 1
|
||||
#define BALLOON_BORN_ANIMATION 2
|
||||
|
||||
// Cantidad posible de globos
|
||||
#define MAX_BALLOONS 100
|
||||
|
||||
// Velocidades a las que se mueven los globos
|
||||
#define BALLOON_SPEED_1 0.60f
|
||||
#define BALLOON_SPEED_2 0.70f
|
||||
#define BALLOON_SPEED_3 0.80f
|
||||
#define BALLOON_SPEED_4 0.90f
|
||||
#define BALLOON_SPEED_5 1.00f
|
||||
|
||||
// Tamaño de los globos
|
||||
#define BALLOON_WIDTH_1 8
|
||||
#define BALLOON_WIDTH_2 13
|
||||
#define BALLOON_WIDTH_3 21
|
||||
#define BALLOON_WIDTH_4 37
|
||||
|
||||
// PowerBall
|
||||
#define POWERBALL_SCREENPOWER_MINIMUM 10
|
||||
#define POWERBALL_COUNTER 8
|
||||
|
||||
// Clase Balloon
|
||||
class Balloon
|
||||
{
|
||||
private:
|
||||
// Estructura para las variables para el efecto de los rebotes
|
||||
struct bouncing
|
||||
{
|
||||
bool enabled; // Si el efecto está activo
|
||||
Uint8 counter; // Countador para el efecto
|
||||
Uint8 speed; // Velocidad a la que transcurre el efecto
|
||||
float zoomW; // Zoom aplicado a la anchura
|
||||
float zoomH; // Zoom aplicado a la altura
|
||||
float despX; // Desplazamiento de pixeles en el eje X antes de pintar el objeto con zoom
|
||||
float despY; // Desplazamiento de pixeles en el eje Y antes de pintar el objeto con zoom
|
||||
std::vector<float> w; // Vector con los valores de zoom para el ancho del globo
|
||||
std::vector<float> h; // Vector con los valores de zoom para el alto del globo
|
||||
};
|
||||
|
||||
float mPosX; // Posición en el eje X
|
||||
float mPosY; // Posición en el eje Y
|
||||
Uint8 mWidth; // Ancho
|
||||
Uint8 mHeight; // Alto
|
||||
float mVelX; // Velocidad en el eje X. Cantidad de pixeles a desplazarse
|
||||
float mVelY; // Velocidad en el eje Y. Cantidad de pixeles a desplazarse
|
||||
float mGravity; // Aceleración en el eje Y. Modifica la velocidad
|
||||
float mDefaultVelY; // Velocidad inicial que tienen al rebotar contra el suelo
|
||||
float mMaxVelY; // Máxima velocidad que puede alcanzar el objeto en el eje Y
|
||||
AnimatedSprite *mSprite; // Sprite del objeto globo
|
||||
bool mBeingCreated; // Indica si el globo se está creando
|
||||
bool mBlinking; // Indica si el globo está intermitente
|
||||
bool mEnabled; // Indica si el globo esta activo
|
||||
bool mInvulnerable; // Indica si el globo es invulnerable
|
||||
bool mPopping; // Indica si el globo está explotando
|
||||
bool mStopped; // Indica si el globo está parado
|
||||
bool mVisible; // Indica si el globo es visible
|
||||
circle_t mCollider; // Circulo de colisión del objeto
|
||||
Uint16 mCreationCounter; // Temporizador para controlar el estado "creandose"
|
||||
Uint16 mCreationCounterIni; // Valor inicial para el temporizador para controlar el estado "creandose"
|
||||
Uint16 mScore; // Puntos que da el globo al ser destruido
|
||||
Uint16 mStoppedCounter; // Contador para controlar el estado "parado"
|
||||
Uint16 mTimeToLive; // Indica el tiempo de vida que le queda al globo
|
||||
Uint8 mKind; // Tipo de globo
|
||||
Uint8 mMenace; // Cantidad de amenaza que genera el globo
|
||||
Uint32 mCounter; // Contador interno
|
||||
float mTravelY; // Distancia que ha de recorrer el globo en el eje Y antes de que se le aplique la gravedad
|
||||
float mSpeed; // Velocidad a la que se mueven los globos
|
||||
Uint8 mSize; // Tamaño del globo
|
||||
Uint8 mPower; // Cantidad de poder que alberga el globo
|
||||
bouncing mBouncing; // Contiene las variables para el efecto de rebote
|
||||
|
||||
// Alinea el circulo de colisión con la posición del objeto globo
|
||||
void updateColliders();
|
||||
|
||||
// Activa el efecto
|
||||
void bounceStart();
|
||||
|
||||
// Detiene el efecto
|
||||
void bounceStop();
|
||||
|
||||
// Aplica el efecto
|
||||
void updateBounce();
|
||||
|
||||
// Actualiza los estados del globo
|
||||
void updateState();
|
||||
|
||||
// Establece la animación correspondiente
|
||||
void updateAnimation();
|
||||
|
||||
// Establece el valor de la variable
|
||||
void setBeingCreated(bool state);
|
||||
|
||||
// Establece el valor de la variable
|
||||
void setTimeToLive(Uint16 time);
|
||||
|
||||
// Obtiene del valor de la variable
|
||||
Uint16 getTimeToLive();
|
||||
|
||||
public:
|
||||
// Constructor
|
||||
Balloon();
|
||||
Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 creationtimer, LTexture *texture, SDL_Renderer *renderer);
|
||||
|
||||
// Destructor
|
||||
~Balloon();
|
||||
|
||||
// Inicializador
|
||||
void init(float x, int y, Uint8 kind, float velx, Uint16 creationtimer, LTexture* texture, SDL_Renderer *renderer);
|
||||
|
||||
// Centra el globo en la posición X
|
||||
void allignTo(int x);
|
||||
|
||||
@@ -27,8 +160,8 @@ public:
|
||||
// Actualiza la posición y estados del globo
|
||||
void move();
|
||||
|
||||
// Pone a cero todos los valores del globo
|
||||
void erase();
|
||||
// Deshabilita el globo y pone a cero todos los valores
|
||||
void disable();
|
||||
|
||||
// Explosiona el globo
|
||||
void pop();
|
||||
@@ -36,17 +169,14 @@ public:
|
||||
// Actualiza al globo a su posicion, animación y controla los contadores
|
||||
void update();
|
||||
|
||||
// Establece la animación correspondiente
|
||||
void setAnimation();
|
||||
|
||||
// Comprueba si el globo tiene algun tipo asignado
|
||||
bool isActive();
|
||||
// Comprueba si el globo está habilitado
|
||||
bool isEnabled();
|
||||
|
||||
// Obtiene del valor de la variable
|
||||
int getPosX();
|
||||
float getPosX();
|
||||
|
||||
// Obtiene del valor de la variable
|
||||
int getPosY();
|
||||
float getPosY();
|
||||
|
||||
// Obtiene del valor de la variable
|
||||
float getVelY();
|
||||
@@ -60,9 +190,18 @@ public:
|
||||
// Establece el valor de la variable
|
||||
void setVelY(float velY);
|
||||
|
||||
// Establece el valor de la variable
|
||||
void setSpeed(float speed);
|
||||
|
||||
// Obtiene del valor de la variable
|
||||
int getKind();
|
||||
|
||||
// Obtiene del valor de la variable
|
||||
Uint8 getSize();
|
||||
|
||||
// Obtiene la clase a la que pertenece el globo
|
||||
Uint8 getClass();
|
||||
|
||||
// Establece el valor de la variable
|
||||
void setStop(bool state);
|
||||
|
||||
@@ -87,9 +226,6 @@ public:
|
||||
// Obtiene del valor de la variable
|
||||
bool isInvulnerable();
|
||||
|
||||
// Establece el valor de la variable
|
||||
void setBeingCreated(bool state);
|
||||
|
||||
// Obtiene del valor de la variable
|
||||
bool isBeingCreated();
|
||||
|
||||
@@ -99,12 +235,6 @@ public:
|
||||
// Obtiene del valor de la variable
|
||||
bool isPopping();
|
||||
|
||||
// Establece el valor de la variable
|
||||
void setTimeToLive(Uint16 time);
|
||||
|
||||
// Obtiene del valor de la variable
|
||||
Uint16 getTimeToLive();
|
||||
|
||||
// Establece el valor de la variable
|
||||
void setStoppedTimer(Uint16 time);
|
||||
|
||||
@@ -115,71 +245,13 @@ public:
|
||||
Uint16 getScore();
|
||||
|
||||
// Obtiene el circulo de colisión
|
||||
Circle &getCollider();
|
||||
circle_t &getCollider();
|
||||
|
||||
// Obtiene le valor de la variable
|
||||
Uint8 getMenace();
|
||||
|
||||
private:
|
||||
// Posición X,Y del objeto globo
|
||||
float mPosX;
|
||||
int mPosY;
|
||||
|
||||
// Alto y ancho del objeto globo
|
||||
Uint8 mWidth;
|
||||
Uint8 mHeight;
|
||||
|
||||
// Variables para controlar la velocidad del globo
|
||||
float mVelX;
|
||||
float mVelY;
|
||||
float mGravity;
|
||||
float mDefaultVelY;
|
||||
int mMaxVelY;
|
||||
|
||||
// Puntos que da el globo al ser destruido
|
||||
Uint16 mScore;
|
||||
|
||||
// Nivel de amenaza del globo
|
||||
Uint8 mMenace;
|
||||
|
||||
// Indica si el globo está parado
|
||||
bool mStopped;
|
||||
|
||||
// Temporizador para controlar el estado "parado"
|
||||
Uint16 mStoppedTimer;
|
||||
|
||||
// Indica si el globo está intermitente
|
||||
bool mBlinking;
|
||||
|
||||
// Indica si el globo es visible
|
||||
bool mVisible;
|
||||
|
||||
// Indica si el globo es invulnerable
|
||||
bool mInvulnerable;
|
||||
|
||||
// Indica si el globo se está creando
|
||||
bool mBeingCreated;
|
||||
|
||||
// Indica si el globo está explotando
|
||||
bool mPopping;
|
||||
|
||||
// Indica el tiempo de vida que le queda al globo
|
||||
Uint16 mTimeToLive;
|
||||
|
||||
// Temporizador para controlar el estado "creandose"
|
||||
Uint16 mCreationTimer;
|
||||
|
||||
// Tipo de globo
|
||||
Uint8 mKind;
|
||||
|
||||
// Sprite del objeto globo
|
||||
AnimatedSprite *mSprite;
|
||||
|
||||
// Circulo de colisión del objeto
|
||||
Circle mCollider;
|
||||
|
||||
// Alinea el circulo de colisión con la posición del objeto globo
|
||||
void shiftColliders();
|
||||
// Obtiene le valor de la variable
|
||||
Uint8 getPower();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||