Compare commits
256 Commits
7ea77e5001
...
2024-10-14
| Author | SHA1 | Date | |
|---|---|---|---|
| 9825c7fb9b | |||
| d0a6e4c572 | |||
| 7c876e1d4d | |||
| 809c10048e | |||
| babf02226c | |||
| 46540ad7c3 | |||
| ba7c44ad06 | |||
| 46b19ee82f | |||
| b2122ac239 | |||
| c11a868289 | |||
| 22d457285d | |||
| b060f21696 | |||
| 33ea8d90ca | |||
| cce14dba4d | |||
| 101e375fd3 | |||
| 4ef759772a | |||
| 07714aabc3 | |||
| d50cf23721 | |||
| 3a6950f3a4 | |||
| a9ca23138d | |||
| e1fa1d2102 | |||
| 117b80bdfc | |||
| d6c3c89872 | |||
| 9e5f41644e | |||
| fc8fdc5fe5 | |||
| 6fe294c59d | |||
| 3fa5b227ae | |||
| f2fa216b0d | |||
| 3c1dcad3ab | |||
| bd3aa0bb06 | |||
| 3e3d764b25 | |||
| c00f4326ae | |||
| 9ce0f16d33 | |||
| 06a4f439c1 | |||
| 9d41d14d68 | |||
| 0d0e49316f | |||
| bf945ef14b | |||
| 0330fe6b74 | |||
| 6305a67c84 | |||
| 5f18189269 | |||
| 7ebefd7b54 | |||
| cffa4c3c92 | |||
| 4f0ea9dcf2 | |||
| b1f936a791 | |||
| 1c0554d4df | |||
| 8ba77d7d5d | |||
| 6515ec6c7b | |||
| b979c0f2b8 | |||
| a95e5077e3 | |||
| 6ea6f85e3e | |||
| fe6e63e39f | |||
| afe092c742 | |||
| 25a2753b13 | |||
| ee721ff573 | |||
| c07fd62037 | |||
| fb74733f2c | |||
| 468bd0950c | |||
| 938e4ad011 | |||
| 71bd3bed52 | |||
| 5ebc58dd01 | |||
| 9b3e549876 | |||
| abc8a0b632 | |||
| 3a84ea792c | |||
| 3cabd5c675 | |||
| 2ec242b2c9 | |||
| d993a6def4 | |||
| 5913d7548a | |||
| 84f3952232 | |||
| 7dbddd5524 | |||
| dee5bcb4e4 | |||
| af1c1051e6 | |||
| aaf6dc29a1 | |||
| 0af441b5df | |||
| 6acf0b7efc | |||
| e033fc8015 | |||
| 2d5859b1c4 | |||
| edc45b6cec | |||
| fad6cddfb6 | |||
| 8ce09d1355 | |||
| 945eaa68e7 | |||
| 28df97ea94 | |||
| ac3340c39f | |||
| 4febe8b7c0 | |||
| 289d01b0fa | |||
| 2767696a3f | |||
| fa82758ce1 | |||
| 878518babe | |||
| 3f24f38a0c | |||
| 1f6dfe5d92 | |||
| 92f7f540c0 | |||
| f2cc0dc352 | |||
| 8d263931b2 | |||
| 0a8d0479a0 | |||
| 20de9e4b72 | |||
| 0de9188547 | |||
| 9d7e975952 | |||
| 46b41757b2 | |||
| c1bf0b8aed | |||
| 5ca4ee0bb8 | |||
| 05e3fddb8f | |||
| 69027f96e6 | |||
| 6ad1bca29f | |||
| 2f152915ed | |||
| 998b151c00 | |||
| 0cd14aa320 | |||
| 159a75a60e | |||
| 80425a5ed0 | |||
| a00c2284b6 | |||
| 75f9d3f5cb | |||
| 85a082d738 | |||
| b6c5d06246 | |||
| 891d5a8f5e | |||
| 333c905b1a | |||
| 41e57064cb | |||
| 7ef75184a5 | |||
| c40c59275a | |||
| 8fc217f0e3 | |||
| 04935c652d | |||
| a435e3ed8c | |||
| 41c3e1f32c | |||
| 3d41da0fdf | |||
| ecf34558f4 | |||
| 1e2f121d82 | |||
| c93e824f86 | |||
| 762a819711 | |||
| a5060b928f | |||
| 2398e4136b | |||
| b3b932edfc | |||
| 443cc6da8d | |||
| 46cdc2189e | |||
| f071b60212 | |||
| 824bc08077 | |||
| e1fb069010 | |||
| b114d75c69 | |||
| 8465ee87fb | |||
| 83fb2f30ba | |||
| 922d146781 | |||
| 1b2d1c5786 | |||
| 7e1085ea42 | |||
| d4417d67d5 | |||
| 14af141d8f | |||
| 870a83d688 | |||
| 54a0d6c448 | |||
| c50d8a8bec | |||
| ad8c16f834 | |||
| cc15b8afd1 | |||
| 770f0eb046 | |||
| 62b1ba84ac | |||
| c5bab7019c | |||
| b3d9b72d1d | |||
| ccfd864eab | |||
| f5b866b8c5 | |||
| 1b160c0584 | |||
| c72dfe5876 | |||
| 548976c955 | |||
| 2a303deff1 | |||
| fa76520c6d | |||
| f57a307991 | |||
| 4f6c92c8d1 | |||
| 1d847eae9f | |||
| 48d876bcf1 | |||
| d16c8239c4 | |||
| 50b1acfe8b | |||
| 60cfc1e4d9 | |||
| 0ed0a5c6b5 | |||
| 5ea41d4fc7 | |||
| 982094264a | |||
| 7a3c2ffe71 | |||
| 49cffb3669 | |||
| 149e422489 | |||
| 4c2528ba93 | |||
| 65b8988ba2 | |||
| c7cc5df920 | |||
| 89979a8ddb | |||
| 7d778a9cfa | |||
| 9012e3d79d | |||
| b09f07ef40 | |||
| 448da70ba8 | |||
| 24b4eaa972 | |||
| 59da8fd4c6 | |||
| f64b461d75 | |||
| b9a15bd8b4 | |||
| 924fd375ff | |||
| e50e7affb3 | |||
| 032c5e7129 | |||
| 1839df142d | |||
| 35749f7c1b | |||
| e48dbb2d4e | |||
| 7e60a742ca | |||
| 5c7bb842ec | |||
| 6a9d0d1b2c | |||
| f8b6d0524d | |||
| 90706d5d0c | |||
| c246472098 | |||
| 45ed1106cb | |||
| a5a3bb23da | |||
| 054950f1d8 | |||
| ba8e068b80 | |||
| 3f3242393e | |||
| a2ce1f0dc3 | |||
| 887e8a7071 | |||
| 7ed0393a9b | |||
| e51e3a5c43 | |||
| eb9eaec61d | |||
| 8c7ff13bc2 | |||
| 88fe1a29fe | |||
| e009349464 | |||
| 4d1f1d2bc2 | |||
| 9d5aee2562 | |||
| 477891cac7 | |||
| 45731c8294 | |||
| 4df505d263 | |||
| ffef64b4fd | |||
| 2358b8e914 | |||
| 1f4d7ce042 | |||
| 657d43de5a | |||
| 735e5299f9 | |||
| bca688a9a7 | |||
| ad2d1cbd65 | |||
| 958a4d1d99 | |||
| 256959505d | |||
| 770a4d5f96 | |||
| d3a13af94f | |||
| 82cb28a13e | |||
| a1fb7500f0 | |||
| 9ad6001046 | |||
| 8390dfd8be | |||
| 2abde3593b | |||
| 60f8819331 | |||
| 884cacbc2e | |||
| f4484b24f1 | |||
| 7b7300fda5 | |||
| af60e2e587 | |||
| 8d9d0eaaf3 | |||
| f1159f2bf3 | |||
| 7dbed9ab8e | |||
| 59680ce7c0 | |||
| 2948684ad3 | |||
| 7501b4936f | |||
| fe361f455a | |||
| 0610389745 | |||
| 5e5d7f5f27 | |||
| 1632441c31 | |||
| 9886f314b5 | |||
| 89cea1c93e | |||
| 98caefb085 | |||
| 18eab9fe0d | |||
| cff1df19c2 | |||
| b29d9681f8 | |||
| 466e572841 | |||
| 1a00a08300 | |||
| 073dd2a904 | |||
| 0d72427ab4 | |||
| 92ff0d6663 | |||
| 92be07ad0c | |||
| 74a7863a8f |
2
.gitignore
vendored
@@ -14,3 +14,5 @@ thumbs.db
|
|||||||
*config.bin
|
*config.bin
|
||||||
*score.bin
|
*score.bin
|
||||||
coffee_crisis*
|
coffee_crisis*
|
||||||
|
debug.txt
|
||||||
|
cppcheck-result*
|
||||||
46
Makefile
@@ -24,16 +24,18 @@ INCLUDES:= -I$(DIR_SOURCES)
|
|||||||
# Variables según el sistema operativo
|
# Variables según el sistema operativo
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
FixPath = $(subst /,\,$1)
|
FixPath = $(subst /,\,$1)
|
||||||
SOURCES := source/*.cpp source/common/*.cpp
|
SOURCES := source/*.cpp
|
||||||
CXXFLAGS:= -std=c++11 -Wall -Os -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows
|
CXXFLAGS:= -std=c++20 -Wall -Os -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows
|
||||||
CXXFLAGS2:= -std=c++11 -Wall -Os -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++
|
CXXFLAGS_DEBUG:= -std=c++20 -Wall -g
|
||||||
LDFLAGS := -lmingw32 -lws2_32 -lSDL2main -lSDL2 -lopengl32
|
LDFLAGS := -lmingw32 -lws2_32 -lSDL2main -lSDL2 -lopengl32
|
||||||
RM = del /Q
|
RM = del /Q
|
||||||
MKD:= mkdir
|
MKD:= mkdir
|
||||||
else
|
else
|
||||||
FixPath = $1
|
FixPath = $1
|
||||||
SOURCES := $(shell find $(DIR_SOURCES) -name '*.cpp')
|
SOURCES := $(shell find $(DIR_SOURCES) -name '*.cpp')
|
||||||
CXXFLAGS:= -std=c++11 -Wall -Os -ffunction-sections -fdata-sections
|
SOURCES := source/*.cpp
|
||||||
|
CXXFLAGS:= -std=c++20 -Wall -Os -ffunction-sections -fdata-sections
|
||||||
|
CXXFLAGS_DEBUG:= -std=c++20 -Wall -g
|
||||||
LDFLAGS := -lSDL2
|
LDFLAGS := -lSDL2
|
||||||
RM = rm -f
|
RM = rm -f
|
||||||
MKD:= mkdir -p
|
MKD:= mkdir -p
|
||||||
@@ -43,6 +45,7 @@ else
|
|||||||
endif
|
endif
|
||||||
ifeq ($(UNAME_S),Darwin)
|
ifeq ($(UNAME_S),Darwin)
|
||||||
CXXFLAGS += -Wno-deprecated
|
CXXFLAGS += -Wno-deprecated
|
||||||
|
CXXFLAGS_DEBUG += -Wno-deprecated
|
||||||
LDFLAGS += -framework OpenGL
|
LDFLAGS += -framework OpenGL
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
@@ -118,13 +121,12 @@ print-variables:
|
|||||||
|
|
||||||
@echo RM: $(RM)
|
@echo RM: $(RM)
|
||||||
|
|
||||||
raspi3:
|
raspi:
|
||||||
$(CXX) $(SOURCES) -D NO_SHADERS $(CXXFLAGS) -lSDL2 -o $(TARGET_FILE)
|
$(CXX) $(SOURCES) -D ARCADE -D VERBOSE $(CXXFLAGS) $(LDFLAGS) -o $(TARGET_FILE)
|
||||||
strip -s -R .comment -R .gnu.version $(TARGET_FILE) --strip-unneeded
|
strip -s -R .comment -R .gnu.version $(TARGET_FILE) --strip-unneeded
|
||||||
|
|
||||||
raspi5:
|
raspi_debug:
|
||||||
$(CXX) $(SOURCES) -D VERBOSE $(CXXFLAGS) $(LDFLAGS) -o $(TARGET_FILE)
|
$(CXX) $(SOURCES) -D ARCADE -D VERBOSE -D DEBUG $(CXXFLAGS_DEBUG) $(LDFLAGS) -o "$(TARGET_FILE)_debug"
|
||||||
strip -s -R .comment -R .gnu.version $(TARGET_FILE) --strip-unneeded
|
|
||||||
|
|
||||||
windows:
|
windows:
|
||||||
@echo off
|
@echo off
|
||||||
@@ -137,7 +139,7 @@ windows_rec:
|
|||||||
|
|
||||||
windows_debug:
|
windows_debug:
|
||||||
@echo off
|
@echo off
|
||||||
$(CXX) $(SOURCES) -D VERBOSE $(CXXFLAGS2) $(LDFLAGS) -o "$(TARGET_FILE)_debug.exe"
|
$(CXX) $(SOURCES) -D DEBUG -D VERBOSE $(CXXFLAGS_DEBUG) $(LDFLAGS) -o "$(TARGET_FILE)_debug.exe"
|
||||||
|
|
||||||
windows_release:
|
windows_release:
|
||||||
@echo off
|
@echo off
|
||||||
@@ -168,11 +170,8 @@ windows_release:
|
|||||||
macos:
|
macos:
|
||||||
$(CXX) $(SOURCES) $(CXXFLAGS) $(LDFLAGS) -o "$(TARGET_FILE)"
|
$(CXX) $(SOURCES) $(CXXFLAGS) $(LDFLAGS) -o "$(TARGET_FILE)"
|
||||||
|
|
||||||
macos_fast:
|
|
||||||
$(CXX) $(SOURCES) -D VERBOSE -std=c++11 -Wall -Wno-deprecated -lSDL2 -framework OpenGL -o "$(TARGET_FILE)"
|
|
||||||
|
|
||||||
macos_debug:
|
macos_debug:
|
||||||
$(CXX) $(SOURCES) -D DEBUG $(CXXFLAGS) $(LDFLAGS) -o "$(TARGET_FILE)_debug"
|
$(CXX) $(SOURCES) -D DEBUG -D VERBOSE $(CXXFLAGS_DEBUG) $(LDFLAGS) -o "$(TARGET_FILE)_debug"
|
||||||
|
|
||||||
macos_release:
|
macos_release:
|
||||||
# Elimina datos de compilaciones anteriores
|
# Elimina datos de compilaciones anteriores
|
||||||
@@ -225,8 +224,7 @@ linux:
|
|||||||
strip -s -R .comment -R .gnu.version "$(TARGET_FILE)" --strip-unneeded
|
strip -s -R .comment -R .gnu.version "$(TARGET_FILE)" --strip-unneeded
|
||||||
|
|
||||||
linux_debug:
|
linux_debug:
|
||||||
$(CXX) $(SOURCES) -D DEBUG $(CXXFLAGS) $(LDFLAGS) -o "$(TARGET_FILE)_debug"
|
$(CXX) $(SOURCES) -D DEBUG -D VERBOSE $(CXXFLAGS_DEBUG) $(LDFLAGS) -o "$(TARGET_FILE)_debug"
|
||||||
strip -s -R .comment -R .gnu.version "$(TARGET_FILE)_debug" --strip-unneeded
|
|
||||||
|
|
||||||
linux_release:
|
linux_release:
|
||||||
# Elimina carpetas previas
|
# Elimina carpetas previas
|
||||||
@@ -249,4 +247,18 @@ linux_release:
|
|||||||
cd "$(RELEASE_FOLDER)" && tar -czvf "../$(LINUX_RELEASE)" *
|
cd "$(RELEASE_FOLDER)" && tar -czvf "../$(LINUX_RELEASE)" *
|
||||||
|
|
||||||
# Elimina la carpeta temporal
|
# Elimina la carpeta temporal
|
||||||
$(RM) "$(RELEASE_FOLDER)"
|
$(RM) "$(RELEASE_FOLDER)"
|
||||||
|
|
||||||
|
anbernic:
|
||||||
|
# Elimina carpetas previas
|
||||||
|
$(RM) "$(RELEASE_FOLDER)"_anbernic
|
||||||
|
|
||||||
|
# Crea la carpeta temporal para realizar el lanzamiento
|
||||||
|
mkdir -p "$(RELEASE_FOLDER)"_anbernic
|
||||||
|
|
||||||
|
# Copia ficheros
|
||||||
|
cp -R data "$(RELEASE_FOLDER)"_anbernic
|
||||||
|
|
||||||
|
# Complia
|
||||||
|
$(CXX) $(SOURCES) -D ANBERNIC -D NO_SHADERS -D ARCADE -D VERBOSE $(CXXFLAGS) $(LDFLAGS) -o $(RELEASE_FOLDER)_anbernic/$(TARGET_NAME)
|
||||||
|
$(CXX) $(SOURCES) -D ANBERNIC -D ARCADE -D VERBOSE $(CXXFLAGS) $(LDFLAGS) -o $(RELEASE_FOLDER)_anbernic/$(TARGET_NAME).shaders
|
||||||
@@ -1,3 +1,14 @@
|
|||||||
|
# JailDesigner - Custom mappings
|
||||||
|
|
||||||
|
# RAP4
|
||||||
|
030086650d0f00008c000000140100003853140,Generic X-Box pad,platform:Linux,a:b0,b:b1,x:b2,y:b3,back:b6,start:b7,guide:b8,leftshoulder:b4,rightshoulder:b5,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,
|
||||||
|
|
||||||
|
# Mad Catz FightStick Alpha PS4
|
||||||
|
03007fcb380700008081000011010000184833152,Mad Catz FightStick Alpha PS4,platform:Linux,a:b1,b:b2,x:b0,y:b3,back:b8,start:b9,guide:b12,leftshoulder:b4,rightshoulder:b5,leftstick:b13,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:b6,righttrigger:b7,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,
|
||||||
|
|
||||||
|
# Mando custom de Dani en madera + Agetec
|
||||||
|
030020617900000006000000100100001216,DragonRise Inc. Generic USB Joystick,platform:Linux,a:b2,b:b1,x:b0,y:b6,start:b5,leftx:a0,lefty:a1,
|
||||||
|
|
||||||
# Game Controller DB for SDL in 2.0.16 format
|
# Game Controller DB for SDL in 2.0.16 format
|
||||||
# Source: https://github.com/gabomdq/SDL_GameControllerDB
|
# Source: https://github.com/gabomdq/SDL_GameControllerDB
|
||||||
|
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
# GAME
|
|
||||||
gameWidth 320
|
|
||||||
gameHeight 240
|
|
||||||
itemSize 20
|
|
||||||
|
|
||||||
# FADE
|
|
||||||
numSquaresWidth 160
|
|
||||||
numSquaresHeight 120
|
|
||||||
fadeRandomSquaresDelay 1
|
|
||||||
fadeRandomSquaresMult 500
|
|
||||||
fadePostDuration 80
|
|
||||||
venetianSize 16
|
|
||||||
|
|
||||||
# SCOREBOARD
|
|
||||||
scoreboard.x 0
|
|
||||||
scoreboard.y 200
|
|
||||||
scoreboard.w 320
|
|
||||||
scoreboard.h 40
|
|
||||||
|
|
||||||
# TITLE
|
|
||||||
pressStart 160
|
|
||||||
titleCounter 800
|
|
||||||
|
|
||||||
# BACKGROUND
|
|
||||||
backgroundAttenuateColor.r 255
|
|
||||||
backgroundAttenuateColor.g 255
|
|
||||||
backgroundAttenuateColor.b 255
|
|
||||||
backgroundAttenuateColor.a 0
|
|
||||||
52
data/config/param_320x240.txt
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
## GAME
|
||||||
|
game.item_size 20
|
||||||
|
game.width 320
|
||||||
|
game.height 240
|
||||||
|
game.play_area.rect.x 0
|
||||||
|
game.play_area.rect.y 0
|
||||||
|
game.play_area.rect.w 320
|
||||||
|
game.play_area.rect.h 200
|
||||||
|
|
||||||
|
## FADE
|
||||||
|
fade.num_squares_width 160
|
||||||
|
fade.num_squares_height 120
|
||||||
|
fade.random_squares_delay 1
|
||||||
|
fade.random_squares_mult 500
|
||||||
|
fade.post_duration 80
|
||||||
|
fade.venetian_size 16
|
||||||
|
|
||||||
|
## SCOREBOARD
|
||||||
|
scoreboard.x 0
|
||||||
|
scoreboard.y 200
|
||||||
|
scoreboard.w 320
|
||||||
|
scoreboard.h 40
|
||||||
|
|
||||||
|
## TITLE
|
||||||
|
title.press_start_position 170
|
||||||
|
title.title_duration 800
|
||||||
|
title.arcade_edition_position 123
|
||||||
|
title.title_c_c_position 80
|
||||||
|
|
||||||
|
## BACKGROUND
|
||||||
|
background.attenuate_color.r 255
|
||||||
|
background.attenuate_color.g 255
|
||||||
|
background.attenuate_color.b 255
|
||||||
|
background.attenuate_alpha 0
|
||||||
|
|
||||||
|
## BALLOONS
|
||||||
|
balloon_1.vel 2.75f
|
||||||
|
balloon_1.grav 0.09f
|
||||||
|
balloon_2.vel 3.70f
|
||||||
|
balloon_2.grav 0.10f
|
||||||
|
balloon_3.vel 4.70f
|
||||||
|
balloon_3.grav 0.10f
|
||||||
|
balloon_4.vel 5.45f
|
||||||
|
balloon_4.grav 0.10f
|
||||||
|
|
||||||
|
## NOTIFICATION
|
||||||
|
notification.pos_v TOP
|
||||||
|
notification.pos_h LEFT
|
||||||
|
notification.sound false
|
||||||
|
notification.color.r 48
|
||||||
|
notification.color.g 48
|
||||||
|
notification.color.b 48
|
||||||
52
data/config/param_320x256.txt
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
## GAME
|
||||||
|
game.item_size 20
|
||||||
|
game.width 320
|
||||||
|
game.height 256
|
||||||
|
game.play_area.rect.x 0
|
||||||
|
game.play_area.rect.y 0
|
||||||
|
game.play_area.rect.w 320
|
||||||
|
game.play_area.rect.h 216
|
||||||
|
|
||||||
|
## FADE
|
||||||
|
fade.num_squares_width 160
|
||||||
|
fade.num_squares_height 128
|
||||||
|
fade.random_squares_delay 1
|
||||||
|
fade.random_squares_mult 500
|
||||||
|
fade.post_duration 80
|
||||||
|
fade.venetian_size 16
|
||||||
|
|
||||||
|
## SCOREBOARD
|
||||||
|
scoreboard.x 0
|
||||||
|
scoreboard.y 216
|
||||||
|
scoreboard.w 320
|
||||||
|
scoreboard.h 40
|
||||||
|
|
||||||
|
## TITLE
|
||||||
|
title.press_start_position 180
|
||||||
|
title.title_duration 800
|
||||||
|
title.arcade_edition_position 123
|
||||||
|
title.title_c_c_position 80
|
||||||
|
|
||||||
|
## BACKGROUND
|
||||||
|
background.attenuate_color.r 255
|
||||||
|
background.attenuate_color.g 255
|
||||||
|
background.attenuate_color.b 255
|
||||||
|
background.attenuate_alpha 0
|
||||||
|
|
||||||
|
## BALLOONS
|
||||||
|
balloon_1.vel 2.75f
|
||||||
|
balloon_1.grav 0.09f
|
||||||
|
balloon_2.vel 3.70f
|
||||||
|
balloon_2.grav 0.10f
|
||||||
|
balloon_3.vel 4.70f
|
||||||
|
balloon_3.grav 0.10f
|
||||||
|
balloon_4.vel 5.45f
|
||||||
|
balloon_4.grav 0.10f
|
||||||
|
|
||||||
|
## NOTIFICATION
|
||||||
|
notification.pos_v TOP
|
||||||
|
notification.pos_h LEFT
|
||||||
|
notification.sound false
|
||||||
|
notification.color.r 48
|
||||||
|
notification.color.g 48
|
||||||
|
notification.color.b 48
|
||||||
BIN
data/font/smb2.gif
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
BIN
data/font/smb2_pal1.gif
Normal file
|
After Width: | Height: | Size: 84 B |
@@ -1,5 +1,5 @@
|
|||||||
frameWidth=8
|
frame_width=10
|
||||||
frameHeight=8
|
frame_height=10
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=orange
|
name=orange
|
||||||
@@ -12,26 +12,19 @@ frames=0,1,2,3,4,5,6,7,8,9
|
|||||||
name=blue
|
name=blue
|
||||||
speed=20
|
speed=20
|
||||||
loop=0
|
loop=0
|
||||||
frames=12,13,14,15,16,17,18,19,20,21
|
frames=10,11,12,13,14,15,16,17,18,19
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=green
|
name=green
|
||||||
speed=10
|
speed=10
|
||||||
loop=0
|
loop=0
|
||||||
frames=24,25,26,27,28,29,30,31,32,33
|
frames=20,21,22,23,24,25,26,27,28,29
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=red
|
name=red
|
||||||
speed=20
|
speed=20
|
||||||
loop=0
|
loop=0
|
||||||
frames=36,37,38,39,40,41,42,43,44,45
|
frames=30,31,32,33,34,35,36,37,38,39
|
||||||
[/animation]
|
|
||||||
|
|
||||||
[animation]
|
|
||||||
name=pop
|
|
||||||
speed=5
|
|
||||||
loop=-1
|
|
||||||
frames=48,49,50,51,52,53,54,55,56,57,58,59
|
|
||||||
[/animation]
|
[/animation]
|
||||||
BIN
data/gfx/balloon/balloon1.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
@@ -1,5 +1,5 @@
|
|||||||
frameWidth=13
|
frame_width=16
|
||||||
frameHeight=13
|
frame_height=16
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=orange
|
name=orange
|
||||||
@@ -12,26 +12,19 @@ frames=0,1,2,3,4,5,6,7,8,9
|
|||||||
name=blue
|
name=blue
|
||||||
speed=20
|
speed=20
|
||||||
loop=0
|
loop=0
|
||||||
frames=12,13,14,15,16,17,18,19,20,21
|
frames=10,11,12,13,14,15,16,17,18,19
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=green
|
name=green
|
||||||
speed=10
|
speed=10
|
||||||
loop=0
|
loop=0
|
||||||
frames=24,25,26,27,28,29,30,31,32,33
|
frames=20,21,22,23,24,25,26,27,28,29
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=red
|
name=red
|
||||||
speed=20
|
speed=20
|
||||||
loop=0
|
loop=0
|
||||||
frames=36,37,38,39,40,41,42,43,44,45
|
frames=30,31,32,33,34,35,36,37,38,39
|
||||||
[/animation]
|
|
||||||
|
|
||||||
[animation]
|
|
||||||
name=pop
|
|
||||||
speed=5
|
|
||||||
loop=-1
|
|
||||||
frames=48,49,50,51,52,53,54,55,56,57,58,59
|
|
||||||
[/animation]
|
[/animation]
|
||||||
BIN
data/gfx/balloon/balloon2.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
@@ -1,5 +1,5 @@
|
|||||||
frameWidth=21
|
frame_width=26
|
||||||
frameHeight=21
|
frame_height=26
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=orange
|
name=orange
|
||||||
@@ -12,26 +12,19 @@ frames=0,1,2,3,4,5,6,7,8,9
|
|||||||
name=blue
|
name=blue
|
||||||
speed=20
|
speed=20
|
||||||
loop=0
|
loop=0
|
||||||
frames=12,13,14,15,16,17,18,19,20,21
|
frames=10,11,12,13,14,15,16,17,18,19
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=green
|
name=green
|
||||||
speed=10
|
speed=10
|
||||||
loop=0
|
loop=0
|
||||||
frames=24,25,26,27,28,29,30,31,32,33
|
frames=20,21,22,23,24,25,26,27,28,29
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=red
|
name=red
|
||||||
speed=20
|
speed=20
|
||||||
loop=0
|
loop=0
|
||||||
frames=36,37,38,39,40,41,42,43,44,45
|
frames=30,31,32,33,34,35,36,37,38,39
|
||||||
[/animation]
|
|
||||||
|
|
||||||
[animation]
|
|
||||||
name=pop
|
|
||||||
speed=5
|
|
||||||
loop=-1
|
|
||||||
frames=48,49,50,51,52,53,54,55,56,57,58,59
|
|
||||||
[/animation]
|
[/animation]
|
||||||
BIN
data/gfx/balloon/balloon3.png
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
30
data/gfx/balloon/balloon4.ani
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
frame_width=48
|
||||||
|
frame_height=48
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=orange
|
||||||
|
speed=10
|
||||||
|
loop=0
|
||||||
|
frames=0,1,2,3,4,5,6,7,8,9
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=blue
|
||||||
|
speed=20
|
||||||
|
loop=0
|
||||||
|
frames=10,11,12,13,14,15,16,17,18,19
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=green
|
||||||
|
speed=10
|
||||||
|
loop=0
|
||||||
|
frames=20,21,22,23,24,25,26,27,28,29
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=red
|
||||||
|
speed=20
|
||||||
|
loop=0
|
||||||
|
frames=30,31,32,33,34,35,36,37,38,39
|
||||||
|
[/animation]
|
||||||
BIN
data/gfx/balloon/balloon4.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
9
data/gfx/balloon/explosion1.ani
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
frame_width=10
|
||||||
|
frame_height=10
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=default
|
||||||
|
speed=5
|
||||||
|
loop=-1
|
||||||
|
frames=0,1,2,3,4,5,6,7,8,9
|
||||||
|
[/animation]
|
||||||
BIN
data/gfx/balloon/explosion1.png
Normal file
|
After Width: | Height: | Size: 760 B |
9
data/gfx/balloon/explosion2.ani
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
frame_width=16
|
||||||
|
frame_height=16
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=default
|
||||||
|
speed=5
|
||||||
|
loop=-1
|
||||||
|
frames=0,1,2,3,4,5,6,7,8,9
|
||||||
|
[/animation]
|
||||||
BIN
data/gfx/balloon/explosion2.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
9
data/gfx/balloon/explosion3.ani
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
frame_width=26
|
||||||
|
frame_height=26
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=default
|
||||||
|
speed=5
|
||||||
|
loop=-1
|
||||||
|
frames=0,1,2,3,4,5,6,7,8,9
|
||||||
|
[/animation]
|
||||||
BIN
data/gfx/balloon/explosion3.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
9
data/gfx/balloon/explosion4.ani
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
frame_width=46
|
||||||
|
frame_height=46
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=default
|
||||||
|
speed=5
|
||||||
|
loop=-1
|
||||||
|
frames=0,1,2,3,4,5,6,7,8,9
|
||||||
|
[/animation]
|
||||||
BIN
data/gfx/balloon/explosion4.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
9
data/gfx/balloon/powerball.ani
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
frame_width=46
|
||||||
|
frame_height=46
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=powerball
|
||||||
|
speed=10
|
||||||
|
loop=-1
|
||||||
|
frames=0
|
||||||
|
[/animation]
|
||||||
BIN
data/gfx/balloon/powerball.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 6.1 KiB |
@@ -1,44 +0,0 @@
|
|||||||
frameWidth=37
|
|
||||||
frameHeight=37
|
|
||||||
|
|
||||||
[animation]
|
|
||||||
name=orange
|
|
||||||
speed=10
|
|
||||||
loop=0
|
|
||||||
frames=0,1,2,3,4,5,6,7,8,9
|
|
||||||
[/animation]
|
|
||||||
|
|
||||||
[animation]
|
|
||||||
name=blue
|
|
||||||
speed=20
|
|
||||||
loop=0
|
|
||||||
frames=12,13,14,15,16,17,18,19,20,21
|
|
||||||
[/animation]
|
|
||||||
|
|
||||||
[animation]
|
|
||||||
name=green
|
|
||||||
speed=10
|
|
||||||
loop=0
|
|
||||||
frames=24,25,26,27,28,29,30,31,32,33
|
|
||||||
[/animation]
|
|
||||||
|
|
||||||
[animation]
|
|
||||||
name=red
|
|
||||||
speed=20
|
|
||||||
loop=0
|
|
||||||
frames=36,37,38,39,40,41,42,43,44,45
|
|
||||||
[/animation]
|
|
||||||
|
|
||||||
[animation]
|
|
||||||
name=powerball
|
|
||||||
speed=10
|
|
||||||
loop=0
|
|
||||||
frames=10
|
|
||||||
[/animation]
|
|
||||||
|
|
||||||
[animation]
|
|
||||||
name=pop
|
|
||||||
speed=5
|
|
||||||
loop=-1
|
|
||||||
frames=48,49,50,51,52,53,54,55,56,57,58,59
|
|
||||||
[/animation]
|
|
||||||
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 644 B |
BIN
data/gfx/bullet/bullet.png
Normal file
|
After Width: | Height: | Size: 858 B |
BIN
data/gfx/controllers/controllers.png
Normal file
|
After Width: | Height: | Size: 799 B |
BIN
data/gfx/game/game_buildings.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
data/gfx/game/game_clouds1.png
Normal file
|
After Width: | Height: | Size: 9.2 KiB |
BIN
data/gfx/game/game_clouds2.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 270 B After Width: | Height: | Size: 270 B |
BIN
data/gfx/game/game_sky_colors.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 935 B After Width: | Height: | Size: 935 B |
|
Before Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 935 B |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
@@ -1,5 +1,5 @@
|
|||||||
frameWidth=20
|
frame_width=20
|
||||||
frameHeight=20
|
frame_height=20
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=default
|
name=default
|
||||||
|
Before Width: | Height: | Size: 400 B After Width: | Height: | Size: 400 B |
@@ -1,5 +1,5 @@
|
|||||||
frameWidth=20
|
frame_width=20
|
||||||
frameHeight=20
|
frame_height=20
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=default
|
name=default
|
||||||
|
Before Width: | Height: | Size: 623 B After Width: | Height: | Size: 623 B |
@@ -1,5 +1,5 @@
|
|||||||
frameWidth=28
|
frame_width=28
|
||||||
frameHeight=37
|
frame_height=37
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=default
|
name=default
|
||||||
|
Before Width: | Height: | Size: 835 B After Width: | Height: | Size: 835 B |
@@ -1,5 +1,5 @@
|
|||||||
frameWidth=20
|
frame_width=20
|
||||||
frameHeight=20
|
frame_height=20
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=default
|
name=default
|
||||||
|
Before Width: | Height: | Size: 336 B After Width: | Height: | Size: 336 B |
@@ -1,5 +1,5 @@
|
|||||||
frameWidth=20
|
frame_width=20
|
||||||
frameHeight=20
|
frame_height=20
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=default
|
name=default
|
||||||
|
Before Width: | Height: | Size: 506 B After Width: | Height: | Size: 506 B |
@@ -1,5 +1,5 @@
|
|||||||
frameWidth=20
|
frame_width=20
|
||||||
frameHeight=20
|
frame_height=20
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=default
|
name=default
|
||||||
|
Before Width: | Height: | Size: 492 B After Width: | Height: | Size: 492 B |
|
Before Width: | Height: | Size: 717 B After Width: | Height: | Size: 717 B |
BIN
data/gfx/logo/logo_jailgames_mini.png
Normal file
|
After Width: | Height: | Size: 720 B |
|
Before Width: | Height: | Size: 561 B After Width: | Height: | Size: 561 B |
|
Before Width: | Height: | Size: 716 B |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 7.9 KiB |
@@ -1,5 +1,5 @@
|
|||||||
frameWidth=30
|
frame_width=30
|
||||||
frameHeight=30
|
frame_height=30
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=walk
|
name=walk
|
||||||
@@ -45,7 +45,7 @@ frames=20,21,22,23
|
|||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=death
|
name=death
|
||||||
speed=5
|
speed=15
|
||||||
loop=0
|
loop=0
|
||||||
frames=24,25,26,27
|
frames=24,25,26,27
|
||||||
[/animation]
|
[/animation]
|
||||||
BIN
data/gfx/player/player1.gif
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
data/gfx/player/player1_pal1.gif
Normal file
|
After Width: | Height: | Size: 173 B |
BIN
data/gfx/player/player1_pal2.gif
Normal file
|
After Width: | Height: | Size: 173 B |
BIN
data/gfx/player/player1_pal3.gif
Normal file
|
After Width: | Height: | Size: 173 B |
BIN
data/gfx/player/player1_power.gif
Normal file
|
After Width: | Height: | Size: 772 B |
BIN
data/gfx/player/player2.gif
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
data/gfx/player/player2_pal1.gif
Normal file
|
After Width: | Height: | Size: 172 B |
BIN
data/gfx/player/player2_pal2.gif
Normal file
|
After Width: | Height: | Size: 172 B |
BIN
data/gfx/player/player2_pal3.gif
Normal file
|
After Width: | Height: | Size: 172 B |
BIN
data/gfx/player/player2_power.gif
Normal file
|
After Width: | Height: | Size: 772 B |
@@ -1,5 +1,5 @@
|
|||||||
frameWidth=35
|
frame_width=39
|
||||||
frameHeight=40
|
frame_height=44
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=default
|
name=default
|
||||||
BIN
data/gfx/player/player_power.gif
Normal file
|
After Width: | Height: | Size: 944 B |
BIN
data/gfx/player/player_power_pal.gif
Normal file
|
After Width: | Height: | Size: 84 B |
|
Before Width: | Height: | Size: 1.2 KiB |
BIN
data/gfx/title/title_arcade_edition.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
@@ -1,5 +1,5 @@
|
|||||||
frameWidth=16
|
frame_width=16
|
||||||
frameHeight=16
|
frame_height=16
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=default
|
name=default
|
||||||
|
Before Width: | Height: | Size: 212 B After Width: | Height: | Size: 212 B |
@@ -278,4 +278,70 @@ DEIXA BUIT PER A
|
|||||||
MODE FORA DE LINEA
|
MODE FORA DE LINEA
|
||||||
|
|
||||||
## 93 - MENU OPCIONES
|
## 93 - MENU OPCIONES
|
||||||
TAULER DE PUNTS
|
TAULER DE PUNTS
|
||||||
|
|
||||||
|
## 94 - NOTIFICACIONES
|
||||||
|
Torna a polsar per eixir ...
|
||||||
|
|
||||||
|
## 95 - DEFINE BUTTONS
|
||||||
|
Disparar cap a l'esquerra
|
||||||
|
|
||||||
|
## 96 - DEFINE BUTTONS
|
||||||
|
Disparar cap amunt
|
||||||
|
|
||||||
|
## 97 - DEFINE BUTTONS
|
||||||
|
Disparar cap a la dreta
|
||||||
|
|
||||||
|
## 98 - DEFINE BUTTONS
|
||||||
|
Start
|
||||||
|
|
||||||
|
## 99 - DEFINE BUTTONS
|
||||||
|
Servei
|
||||||
|
|
||||||
|
## 100 - DEFINE BUTTONS
|
||||||
|
Jugador
|
||||||
|
|
||||||
|
## 101 - MARCADOR
|
||||||
|
Mode demostracio
|
||||||
|
|
||||||
|
## 102 - MARCADOR
|
||||||
|
Game Over
|
||||||
|
|
||||||
|
## 103 - MARCADOR
|
||||||
|
Pulsa START
|
||||||
|
|
||||||
|
## 104 - MARCADOR
|
||||||
|
per jugar
|
||||||
|
|
||||||
|
## 105 - MARCADOR
|
||||||
|
Continuar?
|
||||||
|
|
||||||
|
## 106 - MARCADOR
|
||||||
|
Posa el nom
|
||||||
|
|
||||||
|
## 107 - AJUDA
|
||||||
|
Intercanviar mandos
|
||||||
|
|
||||||
|
## 108 - AJUDA
|
||||||
|
Configuracio
|
||||||
|
|
||||||
|
## 109 - AJUDA
|
||||||
|
Alternar el audio
|
||||||
|
|
||||||
|
## 110 - AJUDA
|
||||||
|
Filtres
|
||||||
|
|
||||||
|
## 111 - AJUDA
|
||||||
|
Reiniciar
|
||||||
|
|
||||||
|
## 112 - AJUDA
|
||||||
|
Pausar
|
||||||
|
|
||||||
|
## 113 - AJUDA
|
||||||
|
Eixir
|
||||||
|
|
||||||
|
## 114 - MARCADOR
|
||||||
|
Per favor
|
||||||
|
|
||||||
|
## 115 - MARCADOR
|
||||||
|
espere
|
||||||
@@ -278,4 +278,70 @@ LEAVE BLANK FOR
|
|||||||
OFFLINE MODE
|
OFFLINE MODE
|
||||||
|
|
||||||
## 93 - MENU OPCIONES
|
## 93 - MENU OPCIONES
|
||||||
HISCORE TABLE
|
HISCORE TABLE
|
||||||
|
|
||||||
|
## 94 - NOTIFICACIONES
|
||||||
|
Press again to quit
|
||||||
|
|
||||||
|
## 95 - DEFINE BUTTONS
|
||||||
|
Fire left
|
||||||
|
|
||||||
|
## 96 - DEFINE BUTTONS
|
||||||
|
Fire up
|
||||||
|
|
||||||
|
## 97 - DEFINE BUTTONS
|
||||||
|
Fire right
|
||||||
|
|
||||||
|
## 98 - DEFINE BUTTONS
|
||||||
|
Start
|
||||||
|
|
||||||
|
## 99 - DEFINE BUTTONS
|
||||||
|
Service
|
||||||
|
|
||||||
|
## 100 - DEFINE BUTTONS
|
||||||
|
Player
|
||||||
|
|
||||||
|
## 101 - MARCADOR
|
||||||
|
Demo mode
|
||||||
|
|
||||||
|
## 102 - MARCADOR
|
||||||
|
Game Over
|
||||||
|
|
||||||
|
## 103 - MARCADOR
|
||||||
|
Press START
|
||||||
|
|
||||||
|
## 104 - MARCADOR
|
||||||
|
to play
|
||||||
|
|
||||||
|
## 105 - MARCADOR
|
||||||
|
Continue?
|
||||||
|
|
||||||
|
## 106 - MARCADOR
|
||||||
|
Enter name
|
||||||
|
|
||||||
|
## 107 - AJUDA
|
||||||
|
Swap Controllers
|
||||||
|
|
||||||
|
## 108 - AJUDA
|
||||||
|
Configuration
|
||||||
|
|
||||||
|
## 109 - AJUDA
|
||||||
|
Toggle audio
|
||||||
|
|
||||||
|
## 110 - AJUDA
|
||||||
|
Shaders
|
||||||
|
|
||||||
|
## 111 - AJUDA
|
||||||
|
Reset
|
||||||
|
|
||||||
|
## 112 - AJUDA
|
||||||
|
Pause
|
||||||
|
|
||||||
|
## 113 - AJUDA
|
||||||
|
Exit
|
||||||
|
|
||||||
|
## 114 - MARCADOR
|
||||||
|
Please
|
||||||
|
|
||||||
|
## 115 - MARCADOR
|
||||||
|
wait
|
||||||
@@ -278,4 +278,70 @@ DEJA EN BLANCO PARA
|
|||||||
MODO SIN CONEXION
|
MODO SIN CONEXION
|
||||||
|
|
||||||
## 93 - MENU OPCIONES
|
## 93 - MENU OPCIONES
|
||||||
TABLA DE PUNTUACIONES
|
TABLA DE PUNTUACIONES
|
||||||
|
|
||||||
|
## 94 - NOTIFICACIONES
|
||||||
|
Pulsa otra vez para salir
|
||||||
|
|
||||||
|
## 95 - DEFINE BUTTONS
|
||||||
|
Disparar a la izquierda
|
||||||
|
|
||||||
|
## 96 - DEFINE BUTTONS
|
||||||
|
Disparar hacia arriba
|
||||||
|
|
||||||
|
## 97 - DEFINE BUTTONS
|
||||||
|
Disparar hacia la derecha
|
||||||
|
|
||||||
|
## 98 - DEFINE BUTTONS
|
||||||
|
Start
|
||||||
|
|
||||||
|
## 99 - DEFINE BUTTONS
|
||||||
|
Servicio
|
||||||
|
|
||||||
|
## 100 - DEFINE BUTTONS
|
||||||
|
Jugador
|
||||||
|
|
||||||
|
## 101 - MARCADOR
|
||||||
|
Mode demostracion
|
||||||
|
|
||||||
|
## 102 - MARCADOR
|
||||||
|
Game Over
|
||||||
|
|
||||||
|
## 103 - MARCADOR
|
||||||
|
Pulsa START
|
||||||
|
|
||||||
|
## 104 - MARCADOR
|
||||||
|
para jugar
|
||||||
|
|
||||||
|
## 105 - MARCADOR
|
||||||
|
Continuar?
|
||||||
|
|
||||||
|
## 106 - MARCADOR
|
||||||
|
Pon tu nombre
|
||||||
|
|
||||||
|
## 107 - AJUDA
|
||||||
|
Intercambiar mandos
|
||||||
|
|
||||||
|
## 108 - AJUDA
|
||||||
|
Configuracion
|
||||||
|
|
||||||
|
## 109 - AJUDA
|
||||||
|
Alternar el audio
|
||||||
|
|
||||||
|
## 110 - AJUDA
|
||||||
|
Filtros
|
||||||
|
|
||||||
|
## 111 - AJUDA
|
||||||
|
Reiniciar
|
||||||
|
|
||||||
|
## 112 - AJUDA
|
||||||
|
Pausar
|
||||||
|
|
||||||
|
## 113 - AJUDA
|
||||||
|
Salir
|
||||||
|
|
||||||
|
## 114 - MARCADOR
|
||||||
|
Por favor
|
||||||
|
|
||||||
|
## 115 - MARCADOR
|
||||||
|
espere
|
||||||
|
Before Width: | Height: | Size: 1.5 KiB |
@@ -97,7 +97,8 @@ void main()
|
|||||||
#if defined(CURVATURE)
|
#if defined(CURVATURE)
|
||||||
screenScale = vec2(1.0, 1.0); //TextureSize / InputSize;
|
screenScale = vec2(1.0, 1.0); //TextureSize / InputSize;
|
||||||
#endif
|
#endif
|
||||||
filterWidth = (768.0 / 240.0) / 3.0;
|
//filterWidth = (768.0 / 240.0) / 3.0;
|
||||||
|
filterWidth = (768.0 / 256.0) / 3.0;
|
||||||
TEX0 = vec2(gl_MultiTexCoord0.x, 1.0-gl_MultiTexCoord0.y)*1.0001;
|
TEX0 = vec2(gl_MultiTexCoord0.x, 1.0-gl_MultiTexCoord0.y)*1.0001;
|
||||||
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
|
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
|
||||||
}
|
}
|
||||||
@@ -146,7 +147,7 @@ float CalcScanLine(float dy)
|
|||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec2 TextureSize = vec2(320.0, 240.0);
|
vec2 TextureSize = vec2(320.0, 256.0);
|
||||||
#if defined(CURVATURE)
|
#if defined(CURVATURE)
|
||||||
vec2 texcoord = Distort(TEX0);
|
vec2 texcoord = Distort(TEX0);
|
||||||
if (texcoord.x < 0.0)
|
if (texcoord.x < 0.0)
|
||||||
|
|||||||
10
linux-utils/check-includes.sh
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
SOURCEPATH=../source/
|
||||||
|
|
||||||
|
for i in "$SOURCEPATH"/*.cpp
|
||||||
|
do
|
||||||
|
include-what-you-use -D DEBUG -D VERBOSE -std=c++20 -Wall "$i"
|
||||||
|
read -p "Presiona cualquier tecla para continuar..."
|
||||||
|
clear
|
||||||
|
done
|
||||||
6
linux-utils/go.sh
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
SECONDS=0
|
||||||
|
make linux_debug
|
||||||
|
duration=$SECONDS
|
||||||
|
echo "$((duration / 60)) minutes and $((duration % 60)) seconds elapsed."
|
||||||
BIN
linux-utils/include-what-you-use
Executable file
3
linux-utils/run_valgrind.sh
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
valgrind --suppressions=valgrind_exceptions --leak-check=full ~/coffee_crisis_arcade_edition/coffee_crisis_arcade_edition_debug > ~/coffee_crisis_arcade_edition/debug.txt 2>&1
|
||||||
12
linux-utils/valgrind_exceptions
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
ignore_unversioned_libs
|
||||||
|
Memcheck:Leak
|
||||||
|
...
|
||||||
|
obj:*/lib*/lib*.so
|
||||||
|
}
|
||||||
|
{
|
||||||
|
ignore_versioned_libs
|
||||||
|
Memcheck:Leak
|
||||||
|
...
|
||||||
|
obj:*/lib*/lib*.so.*
|
||||||
|
}
|
||||||
@@ -1,37 +1,48 @@
|
|||||||
#include "animatedsprite.h"
|
#include "animated_sprite.h"
|
||||||
|
#include <algorithm> // for copy
|
||||||
|
#include <fstream> // for basic_ostream, operator<<, basic_istream, basic...
|
||||||
|
#include <iostream> // for cout
|
||||||
|
#include <iterator> // for back_insert_iterator, back_inserter
|
||||||
|
#include <sstream> // for basic_stringstream
|
||||||
|
#include "texture.h" // for Texture
|
||||||
|
|
||||||
// Carga la animación desde un fichero
|
// Carga la animación desde un fichero
|
||||||
animatedSprite_t loadAnimationFromFile(Texture *texture, std::string filePath, bool verbose)
|
AnimatedFile loadAnimationFromFile(std::shared_ptr<Texture> texture, std::string file_path)
|
||||||
{
|
{
|
||||||
// Inicializa variables
|
// Inicializa variables
|
||||||
animatedSprite_t as;
|
AnimatedFile af;
|
||||||
as.texture = texture;
|
af.texture = texture;
|
||||||
int framesPerRow = 0;
|
auto frames_per_row = 0;
|
||||||
int frameWidth = 0;
|
auto frame_width = 0;
|
||||||
int frameHeight = 0;
|
auto frame_height = 0;
|
||||||
int maxTiles = 0;
|
auto max_tiles = 0;
|
||||||
|
|
||||||
const std::string filename = filePath.substr(filePath.find_last_of("\\/") + 1);
|
#ifdef VERBOSE
|
||||||
std::ifstream file(filePath);
|
const std::string file_name = file_path.substr(file_path.find_last_of("\\/") + 1);
|
||||||
|
#endif
|
||||||
|
std::ifstream file(file_path);
|
||||||
std::string line;
|
std::string line;
|
||||||
|
|
||||||
// El fichero se puede abrir
|
// El fichero se puede abrir
|
||||||
if (file.good())
|
if (file.good())
|
||||||
{
|
{
|
||||||
// Procesa el fichero linea a linea
|
// Procesa el fichero linea a linea
|
||||||
if (verbose)
|
#ifdef VERBOSE
|
||||||
{
|
std::cout << "Animation loaded: " << file_name << std::endl;
|
||||||
std::cout << "Animation loaded: " << filename << std::endl;
|
#endif
|
||||||
}
|
|
||||||
while (std::getline(file, line))
|
while (std::getline(file, line))
|
||||||
{
|
{
|
||||||
// Si la linea contiene el texto [animation] se realiza el proceso de carga de una animación
|
// Si la linea contiene el texto [animation] se realiza el proceso de carga de una animación
|
||||||
if (line == "[animation]")
|
if (line == "[animation]")
|
||||||
{
|
{
|
||||||
animation_t buffer;
|
Animation buffer;
|
||||||
buffer.counter = 0;
|
buffer.counter = 0;
|
||||||
buffer.currentFrame = 0;
|
buffer.current_frame = 0;
|
||||||
buffer.completed = false;
|
buffer.completed = false;
|
||||||
|
buffer.name.clear();
|
||||||
|
buffer.speed = 5;
|
||||||
|
buffer.loop = 0;
|
||||||
|
buffer.frames.clear();
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
@@ -41,7 +52,7 @@ animatedSprite_t loadAnimationFromFile(Texture *texture, std::string filePath, b
|
|||||||
int pos = line.find("=");
|
int pos = line.find("=");
|
||||||
|
|
||||||
// Procesa las dos subcadenas
|
// Procesa las dos subcadenas
|
||||||
if (pos != (int)line.npos)
|
if (pos != static_cast<int>(line.npos))
|
||||||
{
|
{
|
||||||
if (line.substr(0, pos) == "name")
|
if (line.substr(0, pos) == "name")
|
||||||
{
|
{
|
||||||
@@ -63,26 +74,28 @@ animatedSprite_t loadAnimationFromFile(Texture *texture, std::string filePath, b
|
|||||||
// Se introducen los valores separados por comas en un vector
|
// Se introducen los valores separados por comas en un vector
|
||||||
std::stringstream ss(line.substr(pos + 1, line.length()));
|
std::stringstream ss(line.substr(pos + 1, line.length()));
|
||||||
std::string tmp;
|
std::string tmp;
|
||||||
SDL_Rect rect = {0, 0, frameWidth, frameHeight};
|
SDL_Rect rect = {0, 0, frame_width, frame_height};
|
||||||
while (getline(ss, tmp, ','))
|
while (getline(ss, tmp, ','))
|
||||||
{
|
{
|
||||||
// Comprueba que el tile no sea mayor que el maximo indice permitido
|
// Comprueba que el tile no sea mayor que el maximo indice permitido
|
||||||
const int numTile = std::stoi(tmp) > maxTiles ? 0 : std::stoi(tmp);
|
const auto num_tile = std::stoi(tmp) > max_tiles ? 0 : std::stoi(tmp);
|
||||||
rect.x = (numTile % framesPerRow) * frameWidth;
|
rect.x = (num_tile % frames_per_row) * frame_width;
|
||||||
rect.y = (numTile / framesPerRow) * frameHeight;
|
rect.y = (num_tile / frames_per_row) * frame_height;
|
||||||
buffer.frames.push_back(rect);
|
buffer.frames.push_back(rect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cout << "Warning: file " << filename.c_str() << "\n, unknown parameter \"" << line.substr(0, pos).c_str() << "\"" << std::endl;
|
#ifdef VERBOSE
|
||||||
|
std::cout << "Warning: file " << file_name.c_str() << "\n, unknown parameter \"" << line.substr(0, pos).c_str() << "\"" << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (line != "[/animation]");
|
} while (line != "[/animation]");
|
||||||
|
|
||||||
// Añade la animación al vector de animaciones
|
// Añade la animación al vector de animaciones
|
||||||
as.animations.push_back(buffer);
|
af.animations.push_back(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
// En caso contrario se parsea el fichero para buscar las variables y los valores
|
// En caso contrario se parsea el fichero para buscar las variables y los valores
|
||||||
@@ -94,37 +107,39 @@ animatedSprite_t loadAnimationFromFile(Texture *texture, std::string filePath, b
|
|||||||
// Procesa las dos subcadenas
|
// Procesa las dos subcadenas
|
||||||
if (pos != (int)line.npos)
|
if (pos != (int)line.npos)
|
||||||
{
|
{
|
||||||
if (line.substr(0, pos) == "framesPerRow")
|
if (line.substr(0, pos) == "frames_per_row")
|
||||||
{
|
{
|
||||||
framesPerRow = std::stoi(line.substr(pos + 1, line.length()));
|
frames_per_row = std::stoi(line.substr(pos + 1, line.length()));
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (line.substr(0, pos) == "frameWidth")
|
else if (line.substr(0, pos) == "frame_width")
|
||||||
{
|
{
|
||||||
frameWidth = std::stoi(line.substr(pos + 1, line.length()));
|
frame_width = std::stoi(line.substr(pos + 1, line.length()));
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (line.substr(0, pos) == "frameHeight")
|
else if (line.substr(0, pos) == "frame_height")
|
||||||
{
|
{
|
||||||
frameHeight = std::stoi(line.substr(pos + 1, line.length()));
|
frame_height = std::stoi(line.substr(pos + 1, line.length()));
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cout << "Warning: file " << filename.c_str() << "\n, unknown parameter \"" << line.substr(0, pos).c_str() << "\"" << std::endl;
|
#ifdef VERBOSE
|
||||||
|
std::cout << "Warning: file " << file_name.c_str() << "\n, unknown parameter \"" << line.substr(0, pos).c_str() << "\"" << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Normaliza valores
|
// Normaliza valores
|
||||||
if (framesPerRow == 0 && frameWidth > 0)
|
if (frames_per_row == 0 && frame_width > 0)
|
||||||
{
|
{
|
||||||
framesPerRow = texture->getWidth() / frameWidth;
|
frames_per_row = texture->getWidth() / frame_width;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (maxTiles == 0 && frameWidth > 0 && frameHeight > 0)
|
if (max_tiles == 0 && frame_width > 0 && frame_height > 0)
|
||||||
{
|
{
|
||||||
const int w = texture->getWidth() / frameWidth;
|
const auto w = texture->getWidth() / frame_width;
|
||||||
const int h = texture->getHeight() / frameHeight;
|
const auto h = texture->getHeight() / frame_height;
|
||||||
maxTiles = w * h;
|
max_tiles = w * h;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -136,76 +151,55 @@ animatedSprite_t loadAnimationFromFile(Texture *texture, std::string filePath, b
|
|||||||
// El fichero no se puede abrir
|
// El fichero no se puede abrir
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (verbose)
|
#ifdef VERBOSE
|
||||||
{
|
std::cout << "Warning: Unable to open " << file_name.c_str() << " file" << std::endl;
|
||||||
std::cout << "Warning: Unable to open " << filename.c_str() << " file" << std::endl;
|
#endif
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return as;
|
return af;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
AnimatedSprite::AnimatedSprite(Texture *texture, SDL_Renderer *renderer, std::string file, std::vector<std::string> *buffer)
|
AnimatedSprite::AnimatedSprite(std::shared_ptr<Texture> texture, const std::string &file, std::vector<std::string> *buffer)
|
||||||
|
: MovingSprite(texture),
|
||||||
|
current_animation_(0)
|
||||||
{
|
{
|
||||||
// Copia los punteros
|
|
||||||
setTexture(texture);
|
|
||||||
setRenderer(renderer);
|
|
||||||
|
|
||||||
// Carga las animaciones
|
// Carga las animaciones
|
||||||
if (file != "")
|
if (!file.empty())
|
||||||
{
|
{
|
||||||
animatedSprite_t as = loadAnimationFromFile(texture, file);
|
AnimatedFile as = loadAnimationFromFile(texture, file);
|
||||||
|
|
||||||
// Copia los datos de las animaciones
|
// Copia los datos de las animaciones
|
||||||
for (auto animation : as.animations)
|
std::copy(as.animations.begin(), as.animations.end(), std::back_inserter(animations_));
|
||||||
{
|
|
||||||
this->animation.push_back(animation);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (buffer)
|
else if (buffer)
|
||||||
{
|
{
|
||||||
loadFromVector(buffer);
|
loadFromVector(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Inicializa variables
|
|
||||||
currentAnimation = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
AnimatedSprite::AnimatedSprite(SDL_Renderer *renderer, animatedSprite_t *animation)
|
AnimatedSprite::AnimatedSprite(const AnimatedFile *animation)
|
||||||
|
: MovingSprite(animation->texture),
|
||||||
|
current_animation_(0)
|
||||||
{
|
{
|
||||||
// Copia los punteros
|
|
||||||
setTexture(animation->texture);
|
|
||||||
setRenderer(renderer);
|
|
||||||
|
|
||||||
// Inicializa variables
|
|
||||||
currentAnimation = 0;
|
|
||||||
|
|
||||||
// Copia los datos de las animaciones
|
// Copia los datos de las animaciones
|
||||||
for (auto a : animation->animations)
|
std::copy(animation->animations.begin(), animation->animations.end(), std::back_inserter(animations_));
|
||||||
{
|
|
||||||
this->animation.push_back(a);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
AnimatedSprite::~AnimatedSprite()
|
AnimatedSprite::~AnimatedSprite()
|
||||||
{
|
{
|
||||||
for (auto &a : animation)
|
animations_.clear();
|
||||||
{
|
|
||||||
a.frames.clear();
|
|
||||||
}
|
|
||||||
animation.clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Obtiene el indice de la animación a partir del nombre
|
// Obtiene el indice de la animación a partir del nombre
|
||||||
int AnimatedSprite::getIndex(std::string name)
|
int AnimatedSprite::getIndex(const std::string &name)
|
||||||
{
|
{
|
||||||
int index = -1;
|
auto index = -1;
|
||||||
|
|
||||||
for (auto a : animation)
|
for (const auto &a : animations_)
|
||||||
{
|
{
|
||||||
index++;
|
index++;
|
||||||
if (a.name == name)
|
if (a.name == name)
|
||||||
@@ -213,147 +207,147 @@ int AnimatedSprite::getIndex(std::string name)
|
|||||||
return index;
|
return index;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef VERBOSE
|
||||||
std::cout << "** Warning: could not find \"" << name.c_str() << "\" animation" << std::endl;
|
std::cout << "** Warning: could not find \"" << name.c_str() << "\" animation" << std::endl;
|
||||||
|
#endif
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Calcula el frame correspondiente a la animación
|
// Calcula el frame correspondiente a la animación
|
||||||
void AnimatedSprite::animate()
|
void AnimatedSprite::animate()
|
||||||
{
|
{
|
||||||
if (!enabled || animation[currentAnimation].speed == 0)
|
if (animations_[current_animation_].speed == 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Calcula el frame actual a partir del contador
|
// Calcula el frame actual a partir del contador
|
||||||
animation[currentAnimation].currentFrame = animation[currentAnimation].counter / animation[currentAnimation].speed;
|
animations_[current_animation_].current_frame = animations_[current_animation_].counter / animations_[current_animation_].speed;
|
||||||
|
|
||||||
// Si alcanza el final de la animación, reinicia el contador de la animación
|
// 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
|
// en función de la variable loop y coloca el nuevo frame
|
||||||
if (animation[currentAnimation].currentFrame >= (int)animation[currentAnimation].frames.size())
|
if (animations_[current_animation_].current_frame >= (int)animations_[current_animation_].frames.size())
|
||||||
{
|
{
|
||||||
if (animation[currentAnimation].loop == -1)
|
if (animations_[current_animation_].loop == -1)
|
||||||
{ // Si no hay loop, deja el último frame
|
{ // Si no hay loop, deja el último frame
|
||||||
animation[currentAnimation].currentFrame = animation[currentAnimation].frames.size();
|
animations_[current_animation_].current_frame = animations_[current_animation_].frames.size();
|
||||||
animation[currentAnimation].completed = true;
|
animations_[current_animation_].completed = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // Si hay loop, vuelve al frame indicado
|
{ // Si hay loop, vuelve al frame indicado
|
||||||
animation[currentAnimation].counter = 0;
|
animations_[current_animation_].counter = 0;
|
||||||
animation[currentAnimation].currentFrame = animation[currentAnimation].loop;
|
animations_[current_animation_].current_frame = animations_[current_animation_].loop;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// En caso contrario
|
// En caso contrario
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Escoge el frame correspondiente de la animación
|
// Escoge el frame correspondiente de la animación
|
||||||
setSpriteClip(animation[currentAnimation].frames[animation[currentAnimation].currentFrame]);
|
setSpriteClip(animations_[current_animation_].frames[animations_[current_animation_].current_frame]);
|
||||||
|
|
||||||
// Incrementa el contador de la animacion
|
// Incrementa el contador de la animacion
|
||||||
animation[currentAnimation].counter++;
|
animations_[current_animation_].counter++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Obtiene el número de frames de la animación actual
|
// Obtiene el número de frames de la animación actual
|
||||||
int AnimatedSprite::getNumFrames()
|
int AnimatedSprite::getNumFrames()
|
||||||
{
|
{
|
||||||
return (int)animation[currentAnimation].frames.size();
|
return (int)animations_[current_animation_].frames.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Establece el frame actual de la animación
|
// Establece el frame actual de la animación
|
||||||
void AnimatedSprite::setCurrentFrame(int num)
|
void AnimatedSprite::setCurrentFrame(int num)
|
||||||
{
|
{
|
||||||
// Descarta valores fuera de rango
|
// Descarta valores fuera de rango
|
||||||
if (num >= (int)animation[currentAnimation].frames.size())
|
if (num >= (int)animations_[current_animation_].frames.size())
|
||||||
{
|
{
|
||||||
num = 0;
|
num = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cambia el valor de la variable
|
// Cambia el valor de la variable
|
||||||
animation[currentAnimation].currentFrame = num;
|
animations_[current_animation_].current_frame = num;
|
||||||
animation[currentAnimation].counter = 0;
|
animations_[current_animation_].counter = 0;
|
||||||
|
|
||||||
// Escoge el frame correspondiente de la animación
|
// Escoge el frame correspondiente de la animación
|
||||||
setSpriteClip(animation[currentAnimation].frames[animation[currentAnimation].currentFrame]);
|
setSpriteClip(animations_[current_animation_].frames[animations_[current_animation_].current_frame]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Establece el valor del contador
|
// Establece el valor del contador
|
||||||
void AnimatedSprite::setAnimationCounter(std::string name, int num)
|
void AnimatedSprite::setAnimationCounter(const std::string &name, int num)
|
||||||
{
|
{
|
||||||
animation[getIndex(name)].counter = num;
|
animations_[getIndex(name)].counter = num;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Establece la velocidad de una animación
|
// Establece la velocidad de una animación
|
||||||
void AnimatedSprite::setAnimationSpeed(std::string name, int speed)
|
void AnimatedSprite::setAnimationSpeed(const std::string &name, int speed)
|
||||||
{
|
{
|
||||||
animation[getIndex(name)].counter = speed;
|
animations_[getIndex(name)].counter = speed;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Establece la velocidad de una animación
|
// Establece la velocidad de una animación
|
||||||
void AnimatedSprite::setAnimationSpeed(int index, int speed)
|
void AnimatedSprite::setAnimationSpeed(int index, int speed)
|
||||||
{
|
{
|
||||||
animation[index].counter = speed;
|
animations_[index].counter = speed;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Establece si la animación se reproduce en bucle
|
// Establece si la animación se reproduce en bucle
|
||||||
void AnimatedSprite::setAnimationLoop(std::string name, int loop)
|
void AnimatedSprite::setAnimationLoop(const std::string &name, int loop)
|
||||||
{
|
{
|
||||||
animation[getIndex(name)].loop = loop;
|
animations_[getIndex(name)].loop = loop;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Establece si la animación se reproduce en bucle
|
// Establece si la animación se reproduce en bucle
|
||||||
void AnimatedSprite::setAnimationLoop(int index, int loop)
|
void AnimatedSprite::setAnimationLoop(int index, int loop)
|
||||||
{
|
{
|
||||||
animation[index].loop = loop;
|
animations_[index].loop = loop;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Establece el valor de la variable
|
// Establece el valor de la variable
|
||||||
void AnimatedSprite::setAnimationCompleted(std::string name, bool value)
|
void AnimatedSprite::setAnimationCompleted(const std::string &name, bool value)
|
||||||
{
|
{
|
||||||
animation[getIndex(name)].completed = value;
|
animations_[getIndex(name)].completed = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// OLD - Establece el valor de la variable
|
// OLD - Establece el valor de la variable
|
||||||
void AnimatedSprite::setAnimationCompleted(int index, bool value)
|
void AnimatedSprite::setAnimationCompleted(int index, bool value)
|
||||||
{
|
{
|
||||||
animation[index].completed = value;
|
animations_[index].completed = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Comprueba si ha terminado la animación
|
// Comprueba si ha terminado la animación
|
||||||
bool AnimatedSprite::animationIsCompleted()
|
bool AnimatedSprite::animationIsCompleted()
|
||||||
{
|
{
|
||||||
return animation[currentAnimation].completed;
|
return animations_[current_animation_].completed;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Devuelve el rectangulo de una animación y frame concreto
|
// Devuelve el rectangulo de una animación y frame concreto
|
||||||
SDL_Rect AnimatedSprite::getAnimationClip(std::string name, Uint8 index)
|
SDL_Rect AnimatedSprite::getAnimationClip(const std::string &name, Uint8 index)
|
||||||
{
|
{
|
||||||
return animation[getIndex(name)].frames[index];
|
return animations_[getIndex(name)].frames[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Devuelve el rectangulo de una animación y frame concreto
|
// Devuelve el rectangulo de una animación y frame concreto
|
||||||
SDL_Rect AnimatedSprite::getAnimationClip(int indexA, Uint8 indexF)
|
SDL_Rect AnimatedSprite::getAnimationClip(int indexA, Uint8 indexF)
|
||||||
{
|
{
|
||||||
return animation[indexA].frames[indexF];
|
return animations_[indexA].frames[indexF];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Carga la animación desde un vector
|
// Carga la animación desde un vector
|
||||||
bool AnimatedSprite::loadFromVector(std::vector<std::string> *source)
|
bool AnimatedSprite::loadFromVector(std::vector<std::string> *source)
|
||||||
{
|
{
|
||||||
// Inicializa variables
|
// Inicializa variables
|
||||||
int framesPerRow = 0;
|
auto frames_per_row = 0;
|
||||||
int frameWidth = 0;
|
auto frame_width = 0;
|
||||||
int frameHeight = 0;
|
auto frame_height = 0;
|
||||||
int maxTiles = 0;
|
auto max_tiles = 0;
|
||||||
|
|
||||||
// Indicador de éxito en el proceso
|
// Indicador de éxito en el proceso
|
||||||
bool success = true;
|
auto success = true;
|
||||||
std::string line;
|
std::string line;
|
||||||
|
|
||||||
// Recorre todo el vector
|
// Recorre todo el vector
|
||||||
int index = 0;
|
auto index = 0;
|
||||||
while (index < (int)source->size())
|
while (index < (int)source->size())
|
||||||
{
|
{
|
||||||
// Lee desde el vector
|
// Lee desde el vector
|
||||||
@@ -362,10 +356,14 @@ bool AnimatedSprite::loadFromVector(std::vector<std::string> *source)
|
|||||||
// Si la linea contiene el texto [animation] se realiza el proceso de carga de una animación
|
// Si la linea contiene el texto [animation] se realiza el proceso de carga de una animación
|
||||||
if (line == "[animation]")
|
if (line == "[animation]")
|
||||||
{
|
{
|
||||||
animation_t buffer;
|
Animation buffer;
|
||||||
buffer.counter = 0;
|
buffer.counter = 0;
|
||||||
buffer.currentFrame = 0;
|
buffer.current_frame = 0;
|
||||||
buffer.completed = false;
|
buffer.completed = false;
|
||||||
|
buffer.name.clear();
|
||||||
|
buffer.speed = 5;
|
||||||
|
buffer.loop = 0;
|
||||||
|
buffer.frames.clear();
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
@@ -377,7 +375,7 @@ bool AnimatedSprite::loadFromVector(std::vector<std::string> *source)
|
|||||||
int pos = line.find("=");
|
int pos = line.find("=");
|
||||||
|
|
||||||
// Procesa las dos subcadenas
|
// Procesa las dos subcadenas
|
||||||
if (pos != (int)line.npos)
|
if (pos != static_cast<int>(line.npos))
|
||||||
{
|
{
|
||||||
if (line.substr(0, pos) == "name")
|
if (line.substr(0, pos) == "name")
|
||||||
{
|
{
|
||||||
@@ -399,27 +397,29 @@ bool AnimatedSprite::loadFromVector(std::vector<std::string> *source)
|
|||||||
// Se introducen los valores separados por comas en un vector
|
// Se introducen los valores separados por comas en un vector
|
||||||
std::stringstream ss(line.substr(pos + 1, line.length()));
|
std::stringstream ss(line.substr(pos + 1, line.length()));
|
||||||
std::string tmp;
|
std::string tmp;
|
||||||
SDL_Rect rect = {0, 0, frameWidth, frameHeight};
|
SDL_Rect rect = {0, 0, frame_width, frame_height};
|
||||||
while (getline(ss, tmp, ','))
|
while (getline(ss, tmp, ','))
|
||||||
{
|
{
|
||||||
// Comprueba que el tile no sea mayor que el maximo indice permitido
|
// Comprueba que el tile no sea mayor que el maximo indice permitido
|
||||||
const int numTile = std::stoi(tmp) > maxTiles ? 0 : std::stoi(tmp);
|
const int num_tile = std::stoi(tmp) > max_tiles ? 0 : std::stoi(tmp);
|
||||||
rect.x = (numTile % framesPerRow) * frameWidth;
|
rect.x = (num_tile % frames_per_row) * frame_width;
|
||||||
rect.y = (numTile / framesPerRow) * frameHeight;
|
rect.y = (num_tile / frames_per_row) * frame_height;
|
||||||
buffer.frames.push_back(rect);
|
buffer.frames.push_back(rect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#ifdef VERBOSE
|
||||||
std::cout << "Warning: unknown parameter " << line.substr(0, pos).c_str() << std::endl;
|
std::cout << "Warning: unknown parameter " << line.substr(0, pos).c_str() << std::endl;
|
||||||
|
#endif
|
||||||
success = false;
|
success = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (line != "[/animation]");
|
} while (line != "[/animation]");
|
||||||
|
|
||||||
// Añade la animación al vector de animaciones
|
// Añade la animación al vector de animaciones
|
||||||
animation.push_back(buffer);
|
animations_.push_back(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
// En caso contrario se parsea el fichero para buscar las variables y los valores
|
// En caso contrario se parsea el fichero para buscar las variables y los valores
|
||||||
@@ -431,38 +431,40 @@ bool AnimatedSprite::loadFromVector(std::vector<std::string> *source)
|
|||||||
// Procesa las dos subcadenas
|
// Procesa las dos subcadenas
|
||||||
if (pos != (int)line.npos)
|
if (pos != (int)line.npos)
|
||||||
{
|
{
|
||||||
if (line.substr(0, pos) == "framesPerRow")
|
if (line.substr(0, pos) == "frames_per_row")
|
||||||
{
|
{
|
||||||
framesPerRow = std::stoi(line.substr(pos + 1, line.length()));
|
frames_per_row = std::stoi(line.substr(pos + 1, line.length()));
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (line.substr(0, pos) == "frameWidth")
|
else if (line.substr(0, pos) == "frame_width")
|
||||||
{
|
{
|
||||||
frameWidth = std::stoi(line.substr(pos + 1, line.length()));
|
frame_width = std::stoi(line.substr(pos + 1, line.length()));
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (line.substr(0, pos) == "frameHeight")
|
else if (line.substr(0, pos) == "frame_height")
|
||||||
{
|
{
|
||||||
frameHeight = std::stoi(line.substr(pos + 1, line.length()));
|
frame_height = std::stoi(line.substr(pos + 1, line.length()));
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#ifdef VERBOSE
|
||||||
std::cout << "Warning: unknown parameter " << line.substr(0, pos).c_str() << std::endl;
|
std::cout << "Warning: unknown parameter " << line.substr(0, pos).c_str() << std::endl;
|
||||||
|
#endif
|
||||||
success = false;
|
success = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Normaliza valores
|
// Normaliza valores
|
||||||
if (framesPerRow == 0 && frameWidth > 0)
|
if (frames_per_row == 0 && frame_width > 0)
|
||||||
{
|
{
|
||||||
framesPerRow = texture->getWidth() / frameWidth;
|
frames_per_row = texture_->getWidth() / frame_width;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (maxTiles == 0 && frameWidth > 0 && frameHeight > 0)
|
if (max_tiles == 0 && frame_width > 0 && frame_height > 0)
|
||||||
{
|
{
|
||||||
const int w = texture->getWidth() / frameWidth;
|
const int w = texture_->getWidth() / frame_width;
|
||||||
const int h = texture->getHeight() / frameHeight;
|
const int h = texture_->getHeight() / frame_height;
|
||||||
maxTiles = w * h;
|
max_tiles = w * h;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -472,34 +474,34 @@ bool AnimatedSprite::loadFromVector(std::vector<std::string> *source)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Pone un valor por defecto
|
// Pone un valor por defecto
|
||||||
setRect({0, 0, frameWidth, frameHeight});
|
setPos((SDL_Rect){0, 0, frame_width, frame_height});
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Establece la animacion actual
|
// Establece la animacion actual
|
||||||
void AnimatedSprite::setCurrentAnimation(std::string name)
|
void AnimatedSprite::setCurrentAnimation(const std::string &name)
|
||||||
{
|
{
|
||||||
const int newAnimation = getIndex(name);
|
const auto new_animation = getIndex(name);
|
||||||
if (currentAnimation != newAnimation)
|
if (current_animation_ != new_animation)
|
||||||
{
|
{
|
||||||
currentAnimation = newAnimation;
|
current_animation_ = new_animation;
|
||||||
animation[currentAnimation].currentFrame = 0;
|
animations_[current_animation_].current_frame = 0;
|
||||||
animation[currentAnimation].counter = 0;
|
animations_[current_animation_].counter = 0;
|
||||||
animation[currentAnimation].completed = false;
|
animations_[current_animation_].completed = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Establece la animacion actual
|
// Establece la animacion actual
|
||||||
void AnimatedSprite::setCurrentAnimation(int index)
|
void AnimatedSprite::setCurrentAnimation(int index)
|
||||||
{
|
{
|
||||||
const int newAnimation = index;
|
const auto new_animation = index;
|
||||||
if (currentAnimation != newAnimation)
|
if (current_animation_ != new_animation)
|
||||||
{
|
{
|
||||||
currentAnimation = newAnimation;
|
current_animation_ = new_animation;
|
||||||
animation[currentAnimation].currentFrame = 0;
|
animations_[current_animation_].current_frame = 0;
|
||||||
animation[currentAnimation].counter = 0;
|
animations_[current_animation_].counter = 0;
|
||||||
animation[currentAnimation].completed = false;
|
animations_[current_animation_].completed = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -513,13 +515,13 @@ void AnimatedSprite::update()
|
|||||||
// Establece el rectangulo para un frame de una animación
|
// 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)
|
void AnimatedSprite::setAnimationFrames(Uint8 index_animation, Uint8 index_frame, int x, int y, int w, int h)
|
||||||
{
|
{
|
||||||
animation[index_animation].frames.push_back({x, y, w, h});
|
animations_[index_animation].frames.push_back({x, y, w, h});
|
||||||
}
|
}
|
||||||
|
|
||||||
// OLD - Establece el contador para todas las animaciones
|
// OLD - Establece el contador para todas las animaciones
|
||||||
void AnimatedSprite::setAnimationCounter(int value)
|
void AnimatedSprite::setAnimationCounter(int value)
|
||||||
{
|
{
|
||||||
for (auto &a : animation)
|
for (auto &a : animations_)
|
||||||
{
|
{
|
||||||
a.counter = value;
|
a.counter = value;
|
||||||
}
|
}
|
||||||
@@ -528,7 +530,7 @@ void AnimatedSprite::setAnimationCounter(int value)
|
|||||||
// Reinicia la animación
|
// Reinicia la animación
|
||||||
void AnimatedSprite::resetAnimation()
|
void AnimatedSprite::resetAnimation()
|
||||||
{
|
{
|
||||||
animation[currentAnimation].currentFrame = 0;
|
animations_[current_animation_].current_frame = 0;
|
||||||
animation[currentAnimation].counter = 0;
|
animations_[current_animation_].counter = 0;
|
||||||
animation[currentAnimation].completed = false;
|
animations_[current_animation_].completed = false;
|
||||||
}
|
}
|
||||||
@@ -1,50 +1,47 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL_rect.h> // for SDL_Rect
|
||||||
#include "movingsprite.h"
|
#include <SDL2/SDL_stdinc.h> // for Uint8
|
||||||
#include <fstream>
|
#include <memory> // for shared_ptr
|
||||||
#include <iostream>
|
#include <string> // for string
|
||||||
#include <sstream>
|
#include <vector> // for vector
|
||||||
#include <string>
|
#include "moving_sprite.h" // for MovingSprite
|
||||||
#include <vector>
|
class Texture;
|
||||||
|
|
||||||
#ifndef ANIMATEDSPRITE_H
|
struct Animation
|
||||||
#define ANIMATEDSPRITE_H
|
|
||||||
|
|
||||||
struct animation_t
|
|
||||||
{
|
{
|
||||||
std::string name; // Nombre de la animacion
|
std::string name; // Nombre de la animacion
|
||||||
std::vector<SDL_Rect> frames; // Cada uno de los frames que componen la animación
|
std::vector<SDL_Rect> frames; // Cada uno de los frames que componen la animación
|
||||||
int speed; // Velocidad de 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
|
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
|
bool completed; // Indica si ha finalizado la animación
|
||||||
int currentFrame; // Frame actual
|
int current_frame; // Frame actual
|
||||||
int counter; // Contador para las animaciones
|
int counter; // Contador para las animaciones
|
||||||
};
|
};
|
||||||
|
|
||||||
struct animatedSprite_t
|
struct AnimatedFile
|
||||||
{
|
{
|
||||||
std::vector<animation_t> animations; // Vector con las diferentes animaciones
|
std::vector<Animation> animations; // Vector con las diferentes animaciones
|
||||||
Texture *texture; // Textura con los graficos para el sprite
|
std::shared_ptr<Texture> texture; // Textura con los graficos para el sprite
|
||||||
};
|
};
|
||||||
|
|
||||||
// Carga la animación desde un fichero
|
// Carga la animación desde un fichero
|
||||||
animatedSprite_t loadAnimationFromFile(Texture *texture, std::string filePath, bool verbose = false);
|
AnimatedFile loadAnimationFromFile(std::shared_ptr<Texture> texture, std::string filePath);
|
||||||
|
|
||||||
class AnimatedSprite : public MovingSprite
|
class AnimatedSprite : public MovingSprite
|
||||||
{
|
{
|
||||||
private:
|
protected:
|
||||||
// Variables
|
// Variables
|
||||||
std::vector<animation_t> animation; // Vector con las diferentes animaciones
|
std::vector<Animation> animations_; // Vector con las diferentes animaciones
|
||||||
int currentAnimation; // Animacion activa
|
int current_animation_; // Animacion activa
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
AnimatedSprite(Texture *texture = nullptr, SDL_Renderer *renderer = nullptr, std::string file = "", std::vector<std::string> *buffer = nullptr);
|
explicit AnimatedSprite(std::shared_ptr<Texture> texture = nullptr, const std::string &file = std::string(), std::vector<std::string> *buffer = nullptr);
|
||||||
AnimatedSprite(SDL_Renderer *renderer, animatedSprite_t *animation);
|
explicit AnimatedSprite(const AnimatedFile *animation);
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~AnimatedSprite();
|
virtual ~AnimatedSprite();
|
||||||
|
|
||||||
// Calcula el frame correspondiente a la animación actual
|
// Calcula el frame correspondiente a la animación actual
|
||||||
void animate();
|
void animate();
|
||||||
@@ -56,39 +53,39 @@ public:
|
|||||||
void setCurrentFrame(int num);
|
void setCurrentFrame(int num);
|
||||||
|
|
||||||
// Establece el valor del contador
|
// Establece el valor del contador
|
||||||
void setAnimationCounter(std::string name, int num);
|
void setAnimationCounter(const std::string &name, int num);
|
||||||
|
|
||||||
// Establece la velocidad de una animación
|
// Establece la velocidad de una animación
|
||||||
void setAnimationSpeed(std::string name, int speed);
|
void setAnimationSpeed(const std::string &name, int speed);
|
||||||
void setAnimationSpeed(int index, int speed);
|
void setAnimationSpeed(int index, int speed);
|
||||||
|
|
||||||
// Establece el frame al que vuelve la animación al finalizar
|
// Establece el frame al que vuelve la animación al finalizar
|
||||||
void setAnimationLoop(std::string name, int loop);
|
void setAnimationLoop(const std::string &name, int loop);
|
||||||
void setAnimationLoop(int index, int loop);
|
void setAnimationLoop(int index, int loop);
|
||||||
|
|
||||||
// Establece el valor de la variable
|
// Establece el valor de la variable
|
||||||
void setAnimationCompleted(std::string name, bool value);
|
void setAnimationCompleted(const std::string &name, bool value);
|
||||||
void setAnimationCompleted(int index, bool value);
|
void setAnimationCompleted(int index, bool value);
|
||||||
|
|
||||||
// Comprueba si ha terminado la animación
|
// Comprueba si ha terminado la animación
|
||||||
bool animationIsCompleted();
|
bool animationIsCompleted();
|
||||||
|
|
||||||
// Devuelve el rectangulo de una animación y frame concreto
|
// Devuelve el rectangulo de una animación y frame concreto
|
||||||
SDL_Rect getAnimationClip(std::string name = "default", Uint8 index = 0);
|
SDL_Rect getAnimationClip(const std::string &name = "default", Uint8 index = 0);
|
||||||
SDL_Rect getAnimationClip(int indexA = 0, Uint8 indexF = 0);
|
SDL_Rect getAnimationClip(int indexA = 0, Uint8 indexF = 0);
|
||||||
|
|
||||||
// Obtiene el indice de la animación a partir del nombre
|
// Obtiene el indice de la animación a partir del nombre
|
||||||
int getIndex(std::string name);
|
int getIndex(const std::string &name);
|
||||||
|
|
||||||
// Carga la animación desde un vector
|
// Carga la animación desde un vector
|
||||||
bool loadFromVector(std::vector<std::string> *source);
|
bool loadFromVector(std::vector<std::string> *source);
|
||||||
|
|
||||||
// Establece la animacion actual
|
// Establece la animacion actual
|
||||||
void setCurrentAnimation(std::string name = "default");
|
void setCurrentAnimation(const std::string &name = "default");
|
||||||
void setCurrentAnimation(int index = 0);
|
void setCurrentAnimation(int index = 0);
|
||||||
|
|
||||||
// Actualiza las variables del objeto
|
// Actualiza las variables del objeto
|
||||||
void update();
|
void update() override;
|
||||||
|
|
||||||
// OLD - Establece el rectangulo para un frame de una animación
|
// 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);
|
void setAnimationFrames(Uint8 index_animation, Uint8 index_frame, int x, int y, int w, int h);
|
||||||
@@ -98,6 +95,4 @@ public:
|
|||||||
|
|
||||||
// Reinicia la animación
|
// Reinicia la animación
|
||||||
void resetAnimation();
|
void resetAnimation();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||