Skip to content

Commit

Permalink
minor fix to last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
LittlePlanetCD committed Mar 21, 2024
1 parent 79136f6 commit bf8e3a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions RSDKv3/Drawing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions RSDKv3/Scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit bf8e3a1

Please sign in to comment.