Some graphics library cleanup
This commit is contained in:
parent
b5f45a61eb
commit
3b65888eb1
|
@ -554,21 +554,24 @@ transformSurfaceY (SDL_Surface * src, SDL_Surface * dst, int cx, int cy,
|
|||
|
||||
*/
|
||||
|
||||
/*XPUT/* Sanity check */
|
||||
/* Determine if source surface is 32bit or 8bit */
|
||||
/* New source surface is 32bit with a defined RGBA ordering */
|
||||
/* Sanity check zoom factor */
|
||||
/* Check if we have a rotozoom or just a zoom */
|
||||
/* Angle!=0: full rotozoom *
|
||||
//* ----------------------- */
|
||||
/* Calculate target factors from sin/cos and zoom
|
||||
/*
|
||||
Sanity check
|
||||
Determine if source surface is 32bit or 8bit
|
||||
New source surface is 32bit with a defined RGBA ordering
|
||||
Sanity check zoom factor
|
||||
Check if we have a rotozoom or just a zoom
|
||||
Angle!=0: full rotozoom
|
||||
Calculate target factors from sin/cos and zoom
|
||||
*/
|
||||
|
||||
/*
|
||||
Determine destination width and height by rotating a centered source box
|
||||
Alloc space to completely contain the rotated surface
|
||||
Target surface is 32bit with source RGBA/ABGR ordering
|
||||
Lock source surface
|
||||
Check which kind of surface we have
|
||||
Call the 32bit transformation routine to do the rotation (using alpha)
|
||||
*/
|
||||
/* Determine destination width and height by rotating a centered source box */
|
||||
/* Alloc space to completely contain the rotated surface */
|
||||
/* Target surface is 32bit with source RGBA/ABGR ordering */
|
||||
/* Lock source surface */
|
||||
/* Check which kind of surface we have */
|
||||
/* Call the 32bit transformation routine to do the rotation (using alpha) */
|
||||
|
||||
#define VALUE_LIMIT 0.001
|
||||
|
||||
|
|
|
@ -177,20 +177,26 @@ FILE * memo ;
|
|||
* nombre.
|
||||
* @param nombre_program Nombre del programa, obtenido de fp->nombre_program
|
||||
*/
|
||||
void guarda_pantallazo(char* nombre_program)
|
||||
void guarda_pantallazo(unsigned char *nombre_program)
|
||||
{
|
||||
char capturef[256];
|
||||
int c=0;
|
||||
FILE* f;
|
||||
|
||||
sprintf(capturef,"%s%04d.bmp",nombre_program,c);
|
||||
while(f=fopen(capturef,"rb")) {
|
||||
fclose(f);
|
||||
c++;
|
||||
sprintf(capturef,"%s%04d.bmp",nombre_program,c);
|
||||
if(c==0)
|
||||
while(1) {
|
||||
/* 256 son mas que suficientes */
|
||||
if (c >= 256)
|
||||
break;
|
||||
|
||||
sprintf(capturef,"%s%04d.bmp",nombre_program,c);
|
||||
f = fopen(capturef, "rb");
|
||||
|
||||
if (f == NULL)
|
||||
c++;
|
||||
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
SDL_SaveBMP(screen,capturef);
|
||||
}
|
||||
|
||||
|
@ -344,25 +350,6 @@ void frame(FUNCTION_PARAMS)
|
|||
{
|
||||
if ( draws[i].existe )
|
||||
{
|
||||
|
||||
/* if ( draws[i].x + draws[i].Surface->w >= fp->regions[0].x && draws[i].x < fp->regions[0].x + fp->regions[0].w &&
|
||||
draws[i].y + draws[i].Surface->h >= fp->regions[0].y && draws[i].y < fp->regions[0].y + fp->regions[0].h )
|
||||
{
|
||||
if ( draws[i].x >= fp->regions[0].x && draws[i].x + draws[i].Surface->w < fp->regions[0].x + fp->regions[0].w &&
|
||||
draws[i].y >= fp->regions[0].y && draws[i].y + draws[i].Surface->h < fp->regions[0].y + fp->regions[0].h )
|
||||
{
|
||||
srcrect.x = 0 ;
|
||||
srcrect.y = 0 ;
|
||||
srcrect.w = draws[i].Surface->w ;
|
||||
srcrect.h = draws[i].Surface->h ;
|
||||
|
||||
dstrect.x = draws[i].x ;
|
||||
dstrect.y = draws[i].y ;
|
||||
dstrect.w = 0 ; /* Se ignora *//*
|
||||
dstrect.h = 0 ; /* Se ignora *//*
|
||||
Dibuja( draws[i].Surface , srcrect , dstrect , z , draws[i].t,100,0) ;
|
||||
}
|
||||
}*/
|
||||
Dibuja(draws[i].Surface,draws[i].x,draws[i].y,0,0,draws[i].region,z,0,draws[i].t,100,0);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue