diff options
| author | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-10-29 11:42:21 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-10-29 11:42:21 +0100 |
| commit | 55898db4a9cf2b5721279d665918fc0eaa02c1cc (patch) | |
| tree | c00918b3209b1bada61a2127b5530f96d31f8565 /include | |
| parent | dda7cfb99e9e8664878bcd38e3d3392b544c3343 (diff) | |
player sprite
Diffstat (limited to 'include')
| -rw-r--r-- | include/asset_defs.h | 2 | ||||
| -rw-r--r-- | include/players.h | 12 | ||||
| -rw-r--r-- | include/sprite.h | 1 |
3 files changed, 14 insertions, 1 deletions
diff --git a/include/asset_defs.h b/include/asset_defs.h index 65767c6..a25da7c 100644 --- a/include/asset_defs.h +++ b/include/asset_defs.h @@ -27,7 +27,7 @@ image* img_grenade; image* img_grenade_explode; // Players -image* img_player; +image* img_player_running; // Other image* img_zombie_chunk_hand; diff --git a/include/players.h b/include/players.h index 90fdc84..535d388 100644 --- a/include/players.h +++ b/include/players.h @@ -17,6 +17,17 @@ typedef enum t_player_interact_state { INTERACT_RELOADING, } player_interact_state; +typedef enum t_player_direction { + DIRECTION_UP, + DIRECTION_RIGHT, + DIRECTION_DOWN, + DIRECTION_LEFT, + DIRECTION_TOPLEFT, + DIRECTION_TOPRIGHT, + DIRECTION_BOTTOMLEFT, + DIRECTION_BOTTOMRIGHT, +} player_direction; + typedef struct t_player { u32 id; bool active; @@ -28,6 +39,7 @@ typedef struct t_player { float gunx; float guny; float gun_height; + player_direction direction; int total_ammo; int ammo_in_mag; float height; diff --git a/include/sprite.h b/include/sprite.h index 7e0fa41..251ceea 100644 --- a/include/sprite.h +++ b/include/sprite.h @@ -12,6 +12,7 @@ typedef struct t_sprite { float time; int img_width; int img_height; + int frame_start; } sprite; typedef struct t_sprite_frame { |
