diff options
author | Nguyễn Gia Phong <cnx@loang.net> | 2023-08-24 04:21:46 +0900 |
---|---|---|
committer | Nguyễn Gia Phong <cnx@loang.net> | 2023-08-24 04:30:20 +0900 |
commit | efd25d51cdd7a9cadda1c0f6983905fc17545f14 (patch) | |
tree | 8dea973669d8dfe4e7209c9f419bf8cbbf483323 /src/Models.h | |
parent | 2598835c54a3869a477d287d2845bbe42790a359 (diff) | |
download | blackshades-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.h | 25 |
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; |