Implement playable Mac client and rendering validation

This commit is contained in:
shen
2026-09-11 14:58:22 +08:00
parent 1ab68bd06e
commit 374d4165d8
233 changed files with 6546 additions and 284 deletions
+12
View File
@@ -0,0 +1,12 @@
#pragma once
#include <cmath>
namespace mtgodot {
// 40250 MapOutdoor.cpp / AreaTerrain.cpp. Arguments in scaled centimetres.
inline float water_depth_alpha(double depth_cm, double height_scale) {
if (!std::isfinite(depth_cm) || !std::isfinite(height_scale) ||
height_scale <= 0.0 || depth_cm <= 0.0) return 0.0f;
double alpha = depth_cm / (400.0 * height_scale);
return static_cast<float>(alpha > 0.8 ? 0.8 : alpha);
}
}