From b505669206cbb6f52e4e943405cafc3a65a94f8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Sat, 10 Oct 2020 12:35:52 +0200 Subject: [PATCH] Fix SDL example --- programs/testSDL.c | 6 +++--- raycastlib.h | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/programs/testSDL.c b/programs/testSDL.c index beec8d2..ed34068 100644 --- a/programs/testSDL.c +++ b/programs/testSDL.c @@ -526,13 +526,13 @@ RCL_Unit textureAt(int16_t x, int16_t y) RCL_Unit floorHeightAt(int16_t x, int16_t y) { if (x == 6 && (y == 13 || y == 14)) // moving lift - return ((RCL_absVal(-1 * (frame % 64) + 32)) * RCL_UNITS_PER_SQUARE) / 8; + return ((RCL_abs(-1 * (frame % 64) + 32)) * RCL_UNITS_PER_SQUARE) / 8; if (x >= 0 && x < LEVEL_X_RES && y >= 0 && y < LEVEL_Y_RES) return (levelFloor[(LEVEL_Y_RES - y -1) * LEVEL_X_RES + x] * RCL_UNITS_PER_SQUARE) / 8; - int a = RCL_absVal(x - LEVEL_X_RES / 2) - LEVEL_X_RES / 2; - int b = RCL_absVal(y - LEVEL_Y_RES / 2) - LEVEL_Y_RES / 2; + int a = RCL_abs(x - LEVEL_X_RES / 2) - LEVEL_X_RES / 2; + int b = RCL_abs(y - LEVEL_Y_RES / 2) - LEVEL_Y_RES / 2; return (a > b ? a : b) * RCL_UNITS_PER_SQUARE; } diff --git a/raycastlib.h b/raycastlib.h index 4c32116..107b263 100644 --- a/raycastlib.h +++ b/raycastlib.h @@ -26,7 +26,11 @@ author: Miloslav "drummyfish" Ciz license: CC0 1.0 - version: 0.908 + version: 0.908d + + Version numbering: major.minor[d], id 'd' is appended, this is a + in-development version based on the previous stable major.minor version. Two + 'd' versions with the same version number, .e.g. 1.0d, may be different. */ #include