Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
shddefmanager.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 /***********************************************************************************************
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 : WWSHADE *
24 * *
25 * $Archive:: wwshade/shddefmanager.h $*
26 * *
27 * $Org Author:: Jani_p
28 *
29 * $Author:: Kenny_m
30 *
31 * $Modtime:: 5/20/02 3:12p $*
32 * *
33 * $Revision:: 2 $*
34 * *
35 * 5/20/02 KM Added save load behavior
36 *---------------------------------------------------------------------------------------------*
37 * Functions: *
38 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
39
40#ifndef SHDDEFMANAGER_H
41#define SHDDEFMANAGER_H
42
43#include "always.h"
44#include "bittype.h"
45
46class ShdDefClass;
48class ChunkSaveClass;
49class ChunkLoadClass;
50
51
58{
59public:
60
61 static ShdDefFactoryClass * Find_Factory (uint32 class_id);
62 static ShdDefFactoryClass * Find_Factory (const char *name);
63 static void Register_Factory (ShdDefFactoryClass *factory);
64 static void Unregister_Factory (ShdDefFactoryClass *factory);
65
66 // Class enumeration
67 static ShdDefFactoryClass * Get_First (uint32 superclass_id);
68 static ShdDefFactoryClass * Get_Next (ShdDefFactoryClass *current, uint32 superclass_id);
69
70 // Factory enumeration
71 static ShdDefFactoryClass * Get_First (void);
73
74 // Construction
76
77 // save/load
78 static void Save_Shader(ChunkSaveClass& csave, ShdDefClass* shddef);
79 static void Load_Shader(ChunkLoadClass& cload, ShdDefClass** shddef);
80
81private:
82
83 static void Link_Factory (ShdDefFactoryClass *factory);
84 static void Unlink_Factory (ShdDefFactoryClass *factory);
85
86 static ShdDefFactoryClass * _FactoryListHead;
87};
88
89
90
91#endif SHDDEFMANAGER_H
unsigned long uint32
Definition bittype.h:46
static ShdDefClass * Create_ShdDefClass_Instance(uint32 class_id)
static ShdDefFactoryClass * Get_First(void)
static void Load_Shader(ChunkLoadClass &cload, ShdDefClass **shddef)
static void Save_Shader(ChunkSaveClass &csave, ShdDefClass *shddef)
static ShdDefFactoryClass * Find_Factory(uint32 class_id)
Used to look up the ShdDefFactory for a given class id.
static void Unregister_Factory(ShdDefFactoryClass *factory)
removes a factory from the system
static void Register_Factory(ShdDefFactoryClass *factory)
Registers a factory with the system.
static ShdDefFactoryClass * Get_Next(ShdDefFactoryClass *current, uint32 superclass_id)
static ShdDefFactoryClass * Get_First(uint32 superclass_id)