Entirely expanded upon existing proof-of-concept

This commit is contained in:
2026-06-16 11:23:16 -04:00
parent e8d29b7f6b
commit baa5a6935f
19 changed files with 2373 additions and 16 deletions

38
src/render.c Normal file
View File

@@ -0,0 +1,38 @@
#include "render.h"
#include "world.h"
#include "raylib.h"
void DrawEntities(void)
{
for (int i = 0; i < MAX_ENTITIES; i++)
{
Entity *e = &entities[i];
if (!e->active)
continue;
Rectangle rect =
{
e->position.x - e->size * 0.5f,
e->position.y - e->size * 0.5f,
e->size,
e->size
};
DrawRectangleRec(rect, e->color);
DrawRectangleLinesEx(rect, 2, BLACK);
Vector2 velEnd =
{
e->position.x + e->velocity.x * 0.10f,
e->position.y + e->velocity.y * 0.10f
};
DrawLineEx(
e->position,
velEnd,
2,
DARKBLUE);
}
}