summaryrefslogtreecommitdiff
path: root/src/kshape.h
diff options
context:
space:
mode:
authorSteven Fuller <relnev@icculus.org>2001-07-01 00:55:22 +0000
committerPatryk Obara <dreamer.tan@gmail.com>2019-08-20 02:09:04 +0200
commit2186d5f3f95cd74a070a490d899291648d58667a (patch)
tree55241a1afa3e1a22e0b6593a8dead0b703800f44 /src/kshape.h
parent218ca90543758a20ac326e444ca0643174ca7384 (diff)
Initial revision
Diffstat (limited to 'src/kshape.h')
-rw-r--r--src/kshape.h134
1 files changed, 134 insertions, 0 deletions
diff --git a/src/kshape.h b/src/kshape.h
new file mode 100644
index 0000000..9282ccd
--- /dev/null
+++ b/src/kshape.h
@@ -0,0 +1,134 @@
+#ifndef _kshape_h_ /* Is this your first time? */
+#define _kshape_h_ 1
+
+#include "particle.h"
+
+#define SOFTWARE_RENDERER 0
+
+#if SOFTWARE_RENDERER
+#include "SoftwareRender.hpp"
+#endif
+
+
+typedef struct
+{
+ /* base coords */
+ int X;
+ int Y;
+ int Z;
+
+ /* texels and intensity */
+ int U;
+ int V;
+
+ /* coloured components */
+ unsigned char R;
+ unsigned char G;
+ unsigned char B;
+
+ /* alpha component */
+ unsigned char A;
+
+ /* specular colour */
+ unsigned char SpecularR;
+ unsigned char SpecularG;
+ unsigned char SpecularB;
+
+ /* fog component */
+ unsigned char Fog;
+
+
+} RENDERVERTEX;
+
+typedef struct
+{
+ /* stamp used for lazy evaluation */
+ int Stamp;
+
+ /* colour scalings */
+ unsigned char R;
+ unsigned char G;
+ unsigned char B;
+
+ /* specular colour */
+ unsigned char SpecularR;
+ unsigned char SpecularG;
+ unsigned char SpecularB;
+
+ /* fog component */
+ unsigned char Fog;
+
+} COLOURINTENSITIES;
+
+
+typedef struct
+{
+ RENDERVERTEX Vertices[maxpolypts];
+
+ unsigned int NumberOfVertices;
+
+ unsigned int MinZ;
+ unsigned int MaxZ;
+
+ int ImageIndex;
+
+ unsigned char IsTextured :1;
+ unsigned char IsLit :1;
+ unsigned char IsSpecularLit :1;
+ enum TRANSLUCENCY_TYPE TranslucencyMode;
+
+} RENDERPOLYGON;
+
+extern RENDERVERTEX VerticesBuffer[9];
+extern RENDERPOLYGON RenderPolygon;
+
+
+
+
+enum LIGHTING_MODEL_ID
+{
+ LIGHTING_MODEL_STANDARD,
+ LIGHTING_MODEL_HIERARCHICAL,
+ LIGHTING_MODEL_PRELIT,
+};
+
+
+
+extern void InitialiseLightIntensityStamps(void);
+
+extern int FindHeatSourcesInHModel(DISPLAYBLOCK *dispPtr);
+
+
+extern void TranslationSetup(void);
+extern void TranslatePointIntoViewspace(VECTORCH *pointPtr);
+
+
+extern void CheckRenderStatesForModule(MODULE *modulePtr);
+
+
+
+extern void RenderDecal(DECAL *decalPtr);
+extern void RenderParticle(PARTICLE *particlePtr);
+
+/* KJL 10:25:44 7/23/97 - this offset is used to push back the normal game gfx,
+so that the HUD can be drawn over the top without sinking into walls, etc. */
+extern int HeadUpDisplayZOffset;
+
+/* KJL 16:17:13 11/02/98 - heat source containment */
+typedef struct
+{
+ VECTORCH Position;
+} HEATSOURCE;
+
+#define MAX_NUMBER_OF_HEAT_SOURCES 10
+extern HEATSOURCE HeatSourceList[];
+extern int NumberOfHeatSources;
+
+#define MIRRORING_ON 1
+
+#if MIRRORING_ON
+extern int MirroringActive;
+extern int MirroringAxis;
+#endif
+
+#endif \ No newline at end of file