torque Torque Game Engine Documentation
TGE Version 1.5.2

UnknownChunk Class Reference

#include <chunkFile.h>

Inheritance diagram for UnknownChunk:

Inheritance graph
[legend]

Detailed Description

This is a special purpose chunk we use to deal with situations where we have an unknown FourCC.

Basically, it loads everything into a buffer, then writes it back out again, masquerading as the unknown chunk.

This means we have to manually do some of what DECLARE_CHUNK does, ew.


Public Member Functions

 DECLARE_CONOBJECT (UnknownChunk)
 UnknownChunk ()
 ~UnknownChunk ()
virtual const U32 getFourCC () const
virtual const U8getFourCCString () const
virtual const U32 getChunkVersion () const
virtual void readChunk (BitStream &s, const U32 length, const U32 version, const U32 crc, const U32 fourCC)
 Called to read the chunk's data.
virtual void writeChunk (BitStream &s)
 Write a chunk.

Private Types

typedef SimChunk Parent

Private Attributes

U32 mChunkFourCC
U8 mChunkFourCCString [4]
U32 mChunkVersion
U32 mChunkCRC
U32 mDataLength
U8mDataBuffer


Member Typedef Documentation

typedef SimChunk UnknownChunk::Parent [private]

Reimplemented from SimChunk.


Constructor & Destructor Documentation

UnknownChunk::UnknownChunk (  ) 

UnknownChunk::~UnknownChunk (  ) 


Member Function Documentation

UnknownChunk::DECLARE_CONOBJECT ( UnknownChunk   ) 

virtual const U32 UnknownChunk::getFourCC (  )  const [inline, virtual]

virtual const U8* UnknownChunk::getFourCCString (  )  const [inline, virtual]

virtual const U32 UnknownChunk::getChunkVersion (  )  const [inline, virtual]

virtual void UnknownChunk::readChunk ( BitStream s,
const U32  length,
const U32  version,
const U32  crc,
const U32  fourCC 
) [virtual]

Called to read the chunk's data.

We are provided with all the information that we got from the file, just in case it's relevant.

Reimplemented from SimChunk.

virtual void UnknownChunk::writeChunk ( BitStream s  )  [virtual]

Write a chunk.

Length is defined by the size of the data we write out, version by the DECLARE_CHUNK macro, crc by the data we write, and FourCC by the macro. So all we have to do is write data!

Reimplemented from SimChunk.


Field Documentation




All Rights Reserved GarageGames.com, Inc. 1999-2005
Auto-magically Generated with Doxygen