Makefile updated. Small init changes in game_engine

This commit is contained in:
Marc
2014-12-11 07:49:42 +13:00
parent 0a76b9c452
commit da0ff59971
3 changed files with 10 additions and 13 deletions

View File

@@ -235,11 +235,6 @@ struct gamestate* gamestate_init(struct gameoptions *opt)
for (i = 0; i < g->gridsize; i += opt->grid_width)
*iterator++ = &grid_back[i];
/* Switch back to the two allocs, setting pointers by iterating though */
//size_t i;
//for (i = 0; i < opt->grid_height; ++i)
// g->grid[i] = calloc(opt->grid_height, sizeof(long));
g->moved = 0;
g->score = 0;
g->score_high = 0;
@@ -255,6 +250,7 @@ struct gamestate* gamestate_init(struct gameoptions *opt)
return g;
grid_alloc_fail:
free(grid_back);
grid_back_alloc_fail:
free(g);
gamestate_alloc_fail: