Bien, aquí esta lo que te comentaba de utilizar al máximo las bondades del orientado a objetos y del tipo vector de c++, pero creo que solo tendrás que cambiar la parte en que se incluye la librería SDL.
Dudas, pregunta

using namespace std;
#include <SDL/SDL.h>
#include <stdio.h>
#include <iostream>
#include <math.h>
#include <vector>
#include <time.h> //para la semilla aleatoria...
/*El tamaño de la ventana...*/
#define screenWidth 256
#define screenHeight 256
/* Defino algunos colores que utilizare */
SDL_Color GRIS = {155,155,155};
SDL_Color VERDE = {0,255,0};
SDL_Color AZUL = {0,0,255};
SDL_Color ROJO = {255,0,0};
//*
/* Primero los prototipos de función, por qué, es una buena practica */
//inicializar a SDL
SDL_Surface * inicia(int,int,int,const char*,const char*);
//llenar una superficie...
void fill(SDL_Surface *, SDL_Color); //como amo la sobrecarga de operadores 
void fill(SDL_Surface *, SDL_Color, SDL_Rect);
/******************************************************************************/
//Defino las clases de nuestros personajes... primero, un objeto sprite...
class Sprite{
SDL_Rect persona;
SDL_Color color;
public:
Sprite(void){
this->SetPersona(0,0,32,32);
this->SetColor(ROJO);
this->SetPos(10,10);
};
~Sprite(void){};
SDL_Rect GetPersona(void){
return this->persona;
};
void SetPersona(int px, int py, int pw, int ph){
this->persona.x = px;
this->persona.y = py;
this->persona.w = pw;
this->persona.h = ph;
}
void SetColor(SDL_Color color){
this->color = color;
}
void SetPos(int px, int py){
this->persona.x = px;
this->persona.y = py;
}
virtual void update(void){
};
void dibujar(SDL_Surface * pantalla){
fill(pantalla,this->color,this->GetPersona());
};
/**colisión resive un sprite y revisa si choco con el mismo...*/
bool colision(Sprite sprite_a){
//obtenemos la rects de los sprites...
SDL_Rect a = sprite_a.GetPersona();
SDL_Rect b = this->GetPersona();
return ((a.x < b.x + b.w) && (b.x < a.x + a.w) && (a.y < b.y + b.h) && (b.y < a.y + a.h));
}
};
//ahora defino a los personajes, en este caso... nuestro heroe...
class Heroe:public Sprite{
int pos_x, pos_y;
public:
Heroe(void){
this->SetPersona(0,0,32,32);
this->SetColor(VERDE);
pos_x=100;
pos_y=100;
this->SetPos(pos_x,pos_y);
};
~Heroe(void){};
//**Solo definimos el metodo update, dibujar lo heredan de Sprite...
void update(){
Uint8 *keys;
keys=SDL_GetKeyState(NULL);
if (keys[SDLK_LEFT] == 1){
pos_x-=5;
}
else if (keys[SDLK_RIGHT] == 1){
pos_x+=5;
}
if (keys[SDLK_UP] == 1){
pos_y-=5;
}
else if (keys[SDLK_DOWN] == 1){
pos_y+=5;
}
this->SetPos(pos_x,pos_y);
}
};
//Defino los items...
class Item:public Sprite{
int pos_x, pos_y;
int buf, delta;
public:
Item(int x, int y){
this->SetColor(AZUL);
pos_x=x;
pos_y=y;
delta = 1;
buf = 16;
this->SetPersona(0,0,buf,buf);
this->SetPos(pos_x,pos_y);
};
~Item(void){};
void update(){
if (buf > 20 || buf < 16 ){
delta = -delta;
}
buf += delta;
this->SetPersona(0,0,buf,buf);
this->SetPos(pos_x,pos_y);
}
};
/******************************************************************************/
//La función principal...
/******************************************************************************/
int main( int argc, char *argv[] ){
SDL_Surface *screen;
screen = inicia(screenWidth,screenHeight,0,"Manejo sprites","Nullo");
//defino variables para manejar el tiempo...
Uint32 waittime = 1000/30; // fijo a 30 fps
Uint32 framestarttime = 0;
Sint32 delaytime;
//defino las variables para la entrada...
Uint8 *keys;
SDL_Event event;
//defino al heroe...
Heroe heroe = Heroe();
//creo los grupos
//*definimos un vector que contendra Items...
vector<Item> GItems;
//* y un que contendra nuestro heroe...
vector<Heroe> GHeroe;
GHeroe.push_back(heroe);
//creo 5 items y los agrego a la lista...
int i;
srand ( time(NULL) );
for(i=0;i<10;i++){
//colocamos los items de manera aleatoria...
Item it(Item(10+(rand()%screenHeight-20), //pos en x
10+(rand()%screenHeight-20))); // pos en y
GItems.push_back(it);
}
// una variable que sostiene el bucle...
bool jugar = 1;
while(jugar){
//lo siguiente mantiene el framerate constante...
delaytime = waittime - (SDL_GetTicks() - framestarttime);
if(delaytime > 0){
SDL_Delay((Uint32)delaytime);}
framestarttime = SDL_GetTicks();
fill(screen,GRIS);
//dibujo todos los objetos contenidos en el grupo GItems...
for(i=0;i<GItems.size();i++){
GItems[i].update();
GItems[i].dibujar(screen);
//si hay una colisión con el heroe, removemos el item de la lista...
if (GItems[i].colision(heroe)){
cout << "colision con item " << endl;
GItems.erase(GItems.begin()+i);
}
}
/*
actualizamos y dibujamos al heroe....
*/
heroe.dibujar(screen);
heroe.update();
SDL_Flip(screen);
//y esto revisa los eventos de las teclas y eventos
keys=SDL_GetKeyState(NULL);
while ( SDL_PollEvent(&event) ) {
//si se presiona la tecla escape, o hay un evento de cierre...
if ( (event.type == SDL_KEYDOWN && keys[SDLK_ESCAPE] == 1) || (event.type == SDL_QUIT) ){
jugar = 0; //cerrara el programa
}
}
//termina el bucle de juego...
}
//limpiamos la casa...
SDL_Quit();
//...salimos.
return 0;
};
/******************************************************************************/
/**
Las funciones las suelo declarar después del main....
**/
/******************************************************************************/
SDL_Surface * inicia(int W, int H,int Full, const char *title,const char *ico){
// Iniciar SDL
SDL_Surface *temp;
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
exit(1);
}
// Activamos modo de video
if(Full){ }
else{
temp = SDL_SetVideoMode(W,H,32,SDL_HWSURFACE);
if (temp == NULL) {
exit(1);
}
}
SDL_WM_SetCaption(title, ico);
return temp;
}
//------
void fill(SDL_Surface * surf, SDL_Color color) {
//cout << ">> La imagen se llena de color " << surf->w << endl;
SDL_Rect Rect = {0,0,surf->w,surf->h};
SDL_FillRect(surf, &Rect, SDL_MapRGBA(surf->format,color.r,color.g,color.b,255) );
};
void fill(SDL_Surface * surf, SDL_Color color, SDL_Rect rect){
SDL_FillRect(surf, &rect, SDL_MapRGBA(surf->format,color.r,color.g,color.b,255) );
};
//------