[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-cvs] CVS: paragui/src/core pgdriver.cpp,NONE,1.1.2.1 Makefile.a
From: |
Teunis Peters <address@hidden> |
Subject: |
[paragui-cvs] CVS: paragui/src/core pgdriver.cpp,NONE,1.1.2.1 Makefile.am,1.4.2.1,1.4.2.2 pgapplication.cpp,1.10.2.5,1.10.2.6 pgfilearchive.cpp,1.4.2.3,1.4.2.4 |
Date: |
Mon, 07 Oct 2002 18:23:28 -0400 |
Update of /cvsroot/paragui/paragui/src/core
In directory subversions:/tmp/cvs-serv21228/src/core
Modified Files:
Tag: devel-opengl
Makefile.am pgapplication.cpp pgfilearchive.cpp
Added Files:
Tag: devel-opengl
pgdriver.cpp
Log Message:
Add driver support
expand debugging code (but mostly disabled)
Some more clarification.... hope I got everything - T
***** Error reading new file: [Errno 2] No such file or directory:
'pgdriver.cpp'
Index: Makefile.am
===================================================================
RCS file: /cvsroot/paragui/paragui/src/core/Makefile.am,v
retrieving revision 1.4.2.1
retrieving revision 1.4.2.2
diff -C2 -r1.4.2.1 -r1.4.2.2
*** Makefile.am 31 Aug 2002 04:01:22 -0000 1.4.2.1
--- Makefile.am 7 Oct 2002 22:23:26 -0000 1.4.2.2
***************
*** 16,20 ****
pgrectlist.cpp \
pgsurfacecache.cpp \
! pgtimerobject.cpp
libpgcore_la_LIBADD =
--- 16,21 ----
pgrectlist.cpp \
pgsurfacecache.cpp \
! pgtimerobject.cpp \
! pgdriver.cpp
libpgcore_la_LIBADD =
***************
*** 28,32 ****
$(SDL_CFLAGS) \
$(PHYSFS_INCLUDE) \
! -I$(top_srcdir)/include
style_cvs:
--- 29,33 ----
$(SDL_CFLAGS) \
$(PHYSFS_INCLUDE) \
! -I$(top_srcdir)/include -DPLUGIN_PATH=\"$(pkglibdir)\"
style_cvs:
Index: pgapplication.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/core/pgapplication.cpp,v
retrieving revision 1.10.2.5
retrieving revision 1.10.2.6
diff -C2 -r1.10.2.5 -r1.10.2.6
*** pgapplication.cpp 12 Sep 2002 06:38:49 -0000 1.10.2.5
--- pgapplication.cpp 7 Oct 2002 22:23:26 -0000 1.10.2.6
***************
*** 1,2 ****
--- 1,3 ----
+ #define DEBUG
/*
ParaGUI - crossplatform widgetset
***************
*** 79,82 ****
--- 80,84 ----
static bool __sdlinit = false;
void PARAGUI_ShutDownCode() {
+ /* fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__); */
fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
PG_Draw::PG_Draw* dr = PG_Draw::PG_Draw::GetDefaultDrawable();
***************
*** 84,91 ****
// this is pretty much the only spot where it's safe to delete in
// quite this manner...
! dr->quit();
! fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
! delete dr;
! fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
// shutdown log
--- 86,102 ----
// this is pretty much the only spot where it's safe to delete in
// quite this manner...
! if (dr != NULL) {
! fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
! dr->quit();
! fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
! dr->prerm();
! fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
! dr->postrm();
! fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
! delete dr;
! fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
! } else {
! fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
! };
// shutdown log
***************
*** 145,148 ****
--- 156,172 ----
// add our base dir to the searchpath
AddArchive(GetBaseDir());
+
+ static const char* plugin_def_path = PLUGIN_PATH;
+ #ifndef __MACOS__
+ if (getenv("PGPLUGIN_PATH"))
+ plugin_def_path = getenv("PGPLUGIN_PATH");
+ #endif
+ #if 1
+ AddArchive(plugin_def_path);
+ #else /* retained in case debugging needed */
+ if(AddArchive(plugin_def_path)) {
+ PG_LogDBG("'%s' added to searchpath", plugin_def_path);
+ }
+ #endif
}
***************
*** 250,260 ****
--- 274,289 ----
}
+ // PG_LogDBG("ParaGUI[%s]: %s:%i", __FILE__, __FUNCTION__, __LINE__);
PG_RectList *widgetList = PG_Widget::GetWidgetList();
PG_Application::RedrawBackground(my_mouse_position);
+ // PG_LogDBG("ParaGUI[%s]: %s:%i", __FILE__, __FUNCTION__, __LINE__);
drawable->SetClipRect(my_mouse_position);
PG_RectList backlist = widgetList->Intersect(&my_mouse_position);
+ // PG_LogDBG("ParaGUI[%s]: %s:%i", __FILE__, __FUNCTION__, __LINE__);
backlist.Blit(my_mouse_position);
+ // PG_LogDBG("ParaGUI[%s]: %s:%i", __FILE__, __FUNCTION__, __LINE__);
drawable->SetClipRect(PG_Rect());
+ // PG_LogDBG("ParaGUI[%s]: %s:%i", __FILE__, __FUNCTION__, __LINE__);
return;
}
***************
*** 278,282 ****
--- 307,313 ----
my_mouse_position.my_xpos = x;
my_mouse_position.my_ypos = y;
+ // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
drawable->BlitSurface(my_mouse_pointer, PG_Rect(), my_mouse_position);
+ // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
if(!GetBulkMode() && bUpdate) {
drawable->UpdateRects(1, &saved);
***************
*** 322,325 ****
--- 353,357 ----
return false;
+ // PG_LogDBG("ParaGUI[%s]: %s:%i", __FILE__, __FUNCTION__, __LINE__);
// screen->getScreen()->flags |= SDL_GLSDL;
screen = drawable->SetMode(
***************
*** 337,340 ****
--- 369,373 ----
void PG_Application::SetCursor(PG_Draw::PG_DrawableSurface *image) {
+ // PG_LogDBG("ParaGUI: %s", __FUNCTION__);
if(image == 0) {
if(!my_mouse_pointer) {
***************
*** 389,400 ****
if (!surf)
return PG_Application::screen;
PG_Application::screen = surf; // new
PG_Draw::PG_DrawableSurface(surf);
! glMode = (surf->getScreen()->flags & SDL_OPENGLBLIT);
SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY,
SDL_DEFAULT_REPEAT_INTERVAL);
SDL_EnableUNICODE(true);
PG_Rect r =
PG_Rect(0,0,screen->getScreen()->w,screen->getScreen()->h);
PG_Widget::UpdateRect(r);
--- 422,436 ----
if (!surf)
return PG_Application::screen;
+ // PG_LogDBG("ParaGUI[%s]: %s:%i", __FILE__, __FUNCTION__, __LINE__);
PG_Application::screen = surf; // new
PG_Draw::PG_DrawableSurface(surf);
! glMode = (surf->getScreen()->flags & (SDL_OPENGLBLIT | SDL_OPENGL));
! // fprintf(stderr, "%s:%s:%i\n glMode %c", __FILE__, __FUNCTION__,
__LINE__, (glMode?'T':'F'));
SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY,
SDL_DEFAULT_REPEAT_INTERVAL);
SDL_EnableUNICODE(true);
+ // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
PG_Rect r =
PG_Rect(0,0,screen->getScreen()->w,screen->getScreen()->h);
PG_Widget::UpdateRect(r);
***************
*** 409,413 ****
--- 445,451 ----
return false;
+ // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
my_background = LoadSurface(filename);
+ // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
if(my_scaled_background) {
***************
*** 430,433 ****
--- 468,472 ----
/** */
bool PG_Application::SetBackground(PG_Draw::PG_DrawableSurface* surface, int
mode) {
+ // PG_LogDBG("ParaGUI: %s", __FUNCTION__);
if(surface == NULL)
return false;
***************
*** 452,456 ****
/** */
void PG_Application::RedrawBackground(const PG_Rect& rect) {
! static PG_Rect
screenrect(0,0,screen->getScreen()->w,screen->getScreen()->h);
if(GetBulkMode() || !enableBackground) {
--- 491,496 ----
/** */
void PG_Application::RedrawBackground(const PG_Rect& rect) {
! // PG_LogDBG("ParaGUI[%s]: %s:%i", __FILE__, __FUNCTION__, __LINE__);
! /*static*/ PG_Rect
screenrect(0,0,screen->getScreen()->w,screen->getScreen()->h);
if(GetBulkMode() || !enableBackground) {
***************
*** 461,465 ****
--- 501,507 ----
//PG_Application::LockScreen();
+ // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
if(!my_background) {
+ // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__,
__LINE__);
SDL_Color c = my_backcolor;
screen->FillRect(fillrect,
SDL_MapRGB(screen->getScreen()->format, c.r, c.g, c.b));
***************
*** 467,470 ****
--- 509,513 ----
return;
}
+ // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
if(my_backmode == BKMODE_STRETCH &&
(my_background->getScreen()->w != screen->getScreen()->w ||
***************
*** 480,491 ****
--- 523,539 ----
my_background->ScaleSurface(static_cast<Uint16>(screen->getScreen()->w),
static_cast<Uint16>(screen->getScreen()->h));
}
+ // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__,
__LINE__);
drawable->GetClipRect(fillrect);
drawable->SetClipRect(rect);
+ // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__,
__LINE__);
drawable->BlitSurface(my_scaled_background, PG_Rect(),
PG_Rect());
+ // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__,
__LINE__);
drawable->SetClipRect(fillrect);
} else {
+ // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__,
__LINE__);
screen->DrawTile(screenrect, rect, my_background);
}
+ // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
//PG_Application::UnlockScreen();
***************
*** 580,588 ****
PG_Theme* PG_Application::LoadTheme(const char* xmltheme, bool asDefault,
const char* searchpath) {
PG_Theme* theme = NULL;
- // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
PG_LogDBG("Locating theme '%s' ...", xmltheme);
- // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
if(searchpath != NULL) {
if(AddArchive(searchpath)) {
--- 628,634 ----
***************
*** 591,595 ****
}
- // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
#ifdef __MACOS__
--- 637,640 ----
***************
*** 644,650 ****
}
- // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
theme = PG_Theme::Load(xmltheme);
- // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
if(theme && asDefault) {
--- 689,693 ----
***************
*** 663,667 ****
PG_LogMSG("size: %i", DefaultFont->GetSize());
- // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
my_background = theme->FindSurface("Background", "Background",
"background");
my_backmode = theme->FindProperty("Background", "Background",
"backmode");
--- 706,709 ----
***************
*** 679,683 ****
PG_LogWRN("Failed to load !");
}
- // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
if((my_Theme != NULL) && asDefault) {
--- 721,724 ----
***************
*** 686,694 ****
}
- // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
if(asDefault && theme) {
my_Theme = theme;
}
- // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
return theme;
--- 727,733 ----
***************
*** 761,764 ****
--- 800,804 ----
Uint8* mask;
int mlen, i;
+ PG_LogDBG("ParaGUI: %s", __FUNCTION__);
// Load the icon surface
***************
*** 966,973 ****
--- 1006,1015 ----
int PG_Application::GetScreenHeight() {
+ // PG_LogDBG("ParaGUI[%s]: %s:%i", __FILE__, __FUNCTION__, __LINE__);
return screen->getScreen()->h;
}
int PG_Application::GetScreenWidth() {
+ // PG_LogDBG("ParaGUI[%s]: %s:%i", __FILE__, __FUNCTION__, __LINE__);
return screen->getScreen()->w;
}
Index: pgfilearchive.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/core/pgfilearchive.cpp,v
retrieving revision 1.4.2.3
retrieving revision 1.4.2.4
diff -C2 -r1.4.2.3 -r1.4.2.4
*** pgfilearchive.cpp 12 Sep 2002 06:38:49 -0000 1.4.2.3
--- pgfilearchive.cpp 7 Oct 2002 22:23:26 -0000 1.4.2.4
***************
*** 338,341 ****
--- 338,342 ----
if(convert) {
+ PG_LogDBG("ParaGUI: %s", __FUNCTION__);
PG_Draw::PG_DrawableSurface* tmpsrf =
draw->AccelDrawableSurface(surface->getScreen());
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paragui-cvs] CVS: paragui/src/core pgdriver.cpp,NONE,1.1.2.1 Makefile.am,1.4.2.1,1.4.2.2 pgapplication.cpp,1.10.2.5,1.10.2.6 pgfilearchive.cpp,1.4.2.3,1.4.2.4,
Teunis Peters <address@hidden> <=
- Prev by Date:
[paragui-cvs] CVS: paragui/src/draw drawfont.cpp,NONE,1.1.2.1 Makefile.am,1.3.2.2,1.3.2.3 draw.cpp,1.1.2.6,1.1.2.7 drawable.cpp,1.1.2.4,1.1.2.5 drawtile.cpp,1.3.2.2,1.3.2.3
- Next by Date:
[paragui-cvs] CVS: paragui/src/font pgfont.cpp,1.3.2.3,1.3.2.4
- Previous by thread:
[paragui-cvs] CVS: paragui/src/draw drawfont.cpp,NONE,1.1.2.1 Makefile.am,1.3.2.2,1.3.2.3 draw.cpp,1.1.2.6,1.1.2.7 drawable.cpp,1.1.2.4,1.1.2.5 drawtile.cpp,1.3.2.2,1.3.2.3
- Next by thread:
[paragui-cvs] CVS: paragui/src/font pgfont.cpp,1.3.2.3,1.3.2.4
- Index(es):