Debian Codegraph @

Descent3/renderobject.h

raw symbols SCIP
1 /*
2 * Descent 3
3 * Copyright (C) 2024 Parallax Software
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 #ifndef RENDEROBJECT_H
20 #define RENDEROBJECT_H
21
22 #include "object.h"
23 #include "polymodel.h"
24
25 #ifdef _DEBUG
26 void DrawDebugInfo(object *obj);
27 void DrawRoomVisPnts(object *obj);
28 #endif
29
30 // Render an object. Calls one of several routines based on type
31 void RenderObject(object *obj);
32
33 // Sets the polygon render object type to static (one lightval for whole object)
34 void RenderObject_SetStatic(float r, float g, float b);
35
36 // Sets the polygon render object type to gouraud
37 void RenderObject_SetGouraud(vector *dir, float r, float g, float b, float scalar = 1.0);
38
39 // Sets the object render to draw a polymodel with lightmaps applied
40 void RenderObject_SetLightmaps(lightmap_object *lmobject);
41
42 // Actually draws a polygon model based on the light parameters set by the above
43 // functions
44 void RenderObject_DrawPolymodel(object *obj, float *normalized_times);
45
46 // Sets the direction of the lightsource to be used when calculating vertex lighting
47 // The light source vector should be in the models coordinate space
48 void RenderObject_SetLightDirection(vector *dir);
49
50 // Given a position in 3space and a size, returns whether or not that sized point is
51 // visible from the current view matrix
52 int IsPointVisible(vector *, float, float *pointz = NULL);
53
54 // Draws the 'typing message' icon indicator above an object
55 void DrawPlayerTypingIndicator(object *obj);
56
57 #define POWERUP_SPARKLE_INTERVAL 1.0f / 30.0f
58 extern float Last_powerup_sparkle_time;
59
60 #endif