Version 1.5.0

Big Refactor
This commit is contained in:
Andre Schweiger 2018-02-04 18:05:43 +01:00
parent 3b2a0f4de8
commit d2f7796b79
49 changed files with 5306 additions and 3590 deletions

View file

@ -1,5 +1,15 @@
#include "Crafting.h"
void cloneRecipeManager(RecipeManager *from, RecipeManager *to) {
//free old manager recipes
free(to->recipes);
//copy over recipes
to->size = from->size;
to->recipes = (Recipe*)malloc(sizeof(Recipe) * to->size);
memcpy(to->recipes, from->recipes, sizeof(Recipe) * to->size);
}
void checkCanCraftRecipes(RecipeManager * rm, Inventory * inv){
int i, j;
for(i = 0; i < rm->size; i++){