summaryrefslogtreecommitdiff
path: root/game
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-12-30 13:30:48 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2024-12-30 13:30:48 +0000
commiteb4b851381453c1f60ccb56e966ca4e7b8e80b97 (patch)
tree776159306d55037eb49f3c8adf65dc7e0a584f70 /game
parentUpdate rails render for being atop a surface (diff)
downloadilt-eb4b851381453c1f60ccb56e966ca4e7b8e80b97.tar.bz2
ilt-eb4b851381453c1f60ccb56e966ca4e7b8e80b97.tar.xz
ilt-eb4b851381453c1f60ccb56e966ca4e7b8e80b97.zip
Fix naming style of getSurface
Diffstat (limited to 'game')
-rw-r--r--game/geoData.h4
-rw-r--r--game/terrain.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/game/geoData.h b/game/geoData.h
index 92b9b75..b3ef22a 100644
--- a/game/geoData.h
+++ b/game/geoData.h
@@ -94,9 +94,9 @@ public:
template<typename HandleT>
[[nodiscard]] auto
- get_surface(const HandleT h)
+ getSurface(const HandleT handle) const
{
- return property(surface, h);
+ return property(surface, handle);
}
void sanityCheck() const;
diff --git a/game/terrain.cpp b/game/terrain.cpp
index e7508d0..39aa99a 100644
--- a/game/terrain.cpp
+++ b/game/terrain.cpp
@@ -43,7 +43,7 @@ Terrain::generateMeshes()
[this, &vertexIndex, &vertices](const GeoData::VertexHandle v) {
std::for_each(geoData->vf_begin(v), geoData->vf_end(v),
[&vertexIndex, v, this, &vertices](const GeoData::FaceHandle f) {
- const auto surface = geoData->get_surface(f);
+ const auto surface = geoData->getSurface(f);
if (const auto vertexIndexRef = vertexIndex.emplace(std::make_pair(v, surface), 0);
vertexIndexRef.second) {
vertexIndexRef.first->second = vertices.size();
@@ -57,7 +57,7 @@ Terrain::generateMeshes()
geoData->faces_sbegin(), geoData->faces_end(), [this, &vertexIndex, &indices](const GeoData::FaceHandle f) {
std::transform(geoData->fv_begin(f), geoData->fv_end(f), std::back_inserter(indices),
[&vertexIndex, f, this](const GeoData::VertexHandle v) {
- return vertexIndex[std::make_pair(v, geoData->get_surface(f))];
+ return vertexIndex[std::make_pair(v, geoData->getSurface(f))];
});
});
meshes.create<MeshT<Vertex>>(vertices, indices);