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

Fixed conflicts
Added "code" directory for include to make it easier to include core
headers
Stopped warnings (probably cl specific)
This commit is contained in:
2025-10-04 21:58:14 +01:00
19 changed files with 366 additions and 20 deletions

40
code/game/nav.h Normal file
View File

@@ -0,0 +1,40 @@
#if !defined(LD_GAME_NAV_H_)
#define LD_GAME_NAV_H_
#include "core/types.h"
#include "core/macros.h"
#define NAV_MAX_PATH 1024
#define NAV_MAX_CONNECTIONS 8
#define NAV_MAX_NODES 4096
typedef struct NavNode NavNode;
typedef struct NavConnection NavConnection;
struct NavConnection{
F32 Cost;
U32 NodeIndex;
};
struct NavNode {
V2f pos;
U8 connectionCount;
NavConnection connections[NAV_MAX_CONNECTIONS];
};
typedef struct NavPath NavPath;
struct NavPath {
U32 nodeCount;
U32 indexes[NAV_MAX_PATH];
};
typedef struct NavMesh NavMesh;
struct NavMesh{
U32 nodeCount;
NavNode nodes[NAV_MAX_NODES];
};
function NavPath Nav_Path(NavMesh mesh, U32 start, U32 end);
#endif