From 92c55e2bb192785e4587e143c9c367213f30233c Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 15 Mar 2015 21:25:07 -0400 Subject: SHERLOCK: Beginning of animation player --- engines/sherlock/animation.h | 50 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 engines/sherlock/animation.h (limited to 'engines/sherlock/animation.h') diff --git a/engines/sherlock/animation.h b/engines/sherlock/animation.h new file mode 100644 index 0000000000..bf4429656e --- /dev/null +++ b/engines/sherlock/animation.h @@ -0,0 +1,50 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef SHERLOCK_ANIMATION_H +#define SHERLOCK_ANIMATION_H + +#include "common/scummsys.h" +#include "common/str.h" + +namespace Sherlock { + +class SherlockEngine; + +class Animation { +private: + SherlockEngine *_vm; + + const int *checkForSoundFrames(const Common::String &filename); +public: + Common::String _soundOverride; + Common::String _titleOverride; + bool _useEpilogue2; +public: + Animation(SherlockEngine *vm); + + void playPrologue(const Common::String &filename, int minDelay, int fade, bool setPalette, int speed); +}; + +} // End of namespace Sherlock + +#endif -- cgit v1.2.3 From 6cfb7169b94e0c3c665d7799584eb8e5a7f337b3 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 15 Mar 2015 23:16:38 -0400 Subject: SHERLOCK: Beginnings of sprite loading for animations --- engines/sherlock/animation.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'engines/sherlock/animation.h') diff --git a/engines/sherlock/animation.h b/engines/sherlock/animation.h index bf4429656e..14384cfa28 100644 --- a/engines/sherlock/animation.h +++ b/engines/sherlock/animation.h @@ -36,9 +36,6 @@ private: const int *checkForSoundFrames(const Common::String &filename); public: - Common::String _soundOverride; - Common::String _titleOverride; - bool _useEpilogue2; public: Animation(SherlockEngine *vm); -- cgit v1.2.3 From 0ee3f1895f6b6dcf4bbb70ba309fb66d0ca39613 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 16 Mar 2015 22:42:19 -0400 Subject: SHERLOCK: Beginnings of animation sequence loop --- engines/sherlock/animation.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/sherlock/animation.h') diff --git a/engines/sherlock/animation.h b/engines/sherlock/animation.h index 14384cfa28..da4c5baad7 100644 --- a/engines/sherlock/animation.h +++ b/engines/sherlock/animation.h @@ -39,7 +39,7 @@ public: public: Animation(SherlockEngine *vm); - void playPrologue(const Common::String &filename, int minDelay, int fade, bool setPalette, int speed); + bool playPrologue(const Common::String &filename, int minDelay, int fade, bool setPalette, int speed); }; } // End of namespace Sherlock -- cgit v1.2.3 From 42a99354f9d0c4719e955008f57bf433fdbeabb3 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 1 May 2015 16:53:22 -1000 Subject: SHERLOCK: Rename playPrologue to play --- engines/sherlock/animation.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/sherlock/animation.h') diff --git a/engines/sherlock/animation.h b/engines/sherlock/animation.h index da4c5baad7..3d87cb0a91 100644 --- a/engines/sherlock/animation.h +++ b/engines/sherlock/animation.h @@ -39,7 +39,7 @@ public: public: Animation(SherlockEngine *vm); - bool playPrologue(const Common::String &filename, int minDelay, int fade, bool setPalette, int speed); + bool play(const Common::String &filename, int minDelay, int fade, bool setPalette, int speed); }; } // End of namespace Sherlock -- cgit v1.2.3 From 902b79116552b0605668f130e0695e4798ef87d5 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Sat, 9 May 2015 18:04:13 +0200 Subject: SHERLOCK: Make copyright headers consistent --- engines/sherlock/animation.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/sherlock/animation.h') diff --git a/engines/sherlock/animation.h b/engines/sherlock/animation.h index 3d87cb0a91..245d83789f 100644 --- a/engines/sherlock/animation.h +++ b/engines/sherlock/animation.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -- cgit v1.2.3 From 7b2da2abc58866d6ad33730d2237bc0decf4ae0e Mon Sep 17 00:00:00 2001 From: sirlemonhead Date: Tue, 12 May 2015 00:42:57 +0100 Subject: SHERLOCK: Re-factored Scalpel arrays out of Animation --- engines/sherlock/animation.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'engines/sherlock/animation.h') diff --git a/engines/sherlock/animation.h b/engines/sherlock/animation.h index 245d83789f..5802ffcd88 100644 --- a/engines/sherlock/animation.h +++ b/engines/sherlock/animation.h @@ -25,20 +25,35 @@ #include "common/scummsys.h" #include "common/str.h" +#include "common/array.h" namespace Sherlock { +#define FRAMES_END 32000 + class SherlockEngine; class Animation { private: SherlockEngine *_vm; + Common::Array _prologueNames; + Common::Array> _prologueFrames; + + Common::Array _titleNames; + Common::Array> _titleFrames; + const int *checkForSoundFrames(const Common::String &filename); public: public: Animation(SherlockEngine *vm); + void setPrologueNames(const char *const *names, int count); + void setPrologueFrames(const int *frames, int count, int maxFrames); + + void setTitleNames(const char *const *names, int count); + void setTitleFrames(const int *frames, int count, int maxFrames); + bool play(const Common::String &filename, int minDelay, int fade, bool setPalette, int speed); }; -- cgit v1.2.3 From 3a74cb7b57e09e9826c6534c5d53a53753045524 Mon Sep 17 00:00:00 2001 From: sirlemonhead Date: Tue, 12 May 2015 18:17:05 +0100 Subject: SHERLOCK: Fix GCC compilation with correct whitespace for nested Common:Array --- engines/sherlock/animation.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/sherlock/animation.h') diff --git a/engines/sherlock/animation.h b/engines/sherlock/animation.h index 5802ffcd88..06614df6b1 100644 --- a/engines/sherlock/animation.h +++ b/engines/sherlock/animation.h @@ -38,10 +38,10 @@ private: SherlockEngine *_vm; Common::Array _prologueNames; - Common::Array> _prologueFrames; + Common::Array > _prologueFrames; Common::Array _titleNames; - Common::Array> _titleFrames; + Common::Array > _titleFrames; const int *checkForSoundFrames(const Common::String &filename); public: -- cgit v1.2.3 From da9333a924d945c3bd59eb1f8d3dd17d86b5d572 Mon Sep 17 00:00:00 2001 From: sirlemonhead Date: Mon, 18 May 2015 18:20:54 +0100 Subject: SHERLOCK: Fix code formatting issues and comment spelling mistakes --- engines/sherlock/animation.h | 1 - 1 file changed, 1 deletion(-) (limited to 'engines/sherlock/animation.h') diff --git a/engines/sherlock/animation.h b/engines/sherlock/animation.h index 06614df6b1..cd22a5c30a 100644 --- a/engines/sherlock/animation.h +++ b/engines/sherlock/animation.h @@ -44,7 +44,6 @@ private: Common::Array > _titleFrames; const int *checkForSoundFrames(const Common::String &filename); -public: public: Animation(SherlockEngine *vm); -- cgit v1.2.3 From 19d93325b1ccda2d02d708cbef20a49786f38d2b Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 18 May 2015 19:53:49 -0400 Subject: SHERLOCK: Move the override filename fields into the Animation class --- engines/sherlock/animation.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'engines/sherlock/animation.h') diff --git a/engines/sherlock/animation.h b/engines/sherlock/animation.h index cd22a5c30a..2c47686efd 100644 --- a/engines/sherlock/animation.h +++ b/engines/sherlock/animation.h @@ -44,6 +44,9 @@ private: Common::Array > _titleFrames; const int *checkForSoundFrames(const Common::String &filename); +public: + Common::String _soundLibraryFilename; + Common::String _gfxLibraryFilename; public: Animation(SherlockEngine *vm); -- cgit v1.2.3 From 1df183ffcb08a69ed414afd69284a0596fee4e82 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Tue, 19 May 2015 07:37:55 -0400 Subject: SHERLOCK: Move method comments from cpp to headers --- engines/sherlock/animation.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'engines/sherlock/animation.h') diff --git a/engines/sherlock/animation.h b/engines/sherlock/animation.h index 2c47686efd..b7811d3fa8 100644 --- a/engines/sherlock/animation.h +++ b/engines/sherlock/animation.h @@ -39,10 +39,12 @@ private: Common::Array _prologueNames; Common::Array > _prologueFrames; - Common::Array _titleNames; Common::Array > _titleFrames; + /** + * Checks for whether an animation is being played that has associated sound + */ const int *checkForSoundFrames(const Common::String &filename); public: Common::String _soundLibraryFilename; @@ -50,12 +52,29 @@ public: public: Animation(SherlockEngine *vm); + /** + * Load the prologue name array + */ void setPrologueNames(const char *const *names, int count); + + /** + * Load the prologue frame array + */ void setPrologueFrames(const int *frames, int count, int maxFrames); + /** + * Load the title name array + */ void setTitleNames(const char *const *names, int count); + + /** + * Load the title frame array + */ void setTitleFrames(const int *frames, int count, int maxFrames); + /** + * Play a full-screen animation + */ bool play(const Common::String &filename, int minDelay, int fade, bool setPalette, int speed); }; -- cgit v1.2.3 From 4c9e67ccfa709a74f2c78580f42bb642b258cd22 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Sun, 7 Jun 2015 17:05:26 +0200 Subject: SHERLOCK: 3DO animation support --- engines/sherlock/animation.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines/sherlock/animation.h') diff --git a/engines/sherlock/animation.h b/engines/sherlock/animation.h index b7811d3fa8..1755edd97b 100644 --- a/engines/sherlock/animation.h +++ b/engines/sherlock/animation.h @@ -76,6 +76,8 @@ public: * Play a full-screen animation */ bool play(const Common::String &filename, int minDelay, int fade, bool setPalette, int speed); + + bool play3DO(const Common::String &filename, int minDelay, int fade, int speed); }; } // End of namespace Sherlock -- cgit v1.2.3 From f2a25013f1862980107643b2c3d359a817d16e82 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Sun, 7 Jun 2015 19:19:04 +0200 Subject: SHERLOCK: 3DO intro: audio implemented --- engines/sherlock/animation.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'engines/sherlock/animation.h') diff --git a/engines/sherlock/animation.h b/engines/sherlock/animation.h index 1755edd97b..b6e1337975 100644 --- a/engines/sherlock/animation.h +++ b/engines/sherlock/animation.h @@ -45,10 +45,11 @@ private: /** * Checks for whether an animation is being played that has associated sound */ - const int *checkForSoundFrames(const Common::String &filename); + const int *checkForSoundFrames(const Common::String &filename, bool intro); public: Common::String _soundLibraryFilename; Common::String _gfxLibraryFilename; + public: Animation(SherlockEngine *vm); @@ -75,9 +76,9 @@ public: /** * Play a full-screen animation */ - bool play(const Common::String &filename, int minDelay, int fade, bool setPalette, int speed); + bool play(const Common::String &filename, bool intro, int minDelay, int fade, bool setPalette, int speed); - bool play3DO(const Common::String &filename, int minDelay, int fade, int speed); + bool play3DO(const Common::String &filename, bool intro, int minDelay, int fade, int speed); }; } // End of namespace Sherlock -- cgit v1.2.3 From 6aaee559dc7f26240678421043baa865608b7d58 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Tue, 9 Jun 2015 23:22:52 +0200 Subject: SHERLOCK: 3DO intro: implement fade from white --- engines/sherlock/animation.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/sherlock/animation.h') diff --git a/engines/sherlock/animation.h b/engines/sherlock/animation.h index b6e1337975..f3c95d4027 100644 --- a/engines/sherlock/animation.h +++ b/engines/sherlock/animation.h @@ -78,7 +78,7 @@ public: */ bool play(const Common::String &filename, bool intro, int minDelay, int fade, bool setPalette, int speed); - bool play3DO(const Common::String &filename, bool intro, int minDelay, int fade, int speed); + bool play3DO(const Common::String &filename, bool intro, int minDelay, bool fadeFromGrey, int speed); }; } // End of namespace Sherlock -- cgit v1.2.3