mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 05:38:56 +00:00
Partial fix for Mac intro. Sprites are still incorrect because of lack of
m68k asm knowledge :) svn-id: r16356
This commit is contained in:
parent
43c27589bb
commit
3cfbc4082b
@ -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);
|
||||
|
@ -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.");
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user