aboutsummaryrefslogtreecommitdiff
path: root/engines/sludge
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sludge')
-rw-r--r--engines/sludge/backdrop.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/engines/sludge/backdrop.cpp b/engines/sludge/backdrop.cpp
index ac818893e0..c1830d884f 100644
--- a/engines/sludge/backdrop.cpp
+++ b/engines/sludge/backdrop.cpp
@@ -924,7 +924,6 @@ void saveParallaxRecursive(parallaxLayer *me, Common::WriteStream *stream) {
}
bool getRGBIntoStack(uint x, uint y, stackHandler *sH) {
-#if 0
if (x >= sceneWidth || y >= sceneHeight) {
return fatal("Co-ordinates are outside current scene!");
}
@@ -933,25 +932,18 @@ bool getRGBIntoStack(uint x, uint y, stackHandler *sH) {
newValue.varType = SVT_NULL;
- saveTexture(backdropTextureName, backdropTexture);
-
- GLubyte *target;
- if (!NPOT_textures) {
- target = backdropTexture + 4 * getNextPOT(sceneWidth) * y + x * 4;
- } else {
- target = backdropTexture + 4 * sceneWidth * y + x * 4;
- }
+ byte *target = (byte *)renderSurface.getBasePtr(x, y);
- setVariable(newValue, SVT_INT, target[2]);
+ setVariable(newValue, SVT_INT, target[1]);
if (!addVarToStackQuick(newValue, sH->first)) return false;
sH->last = sH->first;
- setVariable(newValue, SVT_INT, target[1]);
+ setVariable(newValue, SVT_INT, target[2]);
if (!addVarToStackQuick(newValue, sH->first)) return false;
- setVariable(newValue, SVT_INT, target[0]);
+ setVariable(newValue, SVT_INT, target[3]);
if (!addVarToStackQuick(newValue, sH->first)) return false;
-#endif
+
return true;
}