Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
htreemgr.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/ww3d2/htreemgr.h 2 9/19/01 6:17p Jani_p $ */
20/***********************************************************************************************
21 *** Confidential - Westwood Studios ***
22 ***********************************************************************************************
23 * *
24 * Project Name : Commando / G 3D Library *
25 * *
26 * $Archive:: /Commando/Code/ww3d2/htreemgr.h $*
27 * *
28 * Author:: Greg_h *
29 * *
30 * $Modtime:: 9/13/01 7:22p $*
31 * *
32 * $Revision:: 2 $*
33 * *
34 *---------------------------------------------------------------------------------------------*
35 * Functions: *
36 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
37
38
39#if defined(_MSC_VER)
40#pragma once
41#endif
42
43#ifndef HTREEMGR_H
44#define HTREEMGR_H
45
46#include "always.h"
47#include "bittype.h"
48#include "hashtemplate.h"
49
50class FileClass;
51class ChunkLoadClass;
52class HTreeClass;
54class StringClass;
55
56/*
57
58 HTreeManagerClass
59
60 This class is used to keep track of all of the hierarchy trees.
61 A hierarchy tree is the base pose for a hierarchy model.
62
63*/
65{
66
67public:
68
71
72 int Load_Tree(ChunkLoadClass & cload);
73 int Num_Trees(void) { return NumTrees; }
74 HTreeClass * Get_Tree(const char * name);
75 HTreeClass * Get_Tree(int id);
76 uint32 Get_Tree_Handle(char * name);
77 void Free_All_Trees(void);
79
80 int Get_Tree_ID(const char * name);
81 char * Get_Tree_Name(const int id);
82
83private:
84
85 enum {
86 MAX_TREES = 16000
87 };
88
89 void Free(void);
90
91 int NumTrees;
92 HTreeClass * TreePtr[MAX_TREES]; // TODO: no no! make this dynamic...
94
95};
96
97
98#endif
unsigned long uint32
Definition bittype.h:46
int Get_Tree_ID(const char *name)
Definition htreemgr.cpp:249
HTreeClass * Get_Tree(const char *name)
Definition htreemgr.cpp:296
int Load_Tree(ChunkLoadClass &cload)
Definition htreemgr.cpp:196
void Free_All_Trees_With_Exclusion_List(const W3DExclusionListClass &exclusion_list)
Definition htreemgr.cpp:146
char * Get_Tree_Name(const int id)
Definition htreemgr.cpp:271
void Free_All_Trees(void)
Definition htreemgr.cpp:121
int Num_Trees(void)
Definition htreemgr.h:73
~HTreeManagerClass(void)
Definition htreemgr.cpp:87
uint32 Get_Tree_Handle(char *name)
HTreeManagerClass(void)
Definition htreemgr.cpp:67