Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
rinfo.cpp
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/***********************************************************************************************
20 *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
21 ***********************************************************************************************
22 * *
23 * Project Name : WW3D *
24 * *
25 * $Archive:: /Commando/Code/ww3d2/rinfo.cpp $*
26 * *
27 * Org Author:: Greg Hjelstrom *
28 * *
29 * Author : Kenny Mitchell *
30 * *
31 * $Modtime:: 06/27/02 1:27p $*
32 * *
33 * $Revision:: 15 $*
34 * *
35 * 06/27/02 KM Render to shadow buffer texture support *
36 *---------------------------------------------------------------------------------------------*
37 * Functions: *
38 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
39
40
41#include "rinfo.h"
42#include "camera.h"
43#include "matpass.h"
44
45
46/***********************************************************************************************
47**
48** RenderInfoClass Implementation
49**
50***********************************************************************************************/
52 Camera(cam),
53 fog_start(0.0f),
54 fog_end(0.0f),
55 fog_scale(0.0f),
61 alphaOverride(1.0f),
64{
65 // Need to have one entry in the override flags stack, initialize it to default values.
67}
68
72
74{
75 // add to the end of the array
77
78 if (matpass) {
79 matpass->Add_Ref();
80 }
82 } else {
84 }
85}
86
88{
89 if (RejectedMaterialPasses == 0) {
90 // remove from the end of the array
94 if (mpass != NULL) {
95 mpass->Release_Ref();
96 }
97 } else {
99 }
100}
101
106
111
119
125
130
131
132
133/***********************************************************************************************
134**
135** SpecialRenderInfoClass Implementation
136**
137***********************************************************************************************/
138
140 RenderInfoClass(cam),
141 RenderType(render_type),
144{
145}
146
150
#define NULL
Definition BaseType.h:92
#define WWASSERT
WWINLINE void Release_Ref(void) const
Definition refcount.h:146
void Add_Ref(void) const
Definition refcount.cpp:171
void Pop_Override_Flags(void)
Definition rinfo.cpp:120
unsigned AdditionalMaterialPassCount
Definition rinfo.h:115
RINFO_OVERRIDE_FLAGS OverrideFlag[MAX_OVERRIDE_FLAG_LEVEL]
Definition rinfo.h:117
TexProjectClass * Texture_Projector
Definition rinfo.h:111
MaterialPassClass * Peek_Additional_Pass(int i)
Definition rinfo.cpp:107
CameraClass & Camera
Definition rinfo.h:100
float fog_scale
Definition rinfo.h:102
float fog_start
Definition rinfo.h:103
void Push_Override_Flags(RINFO_OVERRIDE_FLAGS flg)
Definition rinfo.cpp:112
~RenderInfoClass(void)
Definition rinfo.cpp:69
MaterialPassClass * AdditionalMaterialPassArray[MAX_ADDITIONAL_MATERIAL_PASSES]
Definition rinfo.h:114
unsigned RejectedMaterialPasses
Definition rinfo.h:116
RINFO_OVERRIDE_FLAGS & Current_Override_Flags(void)
Definition rinfo.cpp:126
float fog_end
Definition rinfo.h:104
@ RINFO_OVERRIDE_DEFAULT
Definition rinfo.h:83
void Push_Material_Pass(MaterialPassClass *matpass)
Definition rinfo.cpp:73
float alphaOverride
Definition rinfo.h:105
int Additional_Pass_Count(void)
Definition rinfo.cpp:102
RenderInfoClass(CameraClass &cam)
Definition rinfo.cpp:51
unsigned OverrideFlagLevel
Definition rinfo.h:118
float materialPassAlphaOverride
Definition rinfo.h:106
void Pop_Material_Pass(void)
Definition rinfo.cpp:87
LightEnvironmentClass * light_environment
Definition rinfo.h:109
float materialPassEmissiveOverride
Definition rinfo.h:107
BWRenderClass * BWRenderer
Definition rinfo.h:157
SpecialRenderInfoClass(CameraClass &cam, int render_type)
Definition rinfo.cpp:139
~SpecialRenderInfoClass(void)
Definition rinfo.cpp:147
VisRasterizerClass * VisRasterizer
Definition rinfo.h:153
const unsigned MAX_ADDITIONAL_MATERIAL_PASSES
Definition rinfo.h:65
const unsigned MAX_OVERRIDE_FLAG_LEVEL
Definition rinfo.h:66