1 /*---------------------------------------------------------------------------* 2 Project: header for darch for Revolution 3 File: darch.h 4 5 Copyright (C) 2007 Nintendo All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 $Log: darch.h,v $ 14 Revision 1.1 2008/05/12 07:43:17 nakano_yoshinobu 15 Moved from tests. 16 17 Revision 1.4 2007/11/01 11:34:18 nakano_yoshinobu 18 Changed the type of pathName. (char* -> const char*) 19 20 Revision 1.1.4.1 2007/10/10 02:57:11 nakano_yoshinobu 21 (none) 22 23 Revision 1.3 2007/10/04 04:21:33 nakano_yoshinobu 24 Renamed arguments of DARCHCreate(). 25 26 Revision 1.2 2007/08/29 12:07:32 nakano_yoshinobu 27 Added DARCHGetArcSize(). 28 Removed functions about DarchWorkBuffer. 29 30 Revision 1.1 2007/05/31 08:40:41 ooizumi 31 Initial check-in. 32 33 $NoKeywords: $ 34 *---------------------------------------------------------------------------*/ 35 36 #ifndef __DARCH_H__ 37 #define __DARCH_H__ 38 39 #include <revolution/types.h> 40 41 #ifdef __cplusplus 42 extern "C" { 43 #endif 44 45 #define END_OF_PATH(ptr) \ 46 ( ((ptr)[0] == '\0') || ( ((ptr)[0] == '/') && ((ptr)[1] == '\0') ) ) 47 48 49 typedef struct 50 { 51 const char* pathName; // file path name 52 void* fileStart; // pointer to file data buffer 53 u32 length; // file size 54 55 } DARCHFileInfo; 56 57 u32 DARCHGetArcSize(const DARCHFileInfo* fileInfo, const u32 fileInfoNum); 58 BOOL DARCHCreate(void* arcStart, u32 arcSize, const DARCHFileInfo* fileInfo, const u32 fileInfoNum); 59 60 #ifdef __cplusplus 61 } 62 #endif 63 64 #endif // __DARCH_H__ 65