[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-cvs] CVS: paragui/test dblbuffer.cpp,1.4.2.12,1.4.2.13
From: |
Teunis Peters <address@hidden> |
Subject: |
[paragui-cvs] CVS: paragui/test dblbuffer.cpp,1.4.2.12,1.4.2.13 |
Date: |
Mon, 14 Apr 2003 05:11:53 -0400 |
Update of /cvsroot/paragui/paragui/test
In directory subversions:/tmp/cvs-serv31546/test
Modified Files:
Tag: devel-opengl
dblbuffer.cpp
Log Message:
various fixes and some new ideas that look to be useful
Index: dblbuffer.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/test/dblbuffer.cpp,v
retrieving revision 1.4.2.12
retrieving revision 1.4.2.13
diff -C2 -r1.4.2.12 -r1.4.2.13
*** dblbuffer.cpp 26 Jan 2003 21:27:20 -0000 1.4.2.12
--- dblbuffer.cpp 14 Apr 2003 09:11:50 -0000 1.4.2.13
***************
*** 48,56 ****
/* Set transparent pixel as the pixel at (0,0) */
// if ( sprite->GetFormat()->palette ) {
! sprite->SetColorKey((SDL_SRCCOLORKEY|SDL_RLEACCEL),
! *(Uint8 *)sprite->GetPixels());
// }
! #if 1
/* Convert sprite to video format */
temp = screen->GetCreator()->AccelerateSurface(sprite,true);
--- 48,63 ----
/* Set transparent pixel as the pixel at (0,0) */
// if ( sprite->GetFormat()->palette ) {
! // sprite->SetColorKey((SDL_SRCCOLORKEY|SDL_RLEACCEL),
! // *(Uint8 *)sprite->GetPixels());
! #if 0
! sprite->SetColorKey(SDL_SRCCOLORKEY,
! *(Uint8 *)sprite->GetPixels());
! #else
! sprite->SetColorKey(SDL_SRCCOLORKEY,
! *((Uint32 *)sprite->GetPixels() + 1));
! #endif
// }
! #if 0
/* Convert sprite to video format */
temp = screen->GetCreator()->AccelerateSurface(sprite,true);
***************
*** 61,66 ****
// delete sprite;
sprite = temp;
- #endif
/* We're ready to roll. :) */
return(0);
}
--- 68,73 ----
// delete sprite;
sprite = temp;
/* We're ready to roll. :) */
+ #endif
return(0);
}
***************
*** 71,78 ****
--- 78,87 ----
SDL_Rect *position, *velocity;
PG_Rect area;
+ PG_Rect spritearea;
nupdates = 0;
sprite->SetAlpha(0, 0);
+ // spritearea = PG_Rect(0,0,sprite->GetWidth(),sprite->GetHeight());
/* Move the sprite, bounce at the wall, and draw */
***************
*** 93,97 ****
/* Blit the sprite onto the screen */
area = *position;
! screen->BlitSurface(sprite, PG_Rect(), area);
sprite_rects[nupdates++] = area;
}
--- 102,106 ----
/* Blit the sprite onto the screen */
area = *position;
! screen->BlitSurface(sprite, spritearea, area);
sprite_rects[nupdates++] = area;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paragui-cvs] CVS: paragui/test dblbuffer.cpp,1.4.2.12,1.4.2.13,
Teunis Peters <address@hidden> <=
- Prev by Date:
[paragui-cvs] CVS: paragui/include pgdraw.h,1.4.2.11,1.4.2.12 pgfont.h,1.4.2.3,1.4.2.4
- Next by Date:
[paragui-cvs] CVS: paragui TODO,1.1.1.1.2.12,1.1.1.1.2.13
- Previous by thread:
[paragui-cvs] CVS: paragui/include pgdraw.h,1.4.2.11,1.4.2.12 pgfont.h,1.4.2.3,1.4.2.4
- Next by thread:
[paragui-cvs] CVS: paragui TODO,1.1.1.1.2.12,1.1.1.1.2.13
- Index(es):