genesis-3d_engine/Engine/packagetool/FileFormat.h

75 lines
2.3 KiB
C
Raw Normal View History

/****************************************************************************
Copyright (c) 2011-2013,WebJet Business Division,CYOU
http://www.genesis-3d.com.cn
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __FILE_FORMAT_H__
#define __FILE_FORMAT_H__
#include "packageTool/PackDef.h"
namespace Pack
{
struct FileBlock
{
enum flagType
{
FT_Use = 0x01,
};
HashCode hashName;
//u32 packIndex; //<2F>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
u32 beginBlock; //<2F>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD>ݿ<EFBFBD>
u32 blockCount; //<2F>ļ<EFBFBD><C4BC><EFBFBD>ռ<EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD>С
u32 fileSize; //<2F>ļ<EFBFBD><C4BC><EFBFBD>ʵ<EFBFBD>ʴ<EFBFBD>С
u32 flag; //1<><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD> 0<><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֻ<EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>˴<EFBFBD>С<EFBFBD><D0A1><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
u32 checkCode; //У<><D0A3><EFBFBD><EFBFBD>
u32 NoUse;
};
const u32 PACKAGE_LS_SIGN = 'GEPL';//genesis package list sign
const u32 CURRENT_LS_VERSION = 1;
const u32 PACKAGE_DATA_SIGN = 'GEPD';//genesis package data sign
const u32 CURRENT_DATA_VERSION = 1;
struct PackageListHeader//ͷ<><CDB7>СΪ32 * 4 <20>ֽڣ<D6BD><DAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD>С
{
u32 sign;
u32 version;
u32 headSize;
u32 fileBlocksBegin;
u32 fileBlocksCount;
u32 fileNamesBegin;
u32 NoUse[26];
};
struct PackageDataHeader//ͷ<><CDB7>СΪ32 * 4 <20>ֽڣ<D6BD><DAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD>С
{
u32 sign;
u32 version;
u32 headSize;
u32 diskBlockSize;
u32 diskBlockCount;
u32 filesBegin;
u32 NoUse[26];
};
}
#endif //__FILE_FORMAT_H__