ScummVM API documentation
anim.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef HOPKINS_ANIM_H
23 #define HOPKINS_ANIM_H
24 
25 #include "common/scummsys.h"
26 #include "common/endian.h"
27 #include "common/path.h"
28 #include "graphics/surface.h"
29 
30 namespace Hopkins {
31 
32 struct BankItem {
33  byte *_data;
34  bool _loadedFl;
35  Common::Path _filename;
36  int _fileHeader;
37  int _objDataIdx;
38 };
39 
40 struct BqeAnimItem {
41  byte *_data;
42  bool _enabledFl;
43 };
44 
45 class HopkinsEngine;
46 
48 private:
49  bool _clearAnimationFl;
50 
51  HopkinsEngine *_vm;
52 
53  void initAnimBqe();
54  int loadSpriteBank(int idx, const Common::Path &filename);
55  void searchAnim(const byte *data, int animIndex, int count);
56 
57 public:
58  BqeAnimItem _animBqe[35];
59  BankItem Bank[8];
60 
62  void clearAll();
63 
64  void loadAnim(const Common::Path &animName);
65  void clearAnim();
66  void playAnim(const Common::Path &hiresName, const Common::Path &lowresName, uint32 rate1, uint32 rate2, uint32 rate3, bool skipSeqFl = false);
67  void playAnim2(const Common::Path &hiresName, const Common::Path &lowresName, uint32 rate1, uint32 rate2, uint32 rate3);
68  void playSequence(const Common::Path &file, uint32 rate1, uint32 rate2, uint32 rate3, bool skipEscFl, bool skipSeqFl, bool noColFl = false);
69  void playSequence2(const Common::Path &file, uint32 rate1, uint32 rate2, uint32 rate3, bool skipSeqFl = false);
70 
71  void setClearAnimFlag() { _clearAnimationFl = true; }
72  void unsetClearAnimFlag() { _clearAnimationFl = false; }
73 };
74 
75 } // End of namespace Hopkins
76 
77 #endif /* HOPKINS_ANIM_H */
Definition: path.h:52
Definition: anim.h:47
Definition: anim.h:32
Definition: anim.h:30
Definition: anim.h:40
Definition: hopkins.h:77