1 #include <string.h> 2 #include <shadowdive/shadowdive.h> 3 #include "resources/af_move.h" 4 af_move_create(af_move * move,void * src,int id)5void af_move_create(af_move *move, void *src, int id) { 6 sd_move *sdmv = (sd_move*)src; 7 str_create_from_cstr(&move->move_string, sdmv->move_string); 8 str_create_from_cstr(&move->footer_string, sdmv->footer_string); 9 move->id = id; 10 move->next_move = sdmv->next_anim_id; 11 move->successor_id = sdmv->successor_id; 12 move->category = sdmv->category; 13 move->damage = sdmv->damage_amount / 2.0f; 14 move->points = sdmv->points * 400; 15 move->scrap_amount = sdmv->scrap_amount; 16 move->pos_constraints = sdmv->unknown_2; 17 animation_create(&move->ani, sdmv->animation, id); 18 } 19 af_move_free(af_move * move)20void af_move_free(af_move *move) { 21 animation_free(&move->ani); 22 str_free(&move->move_string); 23 str_free(&move->footer_string); 24 } 25