aboutsummaryrefslogtreecommitdiff
path: root/sword1
diff options
context:
space:
mode:
authorRobert Göffringmann2003-12-22 00:34:02 +0000
committerRobert Göffringmann2003-12-22 00:34:02 +0000
commit6b0fb6585cf31bbd341a7da8fa60be5f09eb2381 (patch)
tree4f8cda775ded2a7db3906de8224e18eb31dc6343 /sword1
parentbb38b7f75fc686bb215b0ca56fc034949f2e43e5 (diff)
downloadscummvm-rg350-6b0fb6585cf31bbd341a7da8fa60be5f09eb2381.tar.gz
scummvm-rg350-6b0fb6585cf31bbd341a7da8fa60be5f09eb2381.tar.bz2
scummvm-rg350-6b0fb6585cf31bbd341a7da8fa60be5f09eb2381.zip
work around a GCC bug.
svn-id: r11843
Diffstat (limited to 'sword1')
-rw-r--r--sword1/screen.cpp3
-rw-r--r--sword1/sworddefs.h1
2 files changed, 2 insertions, 2 deletions
diff --git a/sword1/screen.cpp b/sword1/screen.cpp
index 1adcd65a46..98ca039985 100644
--- a/sword1/screen.cpp
+++ b/sword1/screen.cpp
@@ -440,6 +440,7 @@ void SwordScreen::blitBlockClear(uint16 x, uint16 y, uint8 *data) {
void SwordScreen::renderParallax(uint8 *data) {
ParallaxHeader *header = (ParallaxHeader*)data;
+ uint32 *lineIndexes = (uint32*)(data + sizeof(ParallaxHeader));
assert((FROM_LE_16(header->sizeX) >= SCREEN_WIDTH) && (FROM_LE_16(header->sizeY) >= SCREEN_DEPTH));
double scrlfx, scrlfy;
@@ -458,7 +459,7 @@ void SwordScreen::renderParallax(uint8 *data) {
scrlY = 0;
for (uint16 cnty = 0; cnty < SCREEN_DEPTH; cnty++) {
- uint8 *src = data + READ_LE_UINT32(header->lineIndexes + cnty + scrlY);
+ uint8 *src = data + READ_LE_UINT32(lineIndexes + cnty + scrlY);
uint8 *dest = _screenBuf + SwordLogic::_scriptVars[SCROLL_OFFSET_X] + (cnty + SwordLogic::_scriptVars[SCROLL_OFFSET_Y]) * _scrnSizeX;
uint16 remain = scrlX;
uint16 xPos = 0;
diff --git a/sword1/sworddefs.h b/sword1/sworddefs.h
index 79d77cc18a..65bd482dc1 100644
--- a/sword1/sworddefs.h
+++ b/sword1/sworddefs.h
@@ -85,7 +85,6 @@ struct ParallaxHeader {
char type[16];
uint16 sizeX;
uint16 sizeY;
- uint32 lineIndexes[2]; //2 is arbitrary number
} GCC_PACK;
struct AnimUnit {