2
* Copyright 2010 Inalogic® Inc.
4
* This program is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU Lesser General Public License, as
6
* published by the Free Software Foundation; either version 2.1 or 3.0
9
* This program is distributed in the hope that it will be useful, but
10
* WITHOUT ANY WARRANTY; without even the implied warranties of
11
* MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
12
* PURPOSE. See the applicable version of the GNU Lesser General Public
13
* License for more details.
15
* You should have received a copy of both the GNU Lesser General Public
16
* License along with this program. If not, see <http://www.gnu.org/licenses/>
18
* Authored by: Jay Taoko <jaytaoko@inalogic.com>
23
#ifndef NWORLDARCHIVEMANAGER_H
24
#define NWORLDARCHIVEMANAGER_H
26
#include "NuxCore/FileManager/NSerializer.h"
35
OBJECTTYPE_UNKNOWN = 0,
38
FORCE_OBJECTTYPE = 0x7fffffff
41
#define WORLDARCHIVE_TAG NUX_MAKEFOURCHARTAG('i','w','l','d') // .iwl
42
#define WORLDARCHIVE_VERSION NUX_MAKEFOURCHARTAG('0','0','0','1')
43
#define WORLDARCHIVE_END_TAG NUX_MAKEFOURCHARTAG(0,0,0,0)
46
#define STATICMESHARCHIVE_TAG NUX_MAKEFOURCHARTAG('i','m','s','h') // .ims
47
#define STATICMESHARCHIVE_VERSION NUX_MAKEFOURCHARTAG('0','0','0','1')
48
#define STATICMESHARCHIVE_END_TAG NUX_MAKEFOURCHARTAG(0,0,0,0)
53
unsigned int ArchiveTag;
54
unsigned int ArchiveFormatVersion;
65
const unsigned int WORLDACHIVEHEADER_SIZE = 36;
67
class NWorldArchiveManager
70
NWorldArchiveManager();
71
~NWorldArchiveManager();
73
bool SaveWorldArchiveFile (const TCHAR *WorldArchiveFilename, N3DWorld *World);
74
N3DWorld *LoadWorldArchiveFile (const TCHAR *WorldArchiveFilename);
76
bool SaveStaticMeshFile (const TCHAR *MeshFilename, NMeshObject *Mesh, unsigned int Flags = 0);
77
NMeshObject *LoadStaticMeshFile (const TCHAR *MeshFilename);
81
nux::NSerializer *m_FileStream;
82
unsigned int m_NumberOfObjects;
83
NString m_CurrentWorldArchive;
87
#endif // NWORLDARCHIVEMANAGER_H