diff --git a/src/sys/graphics/main.cpp b/src/sys/graphics/main.cpp index 28d0618..1219323 100755 --- a/src/sys/graphics/main.cpp +++ b/src/sys/graphics/main.cpp @@ -23,12 +23,12 @@ font = new TDPFont(buf); buf->create(400,400,(TPixelFmt *)&def_pixfmt_16bpp); buf2->create(400,400,(TPixelFmt *)&def_pixfmt_15bpp); - result = font->Load("OLDENG.DPF"); + result = font->Load("PACMAN.DPF"); font->SetColor(1); font->PutText(0,0,"HelloWorld"); for (r=0; r<=15; r++) { for (g=0; g<=79; g++) - if (buf->getpixel(g,r)) printf("*"); else printf(" "); + if (buf->getPixel(g,r)) printf("*"); else printf(" "); printf("\n"); } if (buf) delete buf; diff --git a/src/sys/graphics/objfont.cpp b/src/sys/graphics/objfont.cpp index a351297..1c574c1 100755 --- a/src/sys/graphics/objfont.cpp +++ b/src/sys/graphics/objfont.cpp @@ -116,7 +116,7 @@ for (yy=0; yy<=(UInt32)(CharHeightTable[ch]-1); yy++) for (xx=0; xx<=(UInt32)(CharWidthTable[ch]-1); xx++) { pix = *offset++; - if (pix) Buf->putpixel(x+xx,y+yy,ColourTable[pix]); + if (pix) Buf->putPixel(x+xx,y+yy,ColourTable[pix]); } // for xx x+=CharWidthTable[ch]; } // if charwidthtable @@ -148,7 +148,7 @@ do { if ((xx & 7)==0) bits = *(offset++); if (bits & 128) - Buf->putpixel(x+xx,y+ycount,ColourTable[1]); + Buf->putPixel(x+xx,y+ycount,ColourTable[1]); xx++; bits+=bits; } while (--xcount); diff --git a/src/sys/graphics/objgfx30.cpp b/src/sys/graphics/objgfx30.cpp index 1ac049f..8d5f7a5 100755 --- a/src/sys/graphics/objgfx30.cpp +++ b/src/sys/graphics/objgfx30.cpp @@ -75,7 +75,7 @@ return TRUE; } // TGfx0::create -void TGfx0::flip(TGfx0* SrcObject) { +void TGfx0::copy(TGfx0* SrcObject) { UInt32 count, xCount, yCount; UInt32 xx, yy; UInt8 r, g, b; @@ -90,8 +90,8 @@ (GreenShifter!=SrcObject->GreenShifter)) { for (yy=0; yy<=yCount; yy++) for (xx=0; xx<=xCount; xx++) { - SrcObject->unpackRGB(SrcObject->getpixel(xx,yy),&r,&g,&b); - putpixel(xx,yy,RGB(r,g,b)); + SrcObject->unpackRGB(SrcObject->getPixel(xx,yy),&r,&g,&b); + putPixel(xx,yy,RGB(r,g,b)); } // for } // if else @@ -102,7 +102,7 @@ ((char*)SrcObject->Buffer+SrcObject->LineOfs[count]), // src xCount); // len } // else -} // TGfx0::flip +} // TGfx0::copy UInt32 TGfx0::getMaxX(void) { return MaxX; @@ -112,7 +112,7 @@ return MaxY; } // TGfx0::getMaxY -UInt32 TGfx0::getpixel(UInt32 x, UInt32 y) { +UInt32 TGfx0::getPixel(UInt32 x, UInt32 y) { UInt32 result; result = 42; if ((!Buffer) || (!LineOfs)) return TransparentColor; @@ -177,9 +177,9 @@ ); } // switch return result; -} // TGfx0::getpixel +} // TGfx0::getPixel -void TGfx0::putpixel(UInt32 x, UInt32 y, UInt32 colour) { +void TGfx0::putPixel(UInt32 x, UInt32 y, UInt32 colour) { if ((!Buffer) || (!LineOfs)) return; if ((x<0) || (x>MaxX) || (y<0) || y>MaxY) return; switch (BPP) { @@ -245,7 +245,7 @@ ); } // switch return; -} // TGfx0::putpixel +} // TGfx0::putPixel UInt32 TGfx0::RGB(UInt8 red, UInt8 green, UInt8 blue) { UInt32 lastclr; diff --git a/src/sys/graphics/objgfx30.h b/src/sys/graphics/objgfx30.h index 891352c..309c2d2 100755 --- a/src/sys/graphics/objgfx30.h +++ b/src/sys/graphics/objgfx30.h @@ -146,11 +146,11 @@ public: TGfx0(void); bool create(UInt32, UInt32,TPixelFmt*); - void flip(TGfx0*); + void copy(TGfx0*); UInt32 getMaxX(void); UInt32 getMaxY(void); - UInt32 getpixel(UInt32, UInt32); - void putpixel(UInt32, UInt32, UInt32); + UInt32 getPixel(UInt32, UInt32); + void putPixel(UInt32, UInt32, UInt32); UInt32 RGB(UInt8, UInt8, UInt8); void setRGBPalette(UInt8, UInt8, UInt8, UInt8); void unpackRGB(UInt32, UInt8*, UInt8*, UInt8*);