5 void jumpnrun_player_respawn(jumpnrun_player
*self
, vec2d spawn_pos
) {
6 memset(&self
->base
, 0, sizeof(self
->base
));
7 self
->base
.hitbox
= rectangle_new(spawn_pos
, jumpnrun_player_extents());
10 void jumpnrun_player_spawn (jumpnrun_player
*self
, vec2d spawn_pos
, uint8_t lives
) {
11 memset(self
, 0, sizeof(*self
));
12 jumpnrun_player_respawn(self
, spawn_pos
);
16 void jumpnrun_player_kill (jumpnrun_player
*self
) {
17 if((self
->base
.flags
& JUMPNRUN_MOVEABLE_DYING
) == 0) {
18 self
->base
.flags
|= JUMPNRUN_MOVEABLE_DYING
;
19 self
->base
.tick_minor
= 0;
23 void jumpnrun_player_despawn(jumpnrun_player
*self
) {
24 self
->base
.flags
|= JUMPNRUN_PLAYER_DEAD
;
25 self
->base
.flags
&= ~JUMPNRUN_MOVEABLE_DYING
;
26 self
->base
.inertia
= (vec2d
) { FIXED_INT(0), FIXED_INT(0) };
29 void jumpnrun_player_advance_animation(jumpnrun_player
*self
) {
30 ++self
->base
.tick_minor
;
This page took 0.042285 seconds and 5 git commands to generate.