Operation Null Mind 0.4.1
A 2D roguelike top down shooter game made with SDL2
 
Loading...
Searching...
No Matches
player_animations.c File Reference

Player animation system implementation. More...

#include <player.h>
#include <app.h>

Functions

int Player_AnimationInit ()
 [Start] Initializes the player's animation system
 
int Player_AnimationUpdate ()
 [PostUpdate] Updates the player's animation state
 

Detailed Description

Player animation system implementation.

Manages player character animations based on state and actions. Handles animation transitions, updates, and initialization.

Author
Mango
Date
2025-03-07

Function Documentation

◆ Player_AnimationInit()

int Player_AnimationInit ( )

[Start] Initializes the player's animation system

Initializes player animations.

Creates and sets up the player's animation system from the animation data defined in player_data.c.

Returns
int Status code (0 for success, 1 for error)

◆ Player_AnimationUpdate()

int Player_AnimationUpdate ( )

[PostUpdate] Updates the player's animation state

Updates player animations.

Selects the appropriate animation based on player state (idle or walking) and advances the animation frames.

Returns
int Status code (0 for success)