Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
gamemtl.h
Go to the documentation of this file.
1/*
2** Command & Conquer Generals Zero Hour(tm)
3** Copyright 2025 Electronic Arts Inc.
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/* $Header: /Commando/Code/Tools/max2w3d/gamemtl.h 38 8/22/01 7:56a Greg_h $ */
20/***********************************************************************************************
21 *** Confidential - Westwood Studios ***
22 ***********************************************************************************************
23 * *
24 * Project Name : Commando / G 3D engine *
25 * *
26 * File Name : GAMEMTL.H *
27 * *
28 * Programmer : Greg Hjelstrom *
29 * *
30 * Start Date : 06/26/97 *
31 * *
32 * Last Update : June 26, 1997 [GH] *
33 * *
34 *---------------------------------------------------------------------------------------------*
35 * Functions: *
36 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
37
38
39#ifndef GAMEMTL_H
40#define GAMEMTL_H
41
42#include <Max.h>
43#include "w3dmtl.h"
44#include "w3d_file.h"
45
46
47// GameMtl flags values
48#define GAMEMTL_CONVERTED_TO_NOLOD (1<<0) // this material has been converted to use the NO_LOD flag on textures
49
50#define GAMEMTL_DISPLACEMENT_ROLLUP_OPEN (1<<25)
51#define GAMEMTL_SURFACE_ROLLUP_OPEN (1<<26)
52#define GAMEMTL_PASSCOUNT_ROLLUP_OPEN (1<<27)
53#define GAMEMTL_PASS0_ROLLUP_OPEN (1<<28)
54#define GAMEMTL_PASS1_ROLLUP_OPEN (1<<29)
55#define GAMEMTL_PASS2_ROLLUP_OPEN (1<<30)
56#define GAMEMTL_PASS3_ROLLUP_OPEN (1<<31)
57
58#define GAMEMTL_ROLLUP_FLAGS ( GAMEMTL_SURFACE_ROLLUP_OPEN | \
59 GAMEMTL_DISPLACEMENT_ROLLUP_OPEN | \
60 GAMEMTL_PASSCOUNT_ROLLUP_OPEN | \
61 GAMEMTL_PASS0_ROLLUP_OPEN | \
62 GAMEMTL_PASS1_ROLLUP_OPEN | \
63 GAMEMTL_PASS2_ROLLUP_OPEN | \
64 GAMEMTL_PASS3_ROLLUP_OPEN )
65
66#define GAMEMTL_ID_PARTA 0x29397211
67#define GAMEMTL_ID_PARTB 0x28c016c2
68
70//
71// Mapping types
72//
74#define GAMEMTL_MAPPING_UV 0
75#define GAMEMTL_MAPPING_ENV 1
76#define GAMEMTL_MAPPING_CHEAP_ENV 2
77#define GAMEMTL_MAPPING_SCREEN 3
78#define GAMEMTL_MAPPING_LINEAR_OFFSET 4
79#define GAMEMTL_MAPPING_SILHOUETTE 5
80#define GAMEMTL_MAPPING_SCALE 6
81#define GAMEMTL_MAPPING_GRID 7
82#define GAMEMTL_MAPPING_ROTATE 8
83#define GAMEMTL_MAPPING_SINE_LINEAR_OFFSET 9
84#define GAMEMTL_MAPPING_STEP_LINEAR_OFFSET 10
85#define GAMEMTL_MAPPING_ZIGZAG_LINEAR_OFFSET 11
86#define GAMEMTL_MAPPING_WS_CLASSIC_ENV 12
87#define GAMEMTL_MAPPING_WS_ENVIRONMENT 13
88#define GAMEMTL_MAPPING_GRID_CLASSIC_ENV 14
89#define GAMEMTL_MAPPING_GRID_ENVIRONMENT 15
90#define GAMEMTL_MAPPING_RANDOM 16
91#define GAMEMTL_MAPPING_EDGE 17
92#define GAMEMTL_MAPPING_BUMPENV 18
93
94
96//
97// PSX Translucency Type
98//
100#define GAMEMTL_PSX_TRANS_NONE 0
101#define GAMEMTL_PSX_TRANS_100 1
102#define GAMEMTL_PSX_TRANS_50 2
103#define GAMEMTL_PSX_TRANS_25 3
104#define GAMEMTL_PSX_TRANS_MINUS_100 4
105
106class GameMtlDlg;
107class GameMapsClass;
108
109extern Class_ID GameMaterialClassID;
110extern ClassDesc * Get_Game_Material_Desc();
111
112// MLL
113// For Playstation 2 materials.
114extern Class_ID PS2GameMaterialClassID;
115extern ClassDesc * Get_PS2_Game_Material_Desc();
116
117extern Class_ID PCToPS2MaterialClassID;
118extern ClassDesc * Get_PS2_Material_Conversion();
119
121//
122// Game Material
123// This is a plugin-material which attempts to emulate the material
124// used in our in-game 3D engine. It has varying degrees of success
125// at making Max render things like our game but it gives us the
126// ability to have control over all parameters in our material.
127//
129class GameMtl: public Mtl
130{
131
132public:
133
139
140 GameMtl(BOOL loading = FALSE);
141 ~GameMtl(void);
142
143 Class_ID ClassID();
144 SClass_ID SuperClassID();
145
146 // From Animatable
147 void GetClassName(TSTR& s);
148 void DeleteThis() { delete this; }
149 int NumSubs();
150 Animatable * SubAnim(int i);
151 TSTR SubAnimName(int i);
152
153 // References
154 int NumRefs() { return REF_COUNT; }
155 RefTargetHandle Clone(RemapDir &remap = NoRemap());
156 RefResult NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message);
157 void SetReference(int i, RefTargetHandle rtarg);
158 RefTargetHandle GetReference(int i);
159
160 // From MtlBase and Mtl
161 void SetAmbient(Color c, TimeValue t) { Set_Ambient(0,t,c); }
162 void SetDiffuse(Color c, TimeValue t) { Set_Diffuse(0,t,c); }
163 void SetSpecular(Color c, TimeValue t) { Set_Specular(0,t,c); }
164 void SetShininess(float v, TimeValue t) { Set_Shininess(0,t,v); }
165 Color GetAmbient(int mtlNum=0, BOOL backFace=FALSE) { return Get_Ambient(0,0); }
166 Color GetDiffuse(int mtlNum=0, BOOL backFace=FALSE) { return Get_Diffuse(0,0); }
167 Color GetSpecular(int mtlNum=0, BOOL backFace=FALSE) { return Get_Specular(0,0); }
168 float GetXParency(int mtlNum=0, BOOL backFace=FALSE) { return 0.0f; }
169 float GetShininess(int mtlNum=0, BOOL backFace=FALSE) { return Get_Shininess(0,0); }
170 float GetShinStr(int mtlNum=0, BOOL backFace=FALSE) { return 1.0f; }
171 void Reset(void);
172 void Update(TimeValue t, Interval& validr);
173 Interval Validity(TimeValue t);
174
175 int NumSubTexmaps(void);
176 void SetSubTexmap(int i, Texmap * m);
177 Texmap * GetSubTexmap(int i);
178
179 float EvalDisplacement(ShadeContext& sc);
180 Interval DisplacementValidity(TimeValue t);
181
182 // Rendering
183 void Shade(ShadeContext& sc);
184 ULONG Requirements(int subMtlNum);
185 //ULONG LocalRequirements(int subMtlNum);
186
187 // Material editor
188 void SetParamDlg(GameMtlDlg * pd) { MaterialDialog = pd; }
189 ParamDlg* CreateParamDlg(HWND hwMtlEdit, IMtlParams *imp);
190
191 // IO stuff
192 IOResult Save(ISave* iSave);
193 IOResult Load(ILoad* iLoad);
194
195 // Accessors...
196 void Set_Flag(ULONG f, ULONG val) { if (val) Flags|=f; else Flags &= ~f; }
197 int Get_Flag(ULONG f) { return ((Flags&f) ? 1 : 0); }
198
199 void Set_Surface_Type(unsigned int type) { SurfaceType = type; }
200 unsigned int Get_Surface_Type(void) const { return SurfaceType; }
201
202 void Set_Sort_Level(int level) { SortLevel = level; }
203 int Get_Sort_Level(void) const { return SortLevel; }
204
205 void Set_Pass_Count(int passcount);
206 int Get_Pass_Count(void);
207
208 IParamBlock * Get_Parameter_Block(int pass);
209 int Get_Current_Page(int pass) { return CurPage[pass]; }
210 Color Get_Ambient(int pass,TimeValue t);
211 Color Get_Diffuse(int pass,TimeValue t);
212 Color Get_Specular(int pass,TimeValue t);
213 Color Get_Emissive(int pass,TimeValue t);
214 float Get_Shininess(int pass,TimeValue t);
215 float Get_Opacity(int pass,TimeValue t);
216 float Get_Translucency(int pass,TimeValue t);
217 int Get_Copy_Specular_To_Diffuse(int pass);
218 int Get_Mapping_Type(int pass, int stage=0);
219 int Get_PSX_Translucency(int pass);
220 int Get_PSX_Lighting(int pass);
221
222 int Get_Depth_Compare(int pass);
223 int Get_Depth_Mask(int pass);
224 int Get_Alpha_Test(int pass);
225 int Get_Dest_Blend(int pass);
226 int Get_Pri_Gradient(int pass);
227 int Get_Sec_Gradient(int pass);
228 int Get_Src_Blend(int pass);
229 int Get_Detail_Color_Func(int pass);
230 int Get_Detail_Alpha_Func(int pass);
231 int Get_PS2_Shader_Param_A(int pass);
232 int Get_PS2_Shader_Param_B(int pass);
233 int Get_PS2_Shader_Param_C(int pass);
234 int Get_PS2_Shader_Param_D(int pass);
235
236 int Get_Texture_Enable(int pass,int stage);
237 int Get_Texture_Publish(int pass,int stage);
238 int Get_Texture_Resize(int pass,int stage); // NOTE: obsolete, replaced by Get_Texture_No_LOD
239 int Get_Texture_No_Mipmap(int pass,int stage); // NOTE: obsolete, replaced by Get_Texture_No_LOD
240 int Get_Texture_Clamp_U(int pass,int stage);
241 int Get_Texture_Clamp_V(int pass,int stage);
242 int Get_Texture_No_LOD(int pass,int stage);
243 int Get_Texture_Alpha_Bitmap(int pass,int stage);
244 int Get_Texture_Hint(int pass,int stage);
245 int Get_Texture_Display(int pass,int stage);
246 float Get_Texture_Frame_Rate(int pass,int stage);
247 int Get_Texture_Frame_Count(int pass,int stage);
248 int Get_Texture_Anim_Type(int pass,int stage);
249 Texmap * Get_Texture(int pass,int stage);
250 Texmap * Get_Displacement_Map(void) const { return DisplacementMap; }
251 float Get_Displacement_Amount(void) const { return DisplacementAmt; }
252 int Get_Displacement_Map_Index(void) const;
253 int Get_Map_Channel(int pass,int stage);
254
255 void Set_Current_Page(int pass,int page) { CurPage[pass] = page; }
256 void Set_Ambient(int pass,TimeValue t,Color color);
257 void Set_Diffuse(int pass,TimeValue t,Color color);
258 void Set_Specular(int pass,TimeValue t,Color color);
259 void Set_Emissive(int pass,TimeValue t,Color color);
260 void Set_Shininess(int pass,TimeValue t,float val);
261 void Set_Opacity(int pass,TimeValue t,float val);
262 void Set_Translucency(int pass,TimeValue t,float val);
263 void Set_Copy_Specular_To_Diffuse(int pass,bool val);
264 void Set_Mapping_Type(int pass,int stage,int val);
265 void Set_PSX_Translucency(int pass,int val);
266 void Set_PSX_Lighting(int pass,bool val);
267
268 void Set_Depth_Compare(int pass,int val);
269 void Set_Depth_Mask(int pass,int val);
270 void Set_Alpha_Test(int pass,int val);
271 void Set_Dest_Blend(int pass,int val);
272 void Set_Pri_Gradient(int pass,int val);
273 void Set_Sec_Gradient(int pass,int val);
274 void Set_Src_Blend(int pass,int val);
275 void Set_Detail_Color_Func(int pass,int val);
276 void Set_Detail_Alpha_Func(int pass,int val);
277 void Set_PS2_Shader_Param_A(int pass,int val);
278 void Set_PS2_Shader_Param_B(int pass,int val);
279 void Set_PS2_Shader_Param_C(int pass,int val);
280 void Set_PS2_Shader_Param_D(int pass,int val);
281
282 void Set_Texture_Enable(int pass,int stage,bool val);
283 void Set_Texture_Publish(int pass,int stage,bool val);
284 void Set_Texture_Resize(int pass,int stage,bool val); // NOTE: obsolete: replaced by Set_Texture_No_LOD
285 void Set_Texture_No_Mipmap(int pass,int stage,bool val); // NOTE: obsolete: replaced by Set_Texture_No_LOD
286 void Set_Texture_Clamp_U(int pass,int stage,bool val);
287 void Set_Texture_Clamp_V(int pass,int stage,bool val);
288 void Set_Texture_No_LOD(int pass,int stage,bool val);
289 void Set_Texture_Alpha_Bitmap(int pass,int stage,bool val);
290 void Set_Texture_Hint(int pass,int stage,int val);
291 void Set_Texture_Display(int pass,int stage,bool val);
292 void Set_Texture_Frame_Rate(int pass,int stage,float val);
293 void Set_Texture_Frame_Count(int pass,int stage,int val);
294 void Set_Texture_Anim_Type(int pass,int stage,int val);
295 void Set_Texture(int pass,int stage,Texmap * tex);
296 void Set_Displacement_Amount(float amount) { DisplacementAmt = amount; Notify_Changed (); }
297
298 void Set_Map_Channel(int pass,int stage,int channel);
299
300 void Notify_Changed(void);
301
302 // This returns the mapping args string buffer for that pass after
303 // assuring that it is at least of length 'len'.
304 char * Get_Mapping_Arg_Buffer(int pass, int stage=0, unsigned int len = 0U);
305
306 int pass_stage_to_texmap_index(int pass,int stage);
307 void texmap_index_to_pass_stage(int index,int * set_pass,int * set_stage);
308
309 // Set and get the type of shader, PC or PS2.
310 // MLL
311 int Get_Shader_Type() {return (ShaderType);}
312 void Set_Shader_Type(int shadertype) {ShaderType = shadertype;}
313
314 // Approximate the PS2 shader on the PC.
317
318 // IML: Get/set substitute material.
319 Mtl* Substitute_Material() {return (SubstituteMaterial);}
320 void Set_Substitute_Material (Mtl *m) {SubstituteMaterial = m;}
321
322private:
323
324 int texture_ref_index(int pass,int stage) { return REF_TEXTURE + pass*W3dMaterialClass::MAX_STAGES + stage; }
325 int pass_ref_index(int pass) { return REF_PASS_PARAMETERS + pass; }
326
327 void update_viewport_display();
328
329 // Do the shade functions specific to the Playstation 2.
330 void ps2_shade(ShadeContext& sc);
331
332
333 unsigned int SurfaceType;
334 int SortLevel;
335
336 Interval Ivalid; // Valid interval
337 GameMtlDlg * MaterialDialog; // Dialog
338 ULONG Flags; // Flags
339 int RollScroll; // Rollup scroll position
340 int CurPage[W3dMaterialClass::MAX_PASSES]; // which page was last open for each pass
341
342 GameMapsClass * Maps; // ref 0 (obsolete...)
343 IParamBlock * MainParameterBlock;
344 IParamBlock * PassParameterBlock[W3dMaterialClass::MAX_PASSES];
348 Texmap * DisplacementMap;
349 float DisplacementAmt;
350
351 // MLL
352 int ShaderType;
353 enum
354 {
355 REF_MAPS = 0, // obsolete, gamemaps object
356 REF_MAIN = 1, // main parameter block is ref 1
357 REF_PASS_PARAMETERS = 2, // pass parameter blocks are refs 2,3,4,5
358 REF_TEXTURE = 6, // textures are refs 6,7,8,9,10,11,12,13,14 (14 is the displacement map)
359 REF_COUNT = 15
360 };
361
362 Mtl *SubstituteMaterial; // IML: Temporary material used during game to standard material conversion and vice-versa.
363
364 friend class GameMtlDlg;
365 friend class GameMtlPostLoad;
366};
367
369
370#endif
371
372
373
#define FALSE
Definition BaseType.h:113
unsigned long ULONG
Definition bittype.h:64
#define BOOL
Definition Wnd_File.h:57
Int Color
Definition Xfer.h:45
Mtl * Substitute_Material()
Definition gamemtl.h:319
void GetClassName(TSTR &s)
Definition GameMtl.cpp:852
void Set_PSX_Lighting(int pass, bool val)
Definition GameMtl.cpp:2899
Color Get_Specular(int pass, TimeValue t)
Definition GameMtl.cpp:2550
int Get_Current_Page(int pass)
Definition gamemtl.h:209
int Get_Displacement_Map_Index(void) const
Definition GameMtl.cpp:1157
void Set_PS2_Shader_Param_A(int pass, int val)
Definition GameMtl.cpp:3141
float Get_Translucency(int pass, TimeValue t)
Definition GameMtl.cpp:2574
friend class GameMtlDlg
Definition gamemtl.h:364
int Get_Flag(ULONG f)
Definition gamemtl.h:197
int Get_Texture_Anim_Type(int pass, int stage)
Definition GameMtl.cpp:2781
int NumSubs()
Definition GameMtl.cpp:875
void Set_Dest_Blend(int pass, int val)
Definition GameMtl.cpp:2923
int Get_PS2_Shader_Param_A(int pass)
Definition GameMtl.cpp:2796
int Compute_PC_Shader_From_PS2_Shader(int pass)
Definition GameMtl.cpp:2184
int Get_Detail_Alpha_Func(int pass)
Definition GameMtl.cpp:2655
int Get_Texture_Clamp_U(int pass, int stage)
Definition GameMtl.cpp:2701
int Get_Src_Blend(int pass)
Definition GameMtl.cpp:2643
void Set_Emissive(int pass, TimeValue t, Color color)
Definition GameMtl.cpp:2854
void Set_Texture_Resize(int pass, int stage, bool val)
Definition GameMtl.cpp:2979
~GameMtl(void)
Definition GameMtl.cpp:787
int pass_stage_to_texmap_index(int pass, int stage)
Definition GameMtl.cpp:3216
void Set_Texture_Enable(int pass, int stage, bool val)
Definition GameMtl.cpp:2959
float Get_Shininess(int pass, TimeValue t)
Definition GameMtl.cpp:2562
Class_ID ClassID()
Definition GameMtl.cpp:812
void Set_Depth_Mask(int pass, int val)
Definition GameMtl.cpp:2911
void Set_Texture(int pass, int stage, Texmap *tex)
Definition GameMtl.cpp:3136
void Set_Texture_Clamp_V(int pass, int stage, bool val)
Definition GameMtl.cpp:3009
int Get_Texture_Frame_Count(int pass, int stage)
Definition GameMtl.cpp:2771
void Set_Shader_Type(int shadertype)
Definition gamemtl.h:312
ShaderTypeEnum
Definition gamemtl.h:135
@ STE_PC_SHADER
Definition gamemtl.h:136
@ STE_PS2_SHADER
Definition gamemtl.h:137
void Set_Substitute_Material(Mtl *m)
Definition gamemtl.h:320
int Get_Texture_No_Mipmap(int pass, int stage)
Definition GameMtl.cpp:2691
int Get_PS2_Shader_Param_D(int pass)
Definition GameMtl.cpp:2817
int NumSubTexmaps(void)
Definition GameMtl.cpp:1139
void Set_PS2_Shader_Param_C(int pass, int val)
Definition GameMtl.cpp:3155
friend class GameMtlPostLoad
Definition gamemtl.h:365
void SetDiffuse(Color c, TimeValue t)
Definition gamemtl.h:162
void Set_Flag(ULONG f, ULONG val)
Definition gamemtl.h:196
Color Get_Emissive(int pass, TimeValue t)
Definition GameMtl.cpp:2556
float EvalDisplacement(ShadeContext &sc)
Definition GameMtl.cpp:3229
GameMtl(BOOL loading=FALSE)
Definition GameMtl.cpp:739
int Get_Sec_Gradient(int pass)
Definition GameMtl.cpp:2637
void Reset(void)
Definition GameMtl.cpp:1270
IOResult Save(ISave *iSave)
Definition GameMtl.cpp:1670
int Get_Texture_Display(int pass, int stage)
Definition GameMtl.cpp:2751
int Get_Pri_Gradient(int pass)
Definition GameMtl.cpp:2631
int Get_Texture_Enable(int pass, int stage)
Definition GameMtl.cpp:2661
int Get_PSX_Lighting(int pass)
Definition GameMtl.cpp:2601
int Get_Map_Channel(int pass, int stage)
Definition GameMtl.cpp:2824
Color GetSpecular(int mtlNum=0, BOOL backFace=FALSE)
Definition gamemtl.h:167
float Get_Opacity(int pass, TimeValue t)
Definition GameMtl.cpp:2568
int Get_Depth_Mask(int pass)
Definition GameMtl.cpp:2613
void Set_Ambient(int pass, TimeValue t, Color color)
Definition GameMtl.cpp:2836
RefTargetHandle Clone(RemapDir &remap=NoRemap())
Definition GameMtl.cpp:929
void Set_Texture_Anim_Type(int pass, int stage, int val)
Definition GameMtl.cpp:3125
void Set_PS2_Shader_Param_D(int pass, int val)
Definition GameMtl.cpp:3162
int Get_Detail_Color_Func(int pass)
Definition GameMtl.cpp:2649
void Set_Src_Blend(int pass, int val)
Definition GameMtl.cpp:2941
void Set_Texture_Display(int pass, int stage, bool val)
Definition GameMtl.cpp:3049
void SetReference(int i, RefTargetHandle rtarg)
Definition GameMtl.cpp:1056
int Get_Sort_Level(void) const
Definition gamemtl.h:203
Color Get_Ambient(int pass, TimeValue t)
Definition GameMtl.cpp:2538
ULONG Requirements(int subMtlNum)
Definition GameMtl.cpp:1399
void SetAmbient(Color c, TimeValue t)
Definition gamemtl.h:161
void Set_PSX_Translucency(int pass, int val)
Definition GameMtl.cpp:2893
IOResult Load(ILoad *iLoad)
Definition GameMtl.cpp:1434
void Set_Mapping_Type(int pass, int stage, int val)
Definition GameMtl.cpp:2884
void Set_Detail_Color_Func(int pass, int val)
Definition GameMtl.cpp:2947
int Get_PS2_Shader_Param_C(int pass)
Definition GameMtl.cpp:2810
void Set_Detail_Alpha_Func(int pass, int val)
Definition GameMtl.cpp:2953
void Set_Depth_Compare(int pass, int val)
Definition GameMtl.cpp:2905
Color GetDiffuse(int mtlNum=0, BOOL backFace=FALSE)
Definition gamemtl.h:166
void SetSpecular(Color c, TimeValue t)
Definition gamemtl.h:163
void Set_Diffuse(int pass, TimeValue t, Color color)
Definition GameMtl.cpp:2842
void Set_Texture_No_LOD(int pass, int stage, bool val)
Definition GameMtl.cpp:3019
void Set_Pass_Count(int passcount)
Definition GameMtl.cpp:2523
int Get_Alpha_Test(int pass)
Definition GameMtl.cpp:2619
void Shade(ShadeContext &sc)
Definition GameMtl.cpp:1752
SClass_ID SuperClassID()
Definition GameMtl.cpp:834
void Set_Copy_Specular_To_Diffuse(int pass, bool val)
Definition GameMtl.cpp:2878
int Get_Texture_Hint(int pass, int stage)
Definition GameMtl.cpp:2741
float GetShininess(int mtlNum=0, BOOL backFace=FALSE)
Definition gamemtl.h:169
Texmap * Get_Texture(int pass, int stage)
Definition GameMtl.cpp:2791
int Get_Pass_Count(void)
Definition GameMtl.cpp:2529
void Set_Translucency(int pass, TimeValue t, float val)
Definition GameMtl.cpp:2872
void Set_Texture_Alpha_Bitmap(int pass, int stage, bool val)
Definition GameMtl.cpp:3029
int Compute_PS2_Shader_From_PC_Shader(int pass)
Definition GameMtl.cpp:2322
float GetXParency(int mtlNum=0, BOOL backFace=FALSE)
Definition gamemtl.h:168
Texmap * GetSubTexmap(int i)
Definition GameMtl.cpp:1204
void Set_Sec_Gradient(int pass, int val)
Definition GameMtl.cpp:2935
TSTR SubAnimName(int i)
Definition GameMtl.cpp:893
Animatable * SubAnim(int i)
Definition GameMtl.cpp:911
void Set_Pri_Gradient(int pass, int val)
Definition GameMtl.cpp:2929
RefTargetHandle GetReference(int i)
Definition GameMtl.cpp:1101
Texmap * Get_Displacement_Map(void) const
Definition gamemtl.h:250
unsigned int Get_Surface_Type(void) const
Definition gamemtl.h:200
void Set_Texture_No_Mipmap(int pass, int stage, bool val)
Definition GameMtl.cpp:2989
void Set_Texture_Clamp_U(int pass, int stage, bool val)
Definition GameMtl.cpp:2999
void Notify_Changed(void)
Definition GameMtl.cpp:1249
int Get_Texture_Publish(int pass, int stage)
Definition GameMtl.cpp:2671
void Set_Sort_Level(int level)
Definition gamemtl.h:202
Interval Validity(TimeValue t)
Definition GameMtl.cpp:1381
int Get_Texture_Clamp_V(int pass, int stage)
Definition GameMtl.cpp:2711
void Set_Map_Channel(int pass, int stage, int channel)
Definition GameMtl.cpp:3169
void Set_Surface_Type(unsigned int type)
Definition gamemtl.h:199
int Get_Dest_Blend(int pass)
Definition GameMtl.cpp:2625
int Get_Depth_Compare(int pass)
Definition GameMtl.cpp:2607
void Set_Texture_Publish(int pass, int stage, bool val)
Definition GameMtl.cpp:2969
float Get_Displacement_Amount(void) const
Definition gamemtl.h:251
void Set_Displacement_Amount(float amount)
Definition gamemtl.h:296
void SetSubTexmap(int i, Texmap *m)
Definition GameMtl.cpp:1175
void Set_Alpha_Test(int pass, int val)
Definition GameMtl.cpp:2917
int Get_Copy_Specular_To_Diffuse(int pass)
Definition GameMtl.cpp:2580
void Set_Texture_Hint(int pass, int stage, int val)
Definition GameMtl.cpp:3039
ParamDlg * CreateParamDlg(HWND hwMtlEdit, IMtlParams *imp)
Definition GameMtl.cpp:1229
int Get_Texture_Resize(int pass, int stage)
Definition GameMtl.cpp:2681
RefResult NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget, PartID &partID, RefMessage message)
Definition GameMtl.cpp:993
void texmap_index_to_pass_stage(int index, int *set_pass, int *set_stage)
Definition GameMtl.cpp:3223
int Get_Shader_Type()
Definition gamemtl.h:311
float GetShinStr(int mtlNum=0, BOOL backFace=FALSE)
Definition gamemtl.h:170
void SetParamDlg(GameMtlDlg *pd)
Definition gamemtl.h:188
float Get_Texture_Frame_Rate(int pass, int stage)
Definition GameMtl.cpp:2761
void DeleteThis()
Definition gamemtl.h:148
int Get_Texture_Alpha_Bitmap(int pass, int stage)
Definition GameMtl.cpp:2731
Color GetAmbient(int mtlNum=0, BOOL backFace=FALSE)
Definition gamemtl.h:165
void Set_Texture_Frame_Count(int pass, int stage, int val)
Definition GameMtl.cpp:3115
Color Get_Diffuse(int pass, TimeValue t)
Definition GameMtl.cpp:2544
int NumRefs()
Definition gamemtl.h:154
void SetShininess(float v, TimeValue t)
Definition gamemtl.h:164
void Set_Opacity(int pass, TimeValue t, float val)
Definition GameMtl.cpp:2866
void Set_Current_Page(int pass, int page)
Definition gamemtl.h:255
IParamBlock * Get_Parameter_Block(int pass)
void Set_Specular(int pass, TimeValue t, Color color)
Definition GameMtl.cpp:2848
void Set_Shininess(int pass, TimeValue t, float val)
Definition GameMtl.cpp:2860
char * Get_Mapping_Arg_Buffer(int pass, int stage=0, unsigned int len=0U)
Definition GameMtl.cpp:3193
void Set_Texture_Frame_Rate(int pass, int stage, float val)
Definition GameMtl.cpp:3105
Interval DisplacementValidity(TimeValue t)
Definition GameMtl.cpp:3239
void Set_PS2_Shader_Param_B(int pass, int val)
Definition GameMtl.cpp:3148
int Get_Texture_No_LOD(int pass, int stage)
Definition GameMtl.cpp:2721
int Get_Mapping_Type(int pass, int stage=0)
Definition GameMtl.cpp:2586
int Get_PSX_Translucency(int pass)
Definition GameMtl.cpp:2595
int Get_PS2_Shader_Param_B(int pass)
Definition GameMtl.cpp:2803
ClassDesc * Get_PS2_Material_Conversion()
ClassDesc * Get_Game_Material_Desc()
Definition GameMtl.cpp:97
ClassDesc * Get_PS2_Game_Material_Desc()
Class_ID PS2GameMaterialClassID
Mtl * CreateGameMtl()
Class_ID PCToPS2MaterialClassID
Class_ID GameMaterialClassID
struct Update Update
Definition wolapi.h:617