jaunes
This commit is contained in:
17
HolidayTrip/Fundamentals/reap_and_tear/weapons.c
Normal file
17
HolidayTrip/Fundamentals/reap_and_tear/weapons.c
Normal file
@@ -0,0 +1,17 @@
|
||||
#include "weapons.h"
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
struct gun *init_gun(char name[50], int damage, enum distance range, int magazine_size){
|
||||
|
||||
struct gun *rslt = malloc(sizeof( struct gun));
|
||||
//mettre protection
|
||||
|
||||
//init des var du struct
|
||||
strcpy(rslt->name, name);
|
||||
rslt->damage = damage;
|
||||
rslt->range = range;
|
||||
rslt->magazine_size = magazine_size;
|
||||
|
||||
return rslt;
|
||||
}
|
||||
Reference in New Issue
Block a user