Thanks! Nice spot. I've updated the PPP tutorial to fix this. The code is now:
defs.h:
#define MAX_TILES 8
map.c:
static void loadTiles(void) { int i; char filename[MAX_FILENAME_LENGTH]; for (i = 1 ; i < MAX_TILES ; i++) { sprintf(filename, "gfx/tile%d.png", i); tiles[i] = loadTexture(filename); } }
That should all work now (unless I've somehow introduced another bug somehow..!)