Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
nullrobj.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 : WW3D *
24 * *
25 * $Archive:: /Commando/Code/ww3d2/nullrobj.h $*
26 * *
27 * Author:: Greg Hjelstrom *
28 * *
29 * $Modtime:: 1/08/01 10:04a $*
30 * *
31 * $Revision:: 1 $*
32 * *
33 *---------------------------------------------------------------------------------------------*
34 * Functions: *
35 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
36
37
38#if defined(_MSC_VER)
39#pragma once
40#endif
41
42#ifndef NULL_H
43#define NULL_H
44
45#ifndef RENDOBJ_H
46#include "rendobj.h"
47#endif
48
49#include "proto.h"
50
52{
53public:
54
55 Null3DObjClass(const char * name = "NULL");
56 Null3DObjClass(const Null3DObjClass & src);
58
59 virtual int Class_ID(void) const;
60 virtual RenderObjClass * Clone(void) const;
61 virtual const char * Get_Name(void) const { return Name; }
62 virtual void Render(RenderInfoClass & rinfo);
63 virtual void Get_Obj_Space_Bounding_Sphere(SphereClass & sphere) const;
64 virtual void Get_Obj_Space_Bounding_Box(AABoxClass & box) const;
65
66protected:
67
69};
70
71
73{
75public:
78
79 virtual const char * Get_Name(void) const { return Definition.Name; }
80 virtual int Get_Class_ID(void) const { return RenderObjClass::CLASSID_NULL; }
81 virtual RenderObjClass * Create(void) { return NEW_REF(Null3DObjClass,(Definition.Name)); }
82 virtual void DeleteSelf() { delete this; }
83
84protected:
86};
87
88
90{
91public:
92 virtual int Chunk_Type(void) { return W3D_CHUNK_NULL_OBJECT; }
93 virtual PrototypeClass * Load_W3D(ChunkLoadClass & cload);
94};
95
96
97/*
98** Instance of the default loader which the asset manager can
99** automatically install at creation time
100*/
102
103
104#endif
105
#define W3D_NAME_LEN
Definition w3d_file.h:319
@ W3D_CHUNK_NULL_OBJECT
Definition w3d_file.h:477
#define W3DMPO_GLUE(ARGCLASS)
Definition always.h:120
virtual RenderObjClass * Clone(void) const
Definition nullrobj.cpp:71
virtual void Get_Obj_Space_Bounding_Box(AABoxClass &box) const
Definition nullrobj.cpp:86
virtual void Render(RenderInfoClass &rinfo)
Definition nullrobj.cpp:76
Null3DObjClass & operator=(const Null3DObjClass &that)
Definition nullrobj.cpp:59
virtual const char * Get_Name(void) const
Definition nullrobj.h:61
char Name[2 *W3D_NAME_LEN]
Definition nullrobj.h:68
virtual int Class_ID(void) const
Definition nullrobj.cpp:66
virtual void Get_Obj_Space_Bounding_Sphere(SphereClass &sphere) const
Definition nullrobj.cpp:80
Null3DObjClass(const char *name="NULL")
Definition nullrobj.cpp:49
virtual PrototypeClass * Load_W3D(ChunkLoadClass &cload)
Definition nullrobj.cpp:113
virtual int Chunk_Type(void)
Definition nullrobj.h:92
virtual void DeleteSelf()
Definition nullrobj.h:82
W3dNullObjectStruct Definition
Definition nullrobj.h:85
virtual RenderObjClass * Create(void)
Definition nullrobj.h:81
virtual const char * Get_Name(void) const
Definition nullrobj.h:79
virtual int Get_Class_ID(void) const
Definition nullrobj.h:80
PrototypeClass(void)
Definition proto.h:90
PrototypeLoaderClass(void)
Definition proto.h:139
RenderObjClass(void)
Definition rendobj.cpp:170
NullLoaderClass _NullLoader
Definition nullrobj.cpp:44
#define NEW_REF(C, P)
Definition refcount.h:62