aboutsummaryrefslogtreecommitdiff
path: root/source/30-game/CommonVertexIndex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/30-game/CommonVertexIndex.cpp')
-rw-r--r--source/30-game/CommonVertexIndex.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/30-game/CommonVertexIndex.cpp b/source/30-game/CommonVertexIndex.cpp
index 786274e..e9a3ce6 100644
--- a/source/30-game/CommonVertexIndex.cpp
+++ b/source/30-game/CommonVertexIndex.cpp
@@ -1,6 +1,6 @@
#include "CommonVertexIndex.hpp"
-template <class TNumber>
+template <typename TNumber>
static void AssignIndices(TNumber indices[6], TNumber startIdx) {
// Triangle #1
indices[0] = startIdx + 1; // Top right
@@ -12,7 +12,7 @@ static void AssignIndices(TNumber indices[6], TNumber startIdx) {
indices[5] = startIdx + 2; // Bottom right
}
-template <class TNumber>
+template <typename TNumber>
static void AssignIndices(TNumber indices[6], TNumber topLeft, TNumber topRight, TNumber bottomRight, TNumber bottomLeft) {
// Triangle #1
indices[0] = topRight;
@@ -24,7 +24,7 @@ static void AssignIndices(TNumber indices[6], TNumber topLeft, TNumber topRight,
indices[5] = bottomRight;
}
-template <class TVertex>
+template <typename TVertex>
static void AssignPositions(TVertex vertices[4], const Rect<float>& rect) {
// Top left
vertices[0].x = rect.x0();
@@ -40,7 +40,7 @@ static void AssignPositions(TVertex vertices[4], const Rect<float>& rect) {
vertices[3].y = rect.y1();
}
-template <class TVertex>
+template <typename TVertex>
static void AssignPositions(TVertex vertices[4], glm::vec2 bl, glm::vec2 tr) {
// Top left
vertices[0].x = bl.x;
@@ -56,7 +56,7 @@ static void AssignPositions(TVertex vertices[4], glm::vec2 bl, glm::vec2 tr) {
vertices[3].y = bl.y;
}
-template <class TVertex>
+template <typename TVertex>
static void AssignDepths(TVertex vertices[4], float z) {
for (int i = 0; i < 4; ++i) {
auto& vert = vertices[i];
@@ -64,7 +64,7 @@ static void AssignDepths(TVertex vertices[4], float z) {
}
}
-template <class TVertex>
+template <typename TVertex>
static void AssignTexCoords(TVertex vertices[4], const Subregion& texcoords) {
// Top left
vertices[0].u = texcoords.u0;
@@ -80,7 +80,7 @@ static void AssignTexCoords(TVertex vertices[4], const Subregion& texcoords) {
vertices[3].v = texcoords.v0;
}
-template <class TVertex>
+template <typename TVertex>
static void AssignColors(TVertex vertices[4], RgbaColor color) {
for (int i = 0; i < 4; ++i) {
auto& vert = vertices[i];