From abef6da56913f1c55528103e60a50451a39628b1 Mon Sep 17 00:00:00 2001 From: WlodekM Date: Sun, 16 Jun 2024 10:35:45 +0300 Subject: initial commit --- src/Drawer.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/Drawer.h (limited to 'src/Drawer.h') diff --git a/src/Drawer.h b/src/Drawer.h new file mode 100644 index 0000000..cbc2a17 --- /dev/null +++ b/src/Drawer.h @@ -0,0 +1,38 @@ +#ifndef CC_DRAWER_H +#define CC_DRAWER_H +#include "PackedCol.h" +#include "Vectors.h" +/* +Draws the vertices for a cuboid region +Copyright 2014-2023 ClassiCube | Licensed under BSD-3 +*/ +struct VertexTextured; + +CC_VAR extern struct _DrawerData { + /* Whether a colour tinting effect should be applied to all faces. */ + cc_bool Tinted; + /* The colour to multiply colour of faces by (tinting effect). */ + PackedCol TintCol; + /* Minimum corner of base block bounding box. (For texture UV) */ + Vec3 MinBB; + /* Maximum corner of base block bounding box. (For texture UV) */ + Vec3 MaxBB; + /* Coordinate of minimum block bounding box corner in the world. */ + float X1, Y1, Z1; + /* Coordinate of maximum block bounding box corner in the world. */ + float X2, Y2, Z2; +} Drawer; + +/* Draws minimum X face of the cuboid. (i.e. at X1) */ +CC_API void Drawer_XMin(int count, PackedCol col, TextureLoc texLoc, struct VertexTextured** vertices); +/* Draws maximum X face of the cuboid. (i.e. at X2) */ +CC_API void Drawer_XMax(int count, PackedCol col, TextureLoc texLoc, struct VertexTextured** vertices); +/* Draws minimum Z face of the cuboid. (i.e. at Z1) */ +CC_API void Drawer_ZMin(int count, PackedCol col, TextureLoc texLoc, struct VertexTextured** vertices); +/* Draws maximum Z face of the cuboid. (i.e. at Z2) */ +CC_API void Drawer_ZMax(int count, PackedCol col, TextureLoc texLoc, struct VertexTextured** vertices); +/* Draws minimum Y face of the cuboid. (i.e. at Y1) */ +CC_API void Drawer_YMin(int count, PackedCol col, TextureLoc texLoc, struct VertexTextured** vertices); +/* Draws maximum Y face of the cuboid. (i.e. at Y2) */ +CC_API void Drawer_YMax(int count, PackedCol col, TextureLoc texLoc, struct VertexTextured** vertices); +#endif -- cgit 1.4.1-2-gfad0