[Scummvm-cvs-logs] CVS: scummvm x11.cpp,1.22,1.23
Lionel Ulmer
bbrox at users.sourceforge.net
Wed May 1 02:42:03 CEST 2002
Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv15090
Modified Files:
x11.cpp
Log Message:
Zero-initialize the palette and the frame buffer.
Index: x11.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/x11.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** x11.cpp 28 Apr 2002 00:57:16 -0000 1.22
--- x11.cpp 1 May 2002 09:41:54 -0000 1.23
***************
*** 134,140 ****
#ifdef USE_XV_SCALING
! unsigned int palette[256];
#else
! unsigned short palette[256];
#endif
bool _palette_changed;
--- 134,140 ----
#ifdef USE_XV_SCALING
! unsigned int *palette;
#else
! unsigned short *palette;
#endif
bool _palette_changed;
***************
*** 381,386 ****
create_empty_cursor();
! /* Initialize the 'local' frame buffer */
! local_fb = (unsigned char *)malloc(320 * 200 * sizeof(unsigned char));
/* And finally start the local timer */
--- 381,391 ----
create_empty_cursor();
! /* Initialize the 'local' frame buffer and the palette */
! local_fb = (unsigned char *)calloc(320 * 200, sizeof(unsigned char));
! #ifdef USE_XV_SCALING
! palette = (unsigned int *)calloc(256, sizeof(unsigned int));
! #else
! palette = (unsigned short *)calloc(256, sizeof(unsigned short));
! #endif
/* And finally start the local timer */
***************
*** 484,487 ****
--- 489,493 ----
unsigned short *ptr_dst = ((unsigned short *)image->data) + (320 * d->y) + d->x;
#endif
+
for (y = 0; y < d->h; y++) {
for (x = 0; x < d->w; x++) {
More information about the Scummvm-git-logs
mailing list