tibia_alpha/objects.h

35 lines
810 B
C

//
// Created by rov on 12/27/25.
//
#ifndef TIBIA_OBJECTS_H
#define TIBIA_OBJECTS_H
#define SPRITE_TABLE_SIZE 500
#define THING_DATA_POOL_SIZE 256
#define ACTIVE_OBJECT_LIST_SIZE 256
#include <stdbool.h>
#include <stdint.h>
#pragma pack(push, 1)
typedef struct {
uint16_t properties;
uint16_t spriteIndex;
uint16_t flags;
} ThingHeader;
#pragma pack(pop)
typedef struct Objects {
// TODO: not sure about the name/purpose of these.
void* spriteTable[SPRITE_TABLE_SIZE];
void* thingDataPool[THING_DATA_POOL_SIZE];
void* activeObjectList[ACTIVE_OBJECT_LIST_SIZE];
} Objects_t;
bool Objects_Init(Objects_t* objects);
bool Objects_LoadData(Objects_t* objects);
bool Objects_LoadSprites(Objects_t* objects);
void Objects_Destroy(const Objects_t* objects);
#endif //TIBIA_OBJECTS_H