Basically, the first three rows of a transformation matrix contain vectors for projecting the source vector onto the x,y,z axis (by a dot product), while the forth row is just added to the resulting vector. Thus a transformation matrix must contain 4 rows for covering rotation and translation, even if the vectors have only 3 dimensions. For doing this in a mathematical elegant way, vectors get a forth component that is normally 1.

The matrices and vectors used by the shaders are DirectX matrices and vectors. The DirectX coordinate system differs from the GameStudio system: Y and Z is swapped. If you have the DirectX SDK, you can find a description of the DirectX matrices in the help file under Programmers Guide->Using Direct3D->Transforms.

The A6 vertex structure is indeed 'hardwired' for models and terrain:

Code:

struct VERTEX_TLSHADED {
D3DXVECTOR3 v;
D3DXVECTOR3 n;
float texu0,texv0;
float texu1,texv1;
};