summaryrefslogtreecommitdiffstats
path: root/gst/goom/goom_core.c
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2003-02-02 05:26:29 +0000
committerDavid Schleef <ds@schleef.org>2003-02-02 05:26:29 +0000
commitdf0b94aae40c654ce58a6d164c920ae4f1b3f224 (patch)
treed365fc5562870f3c1bec2472a3ab2cc53dd91fab /gst/goom/goom_core.c
parent85f9831b2fb8f4fa1bcf122f50e0f8cd8b5ee52f (diff)
Change %lld, %llu to G_G[U]INT64_FORMAT globally. Fix bad pointer->integer conversion.
Original commit message from CVS: Change %lld, %llu to G_G[U]INT64_FORMAT globally. Fix bad pointer->integer conversion.
Diffstat (limited to 'gst/goom/goom_core.c')
-rw-r--r--gst/goom/goom_core.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/gst/goom/goom_core.c b/gst/goom/goom_core.c
index ab2fea69..cf841127 100644
--- a/gst/goom/goom_core.c
+++ b/gst/goom/goom_core.c
@@ -35,11 +35,11 @@ void goom_init (guint32 resx, guint32 resy)
pixel = (guint32 *) malloc (buffsize * sizeof(guint32) + 128);
back = (guint32 *) malloc (buffsize * sizeof(guint32) + 128);
- RAND_INIT ((guint32)pixel) ;
+ RAND_INIT (GPOINTER_TO_INT(pixel));
cycle = 0 ;
- p1 = (guint32 *)((1+((unsigned int)(pixel))/128)*128);
- p2 = (guint32 *)((1+((unsigned int)(back))/128)*128);
+ p1 = (void *)(((unsigned long)pixel + 0x7f)&(~0x7f));
+ p2 = (void *)(((unsigned long)back + 0x7f)&(~0x7f));
}
@@ -53,11 +53,12 @@ void goom_set_resolution (guint32 resx, guint32 resy)
buffsize = resx * resy;
pixel = (guint32 *) malloc (buffsize * sizeof(guint32) + 128);
- bzero(pixel,buffsize * sizeof(guint32) + 128);
+ memset(pixel,0,buffsize * sizeof(guint32) + 128);
back = (guint32 *) malloc (buffsize * sizeof(guint32) + 128);
- bzero(back,buffsize * sizeof(guint32) + 128);
- p1 = (guint32 *)((1+((unsigned int)(pixel))/128)*128);
- p2 = (guint32 *)((1+((unsigned int)(back))/128)*128);
+ memset(back,0,buffsize * sizeof(guint32) + 128);
+
+ p1 = (void *)(((unsigned long)pixel + 0x7f)&(~0x7f));
+ p2 = (void *)(((unsigned long)back + 0x7f)&(~0x7f));
}