From 4e76ffb4cac99a9df34eb1dd04f6e67a93ad81a0 Mon Sep 17 00:00:00 2001 From: Martin Griffin Date: Mon, 4 Jul 2022 21:25:19 +0100 Subject: [PATCH] Identify a % 16 --- src/field_camera.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/field_camera.c b/src/field_camera.c index 95c7ed952..9b129e6b2 100644 --- a/src/field_camera.c +++ b/src/field_camera.c @@ -404,9 +404,9 @@ void CameraUpdate(void) } gFieldCamera.x += movementSpeedX; - gFieldCamera.x = gFieldCamera.x - 16 * (gFieldCamera.x / 16); + gFieldCamera.x %= 16; gFieldCamera.y += movementSpeedY; - gFieldCamera.y = gFieldCamera.y - 16 * (gFieldCamera.y / 16); + gFieldCamera.y %= 16; if (deltaX != 0 || deltaY != 0) {