diff --git a/sys/lib/ogprintf.cc b/sys/lib/ogprintf.cc index 8f9a224..f3dbe31 100644 --- a/sys/lib/ogprintf.cc +++ b/sys/lib/ogprintf.cc @@ -27,11 +27,11 @@ */ extern "C" { + #include #include #include - #include static int screenRow = 0x0; @@ -40,8 +40,10 @@ int ogPrintf(char *ch) { int i = 0x0; int bufHeight; + ogSurface *screen = (ogDisplay_UbixOS *) systemVitals->screen; ogBitFont *font = (ogBitFont *) systemVitals->font; + char *s = 0; s = ch; @@ -65,12 +67,13 @@ } break; default: - //font->PutChar(*screen, screenCol * font->GetWidth(), screenRow * font->GetHeight(), (char)s[i]); - font->PutChar(*screen, screenCol * font->GetWidth(), screenRow * font->GetHeight(), 65); + font->PutChar(*screen, screenCol * font->GetWidth(), screenRow * font->GetHeight(), s[i]); break; } /* switch */ + ++screenCol; ++i; + } /* while */ return 0; diff --git a/sys/sde/ogDisplay_UbixOS.cc b/sys/sde/ogDisplay_UbixOS.cc index 3f9b2a1..91f36b8 100755 --- a/sys/sde/ogDisplay_UbixOS.cc +++ b/sys/sde/ogDisplay_UbixOS.cc @@ -228,17 +228,18 @@ } // ogDisplay_UbixOS::ogAlias bool ogDisplay_UbixOS::ogCreate(uInt32 _xRes, uInt32 _yRes, ogPixelFmt _pixFormat) { - uInt16 mode; - mode = 0x114; // was 0x111 - SetMode(mode); - /* + uint16_t mode; + + //mode = 0x114; // was 0x111 + //SetMode(mode); + mode = FindMode(_xRes, _yRes, _pixFormat.BPP); if ((mode == 0) && ((_pixFormat.BPP==24) || (_pixFormat.BPP==32))) { if (_pixFormat.BPP==24) _pixFormat.BPP=32; else _pixFormat.BPP=24; mode=FindMode(_xRes,_yRes,_pixFormat.BPP); } // if if (mode!=0) SetMode(mode); - */ + return (mode != 0); } // ogDisplay_UbixOS::ogCreate @@ -275,6 +276,7 @@ void ogDisplay_UbixOS::ogSetPalette(uInt8 colour, uInt8 red, uInt8 green, uInt8 blue, uInt8 alpha) { if (pal == NULL) return; + ogSurface::ogSetPalette(colour, red, green, blue, alpha); outportByte(0x3c8, colour); outportByte(0x3c9, red >> 2); @@ -291,8 +293,3 @@ //mji delete modeInfo; return; } // ogDisplay_UbixOS::~ogDisplay_UbixOS - -/*** - END - ***/ -