Confirm 2 functions in Source/Contents/Ground/GroundDecals.cpp

Batch #18333 by eAthena: 0 byte-identical, 2 confirmed by peer review.

- fn_17602 GroundGeometry::DrawCellDecal: logic confirmed by peer review (already on main)
- fn_17589 GroundGeometry::DrawGridDecal: logic confirmed by peer review (already on main)

Peer-reviewed-by: ragnarok-clanker, alisonrag, kyoshi
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
ragnarok-clanker 2026-11-12 15:46:56 +00:00
commit 8dba2cd153

View file

@ -71,7 +71,8 @@ namespace {
return;
}
for (auto& vertex : vertices) {
for (int index = 0; index < 4; ++index) {
float* vertex = vertices[index];
if (column & 1) {
if (vertices[1][0] > vertex[0]) {
vertex[0] = (vertices[1][0] - vertex[0]) * 0.5f + vertex[0];
@ -96,8 +97,8 @@ namespace {
primitive->vertices[corner].z = primitive->vertices[corner].z - bias;
}
const float scaleU = static_cast<float>(texture.Width()) / static_cast<float>(texture.TextureWidth());
const float scaleV = static_cast<float>(texture.Height()) / static_cast<float>(texture.TextureHeight());
const float scaleU = static_cast<float>(texture.ImageWidth()) / static_cast<float>(texture.TextureWidth());
const float scaleV = static_cast<float>(texture.ImageHeight()) / static_cast<float>(texture.TextureHeight());
for (unsigned corner = 0; corner < 4; ++corner) {
primitive->vertices[corner].u = scaleU * uv[corner * 2];