el marcador fake ja es pinta correctament
This commit is contained in:
@@ -7,10 +7,12 @@
|
||||
|
||||
namespace Constants {
|
||||
// Marges de l'àrea de joc (derivats de Defaults::Zones::GAME)
|
||||
constexpr int MARGE_ESQ = static_cast<int>(Defaults::Zones::GAME.x);
|
||||
constexpr int MARGE_DRET = static_cast<int>(Defaults::Zones::GAME.x + Defaults::Zones::GAME.w);
|
||||
constexpr int MARGE_DALT = static_cast<int>(Defaults::Zones::GAME.y);
|
||||
constexpr int MARGE_BAIX = static_cast<int>(Defaults::Zones::GAME.y + Defaults::Zones::GAME.h);
|
||||
constexpr int MARGE_ESQ = static_cast<int>(Defaults::Zones::PLAYAREA.x);
|
||||
constexpr int MARGE_DRET =
|
||||
static_cast<int>(Defaults::Zones::PLAYAREA.x + Defaults::Zones::PLAYAREA.w);
|
||||
constexpr int MARGE_DALT = static_cast<int>(Defaults::Zones::PLAYAREA.y);
|
||||
constexpr int MARGE_BAIX =
|
||||
static_cast<int>(Defaults::Zones::PLAYAREA.y + Defaults::Zones::PLAYAREA.h);
|
||||
|
||||
// Límits de polígons i objectes
|
||||
constexpr int MAX_IPUNTS = Defaults::Entities::MAX_IPUNTS;
|
||||
@@ -27,11 +29,12 @@ constexpr float PI = Defaults::Math::PI;
|
||||
// Helpers per comprovar límits de zona
|
||||
inline bool dins_zona_joc(float x, float y) {
|
||||
const SDL_FPoint punt = {x, y};
|
||||
return SDL_PointInRectFloat(&punt, &Defaults::Zones::GAME);
|
||||
return SDL_PointInRectFloat(&punt, &Defaults::Zones::PLAYAREA);
|
||||
}
|
||||
|
||||
inline void obtenir_limits_zona(float& min_x, float& max_x, float& min_y, float& max_y) {
|
||||
const auto& zona = Defaults::Zones::GAME;
|
||||
inline void obtenir_limits_zona(float &min_x, float &max_x, float &min_y,
|
||||
float &max_y) {
|
||||
const auto &zona = Defaults::Zones::PLAYAREA;
|
||||
min_x = zona.x;
|
||||
max_x = zona.x + zona.w;
|
||||
min_y = zona.y;
|
||||
|
||||
Reference in New Issue
Block a user