18 lines
256 B
C
18 lines
256 B
C
|
#include "bird.h"
|
||
|
|
||
|
bird* bird_create(){
|
||
|
/* Allocate memory */
|
||
|
bird* b = malloc(sizeof(bird));
|
||
|
|
||
|
/* Set values */
|
||
|
b->pos_x = CAM_OFFSET_X;
|
||
|
b->pos_y = HEIGHT/2;
|
||
|
b->vel_x = BIRD_VEL_X;
|
||
|
b->vel_y = 0;
|
||
|
|
||
|
return b;
|
||
|
}
|
||
|
|
||
|
void bird_destroy(bird* b){
|
||
|
free(b);
|
||
|
}
|