migrat a sistema de shapes

This commit is contained in:
2025-11-28 12:29:56 +01:00
parent 06e9a10c98
commit 4d0a5ca5bd
13 changed files with 246 additions and 115 deletions

19
data/shapes/bullet.shp Normal file
View File

@@ -0,0 +1,19 @@
# bullet.shp - Projectil (petit pentàgon)
# © 1999 Visente i Sergi (versió Pascal)
# © 2025 Port a C++20 amb SDL3
name: bullet
scale: 1.0
center: 0, 0
# Pentàgon petit radi=5 (1/4 del enemic)
# Pentàgon regular amb 72° entre punts
#
# Conversió polar→cartesià (radi=5, SDL: Y creix cap avall):
# angle=-90°: (0.00, -5.00)
# angle=-18°: (4.76, -1.55)
# angle=54°: (2.94, 4.05)
# angle=126°: (-2.94, 4.05)
# angle=198°: (-4.76, -1.55)
polyline: 0,-5 4.76,-1.55 2.94,4.05 -2.94,4.05 -4.76,-1.55 0,-5

View File

@@ -0,0 +1,21 @@
# enemy_pentagon.shp - ORNI enemic (pentàgon regular)
# © 1999 Visente i Sergi (versió Pascal)
# © 2025 Port a C++20 amb SDL3
name: enemy_pentagon
scale: 1.0
center: 0, 0
# Pentàgon regular radi=20
# 5 punts equidistants al voltant d'un cercle (72° entre ells)
# Començant a angle=-90° (amunt), rotant sentit antihorari
#
# Angles: -90°, -18°, 54°, 126°, 198°
# Conversió polar→cartesià (SDL: Y creix cap avall):
# angle=-90°: (0.00, -20.00)
# angle=-18°: (19.02, -6.18)
# angle=54°: (11.76, 16.18)
# angle=126°: (-11.76, 16.18)
# angle=198°: (-19.02, -6.18)
polyline: 0,-20 19.02,-6.18 11.76,16.18 -11.76,16.18 -19.02,-6.18 0,-20

20
data/shapes/ship.shp Normal file
View File

@@ -0,0 +1,20 @@
# ship.shp - Nau del jugador (triangle)
# © 1999 Visente i Sergi (versió Pascal)
# © 2025 Port a C++20 amb SDL3
name: ship
scale: 1.0
center: 0, 0
# Triangle: punta amunt, base avall
# Punts originals (polar):
# p1: r=12, angle=270° (3π/2) → punta amunt
# p2: r=12, angle=45° (π/4) → base dreta-darrere
# p3: r=12, angle=135° (3π/4) → base esquerra-darrere
#
# Conversió polar→cartesià (angle-90° perquè origen visual és amunt):
# p1: (0, -12)
# p2: (8.49, 8.49)
# p3: (-8.49, 8.49)
polyline: 0,-12 8.49,8.49 -8.49,8.49 0,-12