2021-06-01 17:50:39 +02:00
|
|
|
#pragma once
|
|
|
|
#include "grid.h"
|
|
|
|
|
|
|
|
struct Player {
|
|
|
|
int x;
|
|
|
|
int y;
|
2021-06-01 23:35:47 +02:00
|
|
|
int *cash;
|
2021-06-01 17:50:39 +02:00
|
|
|
int left_held;
|
|
|
|
int right_held;
|
|
|
|
int up_held;
|
|
|
|
int down_held;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Player player_init(int x, int y);
|
2021-06-05 18:36:05 +02:00
|
|
|
void reset_cash(void);
|
2021-06-01 23:35:47 +02:00
|
|
|
int player_draw(struct Player, int scr_x, int scr_y);
|
2021-06-01 22:03:26 +02:00
|
|
|
/* return 1 on zone transition */
|
|
|
|
int player_update(struct Player *restrict, struct Grid *restrict);
|