creat project.h

This commit is contained in:
2025-11-27 21:47:08 +01:00
parent 0d69af667d
commit 2b1311042f
18 changed files with 708 additions and 338 deletions

26
source/game/constants.hpp Normal file
View File

@@ -0,0 +1,26 @@
#pragma once
#include "core/defaults.hpp"
// Aliases per a backward compatibility amb codi existent
// Permet usar Constants::MARGE_ESQ en lloc de Defaults::Game::MARGIN_LEFT
namespace Constants {
// Marges de l'àrea de joc
constexpr int MARGE_DALT = Defaults::Game::MARGIN_TOP;
constexpr int MARGE_BAIX = Defaults::Game::MARGIN_BOTTOM;
constexpr int MARGE_ESQ = Defaults::Game::MARGIN_LEFT;
constexpr int MARGE_DRET = Defaults::Game::MARGIN_RIGHT;
// Límits de polígons i objectes
constexpr int MAX_IPUNTS = Defaults::Entities::MAX_IPUNTS;
constexpr int MAX_ORNIS = Defaults::Entities::MAX_ORNIS;
constexpr int MAX_BALES = Defaults::Entities::MAX_BALES;
// Velocitats (valors legacy del codi Pascal)
constexpr int VELOCITAT = static_cast<int>(Defaults::Physics::ENEMY_SPEED);
constexpr int VELOCITAT_MAX = static_cast<int>(Defaults::Physics::BULLET_SPEED);
// Matemàtiques
constexpr float PI = Defaults::Math::PI;
}