afegit segon jugador
This commit is contained in:
@@ -138,6 +138,11 @@ constexpr float INIT_HUD_SHIP_RATIO = 1.0f; // Proporción animación nave
|
||||
|
||||
// Posición inicial de la nave en INIT_HUD (75% de altura de zona de juego)
|
||||
constexpr float INIT_HUD_SHIP_START_Y_RATIO = 0.75f; // 75% desde el top de PLAYAREA
|
||||
|
||||
// Spawn positions (distribución horizontal para 2 jugadores)
|
||||
constexpr float P1_SPAWN_X_RATIO = 0.33f; // 33% desde izquierda
|
||||
constexpr float P2_SPAWN_X_RATIO = 0.67f; // 67% desde izquierda
|
||||
constexpr float SPAWN_Y_RATIO = 0.75f; // 75% desde arriba
|
||||
} // namespace Game
|
||||
|
||||
// Física (valores actuales del juego, sincronizados con joc_asteroides.cpp)
|
||||
@@ -245,6 +250,23 @@ constexpr const char* LOGO = "effects/logo.wav"; //
|
||||
constexpr const char* GOOD_JOB_COMMANDER = "voices/good_job_commander.wav"; // Voz: "Good job, commander"
|
||||
} // namespace Sound
|
||||
|
||||
// Controls (mapeo de teclas para los jugadores)
|
||||
namespace Controls {
|
||||
namespace P1 {
|
||||
constexpr SDL_Scancode ROTATE_RIGHT = SDL_SCANCODE_RIGHT;
|
||||
constexpr SDL_Scancode ROTATE_LEFT = SDL_SCANCODE_LEFT;
|
||||
constexpr SDL_Scancode THRUST = SDL_SCANCODE_UP;
|
||||
constexpr SDL_Keycode SHOOT = SDLK_SPACE;
|
||||
} // namespace P1
|
||||
|
||||
namespace P2 {
|
||||
constexpr SDL_Scancode ROTATE_RIGHT = SDL_SCANCODE_D;
|
||||
constexpr SDL_Scancode ROTATE_LEFT = SDL_SCANCODE_A;
|
||||
constexpr SDL_Scancode THRUST = SDL_SCANCODE_W;
|
||||
constexpr SDL_Keycode SHOOT = SDLK_LSHIFT;
|
||||
} // namespace P2
|
||||
} // namespace Controls
|
||||
|
||||
// Enemy type configuration (tipus d'enemics)
|
||||
namespace Enemies {
|
||||
// Pentagon (esquivador - zigzag evasion)
|
||||
|
||||
Reference in New Issue
Block a user