mirror of
https://github.com/JorjBauer/aiie.git
synced 2024-06-07 16:46:27 +00:00
normalizing SDL BIOS behavior against Teensy
This commit is contained in:
parent
84df756230
commit
736f325e7f
8
bios.cpp
8
bios.cpp
|
@ -126,12 +126,12 @@ void BIOS::DrawMenuBar()
|
||||||
|
|
||||||
for (int i=0; i<NUM_TITLES; i++) {
|
for (int i=0; i<NUM_TITLES; i++) {
|
||||||
for (int x=0; x<titleWidths[i] + 2*XPADDING; x++) {
|
for (int x=0; x<titleWidths[i] + 2*XPADDING; x++) {
|
||||||
g_display->drawPixel(xpos+x, 0, 0xFFFF);
|
g_display->drawUIPixel(xpos+x, 0, 0xFFFF);
|
||||||
g_display->drawPixel(xpos+x, 16, 0xFFFF);
|
g_display->drawUIPixel(xpos+x, 16, 0xFFFF);
|
||||||
}
|
}
|
||||||
for (int y=0; y<=16; y++) {
|
for (int y=0; y<=16; y++) {
|
||||||
g_display->drawPixel(xpos, y, 0xFFFF);
|
g_display->drawUIPixel(xpos, y, 0xFFFF);
|
||||||
g_display->drawPixel(xpos + titleWidths[i] + 2*XPADDING, y, 0xFFFF);
|
g_display->drawUIPixel(xpos + titleWidths[i] + 2*XPADDING, y, 0xFFFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
xpos += XPADDING;
|
xpos += XPADDING;
|
||||||
|
|
|
@ -206,9 +206,9 @@ void SDLDisplay::drawCharacter(uint8_t mode, uint16_t x, uint8_t y, char c)
|
||||||
uint8_t ch = BiosFont[temp];
|
uint8_t ch = BiosFont[temp];
|
||||||
for (int8_t x_off = 0; x_off <= xsize; x_off++) {
|
for (int8_t x_off = 0; x_off <= xsize; x_off++) {
|
||||||
if (ch & (1 << (7-x_off))) {
|
if (ch & (1 << (7-x_off))) {
|
||||||
drawPixel(x + x_off, y + y_off, onPixel);
|
drawUIPixel(x + x_off, y + y_off, onPixel);
|
||||||
} else {
|
} else {
|
||||||
drawPixel(x + x_off, y + y_off, offPixel);
|
drawUIPixel(x + x_off, y + y_off, offPixel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
temp++;
|
temp++;
|
||||||
|
@ -223,6 +223,7 @@ void SDLDisplay::drawString(uint8_t mode, uint16_t x, uint8_t y, const char *str
|
||||||
for (int8_t i=0; i<strlen(str); i++) {
|
for (int8_t i=0; i<strlen(str); i++) {
|
||||||
drawCharacter(mode, x, y, str[i]);
|
drawCharacter(mode, x, y, str[i]);
|
||||||
x += xsize; // fixme: any inter-char spacing?
|
x += xsize; // fixme: any inter-char spacing?
|
||||||
|
if (x >= 320) break; // FIXME constant - and pre-scaling, b/c that's in drawCharacter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user