Debian Codegraph @

Descent3/procedurals.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 PROCEDURALS_H
20 #define PROCEDURALS_Hcxx . . $ `Descent3/procedurals.h:20:9`!
21
22 #include "pstypes.h"cxx . . $ `<file>/lib/pstypes.h`/
23 #include "pserror.h"cxx . . $ `<file>/misc/pserror.h`/
24 #include "fix.h"cxx . . $ `<file>/fix/fix.h`/
25
26 #define MAX_PROC_ELEMENTScxx . . $ `Descent3/procedurals.h:26:9`! 8000
27
28 // Fire procedurals
29 #define PROC_NONEcxx . . $ `Descent3/procedurals.h:29:9`! 0
30 #define PROC_LINE_LIGHTNINGcxx . . $ `Descent3/procedurals.h:30:9`! 1
31 #define PROC_SPHERE_LIGHTNINGcxx . . $ `Descent3/procedurals.h:31:9`! 2
32 #define PROC_STRAIGHTcxx . . $ `Descent3/procedurals.h:32:9`! 3
33 #define PROC_RISING_EMBERcxx . . $ `Descent3/procedurals.h:33:9`! 4
34 #define PROC_RANDOM_EMBERScxx . . $ `Descent3/procedurals.h:34:9`! 5
35 #define PROC_SPINNERScxx . . $ `Descent3/procedurals.h:35:9`! 6
36 #define PROC_ROAMERScxx . . $ `Descent3/procedurals.h:36:9`! 7
37 #define PROC_FOUNTAINcxx . . $ `Descent3/procedurals.h:37:9`! 8
38 #define PROC_CONEcxx . . $ `Descent3/procedurals.h:38:9`! 9
39 #define PROC_FALL_RIGHTcxx . . $ `Descent3/procedurals.h:39:9`! 10
40 #define PROC_FALL_LEFTcxx . . $ `Descent3/procedurals.h:40:9`! 11
41
42 #define PROC_WATER_NONEcxx . . $ `Descent3/procedurals.h:42:9`! 0
43 #define PROC_WATER_HEIGHT_BLOBcxx . . $ `Descent3/procedurals.h:43:9`! 1
44 #define PROC_WATER_SINE_BLOBcxx . . $ `Descent3/procedurals.h:44:9`! 2
45 #define PROC_WATER_RAINDROPScxx . . $ `Descent3/procedurals.h:45:9`! 3
46 #define PROC_WATER_BLOBDROPScxx . . $ `Descent3/procedurals.h:46:9`! 4
47
48 struct dynamic_proc_elementcxx . . $ dynamic_proc_element# {
49 uint8_tcxx . . $ uint8_t# typecxx . . $ dynamic_proc_element#type.;
50 fixcxx . . $ fix# dxcxx . . $ dynamic_proc_element#dx., dycxx . . $ dynamic_proc_element#dy.;
51 uint8_tcxx . . $ uint8_t# frames_leftcxx . . $ dynamic_proc_element#frames_left.;
52 uint8_tcxx . . $ uint8_t# speedcxx . . $ dynamic_proc_element#speed.;
53 uint8_tcxx . . $ uint8_t# colorcxx . . $ dynamic_proc_element#color.;
54
55 uint8_tcxx . . $ uint8_t# sizecxx . . $ dynamic_proc_element#size.;
56
57 fixcxx . . $ fix# x1cxx . . $ dynamic_proc_element#x1., y1cxx . . $ dynamic_proc_element#y1.;
58
59 int16_t prevcxx . . $ dynamic_proc_element#prev., nextcxx . . $ dynamic_proc_element#next.;
60 };
61
62 extern dynamic_proc_elementcxx . . $ dynamic_proc_element# DynamicProcElementscxx . . $ DynamicProcElements.[];
63 extern const char *ProcNamescxx . . $ ProcNames.[], *WaterProcNamescxx . . $ WaterProcNames.[];
64
65 extern uint16_tcxx . . $ uint16_t# DefaultProcPalettecxx . . $ DefaultProcPalette.[];
66
67 // Goes through our array and clears the slots out
68 void InitProceduralscxx . . $ InitProcedurals(49f6e7a06ebc5aa8).();
69
70 // Fades and entire texture one step closer to black
71 void FadeProcTexturecxx . . $ FadeProcTexture(d4f767463ce0a6b3).(int tex_handle);
72
73 // Draws lightning into a bitmap
74 void AddProcLightningcxx . . $ AddProcLightning(748afa4755bc9595).(int x1, int y1, int x2, int y2);
75
76 // link the procedural into the list for its texture
77 void ProcElementLinkcxx . . $ ProcElementLink(3e454b8ccf442868).(int index, int texnum);
78
79 // Unlinks a proc_element from a texture
80 void ProcElementUnlinkcxx . . $ ProcElementUnlink(3e454b8ccf442868).(int index, int texnum);
81
82 // Clears all the procedurals elements attached to this texture
83 void ClearAllProceduralsFromTexturecxx . . $ ClearAllProceduralsFromTexture(d4f767463ce0a6b3).(int texnum);
84
85 // Does a procedural for this texture
86 void EvaluateProceduralcxx . . $ EvaluateProcedural(d4f767463ce0a6b3).(int texnum);
87
88 // Returns the next free procelement
89 int ProcElementAllocatecxx . . $ ProcElementAllocate(b126dc7c1de90089).();
90
91 // Frees up a procelement for use
92 int ProcElementFreecxx . . $ ProcElementFree(7864480464b09eea).(int index);
93
94 // Given an array of r,g,b values, generates a 16bit palette table for those colors
95 void GeneratePaletteForProceduralcxx . . $ GeneratePaletteForProcedural(192b6fdb665876e4).(uint8_tcxx . . $ uint8_t# *r, uint8_tcxx . . $ uint8_t# *g, uint8_tcxx . . $ uint8_t# *b, uint16_tcxx . . $ uint16_t# *pal);
96
97 #endif