Example #1
0
//moves the value next
void list_insert(list_t list, film_t * film, int index)
{
    if(index > list->size || index < 0)
        return; // ERROR
    shiftright(list, index);
    list->filmArray[index] = film;
    list->size++;
}
Example #2
0
void TileMap::shift(int dx, int dy)
{
	while (dx < 0)
	{
		shiftleft();
		dx++;
	}
	while (dx > 0)
	{
		shiftright();
		dx--;
	}
	while (dy < 0)
	{
		shiftup();
		dy++;
	}
	while (dy > 0)
	{
		shiftdown();
		dy--;
	}
}