Merge branch 'main' of yibble.dev:bulmanator/ld58

This commit is contained in:
2025-10-07 14:09:59 +01:00
9 changed files with 187 additions and 52 deletions

View File

@@ -2,19 +2,21 @@
#define LD_GAME_WORLD_H_
#include "../core/math.h"
#include "./aabb.h"
#define WORLD_HITBOX_MAX 4096
#define WORLD_PROP_MAX 2048
#define WORLD_PROP_TYPE_MAX 64
#define WORLD_TILE_TYPE_MAX 64
#define WORLD_MAP_MAX 4800
#define WORLD_PORTAL_MAX 64
// Areas are which
typedef U32 World_Area;
enum World_Area
{
WORLD_AREA_OUTSIDE = (1 << 0),
WORLD_AREA_SALOON = (1 << 1),
WORLD_AREA_OUTSIDE = 1,
WORLD_AREA_SALOON = 2,
};
typedef struct World_Tile World_Tile;
@@ -37,6 +39,15 @@ struct World_Prop
V2f pos;
};
typedef struct World_Portal World_Portal;
struct World_Portal
{
AABB box;
World_Area area;
};
typedef World_Portal World_Hitbox;
typedef struct World World;
#include "player.h"
#include "npc.h"
@@ -53,10 +64,12 @@ struct World {
World_Tile *tileTypes;
World_PropType *propTypes;
World_Prop *props;
AABB *hitboxes;
World_Hitbox *hitboxes;
World_Portal *portals;
U32 *map;
U32 propCount;
U32 portalCount;
U32 hitboxCount;
Audio_Context *audio;