type declaration

M

Michael Sgier

Hello
two questions here. What is declaring the line:
BITMAPINFOHEADER texInfo; // BMP header
then secondly in LoadBMPTexture the LoadBitmapFile function is called
which returns an error: type specifier omitted for parameter
`BITMAPINFOHEADER'
Humm what kind of type is BITMAPINFOHEADER here :-/
Well that's all new for me and haven't seen that before in VB.NET. So
THANKS for your help.
Regards Michael

// // LoadBMPTexture()
// // desc: loads a texture of the BMP format
void CTexture::LoadBMPTexture(char *filename)
{
BITMAPINFOHEADER texInfo; // BMP header

// store BMP data in texture
data = LoadBitmapFile(filename, &texInfo);
if (data == NULL)
{
free(data);
}

// store texture information
width = texInfo.biWidth;
height = texInfo.biHeight;
palette = NULL;
scaledHeight = 0;
scaledWidth = 0;
textureType = BMP;
}

// LoadBitmapFile
// desc: Returns a pointer to the bitmap image of the bitmap specified
// by filename. Also returns the bitmap header information.
// No support for 8-bit bitmaps.
unsigned char *CTexture::LoadBitmapFile(char *filename, BITMAPINFOHEADER
*bitmapInfoHeader)
// in the line above i get the error: error: type specifier omitted for
parameter `BITMAPINFOHEADER'
{
FILE *filePtr; // the file pointer
BITMAPFILEHEADER bitmapFileHeader; // bitmap file header
unsigned char *bitmapImage; // bitmap image data
int imageIdx = 0; // image index counter
unsigned char tempRGB; // swap variable
....
 
H

Howard

Michael Sgier said:
Hello
two questions here. What is declaring the line:
BITMAPINFOHEADER texInfo; // BMP header
then secondly in LoadBMPTexture the LoadBitmapFile function is called
which returns an error: type specifier omitted for parameter
`BITMAPINFOHEADER'
Humm what kind of type is BITMAPINFOHEADER here :-/
Well that's all new for me and haven't seen that before in VB.NET. So
THANKS for your help.
Regards Michael

// // LoadBMPTexture()
// // desc: loads a texture of the BMP format
void CTexture::LoadBMPTexture(char *filename)
{
BITMAPINFOHEADER texInfo; // BMP header

// store BMP data in texture
data = LoadBitmapFile(filename, &texInfo);
if (data == NULL)
{
free(data);
}

// store texture information
width = texInfo.biWidth;
height = texInfo.biHeight;
palette = NULL;
scaledHeight = 0;
scaledWidth = 0;
textureType = BMP;
}

// LoadBitmapFile
// desc: Returns a pointer to the bitmap image of the bitmap specified
// by filename. Also returns the bitmap header information.
// No support for 8-bit bitmaps.
unsigned char *CTexture::LoadBitmapFile(char *filename, BITMAPINFOHEADER
*bitmapInfoHeader)
// in the line above i get the error: error: type specifier omitted for
parameter `BITMAPINFOHEADER'
{
FILE *filePtr; // the file pointer
BITMAPFILEHEADER bitmapFileHeader; // bitmap file header
unsigned char *bitmapImage; // bitmap image data
int imageIdx = 0; // image index counter
unsigned char tempRGB; // swap variable
...

Looks to me as if BITMAPINFOHEADER is not declared. You probably just need
to include the file where it's defined. (Perhaps <windows.h>?)

-Howard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

bmp//array questions 3
porting win to lin by newbie 1
1. Porting win to lin 2
screen capture problem 1
Confused Newbie 3
I can see the music! 2
Model and Texture but with children 2
Too many types in declaration 15

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top