-
Notifications
You must be signed in to change notification settings - Fork 43
.SKY File Format
The .SKY file format can be found in G03_GDATA\D09_SKY
They are compressed the same as .IMG files. But their contents is not yet known.
A .SKY files contains information about well the Sky e.g. Skybox.
The file contains compressed textures. DDS up to 6 of them?
When reading it looks like it reads each texture if the FileDataSize (Each int before the uncompressed, compressed, CompressedData) is not 0 up to a limit of 6.
Each texture is loaded as normal.
At the end of the file there is float unknown[12];
Which always seems to have the first element set to 1. I would assume they are for lighting, lense flare location etc.
It looks as if there are various places to load the sky box information from. SKY file if it exists, defaulting to D08_SKY directory. Lense flares appear to be the same on every map loaded from D08_SKY directory.
//-------------------------------------------------------------------------------------------------
//DEFINE_STRUCT_OF_SKYBOXVERTEX_FOR_GXD
//-------------------------------------------------------------------------------------------------
typedef struct
{
float mV[3];
float mT[2];
}
SKYBOXVERTEX_FOR_GXD;
//-------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------
//DEFINE_STRUCT_OF_LENSFLAREVERTEX_FOR_GXD
//-------------------------------------------------------------------------------------------------
typedef struct
{
float mV[4];
float mT[2];
}
LENSFLAREVERTEX_FOR_GXD;
//-------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------
//DEFINE_CLASS_OF_SKY_FOR_GXD
//-------------------------------------------------------------------------------------------------
class SKY_FOR_GXD
{
public :
BOOL mCheckValidState;
TEXTURE_FOR_GXD mTextureForSkyBox[6];
float mLensFlareShapeRatio;
TEXTURE_FOR_GXD mTextureForLensFlare[10];
float mPostFarPlane;
SKYBOXVERTEX_FOR_GXD mSkyBoxVertexBuffer[24];
LENSFLAREVERTEX_FOR_GXD mLensFlareVertexBuffer[4];
SKY_FOR_GXD( void );
~SKY_FOR_GXD( void );
void Init( void );
void Free( void );
BOOL Save( char *tFileName );
BOOL Load( char *tFileName, BOOL tCheckCreateTexture, BOOL tCheckRemoveFileData );
void DrawForSkyBox( void );
void DrawForLensFlare( void *tWorld );
};