migrant .ani a .yaml
This commit is contained in:
@@ -21,7 +21,8 @@
|
||||
"WebFetch(domain:github.com)",
|
||||
"WebFetch(domain:raw.githubusercontent.com)",
|
||||
"Bash(curl:*)",
|
||||
"WebFetch(domain:fktn-k.github.io)"
|
||||
"WebFetch(domain:fktn-k.github.io)",
|
||||
"Bash(./jaildoctors_dilemma)"
|
||||
],
|
||||
"deny": [],
|
||||
"ask": []
|
||||
|
||||
@@ -128,130 +128,130 @@ BITMAP|${PREFIX}/data/tilesets/standard.gif
|
||||
# ===================================================================
|
||||
# ENEMIES
|
||||
# ===================================================================
|
||||
ANIMATION|${PREFIX}/data/enemies/abad_bell.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/abad_bell.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/abad_bell.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/abad.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/abad.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/abad.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/amstrad_cs.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/amstrad_cs.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/amstrad_cs.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/flying_arounder.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/flying_arounder.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/flying_arounder.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/stopped_arounder.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/stopped_arounder.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/stopped_arounder.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/walking_arounder.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/walking_arounder.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/walking_arounder.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/arounders_door.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/arounders_door.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/arounders_door.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/arounders_machine.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/arounders_machine.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/arounders_machine.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/bat.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/bat.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/bat.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/batman_bell.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/batman_bell.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/batman_bell.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/batman_fire.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/batman_fire.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/batman_fire.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/batman.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/batman.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/batman.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/bell.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/bell.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/bell.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/bin.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/bin.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/bin.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/bird.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/bird.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/bird.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/breakout.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/breakout.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/breakout.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/bry.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/bry.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/bry.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/chip.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/chip.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/chip.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/code.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/code.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/code.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/congo.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/congo.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/congo.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/crosshair.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/crosshair.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/crosshair.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/demon.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/demon.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/demon.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/dimallas.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/dimallas.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/dimallas.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/floppy.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/floppy.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/floppy.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/dong.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/dong.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/dong.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/guitar.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/guitar.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/guitar.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/heavy.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/heavy.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/heavy.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/jailer_#1.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/jailer_#1.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/jailer_#1.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/jailer_#2.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/jailer_#2.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/jailer_#2.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/jailer_#3.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/jailer_#3.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/jailer_#3.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/jailbattle_alien.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/jailbattle_alien.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/jailbattle_alien.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/jailbattle_human.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/jailbattle_human.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/jailbattle_human.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/jeannine.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/jeannine.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/jeannine.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/lamp.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/lamp.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/lamp.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/lord_abad.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/lord_abad.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/lord_abad.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/matatunos.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/matatunos.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/matatunos.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/mummy.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/mummy.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/mummy.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/paco.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/paco.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/paco.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/elsa.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/elsa.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/elsa.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/qvoid.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/qvoid.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/qvoid.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/robot.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/robot.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/robot.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/sam.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/sam.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/sam.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/shock.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/shock.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/shock.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/sigmasua.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/sigmasua.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/sigmasua.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/spark.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/spark.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/spark.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/special/aerojailer.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/special/aerojailer.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/special/aerojailer.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/special/arounder.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/special/arounder.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/special/arounder.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/special/pepe_rosita_job.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/special/pepe_rosita_job.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/special/pepe_rosita_job.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/special/shooting_star.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/special/shooting_star.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/special/shooting_star.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/spider.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/spider.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/spider.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/tree_thing.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/tree_thing.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/tree_thing.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/tuno.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/tuno.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/tuno.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/tv_panel.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/tv_panel.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/tv_panel.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/tv.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/tv.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/tv.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/upv_student.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/upv_student.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/upv_student.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/wave.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/wave.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/wave.gif
|
||||
ANIMATION|${PREFIX}/data/enemies/z80.ani
|
||||
ANIMATION|${PREFIX}/data/enemies/z80.yaml
|
||||
BITMAP|${PREFIX}/data/enemies/z80.gif
|
||||
|
||||
# ===================================================================
|
||||
# PLAYER
|
||||
# ===================================================================
|
||||
BITMAP|${PREFIX}/data/player/player.gif
|
||||
ANIMATION|${PREFIX}/data/player/player.ani
|
||||
ANIMATION|${PREFIX}/data/player/player.yaml
|
||||
BITMAP|${PREFIX}/data/player/player2.gif
|
||||
ANIMATION|${PREFIX}/data/player/player2.ani
|
||||
ANIMATION|${PREFIX}/data/player/player2.yaml
|
||||
BITMAP|${PREFIX}/data/player/player_game_over.gif
|
||||
ANIMATION|${PREFIX}/data/player/player_game_over.ani
|
||||
ANIMATION|${PREFIX}/data/player/player_game_over.yaml
|
||||
|
||||
# ===================================================================
|
||||
# ITEMS
|
||||
@@ -336,4 +336,4 @@ BITMAP|${PREFIX}/data/ending/ending5.gif
|
||||
# CREDITS
|
||||
# ===================================================================
|
||||
BITMAP|${PREFIX}/data/credits/shine.gif
|
||||
ANIMATION|${PREFIX}/data/credits/shine.ani
|
||||
ANIMATION|${PREFIX}/data/credits/shine.yaml
|
||||
|
||||
164
convert_ani_to_yaml.py
Normal file
164
convert_ani_to_yaml.py
Normal file
@@ -0,0 +1,164 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Script para convertir archivos .ani a formato YAML con nomenclatura camelCase
|
||||
"""
|
||||
|
||||
import os
|
||||
import glob
|
||||
import re
|
||||
|
||||
|
||||
def parse_ani_file(file_path):
|
||||
"""
|
||||
Parsea un archivo .ani y retorna un diccionario con los datos
|
||||
"""
|
||||
data = {
|
||||
'tileSetFile': None,
|
||||
'frameWidth': None,
|
||||
'frameHeight': None,
|
||||
'animations': []
|
||||
}
|
||||
|
||||
current_animation = None
|
||||
|
||||
with open(file_path, 'r', encoding='utf-8') as f:
|
||||
for line in f:
|
||||
line = line.strip()
|
||||
|
||||
# Ignorar líneas vacías
|
||||
if not line:
|
||||
continue
|
||||
|
||||
# Detectar inicio de animación
|
||||
if line == '[animation]':
|
||||
current_animation = {}
|
||||
continue
|
||||
|
||||
# Detectar fin de animación
|
||||
if line == '[/animation]':
|
||||
if current_animation:
|
||||
data['animations'].append(current_animation)
|
||||
current_animation = None
|
||||
continue
|
||||
|
||||
# Parsear parámetros
|
||||
if '=' in line:
|
||||
key, value = line.split('=', 1)
|
||||
key = key.strip()
|
||||
value = value.strip()
|
||||
|
||||
# Parámetros globales
|
||||
if key == 'tileSetFile':
|
||||
data['tileSetFile'] = value
|
||||
elif key == 'frame_width':
|
||||
data['frameWidth'] = int(value)
|
||||
elif key == 'frame_height':
|
||||
data['frameHeight'] = int(value)
|
||||
# Parámetros de animación
|
||||
elif current_animation is not None:
|
||||
if key == 'name':
|
||||
current_animation['name'] = value
|
||||
elif key == 'speed':
|
||||
current_animation['speed'] = float(value)
|
||||
elif key == 'loop':
|
||||
current_animation['loop'] = int(value)
|
||||
elif key == 'frames':
|
||||
# Convertir "0,1,2,3" a [0, 1, 2, 3]
|
||||
current_animation['frames'] = [int(x.strip()) for x in value.split(',')]
|
||||
|
||||
return data
|
||||
|
||||
|
||||
def generate_yaml(data, comment_header=""):
|
||||
"""
|
||||
Genera el contenido YAML a partir de los datos parseados
|
||||
"""
|
||||
lines = []
|
||||
|
||||
# Añadir comentario de header si existe
|
||||
if comment_header:
|
||||
lines.append(f"# {comment_header}")
|
||||
|
||||
# Parámetros globales
|
||||
if data['tileSetFile']:
|
||||
lines.append(f"tileSetFile: {data['tileSetFile']}")
|
||||
if data['frameWidth'] is not None:
|
||||
lines.append(f"frameWidth: {data['frameWidth']}")
|
||||
if data['frameHeight'] is not None:
|
||||
lines.append(f"frameHeight: {data['frameHeight']}")
|
||||
|
||||
# Animaciones
|
||||
if data['animations']:
|
||||
lines.append("")
|
||||
lines.append("animations:")
|
||||
|
||||
for anim in data['animations']:
|
||||
lines.append(f" - name: {anim.get('name', 'default')}")
|
||||
lines.append(f" speed: {anim.get('speed', 0.0)}")
|
||||
lines.append(f" loop: {anim.get('loop', 0)}")
|
||||
|
||||
# Frames en formato compacto [0, 1, 2, 3]
|
||||
frames = anim.get('frames', [])
|
||||
frames_str = '[' + ', '.join(str(f) for f in frames) + ']'
|
||||
lines.append(f" frames: {frames_str}")
|
||||
|
||||
# Línea vacía entre animaciones (excepto la última)
|
||||
if anim != data['animations'][-1]:
|
||||
lines.append("")
|
||||
|
||||
return '\n'.join(lines) + '\n'
|
||||
|
||||
|
||||
def convert_ani_to_yaml(ani_path):
|
||||
"""
|
||||
Convierte un archivo .ani a .yaml
|
||||
"""
|
||||
# Generar nombre del archivo de salida
|
||||
yaml_path = ani_path.replace('.ani', '.yaml')
|
||||
|
||||
# Parsear archivo .ani
|
||||
data = parse_ani_file(ani_path)
|
||||
|
||||
# Generar comentario de header basado en el nombre del archivo
|
||||
filename = os.path.basename(ani_path)
|
||||
comment = f"{filename.replace('.ani', '')} animation"
|
||||
|
||||
# Generar contenido YAML
|
||||
yaml_content = generate_yaml(data, comment)
|
||||
|
||||
# Escribir archivo .yaml
|
||||
with open(yaml_path, 'w', encoding='utf-8') as f:
|
||||
f.write(yaml_content)
|
||||
|
||||
print(f"✓ {ani_path} → {yaml_path}")
|
||||
|
||||
return yaml_path
|
||||
|
||||
|
||||
def main():
|
||||
"""
|
||||
Función principal que convierte todos los archivos .ani a .yaml
|
||||
"""
|
||||
# Buscar todos los archivos .ani
|
||||
ani_files = glob.glob('data/**/*.ani', recursive=True)
|
||||
|
||||
if not ani_files:
|
||||
print("No se encontraron archivos .ani")
|
||||
return
|
||||
|
||||
print(f"Encontrados {len(ani_files)} archivos .ani\n")
|
||||
|
||||
# Convertir cada archivo
|
||||
converted = 0
|
||||
for ani_file in sorted(ani_files):
|
||||
try:
|
||||
convert_ani_to_yaml(ani_file)
|
||||
converted += 1
|
||||
except Exception as e:
|
||||
print(f"✗ Error al convertir {ani_file}: {e}")
|
||||
|
||||
print(f"\n{converted}/{len(ani_files)} archivos convertidos exitosamente")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
10
data/credits/shine.yaml
Normal file
10
data/credits/shine.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# shine animation
|
||||
tileSetFile: shine.gif
|
||||
frameWidth: 8
|
||||
frameHeight: 8
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1
|
||||
loop: -1
|
||||
frames: [0, 1, 2, 3, 4, 5, 6, 7]
|
||||
10
data/enemies/abad.yaml
Normal file
10
data/enemies/abad.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# abad animation
|
||||
tileSetFile: abad.gif
|
||||
frameWidth: 8
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1333
|
||||
loop: 0
|
||||
frames: [0, 1, 2]
|
||||
10
data/enemies/abad_bell.yaml
Normal file
10
data/enemies/abad_bell.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# abad_bell animation
|
||||
tileSetFile: abad_bell.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.0667
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
10
data/enemies/amstrad_cs.yaml
Normal file
10
data/enemies/amstrad_cs.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# amstrad_cs animation
|
||||
tileSetFile: amstrad_cs.gif
|
||||
frameWidth: 8
|
||||
frameHeight: 8
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.0667
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255]
|
||||
10
data/enemies/arounders_door.yaml
Normal file
10
data/enemies/arounders_door.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# arounders_door animation
|
||||
tileSetFile: arounders_door.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1333
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 1, 0, 0, 0]
|
||||
10
data/enemies/arounders_machine.yaml
Normal file
10
data/enemies/arounders_machine.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# arounders_machine animation
|
||||
tileSetFile: arounders_machine.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.0667
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
10
data/enemies/bat.yaml
Normal file
10
data/enemies/bat.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# bat animation
|
||||
tileSetFile: bat.gif
|
||||
frameWidth: 9
|
||||
frameHeight: 7
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.05
|
||||
loop: 0
|
||||
frames: [0, 1]
|
||||
10
data/enemies/batman.yaml
Normal file
10
data/enemies/batman.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# batman animation
|
||||
tileSetFile: batman.gif
|
||||
frameWidth: 8
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1333
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
10
data/enemies/batman_bell.yaml
Normal file
10
data/enemies/batman_bell.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# batman_bell animation
|
||||
tileSetFile: batman_bell.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3, 4, 5]
|
||||
10
data/enemies/batman_fire.yaml
Normal file
10
data/enemies/batman_fire.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# batman_fire animation
|
||||
tileSetFile: batman_fire.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.0667
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
10
data/enemies/bell.yaml
Normal file
10
data/enemies/bell.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# bell animation
|
||||
tileSetFile: bell.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
|
||||
10
data/enemies/bin.yaml
Normal file
10
data/enemies/bin.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# bin animation
|
||||
tileSetFile: bin.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 8
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1667
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3, 4]
|
||||
10
data/enemies/bird.yaml
Normal file
10
data/enemies/bird.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# bird animation
|
||||
tileSetFile: bird.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1333
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
10
data/enemies/breakout.yaml
Normal file
10
data/enemies/breakout.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# breakout animation
|
||||
tileSetFile: breakout.gif
|
||||
frameWidth: 24
|
||||
frameHeight: 32
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1]
|
||||
10
data/enemies/bry.yaml
Normal file
10
data/enemies/bry.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# bry animation
|
||||
tileSetFile: bry.gif
|
||||
frameWidth: 10
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5]
|
||||
10
data/enemies/chip.yaml
Normal file
10
data/enemies/chip.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# chip animation
|
||||
tileSetFile: chip.gif
|
||||
frameWidth: 8
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1333
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
10
data/enemies/code.yaml
Normal file
10
data/enemies/code.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# code animation
|
||||
tileSetFile: code.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
10
data/enemies/congo.yaml
Normal file
10
data/enemies/congo.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# congo animation
|
||||
tileSetFile: congo.gif
|
||||
frameWidth: 8
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
10
data/enemies/crosshair.yaml
Normal file
10
data/enemies/crosshair.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# crosshair animation
|
||||
tileSetFile: crosshair.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
10
data/enemies/demon.yaml
Normal file
10
data/enemies/demon.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# demon animation
|
||||
tileSetFile: demon.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1333
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
10
data/enemies/dimallas.yaml
Normal file
10
data/enemies/dimallas.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# dimallas animation
|
||||
tileSetFile: dimallas.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1333
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
10
data/enemies/dong.yaml
Normal file
10
data/enemies/dong.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# dong animation
|
||||
tileSetFile: dong.gif
|
||||
frameWidth: 22
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3, 4, 5]
|
||||
10
data/enemies/elsa.yaml
Normal file
10
data/enemies/elsa.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# elsa animation
|
||||
tileSetFile: elsa.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3, 4, 5]
|
||||
10
data/enemies/floppy.yaml
Normal file
10
data/enemies/floppy.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# floppy animation
|
||||
tileSetFile: floppy.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1333
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
10
data/enemies/flying_arounder.yaml
Normal file
10
data/enemies/flying_arounder.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# flying_arounder animation
|
||||
tileSetFile: flying_arounder.gif
|
||||
frameWidth: 7
|
||||
frameHeight: 7
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1667
|
||||
loop: 0
|
||||
frames: [0]
|
||||
10
data/enemies/guitar.yaml
Normal file
10
data/enemies/guitar.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# guitar animation
|
||||
tileSetFile: guitar.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1333
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
10
data/enemies/heavy.yaml
Normal file
10
data/enemies/heavy.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# heavy animation
|
||||
tileSetFile: heavy.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1333
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
10
data/enemies/jailbattle_alien.yaml
Normal file
10
data/enemies/jailbattle_alien.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# jailbattle_alien animation
|
||||
tileSetFile: jailbattle_alien.gif
|
||||
frameWidth: 13
|
||||
frameHeight: 15
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1
|
||||
loop: 0
|
||||
frames: [0, 1]
|
||||
10
data/enemies/jailbattle_human.yaml
Normal file
10
data/enemies/jailbattle_human.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# jailbattle_human animation
|
||||
tileSetFile: jailbattle_human.gif
|
||||
frameWidth: 11
|
||||
frameHeight: 13
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1
|
||||
loop: 0
|
||||
frames: [0, 1]
|
||||
10
data/enemies/jailer_#1.yaml
Normal file
10
data/enemies/jailer_#1.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# jailer_#1 animation
|
||||
tileSetFile: jailer_#1.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.0667
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
10
data/enemies/jailer_#2.yaml
Normal file
10
data/enemies/jailer_#2.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# jailer_#2 animation
|
||||
tileSetFile: jailer_#2.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.0667
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5]
|
||||
10
data/enemies/jailer_#3.yaml
Normal file
10
data/enemies/jailer_#3.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# jailer_#3 animation
|
||||
tileSetFile: jailer_#3.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.0667
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
10
data/enemies/jeannine.yaml
Normal file
10
data/enemies/jeannine.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# jeannine animation
|
||||
tileSetFile: jeannine.gif
|
||||
frameWidth: 8
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
10
data/enemies/lamp.yaml
Normal file
10
data/enemies/lamp.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# lamp animation
|
||||
tileSetFile: lamp.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.0667
|
||||
loop: 0
|
||||
frames: [0, 1]
|
||||
10
data/enemies/lord_abad.yaml
Normal file
10
data/enemies/lord_abad.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# lord_abad animation
|
||||
tileSetFile: lord_abad.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
10
data/enemies/matatunos.yaml
Normal file
10
data/enemies/matatunos.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# matatunos animation
|
||||
tileSetFile: matatunos.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1333
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3, 4, 5]
|
||||
10
data/enemies/mummy.yaml
Normal file
10
data/enemies/mummy.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# mummy animation
|
||||
tileSetFile: mummy.gif
|
||||
frameWidth: 8
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.2
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
10
data/enemies/paco.yaml
Normal file
10
data/enemies/paco.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# paco animation
|
||||
tileSetFile: paco.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.0667
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3, 4, 5, 6, 7]
|
||||
10
data/enemies/qvoid.yaml
Normal file
10
data/enemies/qvoid.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# qvoid animation
|
||||
tileSetFile: qvoid.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1333
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3, 4, 5, 6, 7]
|
||||
10
data/enemies/robot.yaml
Normal file
10
data/enemies/robot.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# robot animation
|
||||
tileSetFile: robot.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 32
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.0667
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
10
data/enemies/sam.yaml
Normal file
10
data/enemies/sam.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# sam animation
|
||||
tileSetFile: sam.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.0833
|
||||
loop: 0
|
||||
frames: [0, 1]
|
||||
10
data/enemies/shock.yaml
Normal file
10
data/enemies/shock.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# shock animation
|
||||
tileSetFile: shock.gif
|
||||
frameWidth: 8
|
||||
frameHeight: 8
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3, 4, 5, 4, 3, 2, 1]
|
||||
10
data/enemies/sigmasua.yaml
Normal file
10
data/enemies/sigmasua.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# sigmasua animation
|
||||
tileSetFile: sigmasua.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1333
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
10
data/enemies/spark.yaml
Normal file
10
data/enemies/spark.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# spark animation
|
||||
tileSetFile: spark.gif
|
||||
frameWidth: 8
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
10
data/enemies/special/aerojailer.yaml
Normal file
10
data/enemies/special/aerojailer.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# aerojailer animation
|
||||
tileSetFile: aerojailer.gif
|
||||
frameWidth: 43
|
||||
frameHeight: 44
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 1.6667
|
||||
loop: 0
|
||||
frames: [0]
|
||||
10
data/enemies/special/arounder.yaml
Normal file
10
data/enemies/special/arounder.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# arounder animation
|
||||
tileSetFile: arounder.gif
|
||||
frameWidth: 79
|
||||
frameHeight: 90
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 1.6667
|
||||
loop: 0
|
||||
frames: [0]
|
||||
10
data/enemies/special/pepe_rosita_job.yaml
Normal file
10
data/enemies/special/pepe_rosita_job.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# pepe_rosita_job animation
|
||||
tileSetFile: pepe_rosita_job.gif
|
||||
frameWidth: 62
|
||||
frameHeight: 47
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 1.6667
|
||||
loop: 0
|
||||
frames: [0]
|
||||
10
data/enemies/special/shooting_star.yaml
Normal file
10
data/enemies/special/shooting_star.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# shooting_star animation
|
||||
tileSetFile: shooting_star.gif
|
||||
frameWidth: 64
|
||||
frameHeight: 64
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1
|
||||
loop: -1
|
||||
frames: [18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]
|
||||
10
data/enemies/spider.yaml
Normal file
10
data/enemies/spider.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# spider animation
|
||||
tileSetFile: spider.gif
|
||||
frameWidth: 8
|
||||
frameHeight: 8
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.0667
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
10
data/enemies/stopped_arounder.yaml
Normal file
10
data/enemies/stopped_arounder.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# stopped_arounder animation
|
||||
tileSetFile: stopped_arounder.gif
|
||||
frameWidth: 7
|
||||
frameHeight: 8
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1667
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
10
data/enemies/tree_thing.yaml
Normal file
10
data/enemies/tree_thing.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# tree_thing animation
|
||||
tileSetFile: tree_thing.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
|
||||
10
data/enemies/tuno.yaml
Normal file
10
data/enemies/tuno.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# tuno animation
|
||||
tileSetFile: tuno.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1333
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3, 3, 2, 1, 0]
|
||||
10
data/enemies/tv.yaml
Normal file
10
data/enemies/tv.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# tv animation
|
||||
tileSetFile: tv.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 18
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.0833
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
10
data/enemies/tv_panel.yaml
Normal file
10
data/enemies/tv_panel.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# tv_panel animation
|
||||
tileSetFile: tv_panel.gif
|
||||
frameWidth: 24
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.0667
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
10
data/enemies/upv_student.yaml
Normal file
10
data/enemies/upv_student.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# upv_student animation
|
||||
tileSetFile: upv_student.gif
|
||||
frameWidth: 8
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1333
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
10
data/enemies/walking_arounder.yaml
Normal file
10
data/enemies/walking_arounder.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# walking_arounder animation
|
||||
tileSetFile: walking_arounder.gif
|
||||
frameWidth: 5
|
||||
frameHeight: 8
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1
|
||||
loop: 0
|
||||
frames: [0, 1]
|
||||
10
data/enemies/wave.yaml
Normal file
10
data/enemies/wave.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# wave animation
|
||||
tileSetFile: wave.gif
|
||||
frameWidth: 8
|
||||
frameHeight: 8
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1333
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
10
data/enemies/z80.yaml
Normal file
10
data/enemies/z80.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# z80 animation
|
||||
tileSetFile: z80.gif
|
||||
frameWidth: 16
|
||||
frameHeight: 32
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1333
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
20
data/player/player.yaml
Normal file
20
data/player/player.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
# player animation
|
||||
tileSetFile: player.gif
|
||||
frameWidth: 8
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: stand
|
||||
speed: 0.1333
|
||||
loop: 0
|
||||
frames: [0]
|
||||
|
||||
- name: walk
|
||||
speed: 0.1333
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
|
||||
- name: walk_menu
|
||||
speed: 0.0
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
20
data/player/player2.yaml
Normal file
20
data/player/player2.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
# player2 animation
|
||||
tileSetFile: player2.gif
|
||||
frameWidth: 8
|
||||
frameHeight: 16
|
||||
|
||||
animations:
|
||||
- name: stand
|
||||
speed: 0.1333
|
||||
loop: 0
|
||||
frames: [0]
|
||||
|
||||
- name: walk
|
||||
speed: 0.1333
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3, 4, 5, 6, 7]
|
||||
|
||||
- name: walk_menu
|
||||
speed: 0.0
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3, 4, 5, 6, 7]
|
||||
10
data/player/player_game_over.yaml
Normal file
10
data/player/player_game_over.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# player_game_over animation
|
||||
tileSetFile: player_game_over.gif
|
||||
frameWidth: 19
|
||||
frameHeight: 18
|
||||
|
||||
animations:
|
||||
- name: default
|
||||
speed: 0.1
|
||||
loop: 0
|
||||
frames: [0, 1, 2, 3]
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <stdexcept> // Para runtime_error
|
||||
#include <utility>
|
||||
|
||||
#include "external/fkyaml_node.hpp" // Para fkyaml::node
|
||||
#include "core/rendering/surface.hpp" // Para Surface
|
||||
#include "core/resources/resource_cache.hpp" // Para Resource
|
||||
#include "core/resources/resource_helper.hpp" // Para ResourceHelper
|
||||
@@ -42,12 +43,136 @@ auto SurfaceAnimatedSprite::loadAnimationsFromFile(const std::string& file_path)
|
||||
return buffer;
|
||||
}
|
||||
|
||||
// Helper: Convierte un nodo YAML de frames (array) a vector de SDL_FRect
|
||||
auto convertYAMLFramesToRects(const fkyaml::node& frames_node, float frame_width, float frame_height, int frames_per_row, int max_tiles) -> std::vector<SDL_FRect> {
|
||||
std::vector<SDL_FRect> frames;
|
||||
SDL_FRect rect = {0.0F, 0.0F, frame_width, frame_height};
|
||||
|
||||
for (const auto& frame_index_node : frames_node) {
|
||||
const int NUM_TILE = frame_index_node.get_value<int>();
|
||||
if (NUM_TILE <= max_tiles) {
|
||||
rect.x = (NUM_TILE % frames_per_row) * frame_width;
|
||||
rect.y = (NUM_TILE / frames_per_row) * frame_height;
|
||||
frames.emplace_back(rect);
|
||||
}
|
||||
}
|
||||
|
||||
return frames;
|
||||
}
|
||||
|
||||
// Carga las animaciones desde un fichero YAML
|
||||
auto SurfaceAnimatedSprite::loadAnimationsFromYAML(const std::string& file_path, std::shared_ptr<Surface>& surface, float& frame_width, float& frame_height) -> std::vector<AnimationData> {
|
||||
std::vector<AnimationData> animations;
|
||||
|
||||
// Extract filename for logging
|
||||
const std::string FILE_NAME = file_path.substr(file_path.find_last_of("\\/") + 1);
|
||||
|
||||
try {
|
||||
// Load YAML file using ResourceHelper (supports both filesystem and pack)
|
||||
auto file_data = Resource::Helper::loadFile(file_path);
|
||||
|
||||
if (file_data.empty()) {
|
||||
std::cerr << "Error: Unable to load animation file " << FILE_NAME << '\n';
|
||||
throw std::runtime_error("Animation file not found: " + file_path);
|
||||
}
|
||||
|
||||
printWithDots("Animation : ", FILE_NAME, "[ LOADED ]");
|
||||
|
||||
// Parse YAML from string
|
||||
std::string yaml_content(file_data.begin(), file_data.end());
|
||||
auto yaml = fkyaml::node::deserialize(yaml_content);
|
||||
|
||||
// --- Parse global configuration ---
|
||||
if (yaml.contains("tileSetFile")) {
|
||||
std::string tile_set_file = yaml["tileSetFile"].get_value<std::string>();
|
||||
surface = Resource::Cache::get()->getSurface(tile_set_file);
|
||||
}
|
||||
|
||||
if (yaml.contains("frameWidth")) {
|
||||
frame_width = static_cast<float>(yaml["frameWidth"].get_value<int>());
|
||||
}
|
||||
|
||||
if (yaml.contains("frameHeight")) {
|
||||
frame_height = static_cast<float>(yaml["frameHeight"].get_value<int>());
|
||||
}
|
||||
|
||||
// Calculate sprite sheet parameters
|
||||
int frames_per_row = 1;
|
||||
int max_tiles = 1;
|
||||
if (surface) {
|
||||
frames_per_row = surface->getWidth() / static_cast<int>(frame_width);
|
||||
const int W = surface->getWidth() / static_cast<int>(frame_width);
|
||||
const int H = surface->getHeight() / static_cast<int>(frame_height);
|
||||
max_tiles = W * H;
|
||||
}
|
||||
|
||||
// --- Parse animations array ---
|
||||
if (yaml.contains("animations") && yaml["animations"].is_sequence()) {
|
||||
const auto& animations_node = yaml["animations"];
|
||||
|
||||
for (const auto& anim_node : animations_node) {
|
||||
AnimationData animation;
|
||||
|
||||
// Parse animation name
|
||||
if (anim_node.contains("name")) {
|
||||
animation.name = anim_node["name"].get_value<std::string>();
|
||||
}
|
||||
|
||||
// Parse speed (seconds per frame)
|
||||
if (anim_node.contains("speed")) {
|
||||
animation.speed = anim_node["speed"].get_value<float>();
|
||||
}
|
||||
|
||||
// Parse loop frame index
|
||||
if (anim_node.contains("loop")) {
|
||||
animation.loop = anim_node["loop"].get_value<int>();
|
||||
}
|
||||
|
||||
// Parse frames array
|
||||
if (anim_node.contains("frames") && anim_node["frames"].is_sequence()) {
|
||||
animation.frames = convertYAMLFramesToRects(
|
||||
anim_node["frames"],
|
||||
frame_width,
|
||||
frame_height,
|
||||
frames_per_row,
|
||||
max_tiles
|
||||
);
|
||||
}
|
||||
|
||||
animations.push_back(animation);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (const fkyaml::exception& e) {
|
||||
std::cerr << "YAML parsing error in " << FILE_NAME << ": " << e.what() << '\n';
|
||||
throw;
|
||||
} catch (const std::exception& e) {
|
||||
std::cerr << "Error loading animation " << FILE_NAME << ": " << e.what() << '\n';
|
||||
throw;
|
||||
}
|
||||
|
||||
return animations;
|
||||
}
|
||||
|
||||
// Constructor
|
||||
SurfaceAnimatedSprite::SurfaceAnimatedSprite(const std::string& file_path) {
|
||||
// Carga las animaciones
|
||||
if (!file_path.empty()) {
|
||||
Animations v = SurfaceAnimatedSprite::loadAnimationsFromFile(file_path);
|
||||
setAnimations(v);
|
||||
// Detectar extensión del archivo
|
||||
const bool IS_YAML = file_path.substr(file_path.find_last_of('.') + 1) == "yaml";
|
||||
|
||||
if (IS_YAML) {
|
||||
// Cargar desde YAML (formato nuevo)
|
||||
float frame_width = 1.0F;
|
||||
float frame_height = 1.0F;
|
||||
animations_ = loadAnimationsFromYAML(file_path, surface_, frame_width, frame_height);
|
||||
setWidth(frame_width);
|
||||
setHeight(frame_height);
|
||||
} else {
|
||||
// Cargar desde .ani (formato legacy)
|
||||
Animations v = SurfaceAnimatedSprite::loadAnimationsFromFile(file_path);
|
||||
setAnimations(v);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,8 +188,21 @@ SurfaceAnimatedSprite::SurfaceAnimatedSprite(std::shared_ptr<Surface> surface, c
|
||||
: SurfaceMovingSprite(std::move(surface)) {
|
||||
// Carga las animaciones
|
||||
if (!file_path.empty()) {
|
||||
Animations v = SurfaceAnimatedSprite::loadAnimationsFromFile(file_path);
|
||||
setAnimations(v);
|
||||
// Detectar extensión del archivo
|
||||
const bool IS_YAML = file_path.substr(file_path.find_last_of('.') + 1) == "yaml";
|
||||
|
||||
if (IS_YAML) {
|
||||
// Cargar desde YAML (formato nuevo)
|
||||
float frame_width = 1.0F;
|
||||
float frame_height = 1.0F;
|
||||
animations_ = loadAnimationsFromYAML(file_path, surface_, frame_width, frame_height);
|
||||
setWidth(frame_width);
|
||||
setHeight(frame_height);
|
||||
} else {
|
||||
// Cargar desde .ani (formato legacy)
|
||||
Animations v = SurfaceAnimatedSprite::loadAnimationsFromFile(file_path);
|
||||
setAnimations(v);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,8 +15,20 @@ class SurfaceAnimatedSprite : public SurfaceMovingSprite {
|
||||
public:
|
||||
using Animations = std::vector<std::string>; // Tipo para lista de animaciones
|
||||
|
||||
// Estructura pública de datos de animación
|
||||
struct AnimationData {
|
||||
std::string name{}; // Nombre de la animacion
|
||||
std::vector<SDL_FRect> frames; // Cada uno de los frames que componen la animación
|
||||
float speed{0.083F}; // Velocidad de la animación (segundos por frame)
|
||||
int loop{0}; // Indica a que frame vuelve la animación al terminar. -1 para que no vuelva
|
||||
bool completed{false}; // Indica si ha finalizado la animación
|
||||
int current_frame{0}; // Frame actual
|
||||
float accumulated_time{0.0F}; // Tiempo acumulado para las animaciones (time-based)
|
||||
};
|
||||
|
||||
// Métodos estáticos
|
||||
static auto loadAnimationsFromFile(const std::string& file_path) -> Animations; // Carga las animaciones desde fichero
|
||||
static auto loadAnimationsFromFile(const std::string& file_path) -> Animations; // Carga las animaciones desde fichero .ani
|
||||
static auto loadAnimationsFromYAML(const std::string& file_path, std::shared_ptr<Surface>& surface, float& frame_width, float& frame_height) -> std::vector<AnimationData>; // Carga las animaciones desde fichero .yaml
|
||||
|
||||
// Constructores
|
||||
explicit SurfaceAnimatedSprite(const std::string& file_path);
|
||||
@@ -47,17 +59,6 @@ class SurfaceAnimatedSprite : public SurfaceMovingSprite {
|
||||
void setAnimations(const Animations& animations); // Carga la animación desde un vector de cadenas
|
||||
|
||||
private:
|
||||
// Estructura interna de datos de animación
|
||||
struct AnimationData {
|
||||
std::string name{}; // Nombre de la animacion
|
||||
std::vector<SDL_FRect> frames; // Cada uno de los frames que componen la animación
|
||||
float speed{0.083F}; // Velocidad de la animación (segundos por frame)
|
||||
int loop{0}; // Indica a que frame vuelve la animación al terminar. -1 para que no vuelva
|
||||
bool completed{false}; // Indica si ha finalizado la animación
|
||||
int current_frame{0}; // Frame actual
|
||||
float accumulated_time{0.0F}; // Tiempo acumulado para las animaciones (time-based)
|
||||
};
|
||||
|
||||
// Funciones amigas (helper functions del .cpp)
|
||||
friend void parseAnimationFrames(const std::string& value, AnimationData& animation, float frame_width, float frame_height, int frames_per_row, int max_tiles);
|
||||
friend auto parseAnimationParameter(const std::string& key, const std::string& value, AnimationData& animation, float frame_width, float frame_height, int frames_per_row, int max_tiles) -> bool;
|
||||
|
||||
Reference in New Issue
Block a user