Debian Codegraph @

sndlib/ddsndgeometry.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 --- HISTORICAL COMMENTS FOLLOW ---
19
20 * $Source: $
21 * $Revision: 5 $
22 * $Author: Samir $
23 * $Date: 8/13/99 2:00p $
24 *
25 * Hardware occlusion and reflection sound support.
26 *
27 * $Log: /DescentIII/Main/Lib/ddsndgeometry.h $
28 *
29 * 5 8/13/99 2:00p Samir
30 * more aureal and geometry fixes.
31 *
32 * 4 8/11/99 3:12p Samir
33 * fixes for aureal support.
34 *
35 * 3 4/06/99 8:30p Samir
36 * added reflection support.
37 *
38 * 2 3/29/99 10:52a Samir
39 * occlusion support almost complete.
40 *
41 */
42
43 #ifndef DDSNDGEOMETRY_H
44 #define DDSNDGEOMETRY_Hcxx . . $ `sndlib/ddsndgeometry.h:44:9`!
45
46 #include "vecmat.h"cxx . . $ `<file>/lib/vecmat.h`/
47
48 // constants
49 typedef int tSoundMaterialcxx . . $ tSoundMaterial#; // value returned by geometry system.
50
51 // a list of predefined sound materials.
52 const int SNDGEO_MATERIAL_COUNTcxx . . $ SNDGEO_MATERIAL_COUNT. = 8;
53 const tSoundMaterialcxx . . $ tSoundMaterial# SNDGEO_MATERIAL_NONEcxx . . $ SNDGEO_MATERIAL_NONE. = -1, SNDGEO_MATERIAL_ROCKcxx . . $ SNDGEO_MATERIAL_ROCK. = 0, SNDGEO_MATERIAL_WATERcxx . . $ SNDGEO_MATERIAL_WATER. = 1,
54 SNDGEO_MATERIAL_METALcxx . . $ SNDGEO_MATERIAL_METAL. = 2;
55
56 //////////////////////////////////////////////////////////////////////////////
57
58 class llsSystemcxx . . $ llsSystem#;
59
60 class llsGeometrycxx . . $ llsGeometry# {
61 public:
62 llsGeometrycxx . . $ llsGeometry#llsGeometry(49f6e7a06ebc5aa8).();
63
64 bool Initcxx . . $ llsGeometry#Init(ccd01c10275f7c86).(llsSystemcxx . . $ llsSystem# *snd_sys); // specify a sound library to associate geometry with
65 void Shutdowncxx . . $ llsGeometry#Shutdown(49f6e7a06ebc5aa8).(); // closes low level geometry system.
66
67 void StartFramecxx . . $ llsGeometry#StartFrame(49f6e7a06ebc5aa8).();
68 void EndFramecxx . . $ llsGeometry#EndFrame(49f6e7a06ebc5aa8).();
69
70 // polygon lists
71 void IsGroupValidcxx . . $ llsGeometry#IsGroupValid(d4f767463ce0a6b3).(int group); // is a group cached?, check before rendering it.
72 void StartPolygonGroupcxx . . $ llsGeometry#StartPolygonGroup(d4f767463ce0a6b3).(int group); // marks beginning of a list of polygons to render, (-1 group for non cache)
73 void EndPolygonGroupcxx . . $ llsGeometry#EndPolygonGroup(d4f767463ce0a6b3).(int group); // ends a list of polygons to render.
74 void RenderGroupcxx . . $ llsGeometry#RenderGroup(d4f767463ce0a6b3).(int group); // renders a group.
75
76 // clears out geometry info
77 void Clearcxx . . $ llsGeometry#Clear(49f6e7a06ebc5aa8).();
78
79 // primitives, nv = number of verts, and verts is an array of pointers to vertices.
80 // you can pass a sound material value if you want special reflective properties on this polygon.
81 void AddPolycxx . . $ llsGeometry#AddPoly(f4a69767f128d).(int nv, vectorcxx . . $ vector# **verts, unsigned tag, tSoundMaterialcxx . . $ tSoundMaterial# material = SNDGEO_MATERIAL_NONEcxx . . $ SNDGEO_MATERIAL_NONE.);
82
83 private:
84 void AddQuadcxx . . $ llsGeometry#AddQuad(a397e1d7f4d30a0b).(unsigned tag, vectorcxx . . $ vector# **verts); // 4 verts here.
85 void AddTrianglecxx . . $ llsGeometry#AddTriangle(a397e1d7f4d30a0b).(unsigned tag, vectorcxx . . $ vector# **verts); // 3 verts here.
86
87 private:
88 llsSystemcxx . . $ llsSystem# *m_snd_systemcxx . . $ llsGeometry#m_snd_system.; // sound library attached.
89 int n_primatives_usedcxx . . $ llsGeometry#n_primatives_used.; // number of primatives rendered this frame.
90 int n_reflections_usedcxx . . $ llsGeometry#n_reflections_used.;
91 int n_materials_usedcxx . . $ llsGeometry#n_materials_used.;
92 char m_snd_mixercxx . . $ llsGeometry#m_snd_mixer.; // current sound mixer attached.
93 bool m_in_groupcxx . . $ llsGeometry#m_in_group.; // a group of polys is being defined.
94 bool m_lib_initcxx . . $ llsGeometry#m_lib_init.;
95
96 private:
97 void CreateMaterialcxx . . $ llsGeometry#CreateMaterial(c31bc224e645f73e).(tSoundMaterialcxx . . $ tSoundMaterial# material, float transmit_gain, float transmit_highfreq, float reflect_gain,
98 float reflect_highfreq);
99 void DestroyMaterialcxx . . $ llsGeometry#DestroyMaterial(d4f767463ce0a6b3).(tSoundMaterialcxx . . $ tSoundMaterial# material);
100
101 private: // sound material list.
102 void *m_snd_materialscxx . . $ llsGeometry#m_snd_materials.[SNDGEO_MATERIAL_COUNTcxx . . $ SNDGEO_MATERIAL_COUNT.];
103 };
104
105 #endif