From 297232d21594b138bb368a42b5b0d085ff9ed6aa Mon Sep 17 00:00:00 2001 From: rtk0c Date: Thu, 19 Oct 2023 22:50:07 -0700 Subject: The great renaming: switch to "module style" --- source/30-game/CommonVertexIndex.hpp | 77 ------------------------------------ 1 file changed, 77 deletions(-) delete mode 100644 source/30-game/CommonVertexIndex.hpp (limited to 'source/30-game/CommonVertexIndex.hpp') diff --git a/source/30-game/CommonVertexIndex.hpp b/source/30-game/CommonVertexIndex.hpp deleted file mode 100644 index 7e6aa66..0000000 --- a/source/30-game/CommonVertexIndex.hpp +++ /dev/null @@ -1,77 +0,0 @@ -#pragma once - -#include "Color.hpp" -#include "RcPtr.hpp" -#include "Rect.hpp" -#include "Texture.hpp" -#include "VertexIndex.hpp" - -#include - -// Initialized in main() -inline RcPtr gVformatStandard{}; -inline RcPtr gVformatStandardSplit{}; -inline RcPtr gVformatLines{}; - -// Suffixes: -// - _P_osition -// - _T_exture coordiantes -// - _C_olor -// - _N_ormal -// When an number is attached to some suffix, it means there are N number of this element - -struct Index_U16 { - uint16_t value; - - static void Assign(uint16_t indices[6], uint16_t startIdx); - static void Assign(uint16_t indices[6], uint16_t startIdx, uint16_t topLeft, uint16_t topRight, uint16_t bottomRight, uint16_t bottomLeft); - static void Assign(uint16_t indices[6], uint16_t topLeft, uint16_t topRight, uint16_t bottomRight, uint16_t bottomLeft); -}; - -struct Index_U32 { - uint32_t value; - - static void Assign(uint32_t indices[6], uint32_t startIdx); - static void Assign(uint32_t indices[6], uint32_t startIdx, uint32_t topLeft, uint32_t topRight, uint32_t bottomRight, uint32_t bottomLeft); - static void Assign(uint32_t indices[6], uint32_t topLeft, uint32_t topRight, uint32_t bottomRight, uint32_t bottomLeft); -}; - -struct Vertex_PC { - float x, y, z; - uint8_t r, g, b, a; - - /// Assumes the 4 vertices come in TL, TR, BR, BL order. - static void Assign(Vertex_PC vertices[4], const Rect& rect); - /// Assign position in regular cartesian coordinate space (x increases from left to right, y increases from top to bottom). - /// Assumes the 4 vertices come in TL, TR, BR, BL order. - static void Assign(Vertex_PC vertices[4], glm::vec2 bottomLeft, glm::vec2 topRight); - /// Assumes the 4 vertices come in TL, TR, BR, BL order. - static void Assign(Vertex_PC vertices[4], float z); - /// Assumes the 4 vertices come in TL, TR, BR, BL order. - static void Assign(Vertex_PC vertices[4], RgbaColor color); -}; - -struct Vertex_PTC { - float x, y, z; - float u, v; - uint8_t r, g, b, a; - - /// Assumes the 4 vertices come in TL, TR, BR, BL order. - static void Assign(Vertex_PTC vertices[4], const Rect& rect); - /// Assign position in regular cartesian coordinate space (x increases from left to right, y increases from top to bottom). - /// Assumes the 4 vertices come in TL, TR, BR, BL order. - static void Assign(Vertex_PTC vertices[4], glm::vec2 bottomLeft, glm::vec2 topRight); - /// Assumes the 4 vertices come in TL, TR, BR, BL order. - static void Assign(Vertex_PTC vertices[4], float z); - /// Assumes the 4 vertices come in TL, TR, BR, BL order. - static void Assign(Vertex_PTC vertices[4], const Subregion& uvs); - /// Assumes the 4 vertices come in TL, TR, BR, BL order. - static void Assign(Vertex_PTC vertices[4], RgbaColor color); -}; - -struct Vertex_PTNC { - float x, y, z; - float nx, ny, nz; - float u, v; - uint8_t r, g, b, a; -}; -- cgit v1.2.3-70-g09d2