1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: tpl_Internal.h 4 5 Copyright (C)2009-2012 Nintendo Co., Ltd. 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 $Rev: 46347 $ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef NN_LIBRARIES_TPL_CTR_TPL_INTERNAL_H_ 17 #define NN_LIBRARIES_TPL_CTR_TPL_INTERNAL_H_ 18 19 20 namespace nn { namespace tpl { namespace CTR { 21 22 enum CtrTexType 23 { 24 TEXTYPE_CUBE = 0, // 25 TEXTYPE_1D, // 26 TEXTYPE_2D, // 27 28 TEXTYPE_UNSUPPORT = 0xff, // 29 30 TEXTYPE_ForceInt32 = 0x7fffffff 31 }; 32 33 enum CtrTexCubeDir 34 { 35 TEXCUBEDIR_PLUS_X = 0, // 36 TEXCUBEDIR_MINUS_X, // 37 TEXCUBEDIR_PLUS_Y, // 38 TEXCUBEDIR_MINUS_Y, // 39 TEXCUBEDIR_PLUS_Z, // 40 TEXCUBEDIR_MINUS_Z, // 41 42 TEXCUBEDIR_UNSUPPORT = 0xff, // 43 44 TEXCUBEDIR_ForceInt32 = 0x7fffffff 45 }; 46 47 /* Please see man pages for details 48 49 */ 50 struct CtrTextureHash 51 { 52 /// Hash value (CRC-32) generated from texture name 53 unsigned int crc; 54 55 /// Texture index 56 int index; 57 }; 58 59 /* Please see man pages for details 60 61 62 63 64 65 66 */ 67 struct CtrTextureConvertOpt 68 { 69 /// Specify output format. (Cast CtrTexFormat) 70 unsigned char specFormat; 71 72 /// Upper limit specification for mipmap level (0 is unlimited) 73 unsigned char mipmapLimit; 74 75 /// Compression is permitted (prohibit with 0) 76 unsigned char permitCompression; 77 78 /// ETC1 compression method 79 unsigned char etc1Method; 80 }; 81 82 /* Please see man pages for details 83 84 85 86 87 88 89 90 91 92 93 94 95 */ 96 struct CtrTexturePackageHeader 97 { 98 /// Magic code ("CTPK" fixed) 99 char magic[4]; 100 /// File format version number (CTR_TEXTURE_PACKAGE_VERSION is substituted) 101 unsigned short version; 102 /// Number of textures 103 unsigned short numTexture; 104 /// Offset to start of image data 105 unsigned int texDataOffset; 106 /// Image data size 107 unsigned int texDataSize; 108 /// Offset to filename hash 109 unsigned int texHashOffset; 110 /// Offset to convert option table 111 unsigned int convertOptOffset; 112 /// Padding to 32-byte boundary 113 char pad[8]; 114 }; 115 116 117 }}} 118 119 120 #endif // ifndef NN_LIBRARIES_TPL_CTR_TPL_INTERNAL_H_ 121