From 393a7b050519a36236ebd3733672cc1e2d2df87d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Sun, 30 Sep 2018 14:35:14 +0200 Subject: [PATCH] Update log macros --- raycastlib.h | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/raycastlib.h b/raycastlib.h index 764d7d7..1c1e72a 100644 --- a/raycastlib.h +++ b/raycastlib.h @@ -170,7 +170,7 @@ printf(" start: ");\ RCL_logV2D(r.start);\ printf(" dir: ");\ - RCL_logV2D(r.direction);}\ + RCL_logV2D(r.direction);} #define RCL_logHitResult(h){\ printf("hit:\n");\ @@ -180,17 +180,30 @@ RCL_logV2D(h.position);\ printf(" dist: %d\n", h.distance);\ printf(" dir: %d\n", h.direction);\ - printf(" texcoord: %d\n", h.textureCoord);}\ + printf(" texcoord: %d\n", h.textureCoord);} #define RCL_logPixelInfo(p){\ printf("pixel:\n");\ printf(" position: ");\ RCL_logV2D(p.position);\ + printf(" texCoord: ");\ + RCL_logV2D(p.texCoords);\ printf(" depth: %d\n", p.depth);\ + printf(" height: %d\n", p.height);\ printf(" wall: %d\n", p.isWall);\ printf(" hit: ");\ RCL_logHitResult(p.hit);\ - }\ + } + +#define RCL_logCamera(c){\ + printf("camera:\n");\ + printf(" position: ");\ + RCL_logV2D(c.position);\ + printf(" height: %d\n",c.height);\ + printf(" direction: %d\n",c.direction);\ + printf(" shear: %d\n",c.shear);\ + printf(" resolution: %d x %d\n",c.resolution.x,c.resolution.y);\ + } /// Position in 2D space. typedef struct