summary refs log tree commit diff
path: root/src/Models.h
diff options
context:
space:
mode:
authorNguyễn Gia Phong <cnx@loang.net>2023-08-24 04:21:46 +0900
committerNguyễn Gia Phong <cnx@loang.net>2023-08-24 04:30:20 +0900
commitefd25d51cdd7a9cadda1c0f6983905fc17545f14 (patch)
tree8dea973669d8dfe4e7209c9f419bf8cbbf483323 /src/Models.h
parent2598835c54a3869a477d287d2845bbe42790a359 (diff)
downloadblackshades-2.5.1.tar.gz
Fix decal fading animation 2.5.1
Also fix missing decal regression.

Fixes: 48417e11854f8 ("Make XYZ C-compatible")
Diffstat (limited to 'src/Models.h')
-rw-r--r--src/Models.h25
1 files changed, 7 insertions, 18 deletions
diff --git a/src/Models.h b/src/Models.h
index 5c27d6f..7929887 100644
--- a/src/Models.h
+++ b/src/Models.h
@@ -1,36 +1,25 @@
 #ifndef _MODELS_H_
 #define _MODELS_H_
 
-/**> Model Loading <**/
-//
-// Model Maximums
-//
 #include <GL/gl.h>
 
 #include "Quaternions.h"
 #include "Constants.h"
 
-#define max_textured_triangle		400		// maximum number of texture-filled triangles in a model
-#define max_model_vertex			max_textured_triangle*3		// maximum number of vertexs
+#define MAX_TEXTURED_TRIANGLES 400
 
-//
-// Model Structures
-//
-
-class TexturedTriangle{
-public:
+struct TexturedTriangle {
 	short vertex[3];
 	float r,g,b;
 };
 
-class Model{
-public:
+struct Model {
 	short vertexNum, TriangleNum;
 
-	XYZ vertex[max_model_vertex];
-	XYZ normals[max_textured_triangle];
-	TexturedTriangle Triangles[max_textured_triangle];
-	GLfloat vArray[max_textured_triangle*27];
+	XYZ vertex[MAX_TEXTURED_TRIANGLES * 3];
+	XYZ normals[MAX_TEXTURED_TRIANGLES];
+	TexturedTriangle Triangles[MAX_TEXTURED_TRIANGLES];
+	GLfloat vArray[MAX_TEXTURED_TRIANGLES * 27];
 
 	XYZ boundingspherecenter;
 	float boundingsphereradius;