[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-cvs] CVS: paragui/src/draw draw.cpp,1.1.2.4,1.1.2.5 drawable.cp
From: |
Teunis Peters <address@hidden> |
Subject: |
[paragui-cvs] CVS: paragui/src/draw draw.cpp,1.1.2.4,1.1.2.5 drawable.cpp,1.1.2.2,1.1.2.3 drawtile.cpp,1.3.2.1,1.3.2.2 gradient.cpp,1.3.2.1,1.3.2.2 pgglcore.cpp,1.1.2.1,1.1.2.2 rotozoom.cpp,1.3.2.1,1.3.2.2 stretch.cpp,1.3.2.1,1.3.2.2 |
Date: |
Sat, 31 Aug 2002 00:01:55 -0400 |
Update of /cvsroot/paragui/paragui/src/draw
In directory subversions:/tmp/cvs-serv4328/src/draw
Modified Files:
Tag: devel-opengl
draw.cpp drawable.cpp drawtile.cpp gradient.cpp pgglcore.cpp
rotozoom.cpp stretch.cpp
Log Message:
massive changes - updates from main trunk and various bugfixes
Index: draw.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/draw/Attic/draw.cpp,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -C2 -r1.1.2.4 -r1.1.2.5
*** draw.cpp 26 Jun 2002 08:47:51 -0000 1.1.2.4
--- draw.cpp 31 Aug 2002 04:01:23 -0000 1.1.2.5
***************
*** 142,148 ****
fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
dumpflags(t->flags);
surf = new PG_DrawableSurface(t);
screen = surf;
- // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
if (screen == NULL) { PG_LogERR("failed to create window"); exit(-1); }
return screen;
--- 142,148 ----
fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
dumpflags(t->flags);
+ fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
surf = new PG_DrawableSurface(t);
screen = surf;
if (screen == NULL) { PG_LogERR("failed to create window"); exit(-1); }
return screen;
***************
*** 217,222 ****
--- 217,224 ----
t = SDL_CreateRGBSurface(flags,width,height,depth,Rmask,Gmask,Bmask,Amask);
if (t == NULL) { PG_LogERR("SDL: %s", SDL_GetError()); exit(-1); }
+ fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
surf = new PG_DrawableSurface(t);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
+ fprintf(stderr, "%s:%s:%i %i,%i\n", __FILE__, __FUNCTION__, __LINE__,
width, height);
return surf;
};
***************
*** 232,237 ****
--- 234,241 ----
if (t == NULL) { PG_LogERR("SDL: %s", SDL_GetError()); exit(-1); }
SDL_FreeSurface(q);
+ fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
surf = new PG_DrawableSurface(t);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
+ fprintf(stderr, "%s:%s:%i %i,%i %p:%p\n", __FILE__, __FUNCTION__, __LINE__,
width, height, surf, q);
return surf;
#else
***************
*** 273,278 ****
--- 277,284 ----
t =
SDL_CreateRGBSurfaceFrom(pixels,width,height,depth,pitch,Rmask,Gmask,Bmask,Amask);
if (t == NULL) { PG_LogERR("SDL: %s", SDL_GetError()); exit(-1); }
+ fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
surf = new PG_DrawableSurface(t);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
+ fprintf(stderr, "%s:%s:%i %i,%i\n", __FILE__, __FUNCTION__, __LINE__,
width, height);
return surf;
};
***************
*** 283,288 ****
--- 289,296 ----
t = SDL_ConvertSurface(src, src->format, src->flags);
if (t == NULL) { PG_LogERR("SDL: %s", SDL_GetError()); exit(-1); }
+ fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
surf = new PG_DrawableSurface(t);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
+ fprintf(stderr, "%s:%s:%i %i,%i\n", __FILE__, __FUNCTION__, __LINE__,
src->w, src->h);
return surf;
};
***************
*** 297,302 ****
--- 305,312 ----
};
if (t == NULL) { PG_LogERR("SDL: %s", SDL_GetError()); exit(-1); }
+ fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
surf = new PG_DrawableSurface(t);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
+ fprintf(stderr, "%s:%s:%i %i,%i\n", __FILE__, __FUNCTION__, __LINE__,
src->w, src->h);
return surf;
};
***************
*** 310,315 ****
--- 320,327 ----
t = ::PG_Draw::CreateGradient(r, gradient);
if (t == NULL) { PG_LogERR("SDL: %s", SDL_GetError()); exit(-1); }
+ fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
surf = new PG_DrawableSurface(t);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
+ fprintf(stderr, "%s:%s:%i %i,%i\n", __FILE__, __FUNCTION__, __LINE__, r.w,
r.h);
return surf;
#endif
***************
*** 324,329 ****
--- 336,343 ----
t = ::PG_Draw::CreateGradient(r, ul, ur, dl, dr);
if (t == NULL) { PG_LogERR("SDL: %s", SDL_GetError()); exit(-1); }
+ fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
surf = new PG_DrawableSurface(t);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
+ fprintf(stderr, "%s:%s:%i %i,%i\n", __FILE__, __FUNCTION__, __LINE__, r.w,
r.h);
return surf;
#endif
Index: drawable.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/draw/Attic/drawable.cpp,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -r1.1.2.2 -r1.1.2.3
*** drawable.cpp 26 Jun 2002 16:24:57 -0000 1.1.2.2
--- drawable.cpp 31 Aug 2002 04:01:23 -0000 1.1.2.3
***************
*** 30,33 ****
--- 30,34 ----
#include "pgdraw.h"
+ #include "pglog.h"
#include "drawpriv.hh"
***************
*** 72,76 ****
--- 73,82 ----
PG_Draw::PG_DrawableSurface::PG_DrawableSurface(SDL_Surface* s) {
+ if (s == NULL) {
+ PG_LogERR("Surface in PG_DrawableSurface initialized to %p", s);
+ exit(-1);
+ };
ref = s; // memcpy(this, s, sizeof(SDL_Surface));
+ fprintf(stderr, "%s:%s:%i %p:%p\n", __FILE__, __FUNCTION__, __LINE__, this,
ref);
};
Index: drawtile.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/draw/drawtile.cpp,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -C2 -r1.3.2.1 -r1.3.2.2
*** drawtile.cpp 18 Jun 2002 22:40:38 -0000 1.3.2.1
--- drawtile.cpp 31 Aug 2002 04:01:23 -0000 1.3.2.2
***************
*** 43,46 ****
--- 43,50 ----
if (!tilemap)
return;
+
+ // this should -never- happen.. why is it happening?
+ if (tilemap->ref == NULL)
+ return;
if (!tilemap->ref->w || !tilemap->ref->h || !ref->w || !ref->h)
Index: gradient.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/draw/gradient.cpp,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -C2 -r1.3.2.1 -r1.3.2.2
*** gradient.cpp 18 Jun 2002 22:40:38 -0000 1.3.2.1
--- gradient.cpp 31 Aug 2002 04:01:23 -0000 1.3.2.2
***************
*** 111,114 ****
--- 111,116 ----
int oy = drawrect.y - rect.y;
+ surface->Lock();
+
// color space vectors
v00 = ((ur.r - ul.r) * 256) / w;
***************
*** 171,175 ****
for (register Sint32 y = 0; y < drawrect.h; y++) {
! if ( bpp == 1 )
pixel = SDL_MapRGB (
surface->getScreen()->format, r>>8, g>>8, b>>8 );
else
--- 173,177 ----
for (register Sint32 y = 0; y < drawrect.h; y++) {
! /* if ( bpp == 1 )
pixel = SDL_MapRGB (
surface->getScreen()->format, r>>8, g>>8, b>>8 );
else
***************
*** 178,193 ****
| (b>>Bloss) << Bshift;
//| Amask;
!
/* Set the pixel */
switch (bpp) {
case 1:
*((Uint8 *) (bits)) = (Uint8) pixel;
break;
case 2:
*((Uint16 *) (bits)) = (Uint16) pixel;
break;
! case 3: { /*
Format/endian independent */
Uint8 ri = (pixel >>
surface->getScreen()->format->Rshift) & 0xFF;
Uint8 gi = (pixel >>
surface->getScreen()->format->Gshift) & 0xFF;
--- 180,204 ----
| (b>>Bloss) << Bshift;
//| Amask;
! */
/* Set the pixel */
switch (bpp) {
case 1:
+ pixel = SDL_MapRGB (
surface->getScreen()->format, r>>8, g>>8, b>>8 );
*((Uint8 *) (bits)) = (Uint8) pixel;
break;
case 2:
+ pixel = (r>>Rloss) << Rshift
+ | (g>>Gloss) <<
Gshift
+ | (b>>Bloss) <<
Bshift;
+
*((Uint16 *) (bits)) = (Uint16) pixel;
break;
! case 3: {
! pixel = (r>>Rloss) << Rshift
! | (g>>Gloss)
<< Gshift
! | (b>>Bloss)
<< Bshift;
!
Uint8 ri = (pixel >>
surface->getScreen()->format->Rshift) & 0xFF;
Uint8 gi = (pixel >>
surface->getScreen()->format->Gshift) & 0xFF;
***************
*** 200,203 ****
--- 211,218 ----
case 4:
+ pixel = (r>>Rloss) << Rshift
+ | (g>>Gloss) <<
Gshift
+ | (b>>Bloss) <<
Bshift;
+
*((Uint32 *) (bits)) = (Uint32) pixel;
break;
***************
*** 222,225 ****
--- 237,241 ----
}
+ surface->Unlock();
}
Index: pgglcore.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/draw/Attic/pgglcore.cpp,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -r1.1.2.1 -r1.1.2.2
*** pgglcore.cpp 26 Jun 2002 16:24:57 -0000 1.1.2.1
--- pgglcore.cpp 31 Aug 2002 04:01:23 -0000 1.1.2.2
***************
*** 730,733 ****
--- 730,734 ----
if (t == NULL) { PG_LogERR("SDL: %s", SDL_GetError()); exit(-1); }
GLSDL_FIX_SURFACE(t);
+ fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
surf = new PG_DrawableSurface(t);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
***************
*** 743,746 ****
--- 744,748 ----
if (t == NULL) { PG_LogERR("SDL: %s", SDL_GetError()); exit(-1); }
GLSDL_FIX_SURFACE(t);
+ fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
surf = new PG_DrawableSurface(t);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
***************
*** 760,763 ****
--- 762,766 ----
if (t == NULL) { PG_LogERR("SDL: %s", SDL_GetError()); exit(-1); }
GLSDL_FIX_SURFACE(t);
+ fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
surf = new PG_DrawableSurface(t);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
Index: rotozoom.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/draw/rotozoom.cpp,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -C2 -r1.3.2.1 -r1.3.2.2
*** rotozoom.cpp 18 Jun 2002 22:40:38 -0000 1.3.2.1
--- rotozoom.cpp 31 Aug 2002 04:01:23 -0000 1.3.2.2
***************
*** 29,38 ****
*/
#include <cstdlib>
#include <cstring>
#include <cmath>
- #include "paragui.h"
- #include "pgdraw.h"
#include "drawpriv.hh"
--- 29,39 ----
*/
+ #include "paragui.h"
+ #include "pgdraw.h"
+
#include <cstdlib>
#include <cstring>
#include <cmath>
#include "drawpriv.hh"
Index: stretch.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/draw/stretch.cpp,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -C2 -r1.3.2.1 -r1.3.2.2
*** stretch.cpp 18 Jun 2002 22:40:38 -0000 1.3.2.1
--- stretch.cpp 31 Aug 2002 04:01:23 -0000 1.3.2.2
***************
*** 27,30 ****
--- 27,32 ----
*/
+ #include "pgdraw.h"
+
#include <cstdio>
#include <cstring>
***************
*** 32,36 ****
#include <cmath>
- #include "pgdraw.h"
#include "drawpriv.hh"
--- 34,37 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paragui-cvs] CVS: paragui/src/draw draw.cpp,1.1.2.4,1.1.2.5 drawable.cpp,1.1.2.2,1.1.2.3 drawtile.cpp,1.3.2.1,1.3.2.2 gradient.cpp,1.3.2.1,1.3.2.2 pgglcore.cpp,1.1.2.1,1.1.2.2 rotozoom.cpp,1.3.2.1,1.3.2.2 stretch.cpp,1.3.2.1,1.3.2.2,
Teunis Peters <address@hidden> <=
- Prev by Date:
[paragui-cvs] CVS: paragui/VisualC/test .cvsignore,NONE,1.2.2.1 test.dsp,1.1.1.1,1.1.1.1.2.1 test.mak,1.1.1.1,1.1.1.1.2.1
- Next by Date:
[paragui-cvs] CVS: paragui/VisualC/paragui_dynamic .cvsignore,NONE,1.2.2.1 Version.rc,NONE,1.2.2.1 resource.h,NONE,1.2.2.1 paragui_dynamic.dsp,1.1.1.1,1.1.1.1.2.1 paragui_dynamic.mak,1.1.1.1,1.1.1.1.2.1
- Previous by thread:
[paragui-cvs] CVS: paragui/VisualC/test .cvsignore,NONE,1.2.2.1 test.dsp,1.1.1.1,1.1.1.1.2.1 test.mak,1.1.1.1,1.1.1.1.2.1
- Next by thread:
[paragui-cvs] CVS: paragui/VisualC/paragui_dynamic .cvsignore,NONE,1.2.2.1 Version.rc,NONE,1.2.2.1 resource.h,NONE,1.2.2.1 paragui_dynamic.dsp,1.1.1.1,1.1.1.1.2.1 paragui_dynamic.mak,1.1.1.1,1.1.1.1.2.1
- Index(es):