Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
w3dexp.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/Tools/max2w3d/w3dexp.h 22 10/23/00 5:34p Greg_h $ */
20/***********************************************************************************************
21 *** Confidential - Westwood Studios ***
22 ***********************************************************************************************
23 * *
24 * Project Name : Commando Tools - W3D export *
25 * *
26 * $Archive:: /Commando/Code/Tools/max2w3d/w3dexp.h $*
27 * *
28 * $Author:: Greg_h $*
29 * *
30 * $Modtime:: 10/23/00 5:24p $*
31 * *
32 * $Revision:: 22 $*
33 * *
34 *---------------------------------------------------------------------------------------------*
35 * Functions: *
36 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
37
38#ifndef W3DEXP_H
39#define W3DEXP_H
40
41#include "always.h"
42#include <Max.h>
43#include "dllmain.h"
44#include "hiersave.h"
45#include "w3dutil.h"
46#include "resource.h"
47
48
51
52class W3dExportClass : public SceneExport
53{
54
55public:
56
59
60 int ExtCount() { return 1; };
61 const TCHAR * Ext(int n) { return Get_String(IDS_W3D_FILE_EXTEN); };
62 const TCHAR * LongDesc() { return Get_String(IDS_W3D_LONG_DESCRIPTION); };
63 const TCHAR * ShortDesc() { return Get_String(IDS_W3D_SHORT_DESCRIPTION); };
64 const TCHAR * AuthorName() { return Get_String(IDS_AUTHOR_NAME); };
65 const TCHAR * CopyrightMessage() { return Get_String(IDS_COPYRIGHT_NOTICE); };
66 const TCHAR * OtherMessage1() { return _T(""); };
67 const TCHAR * OtherMessage2() { return _T(""); };
68 unsigned int Version() { return 100; };
69
70 void ShowAbout(HWND hWnd) {};
71 int DoExport(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppressPrompts=FALSE, DWORD options=0); // Export file
72
73protected:
74
75 void DoOriginBasedExport(char *rootname, ChunkSaveClass &csave);
76
77public:
78
79 friend BOOL CALLBACK ExportOptionsDlgProc(HWND hDlg,UINT message,WPARAM wParam,LPARAM lParam);
80
81 static char CurrentExportPath[_MAX_DRIVE + _MAX_DIR + 1]; // Used to communicate from the exporter to the dialog.
82 char CurrentScenePath[_MAX_DRIVE + _MAX_DIR + 1]; // directory where the current .max file is stored
83
84private:
85
86 ExpInterface * ExportInterface;
87 Interface * MaxInterface;
88 TimeValue CurTime;
89 int FrameRate;
90
91 W3dExportOptionsStruct ExportOptions;
92
93 char HierarchyFilename[_MAX_PATH];
94 int FixupType;
95 INode * RootNode;
96 INodeListClass * RootList;
97 INodeListClass * OriginList;
98 INodeListClass * DamageRootList;
99
100 HierarchySaveClass * HierarchyTree;
101
102 bool get_export_options(BOOL suppress_prompts = FALSE);
103 INodeListClass * get_origin_list(void);
104 INodeListClass * get_damage_root_list(void);
105 HierarchySaveClass * get_hierarchy_tree(void);
106
107 bool get_base_object_tm(Matrix3 &tm);
108
109 bool Export_Hierarchy(char * name,ChunkSaveClass & csave,Progress_Meter_Class & meter,INode *root);
110 bool Export_Animation(char * name,ChunkSaveClass & csave,Progress_Meter_Class & meter,INode *root);
111 bool Export_Damage_Animations(char * name,ChunkSaveClass & csave,Progress_Meter_Class &meter,INode *damage_root);
112 bool Export_Geometry(char * name,ChunkSaveClass & csave,Progress_Meter_Class & meter,INode *root=NULL, MeshConnectionsClass **out_connection=NULL);
113 bool Export_HLod (char *name, const char *htree_name, ChunkSaveClass &csave, Progress_Meter_Class &meter, MeshConnectionsClass **connections, int lod_count);
114 bool Export_Collection(const char * name,ChunkSaveClass & csave,DynamicVectorClass<GeometryExportTaskClass *> & objlist,INodeListClass & placeholder_list,INodeListClass & transform_node_list);
115
116 void Start_Progress_Bar(void);
117 void End_Progress_Bar(void);
118
119};
120
121
122#endif
#define NULL
Definition BaseType.h:92
#define FALSE
Definition BaseType.h:113
unsigned int UINT
Definition bittype.h:63
unsigned long DWORD
Definition bittype.h:57
#define IDS_W3D_LONG_DESCRIPTION
Definition resource.h:42
#define IDS_AUTHOR_NAME
Definition resource.h:24
#define IDS_W3D_FILE_EXTEN
Definition resource.h:41
#define IDS_W3D_SHORT_DESCRIPTION
Definition resource.h:43
#define IDS_COPYRIGHT_NOTICE
Definition resource.h:23
#define BOOL
Definition Wnd_File.h:57
unsigned int Version()
Definition w3dexp.h:68
const TCHAR * CopyrightMessage()
Definition w3dexp.h:65
int ExtCount()
Definition w3dexp.h:60
const TCHAR * Ext(int n)
Definition w3dexp.h:61
const TCHAR * OtherMessage2()
Definition w3dexp.h:67
const TCHAR * ShortDesc()
Definition w3dexp.h:63
int DoExport(const TCHAR *name, ExpInterface *ei, Interface *i, BOOL suppressPrompts=FALSE, DWORD options=0)
Definition w3dexp.cpp:218
const TCHAR * OtherMessage1()
Definition w3dexp.h:66
char CurrentScenePath[_MAX_DRIVE+_MAX_DIR+1]
Definition w3dexp.h:82
~W3dExportClass()
Definition w3dexp.h:58
static char CurrentExportPath[_MAX_DRIVE+_MAX_DIR+1]
Definition w3dexp.h:81
const TCHAR * LongDesc()
Definition w3dexp.h:62
friend BOOL CALLBACK ExportOptionsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
void ShowAbout(HWND hWnd)
Definition w3dexp.h:70
void DoOriginBasedExport(char *rootname, ChunkSaveClass &csave)
Definition w3dexp.cpp:347
const TCHAR * AuthorName()
Definition w3dexp.h:64
TCHAR * Get_String(int id)
Definition dllmain.cpp:198