paragui-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paragui-cvs] CVS: paragui/test dblbuffer.cpp,1.1.1.1,1.1.1.1.6.1


From: Alexander Pipelka <address@hidden>
Subject: [paragui-cvs] CVS: paragui/test dblbuffer.cpp,1.1.1.1,1.1.1.1.6.1
Date: Mon, 03 Jun 2002 05:15:46 -0400

Update of /cvsroot/paragui/paragui/test
In directory subversions:/tmp/cvs-serv8317/test

Modified Files:
      Tag: devel-1-0
        dblbuffer.cpp 
Log Message:
added VC workspace for the dblbuffer demo
some fixes in dblbuffer.cpp



Index: dblbuffer.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/test/dblbuffer.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.6.1
diff -C2 -r1.1.1.1 -r1.1.1.1.6.1
*** dblbuffer.cpp       15 Apr 2002 13:22:29 -0000      1.1.1.1
--- dblbuffer.cpp       3 Jun 2002 09:15:44 -0000       1.1.1.1.6.1
***************
*** 44,51 ****
  int LoadSprite(SDL_Surface *screen, char *file)
  {
-       SDL_Surface *temp;
- 
        /* Load the sprite image */
!       sprite = SDL_LoadBMP(file);
        if ( sprite == NULL ) {
                PG_LogMSG( "Couldn't load %s: %s", file, SDL_GetError());
--- 44,49 ----
  int LoadSprite(SDL_Surface *screen, char *file)
  {
        /* Load the sprite image */
!       sprite = PG_FileArchive::LoadSurface(file, true);
        if ( sprite == NULL ) {
                PG_LogMSG( "Couldn't load %s: %s", file, SDL_GetError());
***************
*** 59,72 ****
        }
  
-       /* Convert sprite to video format */
-       temp = SDL_DisplayFormat(sprite);
-       SDL_FreeSurface(sprite);
-       if ( temp == NULL ) {
-               PG_LogMSG( "Couldn't convert background: %s",
-                                                       SDL_GetError());
-               return(-1);
-       }
-       sprite = temp;
- 
        /* We're ready to roll. :) */
        return(0);
--- 57,60 ----
***************
*** 80,83 ****
--- 68,73 ----
        nupdates = 0;
  
+       SDL_SetAlpha(sprite, 0, 0);
+ 
        /* Move the sprite, bounce at the wall, and draw */
        for ( i=0; i<numsprites; ++i ) {
***************
*** 345,349 ****
                }
        }
-       SDL_FreeSurface(sprite);
        free(mem);
  
--- 335,338 ----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]