|
From: <Bla...@at...> - 2001-11-02 21:12:08
|
There are some things I have not covered in the coding methodology...here
they are, as far as I know ;o)
Using integers, there should not be any variable created by calling:
int (variable)
this is incorrect and is not platform spanable, so use the following
variables instead:
int8 //1 byte integer (char)
uint8 //1 byte unsigned integer (unsigned char)
int16 //2 byte integer (short)
uint16 //2 byte unsigned integer (unsigned short)
int32 //4 byte integer (long)
uint32 //4 byte unsigned integer (unsigned long)
Special DirectX variables are allowed such as: WORD and DWORD
Special compiler variables are allowed such as: HRESULT
Special Note on Hresult:
when creating an hresult variable it must be named:
HRESULT rval;
If the variable is a class member variable use
HRESULT m_rval;
If the variable is a global use
HRESULT g_rval;
and so on.
Structure naming convention. Structures must be named using the following
convention.
typedef struct
{
(variables)
} cge_t(Name), *cge_t(Name)_ptr
//Special Note to Ian:
typedef struct
{
cge_tDriverMode pDriverList[64];
UINT16 ListSize;
} cge_tDriverList, *cge_tDriverList_ptr;
This structure is incorrect, I shall correct it and upload the corrected
version when I am uploading the cgeInput class (DX8 version). As you can
see pDriverList[64] is NOT a pointer, this was an oversight by me...when I
initially programed this structure it was going to be a pointer but then I
decided to just make it a constant structure, easier to work with and it's
not very large anyway (71 bytes each). Also I need to change the UINT16 to
use uint16 (lowercase uint, this is a C++ compiler difference, the variables
are the same but the lowercase version is default supported by the compiler
while the uppercase was a defined version of it.)
I think that was the extend of the conventions that I overlooked when
writting that file....
Jacek Ringwelski
|