Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
hanimmgr.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/hanimmgr.h 1 1/22/01 3:36p Greg_h $ */
20/***********************************************************************************************
21 *** Confidential - Westwood Studios ***
22 ***********************************************************************************************
23 * *
24 * Project Name : Commando / G 3D Library *
25 * *
26 * $Archive:: /Commando/Code/ww3d2/hanimmgr.h $*
27 * *
28 * Author:: Greg_h *
29 * *
30 * $Modtime:: 1/08/01 10:04a $*
31 * *
32 * $Revision:: 1 $*
33 * *
34 *---------------------------------------------------------------------------------------------*
35 * Functions: *
36 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
37
38
39#if defined(_MSC_VER)
40#pragma once
41#endif
42
43#ifndef HANIMMGR_H
44#define HANIMMGR_H
45
46#include "always.h"
47#include "hash.h"
48#include "wwstring.h"
49#include "vector.h"
50
51class HAnimClass;
52class ChunkLoadClass;
54
55/*
56** An entry for a table of anims not found, so we can quickly determine their loss
57*/
59
60public:
61 MissingAnimClass( const char * name ) : Name( name ) {}
62 virtual ~MissingAnimClass( void ) {}
63
64 virtual const char * Get_Key( void ) { return Name; }
65
66private:
67 StringClass Name;
68
69};
70
71/*
72 HAnimManagerClass
73
74 This class is used to keep track of all of the motion data.
75*/
76
78{
79
80public:
83
84 int Load_Anim(ChunkLoadClass & cload);
85 HAnimClass * Get_Anim(const char * name);
86 HAnimClass * Peek_Anim(const char * name);
87 bool Add_Anim(HAnimClass *new_anim);
88 void Free_All_Anims(void);
91
92 void Register_Missing( const char * name );
93 bool Is_Missing( const char * name );
94 void Reset_Missing( void );
95
96private:
97 int Load_Compressed_Anim(ChunkLoadClass & cload);
98 int Load_Raw_Anim(ChunkLoadClass & cload);
99 int Load_Morph_Anim(ChunkLoadClass & cload);
100
101 HashTableClass * AnimPtrTable;
102 HashTableClass * MissingAnimTable;
103
105};
106
107
108/*
109** An Iterator to get to all loaded HAnims in a HAnimManager
110*/
112public:
113 HAnimManagerIterator( HAnimManagerClass & manager ) : HashTableIteratorClass( *manager.AnimPtrTable ) {}
115};
116
117#endif
void Register_Missing(const char *name)
Definition hanimmgr.cpp:427
void Free_All_Anims_With_Exclusion_List(const W3DExclusionListClass &exclusion_list)
Definition hanimmgr.cpp:347
HAnimClass * Peek_Anim(const char *name)
Definition hanimmgr.cpp:282
void Reset_Missing(void)
Definition hanimmgr.cpp:437
void Free_All_Anims(void)
Definition hanimmgr.cpp:322
~HAnimManagerClass(void)
Definition hanimmgr.cpp:93
int Load_Anim(ChunkLoadClass &cload)
Definition hanimmgr.cpp:119
bool Add_Anim(HAnimClass *new_anim)
Definition hanimmgr.cpp:408
bool Is_Missing(const char *name)
Definition hanimmgr.cpp:432
HAnimClass * Get_Anim(const char *name)
Definition hanimmgr.cpp:300
friend class HAnimManagerIterator
Definition hanimmgr.h:104
void Create_Asset_List(DynamicVectorClass< StringClass > &exclusion_list)
Definition hanimmgr.cpp:379
HAnimManagerClass(void)
Definition hanimmgr.cpp:73
HAnimManagerIterator(HAnimManagerClass &manager)
Definition hanimmgr.h:113
HAnimClass * Get_Current_Anim(void)
Definition hanimmgr.cpp:454
HashTableIteratorClass(HashTableClass &table)
Definition hash.h:102
HashableClass(void)
Definition hash.h:57
virtual ~MissingAnimClass(void)
Definition hanimmgr.h:62
MissingAnimClass(const char *name)
Definition hanimmgr.h:61
virtual const char * Get_Key(void)
Definition hanimmgr.h:64