[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus/src/video graphic.c
From: |
Nehal Mistry |
Subject: |
[Stratagus-CVS] stratagus/src/video graphic.c |
Date: |
Thu, 20 Nov 2003 01:53:15 -0500 |
CVSROOT: /cvsroot/stratagus
Module name: stratagus
Branch:
Changes by: Nehal Mistry <address@hidden> 03/11/20 01:53:14
Modified files:
src/video : graphic.c
Log message:
flipped surfaces shares the normal surface palette
Patches:
Index: stratagus/src/video/graphic.c
diff -u stratagus/src/video/graphic.c:1.50 stratagus/src/video/graphic.c:1.51
--- stratagus/src/video/graphic.c:1.50 Thu Nov 20 01:43:42 2003
+++ stratagus/src/video/graphic.c Thu Nov 20 01:53:14 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: graphic.c,v 1.50 2003/11/20 06:43:42 nehalmistry Exp $
+// $Id: graphic.c,v 1.51 2003/11/20 06:53:14 nehalmistry Exp $
//@{
@@ -585,6 +585,11 @@
((char*)s->pixels)[j + i * s->w] =
((char*)graphic->Surface->pixels)[s->w - j + i * s->w];
}
+ }
+
+ if (s->format->palette) {
+ free(s->format->palette);
+ s->format->palette = graphic->Surface->format->palette;
}
SDL_UnlockSurface(s);