Some more progress
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#define FACTORYGAME_PLAYER_H
|
||||
|
||||
#include "../tiles/tile.h"
|
||||
#include "../items/item.h"
|
||||
|
||||
extern int playerReach;
|
||||
extern int playerX;
|
||||
@@ -22,6 +23,10 @@ bool isInboundsTile(int x, int y);
|
||||
|
||||
void adjustRect(SDL_Rect *rect);
|
||||
|
||||
#define neededHealthIdle 120
|
||||
|
||||
#define playerMaxHealth 255
|
||||
|
||||
typedef struct {
|
||||
uint16_t slotCounts[ITEMREGISTRY_SIZE];
|
||||
uint16_t activeSlotIndex;
|
||||
@@ -47,12 +52,19 @@ typedef struct {
|
||||
PlayerCursor cursor;
|
||||
PlayerInventory inventory;
|
||||
SDL_Renderer *renderer;
|
||||
uint8_t health;
|
||||
uint8_t prevHealth;
|
||||
uint8_t healthIdle;
|
||||
} Player;
|
||||
|
||||
void setActivePlayerSlot(Player * plr, uint16_t activeSlotIndex);
|
||||
|
||||
void moveActivePlayerSlot(Player *plr, bool up, bool seek);
|
||||
|
||||
void renderPlayer(Player * plr);
|
||||
|
||||
void initPlayer(Player * plr);
|
||||
|
||||
void updatePlayer(Player *plr);
|
||||
|
||||
#endif //FACTORYGAME_PLAYER_H
|
||||
|
Reference in New Issue
Block a user