feat: Hitbox drawing
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user