aboutsummaryrefslogtreecommitdiff
path: root/engines/prince
diff options
context:
space:
mode:
authorlukaslw2014-10-08 23:59:20 +0200
committerlukaslw2014-10-08 23:59:20 +0200
commitf10ea31e3b07082fcfc659511a82521463cfd15f (patch)
tree774a0b36ac4d15cbdf712d78d7234dfd056374df /engines/prince
parent4270a1a23ab54a3cb7efe7143725fcd64ba4cc8b (diff)
downloadscummvm-rg350-f10ea31e3b07082fcfc659511a82521463cfd15f.tar.gz
scummvm-rg350-f10ea31e3b07082fcfc659511a82521463cfd15f.tar.bz2
scummvm-rg350-f10ea31e3b07082fcfc659511a82521463cfd15f.zip
PRINCE: GraphicsMan - add some new comments
Diffstat (limited to 'engines/prince')
-rw-r--r--engines/prince/graphics.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/engines/prince/graphics.cpp b/engines/prince/graphics.cpp
index f54327fbf8..40ecaf5d0b 100644
--- a/engines/prince/graphics.cpp
+++ b/engines/prince/graphics.cpp
@@ -113,6 +113,10 @@ void GraphicsMan::drawTransparentSurface(Graphics::Surface *screen, int32 posX,
change();
}
+/**
+ * Similar to drawTransparentSurface but with use of shadowTable for color recalculation
+ * and kShadowColor (191) as a transparent color.
+ */
void GraphicsMan::drawAsShadowSurface(Graphics::Surface *screen, int32 posX, int32 posY, const Graphics::Surface *s, byte *shadowTable) {
byte *src1 = (byte *)s->getBasePtr(0, 0);
byte *dst1 = (byte *)screen->getBasePtr(posX, posY);
@@ -133,6 +137,10 @@ void GraphicsMan::drawAsShadowSurface(Graphics::Surface *screen, int32 posX, int
}
}
+/**
+ * Used in glowing animation for inventory items. Creates special blendTable array of colors,
+ * use black (0) as a transparent color.
+ */
void GraphicsMan::drawTransparentWithBlendSurface(Graphics::Surface *screen, int32 posX, int32 posY, const Graphics::Surface *s) {
byte *src1 = (byte *)s->getBasePtr(0, 0);
byte *dst1 = (byte *)screen->getBasePtr(posX, posY);
@@ -159,6 +167,10 @@ void GraphicsMan::drawTransparentWithBlendSurface(Graphics::Surface *screen, int
change();
}
+/**
+ * Similar to drawTransparentSurface but with with use of DrawNode as argument for Z axis sorting
+ * and white (255) as transparent color.
+ */
void GraphicsMan::drawTransparentDrawNode(Graphics::Surface *screen, DrawNode *drawNode) {
byte *src1 = (byte *)drawNode->s->getBasePtr(0, 0);
byte *dst1 = (byte *)screen->getBasePtr(drawNode->posX, drawNode->posY);
@@ -265,7 +277,6 @@ void GraphicsMan::drawTransparentWithTransDrawNode(Graphics::Surface *screen, Dr
// it's not mask color above - we draw as transition color
} else {
// first and last row at the same time (height = 1) - no anti-alias
- // just for bugged animations
continue;
}
// new color value based on orginal screen surface color and sprite's edge pixel color