xulchris 47a534b
--- src/mixer.c.orig	2005-08-10 23:14:27.000000000 -0700
xulchris 47a534b
+++ src/mixer.c	2006-04-20 14:16:28.000000000 -0700
xulchris 47a534b
@@ -81,7 +81,7 @@
xulchris 47a534b
 	    channeldata[channel].queue = NULL;
xulchris 47a534b
 	    channelnum = Mix_PlayChannelTimed(channel, sound, 0, -1);
xulchris 47a534b
 	    if(channelnum != -1)
xulchris 47a534b
-	    	Mix_GroupChannel(channelnum, (int)sound);
xulchris 47a534b
+	    	Mix_GroupChannel(channelnum, (intptr_t)sound);
xulchris 47a534b
 	}
xulchris 47a534b
 	else
xulchris 47a534b
 	{
xulchris 47a534b
@@ -354,7 +354,7 @@
xulchris 47a534b
 	//make sure volume on this arbitrary channel is set to full
xulchris 47a534b
 	Mix_Volume(channelnum, 128);
xulchris 47a534b
 
xulchris 47a534b
-	Mix_GroupChannel(channelnum, (int)chunk);
xulchris 47a534b
+	Mix_GroupChannel(channelnum, (intptr_t)chunk);
xulchris 47a534b
 	return PyChannel_New(channelnum);
xulchris 47a534b
 }
xulchris 47a534b
 
xulchris 47a534b
@@ -378,7 +378,7 @@
xulchris 47a534b
 
xulchris 47a534b
 	MIXER_INIT_CHECK();
xulchris 47a534b
 
xulchris 47a534b
-	return PyInt_FromLong(Mix_GroupCount((int)chunk));
xulchris 47a534b
+	return PyInt_FromLong(Mix_GroupCount((intptr_t)chunk));
xulchris 47a534b
 }
xulchris 47a534b
 
xulchris 47a534b
 
xulchris 47a534b
@@ -440,7 +440,7 @@
xulchris 47a534b
 
xulchris 47a534b
 	MIXER_INIT_CHECK();
xulchris 47a534b
 
xulchris 47a534b
-	Mix_FadeOutGroup((int)chunk, time);
xulchris 47a534b
+	Mix_FadeOutGroup((intptr_t)chunk, time);
xulchris 47a534b
 	RETURN_NONE
xulchris 47a534b
 }
xulchris 47a534b
 
xulchris 47a534b
@@ -460,7 +460,7 @@
xulchris 47a534b
 
xulchris 47a534b
 	MIXER_INIT_CHECK();
xulchris 47a534b
 
xulchris 47a534b
-	Mix_HaltGroup((int)chunk);
xulchris 47a534b
+	Mix_HaltGroup((intptr_t)chunk);
xulchris 47a534b
 	RETURN_NONE
xulchris 47a534b
 }
xulchris 47a534b
 
xulchris 47a534b
@@ -661,7 +661,7 @@
xulchris 47a534b
 
xulchris 47a534b
 	channelnum = Mix_PlayChannelTimed(channelnum, chunk, loops, playtime);
xulchris 47a534b
 	if(channelnum != -1)
xulchris 47a534b
-		Mix_GroupChannel(channelnum, (int)chunk);
xulchris 47a534b
+		Mix_GroupChannel(channelnum, (intptr_t)chunk);
xulchris 47a534b
 
xulchris 47a534b
         Py_XDECREF(channeldata[channelnum].sound);
xulchris 47a534b
 	Py_XDECREF(channeldata[channelnum].queue);
xulchris 47a534b
@@ -705,7 +705,7 @@
xulchris 47a534b
 	{
xulchris 47a534b
 	    channelnum = Mix_PlayChannelTimed(channelnum, chunk, 0, -1);
xulchris 47a534b
 	    if(channelnum != -1)
xulchris 47a534b
-		    Mix_GroupChannel(channelnum, (int)chunk);
xulchris 47a534b
+		    Mix_GroupChannel(channelnum, (intptr_t)chunk);
xulchris 47a534b
 
xulchris 47a534b
             channeldata[channelnum].sound = sound;
xulchris 47a534b
             Py_INCREF(sound);
xulchris 47a534b
--- src/overlay.c.org	2005-08-09 19:45:15.000000000 -0700
xulchris 47a534b
+++ src/overlay.c	2006-04-20 14:16:28.000000000 -0700
xulchris 47a534b
@@ -85,7 +85,7 @@
xulchris 47a534b
 {
xulchris 47a534b
 	// Parse data params for frame
xulchris 47a534b
 	int ls_y, ls_u, ls_v, y;
xulchris 47a534b
-	unsigned char *dst_y, *dst_u, *dst_v, *src_y, *src_u, *src_v;
xulchris 47a534b
+	void *dst_y, *dst_u, *dst_v, *src_y, *src_u, *src_v;
xulchris 47a534b
 	if(!PyArg_ParseTuple(args, "(s#s#s#)", &src_y, &ls_y, &src_u, &ls_u, &src_v, &ls_v))
xulchris 47a534b
 		return NULL;
xulchris 47a534b
 
xulchris 47a534b
@@ -94,9 +94,9 @@
xulchris 47a534b
 		SDL_LockYUVOverlay( self->cOverlay );
xulchris 47a534b
 
xulchris 47a534b
 		// No clipping at this time( only support for YUV420 )
xulchris 47a534b
-		dst_y = (char*)self->cOverlay->pixels[ 0 ];
xulchris 47a534b
-		dst_v = (char*)self->cOverlay->pixels[ 1 ];
xulchris 47a534b
-		dst_u = (char*)self->cOverlay->pixels[ 2 ];
xulchris 47a534b
+		dst_y = (void*)self->cOverlay->pixels[ 0 ];
xulchris 47a534b
+		dst_v = (void*)self->cOverlay->pixels[ 1 ];
xulchris 47a534b
+		dst_u = (void*)self->cOverlay->pixels[ 2 ];
xulchris 47a534b
 		for (y=0; y< self->cOverlay->h; y++)
xulchris 47a534b
 		{
xulchris 47a534b
 			memcpy( dst_y, src_y, self->cOverlay->w );
xulchris 47a534b
--- src/time.c.org	2004-07-22 17:33:08.000000000 -0700
xulchris 47a534b
+++ src/time.c	2006-04-20 14:24:43.000000000 -0700
xulchris 47a534b
@@ -34,7 +34,7 @@
xulchris 47a534b
 	{
xulchris 47a534b
 		SDL_Event event;
xulchris 47a534b
 		memset(&event, 0, sizeof(event));
xulchris 47a534b
-		event.type = (int)param;
xulchris 47a534b
+		event.type = (intptr_t)param;
xulchris 47a534b
 		SDL_PushEvent(&event);
xulchris 47a534b
 	}
xulchris 47a534b
 	return interval;
xulchris 47a534b
@@ -193,7 +193,8 @@
xulchris 47a534b
 static PyObject* time_set_timer(PyObject* self, PyObject* arg)
xulchris 47a534b
 {
xulchris 47a534b
 	SDL_TimerID newtimer;
xulchris 47a534b
-	int ticks = 0, event = SDL_NOEVENT;
xulchris 47a534b
+	int ticks = 0;
xulchris 47a534b
+	intptr_t event = SDL_NOEVENT;
xulchris 47a534b
 	if(!PyArg_ParseTuple(arg, "ii", &event, &ticks))
xulchris 47a534b
 		return NULL;
xulchris 47a534b
 
xulchris 47a534b
--- src/surface.c.orig	2005-02-05 16:03:07.000000000 -0800
xulchris 47a534b
+++ src/surface.c	2006-04-20 15:01:07.000000000 -0700
xulchris 47a534b
@@ -35,7 +35,7 @@
xulchris 47a534b
                         SDL_Surface *dst, SDL_Rect *dstrect);
xulchris 47a534b
 
xulchris 47a534b
 static PyObject* surface_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
xulchris 47a534b
-static int surface_init(PySurfaceObject *self, PyObject *args, PyObject *kwds);
xulchris 47a534b
+static intptr_t surface_init(PySurfaceObject *self, PyObject *args, PyObject *kwds);
xulchris 47a534b
 
xulchris 47a534b
 
xulchris 47a534b
 /* surface object methods */
xulchris 47a534b
@@ -1880,7 +1880,7 @@
xulchris 47a534b
     return (PyObject *)self;
xulchris 47a534b
 }
xulchris 47a534b
 
xulchris 47a534b
-static int surface_init(PySurfaceObject *self, PyObject *args, PyObject *kwds)
xulchris 47a534b
+static intptr_t surface_init(PySurfaceObject *self, PyObject *args, PyObject *kwds)
xulchris 47a534b
 {
xulchris 47a534b
 	Uint32 flags = 0;
xulchris 47a534b
 	int width, height;
xulchris 47a534b
@@ -1904,19 +1904,19 @@
xulchris 47a534b
 	if(depth && masks) /*all info supplied, most errorchecking needed*/
xulchris 47a534b
 	{
xulchris 47a534b
 		if(PySurface_Check(depth))
xulchris 47a534b
-			return (int)RAISE(PyExc_ValueError, "cannot pass surface for depth and color masks");
xulchris 47a534b
+			return (intptr_t)RAISE(PyExc_ValueError, "cannot pass surface for depth and color masks");
xulchris 47a534b
 		if(!IntFromObj(depth, &bpp))
xulchris 47a534b
-			return (int)RAISE(PyExc_ValueError, "invalid bits per pixel depth argument");
xulchris 47a534b
+			return (intptr_t)RAISE(PyExc_ValueError, "invalid bits per pixel depth argument");
xulchris 47a534b
 		if(!PySequence_Check(masks) || PySequence_Length(masks)!=4)
xulchris 47a534b
-			return (int)RAISE(PyExc_ValueError, "masks argument must be sequence of four numbers");
xulchris 47a534b
+			return (intptr_t)RAISE(PyExc_ValueError, "masks argument must be sequence of four numbers");
xulchris 47a534b
 		if(!UintFromObjIndex(masks, 0, &Rmask) || !UintFromObjIndex(masks, 1, &Gmask) ||
xulchris 47a534b
 					!UintFromObjIndex(masks, 2, &Bmask) || !UintFromObjIndex(masks, 3, &Amask))
xulchris 47a534b
-			return (int)RAISE(PyExc_ValueError, "invalid mask values in masks sequence");
xulchris 47a534b
+			return (intptr_t)RAISE(PyExc_ValueError, "invalid mask values in masks sequence");
xulchris 47a534b
 	}
xulchris 47a534b
 	else if(depth && PyNumber_Check(depth))/*use default masks*/
xulchris 47a534b
 	{
xulchris 47a534b
 		if(!IntFromObj(depth, &bpp))
xulchris 47a534b
-			return (int)RAISE(PyExc_ValueError, "invalid bits per pixel depth argument");
xulchris 47a534b
+			return (intptr_t)RAISE(PyExc_ValueError, "invalid bits per pixel depth argument");
xulchris 47a534b
 		if(flags & SDL_SRCALPHA)
xulchris 47a534b
 		{
xulchris 47a534b
 			switch(bpp)
xulchris 47a534b
@@ -1926,7 +1926,7 @@
xulchris 47a534b
 			case 32:
xulchris 47a534b
 				Rmask = 0xFF<<16; Gmask = 0xFF<<8; Bmask = 0xFF; Amask = 0xFF<<24; break;
xulchris 47a534b
 			default:
xulchris 47a534b
-				return (int)RAISE(PyExc_ValueError, "no standard masks exist for given bitdepth with alpha");
xulchris 47a534b
+				return (intptr_t)RAISE(PyExc_ValueError, "no standard masks exist for given bitdepth with alpha");
xulchris 47a534b
 			}
xulchris 47a534b
 		}
xulchris 47a534b
 		else
xulchris 47a534b
@@ -1946,7 +1946,7 @@
xulchris 47a534b
 			case 32:
xulchris 47a534b
 				Rmask = 0xFF<<16; Gmask = 0xFF<<8; Bmask = 0xFF; break;
xulchris 47a534b
 			default:
xulchris 47a534b
-				return (int)RAISE(PyExc_ValueError, "nonstandard bit depth given");
xulchris 47a534b
+				return (intptr_t)RAISE(PyExc_ValueError, "nonstandard bit depth given");
xulchris 47a534b
 			}
xulchris 47a534b
 		}
xulchris 47a534b
 	}