diff options
author | Peter Kohaut | 2015-09-19 01:43:38 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-09-29 22:33:40 +0200 |
commit | de7f961f484bc29c33240a29376bbd24dc4d6139 (patch) | |
tree | 6632ae781aecf5553c8f0309503b42da90feb47b /engines/bladerunner/slice_animations.cpp | |
parent | 479d2f5b6293af2ae84fbdc718348a6e1126efb0 (diff) | |
download | scummvm-rg350-de7f961f484bc29c33240a29376bbd24dc4d6139.tar.gz scummvm-rg350-de7f961f484bc29c33240a29376bbd24dc4d6139.tar.bz2 scummvm-rg350-de7f961f484bc29c33240a29376bbd24dc4d6139.zip |
BLADERUNNER: added implementation of more script methods added combat structure (maybe it combat mode??)
Diffstat (limited to 'engines/bladerunner/slice_animations.cpp')
-rw-r--r-- | engines/bladerunner/slice_animations.cpp | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/engines/bladerunner/slice_animations.cpp b/engines/bladerunner/slice_animations.cpp index efcd4b3987..b813c13a3d 100644 --- a/engines/bladerunner/slice_animations.cpp +++ b/engines/bladerunner/slice_animations.cpp @@ -63,14 +63,14 @@ bool SliceAnimations::open(const Common::String &name) { _animations.resize(animationCount); for (uint32 i = 0; i != animationCount; ++i) { - _animations[i].frameCount = file.readUint32LE(); - _animations[i].frameSize = file.readUint32LE(); - _animations[i].fps = file.readFloatLE(); - _animations[i].unk0 = file.readFloatLE(); - _animations[i].unk1 = file.readFloatLE(); - _animations[i].unk2 = file.readFloatLE(); - _animations[i].unk3 = file.readFloatLE(); - _animations[i].offset = file.readUint32LE(); + _animations[i].frameCount = file.readUint32LE(); + _animations[i].frameSize = file.readUint32LE(); + _animations[i].fps = file.readFloatLE(); + _animations[i].positionChange.x = file.readFloatLE(); + _animations[i].positionChange.y = file.readFloatLE(); + _animations[i].positionChange.z = file.readFloatLE(); + _animations[i].facingChange = file.readFloatLE(); + _animations[i].offset = file.readUint32LE(); #if 0 debug("%4d %6d %6x %7.2g %7.2g %7.2g %7.2g %7.2g %8x", @@ -172,8 +172,16 @@ void *SliceAnimations::getFramePtr(uint32 animation, uint32 frame) { int SliceAnimations::getNumberOfFrames(int animationId) { - if (animationId > _animations.size()) + if (animationId > (int)_animations.size()) return 0; return _animations[animationId].frameCount; } + + +float SliceAnimations::getFps(int animationId) { + if (animationId > (int)_animations.size()) + return 15.0f; + return _animations[animationId].fps; +} + } // End of namespace BladeRunner |