Switch more char/short/int/long to sized type
This commit is contained in:
@ -14,24 +14,24 @@
|
||||
// Informationen ueber einen VESA-Grafikmodus
|
||||
// (siehe http://wiki.osdev.org/VESA_Video_Modes)
|
||||
struct VbeModeInfoBlock {
|
||||
unsigned short attributes;
|
||||
unsigned char winA, winB;
|
||||
unsigned short granularity;
|
||||
unsigned short winsize;
|
||||
unsigned short segmentA, segmentB;
|
||||
unsigned short realFctPtr[2];
|
||||
unsigned short pitch; // Bytes pro Scanline
|
||||
uint16_t attributes;
|
||||
uint8_t winA, winB;
|
||||
uint16_t granularity;
|
||||
uint16_t winsize;
|
||||
uint16_t segmentA, segmentB;
|
||||
uint16_t realFctPtr[2];
|
||||
uint16_t pitch; // Bytes pro Scanline
|
||||
|
||||
unsigned short Xres, Yres;
|
||||
unsigned char Wchar, Ychar, planes, bpp, banks;
|
||||
unsigned char memory_model, bank_size, image_pages;
|
||||
unsigned char reserved0;
|
||||
uint16_t Xres, Yres;
|
||||
uint8_t Wchar, Ychar, planes, bpp, banks;
|
||||
uint8_t memory_model, bank_size, image_pages;
|
||||
uint8_t reserved0;
|
||||
|
||||
unsigned char red_mask, red_position;
|
||||
unsigned char green_mask, green_position;
|
||||
unsigned char blue_mask, blue_position;
|
||||
unsigned char rsv_mask, rsv_position;
|
||||
unsigned char directcolor_attributes;
|
||||
uint8_t red_mask, red_position;
|
||||
uint8_t green_mask, green_position;
|
||||
uint8_t blue_mask, blue_position;
|
||||
uint8_t rsv_mask, rsv_position;
|
||||
uint8_t directcolor_attributes;
|
||||
|
||||
uint32_t physbase; // Adresse des Linear-Framebuffers
|
||||
uint32_t OffScreenMemOffset;
|
||||
@ -42,11 +42,11 @@ struct VbeModeInfoBlock {
|
||||
// (siehe http://wiki.osdev.org/VESA_Video_Modes)
|
||||
struct VbeInfoBlock {
|
||||
char VbeSignature[4]; // == "VESA"
|
||||
unsigned short VbeVersion; // == 0x0300 for VBE 3.0
|
||||
unsigned short OemStringPtr[2]; // isa vbeFarPtr
|
||||
unsigned char Capabilities[4];
|
||||
unsigned short VideoModePtr[2]; // isa vbeFarPtr
|
||||
unsigned short TotalMemory; // as # of 64KB blocks
|
||||
uint16_t VbeVersion; // == 0x0300 for VBE 3.0
|
||||
uint16_t OemStringPtr[2]; // isa vbeFarPtr
|
||||
uint8_t Capabilities[4];
|
||||
uint16_t VideoModePtr[2]; // isa vbeFarPtr
|
||||
uint16_t TotalMemory; // as # of 64KB blocks
|
||||
} __attribute__((packed));
|
||||
|
||||
/*****************************************************************************
|
||||
@ -68,7 +68,7 @@ void VESA::initTextMode() {
|
||||
* Beschreibung: Bestimmten Grafikmodus einschalten. Dies wird durch *
|
||||
* einen Aufruf des BIOS gemacht. *
|
||||
*****************************************************************************/
|
||||
bool VESA::initGraphicMode(unsigned short mode) {
|
||||
bool VESA::initGraphicMode(uint16_t mode) {
|
||||
|
||||
// Alle Grafikmodi abfragen
|
||||
BC_params->AX = 0x4F00;
|
||||
@ -117,7 +117,7 @@ bool VESA::initGraphicMode(unsigned short mode) {
|
||||
bpp = static_cast<uint8_t>(minf->bpp);
|
||||
lfb = minf->physbase;
|
||||
|
||||
hfb = reinterpret_cast<unsigned int>(new char[xres * yres * bpp / 8]);
|
||||
hfb = reinterpret_cast<uint32_t>(new char[xres * yres * bpp / 8]);
|
||||
|
||||
// Grafikmodus einschalten
|
||||
BC_params->AX = 0x4f02; // SVFA BIOS, init mode
|
||||
|
||||
Reference in New Issue
Block a user