diff options
Diffstat (limited to 'src/include/video/trail_geometry.h')
-rw-r--r-- | src/include/video/trail_geometry.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/include/video/trail_geometry.h b/src/include/video/trail_geometry.h new file mode 100644 index 0000000..e6c747b --- /dev/null +++ b/src/include/video/trail_geometry.h @@ -0,0 +1,31 @@ +#ifndef TRAIL_GEOMETRY_H +#define TRAIL_GEOMETRY_H + +#include "video.h" +#include "game/game.h" + +typedef struct { + vec3* pVertices; // each vertex consists of three floats + vec3* pNormals; // each normal consists of three float + vec2* pTexCoords; // each texcoord consists of three float + unsigned short *pIndices; // each triangle consists of three 16bit indices + unsigned char *pColors; // each vertex color consists of 4 bytes + unsigned int iSize; + unsigned int iUsed; +} TrailMesh; + +void storeVertex(TrailMesh *pMesh, int offset, + segment2 *s, float t, float fFloor, float fTop, + float fSegLength, float fTotalLength); +void storeIndices(TrailMesh *pMesh, int indexOffset, int vertexOffset); +void trailGeometry(Player *pPlayer, PlayerVisual *pV, + TrailMesh *pMesh, + int *pVertexOffset, int *pIndexOffset); +void bowGeometry(Player *pPlayer, PlayerVisual *pV, + TrailMesh *pMesh, + int *pVertexOffset, int *pIndexOffset); +void trailRender(TrailMesh *pMesh); +void trailStatesNormal(Player *pPlayer, int texture); +void trailStatesShadowed(void); +void trailStatesRestore(void); +#endif |