From 819f7e7f764e8110070efd6a896c9f60d1b80d87 Mon Sep 17 00:00:00 2001 From: Carlos Sanchez Date: Wed, 21 Aug 2024 01:09:22 -0400 Subject: [PATCH] Cleanup maze code --- maze.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/maze.c b/maze.c index c4158c0..10adfe3 100644 --- a/maze.c +++ b/maze.c @@ -102,8 +102,6 @@ int maze_visited(uint8_t *maze, int x, int y, int size) { } int maze_connected(uint8_t *maze, int x, int y, int size, uint8_t move) { - // eprintf("CHECKING DIR %d at (%d,%d), it is %d\n", move, x, y, - // maze[x + y * size]); if (move == DIREAST) { return (maze[x + y * size] & MAZEEAST) == 0; } else if (move == DIRWEST) { @@ -283,12 +281,6 @@ typedef struct { struct vec2 rot; // x is yaw, y is pitch } ecs_placement; -// A component representing movement through the scene. -// typedef struct { -// struct vec3 posvel; -// mfloat_t yawvel; -// } ecs_movement; - // A component which links back to a camera typedef struct { haloo3d_camera *camera; @@ -348,11 +340,6 @@ void sys_billboard(ecs_billboard *bb) { bb->obj->lookvec.x = -(bb->lookat->x - bb->obj->pos.x); bb->obj->lookvec.y = 0; bb->obj->lookvec.z = -(bb->lookat->z - bb->obj->pos.z); - // if (bb->obj->pos.y != 0) { - // printf("BBY: %f LXYZ: (%f, %f, %f) S: %f,%f\n", bb->obj->pos.y, - // bb->obj->lookvec.x, bb->obj->lookvec.y, bb->obj->lookvec.z, - // bb->obj->scale.x, bb->obj->scale.y); - // } } void sys_syncgrow(ecs_syncgrow *sg) { @@ -408,8 +395,6 @@ void sys_camera(ecs_camera *cam, ecs_placement *p) { cam->camera->pos = p->pos; cam->camera->yaw = p->rot.x; cam->camera->pitch = p->rot.y; - // eprintf("CAM: %f %f POS: %f %f %f\n", cam->camera->yaw, cam->camera->pitch, - // cam->camera->pos.x, cam->camera->pos.y, cam->camera->pos.z); } void sys_world(ecs_world *w) { @@ -847,9 +832,6 @@ int main() { // int argc, char **argv) { ECS_SETCOMPONENT(&ecs, startid, ecs_billboard){.obj = starti, .lookat = &render.camera.pos}; ecs_eid endid = mecs_newentity(&ecs, 0); - // endi->scale.y = endi->scale.x; - // endi->lookvec.x = -1; - // endi->lookvec.z = 0; ECS_SETCOMPONENT(&ecs, endid, ecs_syncgrow){.obj = endi, .scale = &eworld->scaleto, .basescale = endi->scale.x, @@ -860,7 +842,6 @@ int main() { // int argc, char **argv) { // Player is ofc most complicated ecs_eid playerid = mecs_newentity(&ecs, 0); eprintf("Player eid: %d\n", playerid); - // ECS_SETCOMPONENT(&ecs, playerid, ecs_worldstate){.state = &wstate}; ECS_SETCOMPONENT(&ecs, playerid, ecs_placement){ .pos = render.camera.pos, .rot = {.x = render.camera.yaw, .y = render.camera.pitch}};