aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorSimei Yin2017-07-15 16:28:19 +0200
committerSimei Yin2017-07-15 17:51:57 +0200
commitd53c43d092ed505185ad30086ffb78f1b04332a3 (patch)
treef824620c3171f42312d93e1a2f1a0468dddc661f /engines
parentcd384d10b2d48bce7e40674b287e77612bec7e34 (diff)
downloadscummvm-rg350-d53c43d092ed505185ad30086ffb78f1b04332a3.tar.gz
scummvm-rg350-d53c43d092ed505185ad30086ffb78f1b04332a3.tar.bz2
scummvm-rg350-d53c43d092ed505185ad30086ffb78f1b04332a3.zip
SLUDGE: Add a color into stack machine
Diffstat (limited to 'engines')
-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;
}