Compare commits
2 Commits
Author | SHA1 | Date |
---|---|---|
Masséna Fezard | Nounouille | 1aa54343de | |
Masséna Fezard | Nounouille | 56f50261e7 |
Binary file not shown.
Before Width: | Height: | Size: 146 B After Width: | Height: | Size: 184 B |
Binary file not shown.
After Width: | Height: | Size: 308 B |
Binary file not shown.
Before Width: | Height: | Size: 549 B After Width: | Height: | Size: 789 B |
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
|
@ -12,7 +12,6 @@ struct Player {
|
|||
};
|
||||
|
||||
struct Player player_init(int x, int y);
|
||||
void reset_cash(void);
|
||||
int player_draw(struct Player, int scr_x, int scr_y);
|
||||
/* return 1 on zone transition */
|
||||
int player_update(struct Player *restrict, struct Grid *restrict);
|
||||
|
|
|
@ -10,7 +10,6 @@ game_init(void)
|
|||
grid_random_walker(&game.floor);
|
||||
game.player = player_init(0, game.floor.height / 2);
|
||||
game.rest = grid_new(25, 14);
|
||||
reset_cash();
|
||||
return game;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,19 +1,12 @@
|
|||
#include "player.h"
|
||||
|
||||
static int cash = 0;
|
||||
|
||||
struct Player
|
||||
player_init(int x, int y)
|
||||
{
|
||||
static int cash = 0;
|
||||
struct Player player;
|
||||
player.x = x;
|
||||
player.y = y;
|
||||
player.cash = &cash;
|
||||
return player;
|
||||
}
|
||||
|
||||
void
|
||||
reset_cash(void)
|
||||
{
|
||||
cash = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue