feat: Hitbox drawing

This commit is contained in:
2025-10-06 14:50:32 +01:00
parent 3a84947750
commit 8a360df98a
6 changed files with 44 additions and 9 deletions

View File

@@ -37,13 +37,15 @@ void ProcessEvents(SDL_Event *event, World *world)
}
void RenderWorld(World *world, D_Context *draw) {
for (int i = 0; i < 4800; i++) {
D_Rect(
draw,
(F32) (i % 96), (F32) (i / 96),
.texture = world->tileTypes[world->map[i]].tile,
.angle = (F32) world->tileTypes[world->map[i]].rotation,
);
if(world->player.currentArea == WORLD_AREA_OUTSIDE) {
for (int i = 0; i < 4800; i++) {
D_Rect(
draw,
(F32) (i % 96), (F32) (i / 96),
.texture = world->tileTypes[world->map[i]].tile,
.angle = (F32) world->tileTypes[world->map[i]].rotation,
);
}
}
for (int i = 0; i < world->propCount; i++) {
if(world->props[i].area == world->player.currentArea) {