2015-03-15 20:52:55 +00:00
|
|
|
/* 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.
|
|
|
|
*
|
2021-12-26 17:47:58 +00:00
|
|
|
* 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 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
2015-05-09 16:04:13 +00:00
|
|
|
*
|
2015-03-15 20:52:55 +00:00
|
|
|
* 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.
|
2015-05-09 16:04:13 +00:00
|
|
|
*
|
2015-03-15 20:52:55 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
2021-12-26 17:47:58 +00:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2015-03-15 20:52:55 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2015-03-16 01:25:07 +00:00
|
|
|
#ifndef SHERLOCK_ANIMATION_H
|
|
|
|
#define SHERLOCK_ANIMATION_H
|
|
|
|
|
|
|
|
#include "common/scummsys.h"
|
2023-09-17 16:23:45 +00:00
|
|
|
#include "common/path.h"
|
2015-05-11 23:42:57 +00:00
|
|
|
#include "common/array.h"
|
2015-03-15 20:52:55 +00:00
|
|
|
|
|
|
|
namespace Sherlock {
|
|
|
|
|
2015-05-11 23:42:57 +00:00
|
|
|
#define FRAMES_END 32000
|
|
|
|
|
2015-03-16 01:25:07 +00:00
|
|
|
class SherlockEngine;
|
|
|
|
|
|
|
|
class Animation {
|
|
|
|
private:
|
|
|
|
SherlockEngine *_vm;
|
|
|
|
|
2015-05-11 23:42:57 +00:00
|
|
|
Common::Array<const char *> _prologueNames;
|
2015-05-12 17:17:05 +00:00
|
|
|
Common::Array<Common::Array<int> > _prologueFrames;
|
2015-05-11 23:42:57 +00:00
|
|
|
Common::Array<const char *> _titleNames;
|
2015-05-12 17:17:05 +00:00
|
|
|
Common::Array<Common::Array<int> > _titleFrames;
|
2015-05-11 23:42:57 +00:00
|
|
|
|
2015-05-19 11:37:55 +00:00
|
|
|
/**
|
|
|
|
* Checks for whether an animation is being played that has associated sound
|
|
|
|
*/
|
2023-09-17 16:23:45 +00:00
|
|
|
const int *checkForSoundFrames(const Common::Path &filename, bool intro);
|
2015-05-18 23:53:49 +00:00
|
|
|
public:
|
2023-09-17 16:23:45 +00:00
|
|
|
Common::Path _soundLibraryFilename;
|
|
|
|
Common::Path _gfxLibraryFilename;
|
2015-06-07 17:19:04 +00:00
|
|
|
|
2015-03-16 01:25:07 +00:00
|
|
|
public:
|
|
|
|
Animation(SherlockEngine *vm);
|
2015-03-15 20:52:55 +00:00
|
|
|
|
2015-05-19 11:37:55 +00:00
|
|
|
/**
|
|
|
|
* Load the prologue name array
|
|
|
|
*/
|
2015-05-11 23:42:57 +00:00
|
|
|
void setPrologueNames(const char *const *names, int count);
|
2016-10-09 12:59:58 +00:00
|
|
|
|
2015-05-19 11:37:55 +00:00
|
|
|
/**
|
|
|
|
* Load the prologue frame array
|
|
|
|
*/
|
2015-05-11 23:42:57 +00:00
|
|
|
void setPrologueFrames(const int *frames, int count, int maxFrames);
|
|
|
|
|
2015-05-19 11:37:55 +00:00
|
|
|
/**
|
|
|
|
* Load the title name array
|
|
|
|
*/
|
2015-05-11 23:42:57 +00:00
|
|
|
void setTitleNames(const char *const *names, int count);
|
2016-10-09 12:59:58 +00:00
|
|
|
|
2015-05-19 11:37:55 +00:00
|
|
|
/**
|
|
|
|
* Load the title frame array
|
|
|
|
*/
|
2015-05-11 23:42:57 +00:00
|
|
|
void setTitleFrames(const int *frames, int count, int maxFrames);
|
|
|
|
|
2015-05-19 11:37:55 +00:00
|
|
|
/**
|
|
|
|
* Play a full-screen animation
|
|
|
|
*/
|
2023-09-17 16:23:45 +00:00
|
|
|
bool play(const Common::Path &filename, bool intro, int minDelay, int fade, bool setPalette, int speed);
|
2015-06-07 15:05:26 +00:00
|
|
|
|
2023-09-17 16:23:45 +00:00
|
|
|
bool play3DO(const Common::Path &filename, bool intro, int minDelay, bool fadeFromGrey, int speed);
|
2015-03-15 20:52:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End of namespace Sherlock
|
|
|
|
|
|
|
|
#endif
|