// class for bitmaps .BMP file
class BITMAP_FILE
{
public:
BITMAPFILEHEADER bitmapfileheader; // this contains the bitmapfile header
BITMAPINFOHEADER bitmapinfoheader; // this is all the info including the palette
PALETTEENTRY palette[256]; // we will store the palette here
UCHAR *buffer; // this is a pointer to the data
/*
//default constructor
BITMAP_FILE();
*/
//member functions
int Load_Bitmap_File(BITMAP_FILE_PTR bitmap, char *filename);
};
classes->conversion correct?
okie i seriously dunno whether my own conversion is correct or not...i am trying to convert Mr LaMothe's struct engine to
class type engine.
this is for the header file, is a constructor necessary here?
or must i call a default constructor, coz i dun find any
data members to add into the constructors.
and i couldnt find a place to put this:
*BITMAP_FILE_PTR
which is found on the previous structure.
[edited by - edwinnie on May 6, 2002 9:58:00 AM]
May 06, 2002 11:19 AM
for: *BITMAP_FILE_PTR
do:
typedef BITMAP_FILE* BITMAP_FILE_PTR;
Your data members should be private, and the methods (Load_Bitmap_File) public. Also, your methods (L_B_F) don''t have to take a BITMAP_FILE_PTR, because it is now a class and refers to itself via the "this" pointer.. you no longer need to pass the object to load the data into.
do:
typedef BITMAP_FILE* BITMAP_FILE_PTR;
Your data members should be private, and the methods (Load_Bitmap_File) public. Also, your methods (L_B_F) don''t have to take a BITMAP_FILE_PTR, because it is now a class and refers to itself via the "this" pointer.. you no longer need to pass the object to load the data into.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement