[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-cvs] CVS: paragui/src/draw/dummy nullcore.cpp,1.1.2.2,1.1.2.3
From: |
Teunis Peters <address@hidden> |
Subject: |
[paragui-cvs] CVS: paragui/src/draw/dummy nullcore.cpp,1.1.2.2,1.1.2.3 |
Date: |
Thu, 31 Oct 2002 19:34:17 -0500 |
Update of /cvsroot/paragui/paragui/src/draw/dummy
In directory subversions:/tmp/cvs-serv14284/src/draw/dummy
Modified Files:
Tag: devel-opengl
nullcore.cpp
Log Message:
Dummy core now operational - fix buglets in pgapplication which caused problems
with this driver and would with further drivers...
Index: nullcore.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/draw/dummy/Attic/nullcore.cpp,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -r1.1.2.2 -r1.1.2.3
*** nullcore.cpp 30 Oct 2002 20:21:17 -0000 1.1.2.2
--- nullcore.cpp 1 Nov 2002 00:34:14 -0000 1.1.2.3
***************
*** 27,46 ****
class DummyDrawable : public PG_DrawableSurface {
friend class DummyDraw;
! SDL_Surface* dummySurface;
protected:
! DummyDrawable();
~DummyDrawable();
int Lock();
void Unlock();
- void UpdateRects(int numrects, PG_Rect *rects);
- int SetColorKey(Uint32 flag, Uint32 key);
bool SetClipRect(const PG_Rect& rect);
void BlitSurface(const SDL_Surface* srf_src, const PG_Rect& rect_src, const
PG_Rect& rect_dst);
! int FillRect(const PG_Rect& dstrect, Uint32 color);
! void DrawLine(Uint32 x0, Uint32 y0, Uint32 x1, Uint32 y1, const SDL_Color&
color, Uint8 width = 1);
! void SetPixel(int x, int y, const SDL_Color& color);
void DrawTile(const PG_Rect& ref, const PG_Rect& drawrect,
PG_DrawableSurface* tilemap);
- void GetClipRect(PG_Rect& rect);
void BlitScale(PG_DrawableSurface* src, bool smooth = true);
/* from SDL_SetColors(..) (don't US know how to spell? It's 'colour'! */
--- 27,51 ----
class DummyDrawable : public PG_DrawableSurface {
friend class DummyDraw;
! SDL_PixelFormat nullinfo;
protected:
! DummyDrawable();
!
! public:
~DummyDrawable();
+ Uint32 GetWidth();
+ Uint32 GetHeight();
+ Uint32 GetDepth();
+ SDL_PixelFormat* GetFormat();
+ void* GetPixels();
+ Uint32 GetPitch();
+ void UpdateRects(int numrects, PG_Rect *rects);
int Lock();
void Unlock();
bool SetClipRect(const PG_Rect& rect);
+ void GetClipRect(PG_Rect& rect);
void BlitSurface(const SDL_Surface* srf_src, const PG_Rect& rect_src, const
PG_Rect& rect_dst);
! int SetColorKey(Uint32 flag, Uint32 key);
void DrawTile(const PG_Rect& ref, const PG_Rect& drawrect,
PG_DrawableSurface* tilemap);
void BlitScale(PG_DrawableSurface* src, bool smooth = true);
/* from SDL_SetColors(..) (don't US know how to spell? It's 'colour'! */
***************
*** 48,51 ****
--- 53,63 ----
int SetPalette(int flags, SDL_Color *colors, int firstcolor, int ncolors);
int SetAlpha(Uint32 flag, Uint8 alpha);
+ Uint32 MapRGB(Uint8 r, Uint8 g, Uint8 b);
+ Uint32 MapRGBA(Uint8 r, Uint8 g, Uint8 b, Uint8 a);
+
+ int FillRect(const PG_Rect& dstrect, Uint32 color);
+ void DrawLine(Uint32 x0, Uint32 y0, Uint32 x1, Uint32 y1, const SDL_Color&
color, Uint8 width = 1);
+ void SetPixel(int x, int y, const SDL_Color& color);
+
PG_DrawableSurface* RotoScaleSurface(double angle, double zoom,
bool smooth = true);
***************
*** 57,61 ****
bool BlitFTBitmap(FT_Bitmap *Bitmap, int PosX, int PosY, PG_Font* Param,
PG_Rect *ClipRect);
! /* SDL_Surface* getScreen() { return dummySurface; }; */
#if 0
--- 69,73 ----
bool BlitFTBitmap(FT_Bitmap *Bitmap, int PosX, int PosY, PG_Font* Param,
PG_Rect *ClipRect);
! SDL_Surface* SDL();
#if 0
***************
*** 209,212 ****
--- 221,255 ----
};
+ Uint32 DummyDrawable::GetWidth() {
+ DBGX(PG_LogDBG("DummyDraw: %s", __FUNCTION__));
+ return 0; // PG_DrawableSurface::GetWidth();
+ };
+
+ Uint32 DummyDrawable::GetHeight() {
+ DBGX(PG_LogDBG("DummyDraw: %s", __FUNCTION__));
+ return 0; // PG_DrawableSurface::GetHeight();
+ };
+
+ Uint32 DummyDrawable::GetDepth() {
+ DBGX(PG_LogDBG("DummyDraw: %s", __FUNCTION__));
+ return 0; // PG_DrawableSurface::GetDepth();
+ };
+
+ SDL_PixelFormat* DummyDrawable::GetFormat() {
+ /* must provide valid information */
+ DBGX(PG_LogDBG("DummyDraw: %s", __FUNCTION__));
+ return &nullinfo; // PG_DrawableSurface::GetFormat();
+ };
+
+ void* DummyDrawable::GetPixels() {
+ DBGX(PG_LogDBG("DummyDraw: %s", __FUNCTION__));
+ return NULL; // PG_DrawableSurface::GetPixels();
+ };
+
+ Uint32 DummyDrawable::GetPitch() {
+ DBGX(PG_LogDBG("DummyDraw: %s", __FUNCTION__));
+ return 0; // PG_DrawableSurface::GetPitch();
+ };
+
int DummyDraw::Lock() {
DBGX(PG_LogDBG("DummyDraw: %s", __FUNCTION__));
***************
*** 269,273 ****
SDL_Rect **DummyDraw::ListModes(SDL_PixelFormat *format, Uint32 flags) {
DBGX(PG_LogDBG("DummyDraw: %s", __FUNCTION__));
! return NULL;
};
--- 312,317 ----
SDL_Rect **DummyDraw::ListModes(SDL_PixelFormat *format, Uint32 flags) {
DBGX(PG_LogDBG("DummyDraw: %s", __FUNCTION__));
! return (SDL_Rect **) -1;
! /* return NULL; */
};
***************
*** 282,297 ****
};
! DummyDrawable::DummyDrawable() {
DBGX(PG_LogDBG("DummyDraw: %s", __FUNCTION__));
! dummySurface =
SDL_CreateRGBSurface(0, 1, 1, 32,
0xff0000, 0x00ff00, 0x0000ff, 0xff000000);
};
DummyDrawable::~DummyDrawable() {
DBGX(PG_LogDBG("DummyDraw: %s", __FUNCTION__));
- if (dummySurface != NULL) {
- SDL_FreeSurface(dummySurface);
- dummySurface = NULL;
- };
};
--- 326,342 ----
};
! DummyDrawable::DummyDrawable() : nullinfo() {
DBGX(PG_LogDBG("DummyDraw: %s", __FUNCTION__));
! #if 0
! /* needed for providing valid (but useless) information...
! * looks like it isn't needed anymore...
! */
! ref =
SDL_CreateRGBSurface(0, 1, 1, 32,
0xff0000, 0x00ff00, 0x0000ff, 0xff000000);
+ #endif
};
DummyDrawable::~DummyDrawable() {
DBGX(PG_LogDBG("DummyDraw: %s", __FUNCTION__));
};
***************
*** 337,340 ****
--- 382,395 ----
};
+ Uint32 DummyDrawable::MapRGB(Uint8 r, Uint8 g, Uint8 b) {
+ DBGX(PG_LogDBG("DummyDraw: %s", __FUNCTION__));
+ return 0;
+ };
+
+ Uint32 DummyDrawable::MapRGBA(Uint8 r, Uint8 g, Uint8 b, Uint8 a) {
+ DBGX(PG_LogDBG("DummyDraw: %s", __FUNCTION__));
+ return 0;
+ };
+
PG_DrawableSurface* DummyDrawable::RotoScaleSurface(double angle, double zoom,
bool smooth) {
***************
*** 367,370 ****
--- 422,430 ----
bool DummyDrawable::BlitFTBitmap(FT_Bitmap *Bitmap, int PosX, int PosY,
PG_Font* Param, PG_Rect *ClipRect) {
+ DBGX(PG_LogDBG("DummyDraw: %s", __FUNCTION__));
+ return false;
+ };
+
+ SDL_Surface* DummyDrawable::SDL() {
DBGX(PG_LogDBG("DummyDraw: %s", __FUNCTION__));
return false;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paragui-cvs] CVS: paragui/src/draw/dummy nullcore.cpp,1.1.2.2,1.1.2.3,
Teunis Peters <address@hidden> <=
- Prev by Date:
[paragui-cvs] CVS: paragui/src/core pgapplication.cpp,1.10.2.11,1.10.2.12
- Next by Date:
[paragui-cvs] CVS: paragui/src/draw/opengl pggloper.cpp,1.1.2.3,1.1.2.4 pgglroot.cpp,1.1.2.4,1.1.2.5
- Previous by thread:
[paragui-cvs] CVS: paragui/src/core pgapplication.cpp,1.10.2.11,1.10.2.12
- Next by thread:
[paragui-cvs] CVS: paragui/src/draw/opengl pggloper.cpp,1.1.2.3,1.1.2.4 pgglroot.cpp,1.1.2.4,1.1.2.5
- Index(es):