Sorry to bump this, but I'm still having trouble.
First I tried this, but it wouldn't compile. I
kept getting a error that said there wasn't a
matching function inside the GRAPHIC class (if
I understood it correctly)...
Code:
class GRAPHIC{
public:
bool ReadImageInfo(char *BitmapName);
bool ReadPalette(char *BitmapName, BYTE Palette[256][3]);
private:
...
};
BYTE MainGamePalette[256][3];
int main(){
GRAPHIC *image = new GRAPHIC;
image->ReadImageInfo("Bitmap.bmp");
image->ReadPalette("Bitmap.bmp", MainGamePalette[256][3]);
return 0;
}
Then I tried this (the next example). This compiled,
but wouldn't run. As soon as I tried to run the
game, I got a whole bunch of hex-things that I
don't understand, yet. It said something like:
"Exiting due to Signal SIGSEGV"...
I don't know if this error is related to my
palette-problem, or not. But it didn't happen
until after I changed my code (I'm still looking
at things)...
Code:
BYTE MainGamePalette[256][3];
int main(){
...
image->ReadPalette("Bitmap.bmp", MainGamePalette);
return 0;
}
Can anybody help? Is the second example correct
(because it compiles), and my problem lies
elswhere? Or is it completely wrong?
Thanks a lot,
ethic.