Hallo zusammen.
Ich quäle mich schon lange mit der Funktion
herum.
Diese Definitionen sind noch vorgegeben:
Das Problem ist ganz einfach, ich programmiere ein Spiel und möchte dabei gerne ein Bild (BMP) einbinden (BGI). Mein verwendetes Programm ist Eclipse, jedoch in C und nicht in C++, habe aber die BGI funktionen eingebunden. Alle Grafikfunktionen funktionieren wie sie sollen. Einfach ein Bild kann nicht nicht anzeigen.
Oder einfacher gesagt, wie muss ich putimage(); anwenden, damit es ein Bild, welches auf dem Computer gespeichert ist anzeigt??
Ich freue mich auf eure Antworten, sodass ich bei dem Projekt weiter arbeiten kann.
Viele Grüsse
Thom
Ich quäle mich schon lange mit der Funktion
Code:
extern void PutImage (int x, int y, ImageType *Image);
Diese Definitionen sind noch vorgegeben:
Code:
typedef struct ColorType { unsigned char Red; unsigned char Green; unsigned char Blue; } ColorType; typedef struct RawImageType { short Width; // 2 bytes short Height; // 2 bytes Note:This means bits is also aligned to 32bit(DWORD) boundry char Bits[1]; } RawImageType; typedef struct PixelImageType { short Width; // 2 bytes short Height; // 2 bytes Note:This means bits is also aligned to 32bit(DWORD) boundry unsigned long Pixels[1]; } PixelImageType; typedef struct Color32Type { unsigned char Red; unsigned char Green; unsigned char Blue; unsigned char Dummy; } Color32Type; typedef struct RGBImageType { short Width; // 2 bytes short Height; // 2 bytes Note:This means bits is also aligned to 32bit(DWORD) boundry Color32Type Pixels[1]; } RGBImageType; typedef union ImageType { RGBImageType RGB; PixelImageType Pixels; RawImageType Bytes; } ImageType;
Oder einfacher gesagt, wie muss ich putimage(); anwenden, damit es ein Bild, welches auf dem Computer gespeichert ist anzeigt??
Ich freue mich auf eure Antworten, sodass ich bei dem Projekt weiter arbeiten kann.
Viele Grüsse
Thom
Comment