diff options
author | Eugene Sandulenko | 2004-12-28 13:34:33 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2004-12-28 13:34:33 +0000 |
commit | 3cfbc4082bdc0233fd4440695e6eb11aacc97ece (patch) | |
tree | 3dd5ea2d89fb10e84b5cdb1fdc7b9edf2860d9ea /saga | |
parent | 43c27589bbd6113ecf052c4cabf79432ad3799fe (diff) | |
download | scummvm-rg350-3cfbc4082bdc0233fd4440695e6eb11aacc97ece.tar.gz scummvm-rg350-3cfbc4082bdc0233fd4440695e6eb11aacc97ece.tar.bz2 scummvm-rg350-3cfbc4082bdc0233fd4440695e6eb11aacc97ece.zip |
Partial fix for Mac intro. Sprites are still incorrect because of lack of
m68k asm knowledge :)
svn-id: r16356
Diffstat (limited to 'saga')
-rw-r--r-- | saga/animation.cpp | 3 | ||||
-rw-r--r-- | saga/ite_introproc.cpp | 13 | ||||
-rw-r--r-- | saga/sprite.cpp | 20 |
3 files changed, 25 insertions, 11 deletions
diff --git a/saga/animation.cpp b/saga/animation.cpp index 902dadb3ef..f6ed13a361 100644 --- a/saga/animation.cpp +++ b/saga/animation.cpp @@ -283,6 +283,7 @@ int Anim::play(uint16 anim_id, int vector_time, bool playing) { link_anim = _anim_tbl[link_anim_id]; if (link_anim != NULL) { + debug(5, "Animation ended going to %d", link_anim_id); link_anim->current_frame = 0; link_anim->state = ANIM_PLAYING; } @@ -425,7 +426,7 @@ void Anim::readAnimHeader(MemoryReadStreamEndian &readS, ANIMATION_HEADER &ah) { ah.unknown07 = readS.readByte(); ah.nframes = readS.readByte() - 1; ah.loopframe = readS.readByte() - 1; - ah.start = readS.readUint16BE(); //FIXME: check on Mac + ah.start = readS.readUint16BE(); if (ah.start != 65535 && ah.start != 0) error("Anim::readAnimHeader(): found different start: %d. Fix Anim::play()", ah.start); diff --git a/saga/ite_introproc.cpp b/saga/ite_introproc.cpp index c92ad9bb0e..92250b2c56 100644 --- a/saga/ite_introproc.cpp +++ b/saga/ite_introproc.cpp @@ -198,11 +198,16 @@ int Scene::ITEIntroAnimProc(int param, SCENE_INFO *scene_info) { _vm->_anim->link(1, 2); _vm->_anim->link(2, 3); _vm->_anim->link(3, 4); - _vm->_anim->link(4, 5); - _vm->_anim->link(5, 6); - // Scene should end on display of last animation frame - _vm->_anim->setFlag(6, ANIM_ENDSCENE); + if (_vm->_features & GF_MAC_RESOURCES) + _vm->_anim->setFlag(4, ANIM_ENDSCENE); + else { + _vm->_anim->link(4, 5); + _vm->_anim->link(5, 6); + + // Scene should end on display of last animation frame + _vm->_anim->setFlag(6, ANIM_ENDSCENE); + } debug(0, "Beginning animation playback."); diff --git a/saga/sprite.cpp b/saga/sprite.cpp index db75a18ea0..551dee9845 100644 --- a/saga/sprite.cpp +++ b/saga/sprite.cpp @@ -199,17 +199,25 @@ int Sprite::draw(SURFACE *ds, SPRITELIST *sprite_list, int sprite_num, const Poi sprite_p += offset; assert(sprite_p); - MemoryReadStreamEndian readS(sprite_p, 5, IS_BIG_ENDIAN); - x_align = readS.readSByte(); - y_align = readS.readSByte(); + MemoryReadStreamEndian readS(sprite_p, 8, IS_BIG_ENDIAN); + if (!(_vm->_features & GF_MAC_RESOURCES)) { + x_align = readS.readSByte(); + y_align = readS.readSByte(); + + so_width = s_width = readS.readByte(); + so_height = s_height = readS.readByte(); + } else { + x_align = readS.readSint16(); + y_align = readS.readSint16(); + so_width = s_width = readS.readUint16(); + so_height = s_height = readS.readUint16(); + } + debug(0, "%d x %d", s_width, s_height); spr_pt.x = screenCoord.x + x_align; spr_pt.y = screenCoord.y + y_align; - so_width = s_width = readS.readByte(); - so_height = s_height = readS.readByte(); - if (scale < 256) scaleSpriteCoords(scale, &s_width, &s_height, &x_align, &y_align); |