imgtools/romtools/rofsbuild/r_build.cpp
changeset 671 ff8ff850b0cf
parent 654 7c11c3d8d025
child 672 bc9ef8cca9ec
equal deleted inserted replaced
670:46ea84d14897 671:ff8ff850b0cf
    80 
    80 
    81 struct SortableEntry
    81 struct SortableEntry
    82 	{
    82 	{
    83 	TRofsEntry* iEntry;
    83 	TRofsEntry* iEntry;
    84 	TBool iIsDir;
    84 	TBool iIsDir;
    85 	TUint16 iOffset;
    85 	TUint32 iOffset;
    86 	};
    86 	};
    87 
    87 
    88 int compare(const void* l, const void* r)
    88 int compare(const void* l, const void* r)
    89 	{
    89 	{
    90 	const SortableEntry* left  = (const SortableEntry*)l;
    90 	const SortableEntry* left  = (const SortableEntry*)l;
   619 		if( node->IsFile() )
   619 		if( node->IsFile() )
   620 			{
   620 			{
   621 			entry = pFileEntry;
   621 			entry = pFileEntry;
   622 
   622 
   623 			//Offset in 32bit words from start of file block
   623 			//Offset in 32bit words from start of file block
   624 			array[index].iOffset = (TUint16) ((((TUint8*) entry) - fileBlockBase) >> 2);
   624 			array[index].iOffset = (TUint32) ((((TUint8*) entry) - fileBlockBase) >> 2);
   625 			array[index].iIsDir = EFalse;
   625 			array[index].iIsDir = EFalse;
   626 			}
   626 			}
   627 		else
   627 		else
   628 			{
   628 			{
   629 			entry = pDirEntry;
   629 			entry = pDirEntry;
   630 
   630 
   631 			//Offset in 32bit words from start of directory block
   631 			//Offset in 32bit words from start of directory block
   632 			array[index].iOffset = (TUint16) ((((TUint8*) entry) - dirBlockBase) >> 2);
   632 			array[index].iOffset = (TUint32) ((((TUint8*) entry) - dirBlockBase) >> 2);
   633 			array[index].iIsDir = ETrue;
   633 			array[index].iIsDir = ETrue;
   634 			}
   634 			}
   635 		array[index].iEntry = entry;
   635 		array[index].iEntry = entry;
   636 		index++;	 
   636 		index++;	 
   637 		entry->iNameOffset = KRofsEntryNameOffset; 
   637 		entry->iNameOffset = KRofsEntryNameOffset;