From bf8e3a1c237a76ef58d5353a473e0f01dd650303 Mon Sep 17 00:00:00 2001 From: LittlePlanetCD Date: Thu, 21 Mar 2024 06:46:24 -0500 Subject: [PATCH] minor fix to last commit --- RSDKv3/Drawing.cpp | 2 -- RSDKv3/Scene.cpp | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/RSDKv3/Drawing.cpp b/RSDKv3/Drawing.cpp index 1ae47283..90ff7adf 100644 --- a/RSDKv3/Drawing.cpp +++ b/RSDKv3/Drawing.cpp @@ -2108,7 +2108,6 @@ void DrawHLineScrollLayer(int layerID) int fullLayerwidth = layerwidth << 7; for (int i = 0; i < hParallax.entryCount; ++i) { hParallax.linePos[i] = xScrollOffset * hParallax.parallaxFactor[i] >> 8; - hParallax.scrollPos[i] += hParallax.scrollSpeed[i]; if (hParallax.scrollPos[i] > fullLayerwidth << 16) hParallax.scrollPos[i] -= fullLayerwidth << 16; if (hParallax.scrollPos[i] < 0) @@ -2649,7 +2648,6 @@ void DrawHLineScrollLayer(int layerID) layerWidth = layerWidth << 7; for (int i = 0; i < hParallax.entryCount; i++) { hParallax.linePos[i] = hParallax.parallaxFactor[i] * xScrollOffset >> 8; - hParallax.scrollPos[i] = hParallax.scrollPos[i] + hParallax.scrollSpeed[i]; if (hParallax.scrollPos[i] > layerWidth << 16) { hParallax.scrollPos[i] = hParallax.scrollPos[i] - (layerWidth << 16); } diff --git a/RSDKv3/Scene.cpp b/RSDKv3/Scene.cpp index fb8af8fe..77676abc 100644 --- a/RSDKv3/Scene.cpp +++ b/RSDKv3/Scene.cpp @@ -755,7 +755,7 @@ void LoadStageBackground() FileRead(&fileBuffer, 1); hParallax.parallaxFactor[i] = fileBuffer << 8; FileRead(&fileBuffer, 1); - hParallax.parallaxFactor[i] += fileBuffer; + hParallax.parallaxFactor[i] |= fileBuffer; FileRead(&fileBuffer, 1); hParallax.scrollSpeed[i] = fileBuffer << 10; @@ -770,7 +770,7 @@ void LoadStageBackground() FileRead(&fileBuffer, 1); vParallax.parallaxFactor[i] = fileBuffer << 8; FileRead(&fileBuffer, 1); - vParallax.parallaxFactor[i] += fileBuffer; + vParallax.parallaxFactor[i] |= fileBuffer; FileRead(&fileBuffer, 1); vParallax.scrollSpeed[i] = fileBuffer << 10;