Basic C Question - Parsing Data
Basic C Question - Parsing Data
I am working on parsing CAF files to extract some information and ran into a small roadblock due to my limited C knowledge (still learning with a long way to go). I have the following structs that I am trying to read in:
- Code:
typedef struct
{
UInt32 mChunkType; // char mChunkType[4]
SInt64 mChunkSize;
} CAFChunkHeader;
typedef struct
{
UInt32 mFileType; // char mFileType[4]
UInt16 mFileVersion;
UInt16 mFileFlags;
} CAFFileHeader;
- Code:
CAFFileHeader *fileHeader = ( CAFFileHeader * )sio2StreamReadPtr( _SIO2stream, sizeof( CAFFileHeader ) );
CAFChunkHeader *firstChunk = ( CAFChunkHeader* )sio2StreamReadPtr( _SIO2stream, sizeof( CAFChunkHeader ) );
uprise78- Posts : 228
Join date : 2008-10-31
Re: Basic C Question - Parsing Data
I think I figured it out. The data was big endian and it just needed to be converted to little endian.
uprise78- Posts : 228
Join date : 2008-10-31
Similar topics
» Optimize mesh data
» Developing in windows?
» Basic Getting Started Problem
» Basic collision testing
» How do I play the sio2.ogv video in the data directory of the SDK.
» Developing in windows?
» Basic Getting Started Problem
» Basic collision testing
» How do I play the sio2.ogv video in the data directory of the SDK.
Permissions in this forum:
You cannot reply to topics in this forum