tVT_Char *chars = Buffer;\r
int pitch = gVesa_Modes[giVesaCurrentMode].pitch;\r
int depth = gVesa_Modes[giVesaCurrentMode].bpp;\r
tVT_Char *chars = Buffer;\r
int pitch = gVesa_Modes[giVesaCurrentMode].pitch;\r
int depth = gVesa_Modes[giVesaCurrentMode].bpp;\r
int widthInChars = gVesa_Modes[giVesaCurrentMode].width/giVT_CharWidth;\r
int heightInChars = gVesa_Modes[giVesaCurrentMode].height/giVT_CharHeight;\r
int x, y;\r
int widthInChars = gVesa_Modes[giVesaCurrentMode].width/giVT_CharWidth;\r
int heightInChars = gVesa_Modes[giVesaCurrentMode].height/giVT_CharHeight;\r
int x, y;\r
LOG("gVesa_Modes[%i] = {height:%i, width:%i, pitch:%i}",\r
giVesaCurrentMode,\r
gVesa_Modes[giVesaCurrentMode].height,\r
LOG("gVesa_Modes[%i] = {height:%i, width:%i, pitch:%i}",\r
giVesaCurrentMode,\r
gVesa_Modes[giVesaCurrentMode].height,\r
LOG("(x,y) = (%i,%i) = [%i,%i]",\r
x,\r
y,\r
LOG("(x,y) = (%i,%i) = [%i,%i]",\r
x,\r
y,\r
y * giVT_CharHeight * pitch\r
);\r
LOG("(w,h) = (%i,%i) = [%i,%i]",\r
(int)(Length % widthInChars),\r
(int)(Length / widthInChars),\r
y * giVT_CharHeight * pitch\r
);\r
LOG("(w,h) = (%i,%i) = [%i,%i]",\r
(int)(Length % widthInChars),\r
(int)(Length / widthInChars),\r
- dest + x*giVT_CharWidth*depth/8, depth, pitch,\r
+ dest + x*giVT_CharWidth*bytes_per_px, bytes_per_px*8, pitch,\r
VT_Colour12toN(chars->BGCol, depth),\r
VT_Colour12toN(chars->FGCol, depth)\r
);\r
VT_Colour12toN(chars->BGCol, depth),\r
VT_Colour12toN(chars->FGCol, depth)\r
);\r
- if( (data->bpp == 32 || data->bpp == 24)\r
- && (gVesa_Modes[i].bpp == 32 || gVesa_Modes[i].bpp == 24) )\r
+ //if( (data->bpp == 32 || data->bpp == 24)\r
+ // && (gVesa_Modes[i].bpp == 32 || gVesa_Modes[i].bpp == 24) )\r
+ if( data->bpp == gVesa_Modes[i].bpp )\r
tmp = gVesa_Modes[i].width * gVesa_Modes[i].height;\r
tmp -= data->width * data->height;\r
tmp = tmp < 0 ? -tmp : tmp;\r
tmp = gVesa_Modes[i].width * gVesa_Modes[i].height;\r
tmp -= data->width * data->height;\r
tmp = tmp < 0 ? -tmp : tmp;\r
- factor = tmp * 100 / (data->width * data->height);\r
+ factor = tmp * 1000 / (data->width * data->height);\r
+ \r
+ if( data->bpp == 8 && gVesa_Modes[i].bpp != 8 ) continue;\r
+ if( data->bpp == 16 && gVesa_Modes[i].bpp != 16 ) continue;\r
\r
if( (data->bpp == 32 || data->bpp == 24)\r
&& (gVesa_Modes[i].bpp == 32 || gVesa_Modes[i].bpp == 24) )\r
{\r
\r
if( (data->bpp == 32 || data->bpp == 24)\r
&& (gVesa_Modes[i].bpp == 32 || gVesa_Modes[i].bpp == 24) )\r
{\r