aboutsummaryrefslogtreecommitdiff
path: root/engines/prince/hero.cpp
diff options
context:
space:
mode:
authorlukaslw2014-08-15 20:32:32 +0200
committerlukaslw2014-08-15 20:32:32 +0200
commit89bda02eb111d0aefb8a81115b0986eff07321ed (patch)
treec4b40c3a604ec56ffbd6304fe3c28542b41bc9fd /engines/prince/hero.cpp
parent13541465482612387e789d84c4e3d96a2ee0fbdd (diff)
downloadscummvm-rg350-89bda02eb111d0aefb8a81115b0986eff07321ed.tar.gz
scummvm-rg350-89bda02eb111d0aefb8a81115b0986eff07321ed.tar.bz2
scummvm-rg350-89bda02eb111d0aefb8a81115b0986eff07321ed.zip
PRINCE: showHeroShadow - shadowLine data reading fix
Diffstat (limited to 'engines/prince/hero.cpp')
-rw-r--r--engines/prince/hero.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/engines/prince/hero.cpp b/engines/prince/hero.cpp
index 496099251f..e2d63c5e5d 100644
--- a/engines/prince/hero.cpp
+++ b/engines/prince/hero.cpp
@@ -240,7 +240,6 @@ static void plot(int x, int y, int color, void *data) {
shadowLine->_shadLineLen++;
}
-// FIXME - horizontal line with wrong colors in the middle of shadow appears in loc. 12, 23
void Hero::showHeroShadow(Graphics::Surface *screen, DrawNode *drawNode) {
Hero *heroData = (Hero *)drawNode->data;
int16 heroSurfaceWidth = drawNode->s->w;
@@ -500,18 +499,18 @@ void Hero::showHeroShadow(Graphics::Surface *screen, DrawNode *drawNode) {
}
//skip_line
//next_line
- if (*(shadowLineStart + 2) < *(shadowLineStart - 2)) {
+ if (READ_UINT16(shadowLineStart + 2) < READ_UINT16(shadowLineStart - 2)) {
//minus_y
shadBitAddr -= PrinceEngine::kMaxPicWidth / 8;
shadPosY--;
diffY--;
- } else if (*(shadowLineStart + 2) > *(shadowLineStart - 2)) {
+ } else if (READ_UINT16(shadowLineStart + 2) > READ_UINT16(shadowLineStart - 2)) {
shadBitAddr += PrinceEngine::kMaxPicWidth / 8;
shadPosY++;
diffY++;
}
//no_change_y
- if (*shadowLineStart < *(shadowLineStart - 4)) {
+ if (READ_UINT16(shadowLineStart) < READ_UINT16(shadowLineStart - 4)) {
//minus_x
shadPosX--;
//rol
@@ -522,7 +521,7 @@ void Hero::showHeroShadow(Graphics::Surface *screen, DrawNode *drawNode) {
shadBitMask <<= 1;
}
diffX--;
- } else if (*shadowLineStart > *(shadowLineStart - 4)) {
+ } else if (READ_UINT16(shadowLineStart) > READ_UINT16(shadowLineStart - 4)) {
shadPosX++;
//ror
if (shadBitMask == 1) {