[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-cvs] CVS: paragui/src/draw drawtile.cpp,1.3.2.3,1.3.2.4 glSDL.c
From: |
Teunis Peters <address@hidden> |
Subject: |
[paragui-cvs] CVS: paragui/src/draw drawtile.cpp,1.3.2.3,1.3.2.4 glSDL.c,1.1.2.1,1.1.2.2 pgrect.cpp,1.3,1.3.2.1 |
Date: |
Thu, 10 Oct 2002 15:16:22 -0400 |
Update of /cvsroot/paragui/paragui/src/draw
In directory subversions:/tmp/cvs-serv13820/src/draw
Modified Files:
Tag: devel-opengl
drawtile.cpp glSDL.c pgrect.cpp
Log Message:
Updates and bugrepairs; still outstanding some of OpenGL driver not yet
operational. As it sits most of the system works now.
Index: drawtile.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/draw/drawtile.cpp,v
retrieving revision 1.3.2.3
retrieving revision 1.3.2.4
diff -C2 -r1.3.2.3 -r1.3.2.4
*** drawtile.cpp 7 Oct 2002 22:23:26 -0000 1.3.2.3
--- drawtile.cpp 10 Oct 2002 19:16:20 -0000 1.3.2.4
***************
*** 36,40 ****
const PG_Rect& drawrect,
PG_DrawableSurface* tilemap) {
! /* fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__); */
PG_Point index1;
PG_Point index2;
--- 36,40 ----
const PG_Rect& drawrect,
PG_DrawableSurface* tilemap) {
! // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
PG_Point index1;
PG_Point index2;
***************
*** 72,75 ****
--- 72,76 ----
dst.y = refv.y + y * tilemap->ref->h;
+ // fprintf(stderr, "%s:%s:%i %p\n", __FILE__, __FUNCTION__, __LINE__,
tilemap->ref);
BlitSurface(tilemap, src, dst);
}
Index: glSDL.c
===================================================================
RCS file: /cvsroot/paragui/paragui/src/draw/Attic/glSDL.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -r1.1.2.1 -r1.1.2.2
*** glSDL.c 18 Jun 2002 22:40:38 -0000 1.1.2.1
--- glSDL.c 10 Oct 2002 19:16:20 -0000 1.1.2.2
***************
*** 1515,1519 ****
datasurf->format->Amask ? GL_RGBA :
GL_RGB,
GL_UNSIGNED_BYTE,
! (Uint8 *)datasurf->pixels + bpp *
fromx);
DBG4(_print_glerror(2));
fromx += txi->tilew;
--- 1515,1519 ----
datasurf->format->Amask ? GL_RGBA :
GL_RGB,
GL_UNSIGNED_BYTE,
! ((Uint8 *)datasurf->pixels) + (bpp *
fromx));
DBG4(_print_glerror(2));
fromx += txi->tilew;
Index: pgrect.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/draw/pgrect.cpp,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -C2 -r1.3 -r1.3.2.1
*** pgrect.cpp 15 Apr 2002 13:35:35 -0000 1.3
--- pgrect.cpp 10 Oct 2002 19:16:20 -0000 1.3.2.1
***************
*** 123,126 ****
--- 123,158 ----
}
+ PG_Rect PG_Rect::UnionRect(const PG_Rect& p, const PG_Rect& c) {
+ static int cx0,cy0,cx1,cy1;
+ static int rx0,ry0,rx1,ry1;
+
+ // fill in default (NULL) result rectangle
+ PG_Rect result;
+
+ // get coordinates of the rectangles
+ rx0 = p.my_xpos;
+ ry0 = p.my_ypos;
+ rx1 = p.my_xpos + p.my_width - 1;
+ ry1 = p.my_ypos + p.my_height - 1;
+
+ cx0 = c.my_xpos;
+ cy0 = c.my_ypos;
+ cx1 = c.my_xpos + c.my_width - 1;
+ cy1 = c.my_ypos + c.my_height - 1;
+
+ if (cx0 < rx0) rx0 = cx0;
+ if (cy0 < ry0) ry0 = cy0;
+ if (cx1 > rx1) rx1 = cx1;
+ if (cy1 > ry1) ry1 = cy1;
+
+ result.SetRect(rx0, ry0, (rx1-rx0)+1, (ry1-ry0)+1);
+
+ return result;
+ };
+
+ PG_Rect PG_Rect::UnionRect(const PG_Rect& p) const {
+ return UnionRect(p, *this);
+ };
+
PG_Rect& PG_Rect::operator =(const PG_Rect& src) {
SetRect(src.x, src.y, src.w, src.h);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paragui-cvs] CVS: paragui/src/draw drawtile.cpp,1.3.2.3,1.3.2.4 glSDL.c,1.1.2.1,1.1.2.2 pgrect.cpp,1.3,1.3.2.1,
Teunis Peters <address@hidden> <=