Some more progress

This commit is contained in:
2025-05-30 22:31:59 +02:00
parent d01bdbe819
commit 0c9698879b
13 changed files with 290 additions and 72 deletions

View File

@@ -4,10 +4,20 @@
#include <SDL2/SDL.h>
#include "../util/util.h"
#include "../tiles/belt.h"
#ifndef FACTORYGAME_ITEM_H
#define FACTORYGAME_ITEM_H
#define ITEMREGISTRY_SIZE 20
typedef struct {
float offset;
int tileX, tileY;
bool active;
uint16_t type;
} ItemOnBelt;
typedef struct {
uint16_t type;
char name[20];
@@ -15,17 +25,9 @@ typedef struct {
SDL_Texture * textureOnBelt[ORIENT_DIRECTION_COUNT];
} Item;
#define ITEMREGISTRY_SIZE 512
extern Item ItemRegistry[ITEMREGISTRY_SIZE];
typedef struct {
float offset;
int tileX, tileY;
bool active;
uint16_t type;
} ItemOnBelt;
void updateItems();
void loadItems(SDL_Renderer *renderer);