diff --git a/data/shapes/bullet.shp b/data/shapes/bullet.shp index cf8ac3b..1b3a353 100644 --- a/data/shapes/bullet.shp +++ b/data/shapes/bullet.shp @@ -6,14 +6,18 @@ name: bullet scale: 1.0 center: 0, 0 -# Pentàgon petit radi=5 (1/4 del enemic) -# Pentàgon regular amb 72° entre punts +# Cercle (octàgon regular radi=3) +# 8 punts equidistants (45° entre ells) per aproximar un cercle +# Començant a angle=-90° (amunt), rotant sentit horari # -# 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) +# Conversió polar→cartesià (radi=3, SDL: Y creix cap avall): +# angle=-90°: (0.00, -3.00) +# angle=-45°: (2.12, -2.12) +# angle=0°: (3.00, 0.00) +# angle=45°: (2.12, 2.12) +# angle=90°: (0.00, 3.00) +# angle=135°: (-2.12, 2.12) +# angle=180°: (-3.00, 0.00) +# angle=225°: (-2.12, -2.12) -polyline: 0,-5 4.76,-1.55 2.94,4.05 -2.94,4.05 -4.76,-1.55 0,-5 +polyline: 0,-3 2.12,-2.12 3,0 2.12,2.12 0,3 -2.12,2.12 -3,0 -2.12,-2.12 0,-3 diff --git a/source/core/defaults.hpp b/source/core/defaults.hpp index bbba5ca..695196f 100644 --- a/source/core/defaults.hpp +++ b/source/core/defaults.hpp @@ -70,7 +70,7 @@ constexpr int MAX_IPUNTS = 30; constexpr float SHIP_RADIUS = 12.0f; constexpr float ENEMY_RADIUS = 20.0f; -constexpr float BULLET_RADIUS = 5.0f; +constexpr float BULLET_RADIUS = 3.0f; } // namespace Entities // Game rules (lives, respawn, game over) @@ -144,7 +144,7 @@ namespace Brightness { // Brillantor estàtica per entitats de joc (0.0-1.0) constexpr float NAU = 1.0f; // Màxima visibilitat (jugador) constexpr float ENEMIC = 0.7f; // 30% més tènue (destaca menys) -constexpr float BALA = 0.9f; // Destacada però menys que nau +constexpr float BALA = 1.0f; // Brillo a tope (màxima visibilitat) // Starfield: gradient segons distància al centre // distancia_centre: 0.0 (centre) → 1.0 (vora pantalla) diff --git a/source/game/entities/bala.cpp b/source/game/entities/bala.cpp index 40e877e..bcd955f 100644 --- a/source/game/entities/bala.cpp +++ b/source/game/entities/bala.cpp @@ -67,8 +67,8 @@ void Bala::actualitzar(float delta_time) { void Bala::dibuixar() const { if (esta_ && forma_) { // [NUEVO] Usar render_shape en lloc de rota_pol - // Les bales no roten visualment (angle sempre 0.0f) - Rendering::render_shape(renderer_, forma_, centre_, 0.0f, 1.0f, true, 1.0f, brightness_); + // Les bales roten segons l'angle de trajectòria + Rendering::render_shape(renderer_, forma_, centre_, angle_, 1.0f, true, 1.0f, brightness_); } }