Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
hmdldef.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/hmdldef.h $*
26 * *
27 * Author:: Greg_h *
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 HMDLDEF_H
43#define HMDLDEF_H
44
45#include "always.h"
46#include "w3d_file.h"
47
48class FileClass;
49class ChunkLoadClass;
50class ChunkSaveClass;
51class SnapPointsClass;
52
53/*
54** Each render object to be attached into the hierarchy model
55** will be defined by an instance of the following structure.
56** The HmdlNodeDefStruct associates a named render object with
57** an indexed pivot/bone in the hierarchy tree.
58*/
64
65
66/*
67** HModelDefClass
68**
69** "Hierarchy Model Definition Class"
70** This class serves as a blueprint for creating HierarchyModelClasses.
71** The asset manager stores these objects internally and uses them to
72** create instances of HierarchyModels for the user.
73*/
75{
76
77public:
78
79 enum {
82 };
83
84 HModelDefClass(void);
85 ~HModelDefClass(void);
86
87 int Load_W3D(ChunkLoadClass & cload);
88 const char * Get_Name(void) const { return Name; }
89
90private:
91
92 char Name[2*W3D_NAME_LEN]; // <basepose>.<modelname>
93 char ModelName[W3D_NAME_LEN]; // name of the model
94 char BasePoseName[W3D_NAME_LEN]; // name of the base pose (hierarchy tree)
95
96 int SubObjectCount;
97 HmdlNodeDefStruct * SubObjects;
98 SnapPointsClass * SnapPoints;
99
100 void Free(void);
101 bool read_header(ChunkLoadClass & cload);
102 bool read_connection(ChunkLoadClass & cload,HmdlNodeDefStruct * con,bool pre30);
103 bool read_mesh_connection(ChunkLoadClass & cload,int idx,bool pre30);
104 bool read_collision_connection(ChunkLoadClass & cload,int idx,bool pre30);
105 bool read_skin_connection(ChunkLoadClass & cload,int idx,bool pre30);
106
107 // HModelClass requires intimate knowlege of us
108 friend class HModelClass;
109 friend class HLodClass;
110};
111
112#endif
#define W3D_NAME_LEN
Definition w3d_file.h:319
friend class HLodClass
Definition hmdldef.H:109
const char * Get_Name(void) const
Definition hmdldef.H:88
HModelDefClass(void)
Definition hmdldef.cpp:59
~HModelDefClass(void)
Definition hmdldef.cpp:79
friend class HModelClass
Definition hmdldef.H:108
int Load_W3D(ChunkLoadClass &cload)
Definition hmdldef.cpp:123
char RenderObjName[2 *W3D_NAME_LEN]
Definition hmdldef.H:61