Start atlas

This commit is contained in:
2025-06-01 22:13:02 +02:00
parent 96a9a45c20
commit 84805b92cb
64 changed files with 954 additions and 243 deletions

View File

@@ -28,12 +28,13 @@ void adjustRect(SDL_Rect *rect, SDL_Rect playerRect);
#define playerMaxHealth 255
typedef struct {
typedef struct PlayerInventory {
uint16_t slotCounts[ITEMREGISTRY_SIZE];
uint16_t activeSlotIndex;
ItemType activeSlotIndex;
ItemType hotKeySlots[13];
} PlayerInventory;
typedef struct {
typedef struct PlayerCursor {
int windowX;
int windowY;
int tileX;
@@ -50,7 +51,7 @@ typedef struct {
int breakingProgress;
} PlayerCursor;
typedef struct {
typedef struct Player{
PlayerCursor cursor;
PlayerInventory inventory;
uint8_t health;
@@ -59,7 +60,7 @@ typedef struct {
SDL_Rect rect;
} Player;
void setActivePlayerSlot(Player *plr, uint16_t activeSlotIndex);
void setActivePlayerSlot(Player *plr, ItemType activeSlotIndex);
void moveActivePlayerSlot(Player *plr, bool up, bool seek);