fix: tidy namespace Scenes::/Info:: PascalCase i locals UPPER_CASE
This commit is contained in:
@@ -906,8 +906,8 @@ namespace Rendering {
|
||||
|
||||
// ---- Calcular viewport (dimensions lògiques del canvas) ----
|
||||
// Si 4:3 actiu, effective_height ja és 240 (la textura estirada)
|
||||
const auto logical_w = static_cast<float>(game_width_);
|
||||
const auto logical_h = static_cast<float>(effective_height);
|
||||
const auto LOGICAL_W = static_cast<float>(game_width_);
|
||||
const auto LOGICAL_H = static_cast<float>(effective_height);
|
||||
|
||||
float vx = 0.0F;
|
||||
float vy = 0.0F;
|
||||
@@ -916,8 +916,8 @@ namespace Rendering {
|
||||
switch (scaling_mode_) {
|
||||
case Options::ScalingMode::DISABLED:
|
||||
// 1:1, sense escala (pot ser diminut en finestres grans)
|
||||
vw = logical_w;
|
||||
vh = logical_h;
|
||||
vw = LOGICAL_W;
|
||||
vh = LOGICAL_H;
|
||||
break;
|
||||
case Options::ScalingMode::STRETCH:
|
||||
// Omple tota la finestra, escala no uniforme
|
||||
@@ -925,23 +925,23 @@ namespace Rendering {
|
||||
vh = static_cast<float>(sh);
|
||||
break;
|
||||
case Options::ScalingMode::LETTERBOX: {
|
||||
const float SCALE = std::min(static_cast<float>(sw) / logical_w,
|
||||
static_cast<float>(sh) / logical_h);
|
||||
vw = logical_w * SCALE;
|
||||
vh = logical_h * SCALE;
|
||||
const float SCALE = std::min(static_cast<float>(sw) / LOGICAL_W,
|
||||
static_cast<float>(sh) / LOGICAL_H);
|
||||
vw = LOGICAL_W * SCALE;
|
||||
vh = LOGICAL_H * SCALE;
|
||||
break;
|
||||
}
|
||||
case Options::ScalingMode::OVERSCAN: {
|
||||
const float SCALE = std::max(static_cast<float>(sw) / logical_w,
|
||||
static_cast<float>(sh) / logical_h);
|
||||
vw = logical_w * SCALE;
|
||||
vh = logical_h * SCALE;
|
||||
const float SCALE = std::max(static_cast<float>(sw) / LOGICAL_W,
|
||||
static_cast<float>(sh) / LOGICAL_H);
|
||||
vw = LOGICAL_W * SCALE;
|
||||
vh = LOGICAL_H * SCALE;
|
||||
break;
|
||||
}
|
||||
case Options::ScalingMode::INTEGER: {
|
||||
const int SCALE = std::max(1, std::min(static_cast<int>(sw) / static_cast<int>(logical_w), static_cast<int>(sh) / static_cast<int>(logical_h)));
|
||||
vw = logical_w * static_cast<float>(SCALE);
|
||||
vh = logical_h * static_cast<float>(SCALE);
|
||||
const int SCALE = std::max(1, std::min(static_cast<int>(sw) / static_cast<int>(LOGICAL_W), static_cast<int>(sh) / static_cast<int>(LOGICAL_H)));
|
||||
vw = LOGICAL_W * static_cast<float>(SCALE);
|
||||
vh = LOGICAL_H * static_cast<float>(SCALE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user