Debian Codegraph @

editor/HTexture.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 * $Logfile: /DescentIII/Main/editor/HTexture.h $
21 * $Revision: 1.1.1.1 $
22 * $Date: 2003-08-26 03:57:38 $
23 * $Author: kevinb $
24 *
25 * HTexture handler for texture functions
26 *
27 * $Log: not supported by cvs2svn $
28 *
29 * 12 8/30/99 12:55p Gwar
30 * added a parameter to HTexturePropagateToFace to not change the texture
31 * of the target face
32 *
33 * 11 5/19/99 12:21a Gwar
34 *
35 * 10 4/27/99 3:30p Gwar
36 * added a NEWEDITOR #define
37 *
38 * 9 8/15/98 5:04p Matt
39 * Added code to copy a texture & UVs from one face to another
40 *
41 * 8 4/16/98 10:42a Matt
42 * Made texture propagation work across rooms.
43 *
44 * 7 9/17/97 11:57a Matt
45 * Ripped out segment code
46 *
47 * 6 9/17/97 11:17a Samir
48 * BIG SEGMENT RIPOUT
49 *
50 * 5 8/13/97 9:52a Matt
51 * Combined slide left/right/up/down into one function, and the same with
52 * rotate left/right
53 *
54 * 4 8/01/97 4:53p Jason
55 * made a more general PropagateTextureToFace function call
56 *
57 * 4 4/17/97 4:03p Samir
58 * Apply Tmap 1 and Tmap2 implemented, but no Tmap2 rendering is occurring
59 * yet.
60 *
61 * 3 3/31/97 3:50p Samir
62 * Set default texture uvs should work for side not whole segment.
63 *
64 * 2 2/26/97 3:59p Samir
65 * Most scaling, rotating, sliding and flipping work.
66 *
67 * 1 2/20/97 11:52a Samir
68 *
69 * $NoKeywords: $
70 */
71
72 #ifndef HTEXTURE_H
73 #define HTEXTURE_H
74
75 #include "pstypes.h"
76
77 #ifndef NEWEDITOR
78 #include "d3edit.h"
79 #else
80 #include "../neweditor/stdafx.h"
81 #include "../neweditor/neweditor.h"
82 #include "../neweditor/globals.h"
83 #endif
84
85 struct room;
86
87 // function to apply a texture to a segment side.
88 void HTextureStretchLess(room *rp, int face, int edge);
89 void HTextureStretchMore(room *rp, int face, int edge);
90 void HTextureSetDefault(room *rp, int face = Curface);
91 void HTextureFlipX();
92 void HTextureFlipY();
93 void HTextureSlide(room *rp, int facenum, float right, float up);
94 void HTextureRotate(room *rp, int facenum, angle ang);
95 void HTextureNextEdge();
96
97 // Apply the specified texture to the specified room:face
98 void HTextureApplyToRoomFace(room *rp, int facenum, int tnum);
99
100 // Copy texture from current face to adjacent face, tiling the UV coordinates
101 // Parameters: destrp,destface - room:face that the propagate is based on
102 // srcrp,srcface - room:face that is changed
103 // Return: 1 if success, 0 if faces not adjacent
104 int HTexturePropagateToFace(room *destrp, int destface, room *srcrp, int srcface, bool tex = true);
105
106 // Copy texture UVs from one face to another
107 // Parameters: destrp,destface - room:face that is changed
108 // srcrp,srcface - room:face to copy from
109 // offset - vert 0 on source is assigned to vert offset on dest
110 // Return: 1 if success, 0 if faces don't have the same number of verts
111 int HTextureCopyUVsToFace(room *destrp, int destface, room *srcrp, int srcface, int offset);
112
113 #endif