ScummVM API documentation
resources.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 #ifndef PELROCK_RESOURCES_H
22 #define PELROCK_RESOURCES_H
23 
24 namespace Pelrock {
25 
26 static const int walkingAnimLengths[4] = {8, 8, 4, 4}; // size of each inner array
27 static const int talkingAnimLengths[4] = {8, 8, 4, 4}; // size of each inner array
28 static const int interactingAnimLength = 2;
29 
31 private:
32  InventoryObject *_inventoryIcons = nullptr;
33 
34 public:
35  ResourceManager(/* args */);
36  ~ResourceManager();
37 
38  void mergeRleBlocks(Common::SeekableReadStream *stream, uint32 offset, int numBlocks, byte *outputBuffer);
39  void loadSettingsMenu();
40  void loadCursors();
41  void loadInteractionIcons();
45  void loadAlfredAnims();
49  void loadOtherSpecialAnim(uint32 offset, bool rleCompressed, byte *&buffer, size_t &bufferSize);
53  void loadAlfredSpecialAnim(int numAnim, bool reverse = false);
54  void clearSpecialAnim();
55  void loadInventoryItems();
56  void loadHardcodedText();
57  void getPaletteForRoom28(byte *palette);
58  Common::Array<Common::StringArray> loadComputerText();
59  void getExtraScreen(int screenIndex, byte *screenBuf, byte *palette);
61  Common::Array<Common::Array<Common::String>> processTextData(byte *data, size_t size, bool decode = false);
62  Sticker getSticker(int stickerIndex);
63  byte *loadStickerPixels(const Sticker &sticker);
64  InventoryObject getIconForObject(byte index);
65  byte *loadExtra();
66 
67  byte *alfredIdle[4]; // 4 directions
68 
69  byte **alfredWalkFrames[4]; // 4 arrays of arrays
70  byte **alfredCrawlFrames[4];// 4 arrays of arrays
71  byte **alfredTalkFrames[4]; // 4 arrays of arrays
72  byte **alfredInteractFrames[4];
73 
74  byte **alfredCombFrames[2];
75 
76  byte *_cursorMasks[5];
77  byte *_verbIcons[9];
78  byte *_popUpBalloon = nullptr;
80  Common::String _left;
81  Common::String _right;
82  Common::String _conversationTerminator;
83 
84  // Special anims
85  AlfredSpecialAnim *_currentSpecialAnim = nullptr;
86  bool _isSpecialAnimFinished = false;
87  static const AlfredSpecialAnimOffset alfredSpecialAnims[];
88 };
89 
90 } // End of namespace Pelrock
91 #endif
Definition: types.h:136
void loadAlfredSpecialAnim(int numAnim, bool reverse=false)
Definition: str.h:59
Definition: array.h:52
Definition: actions.h:26
Definition: stream.h:745
Definition: types.h:426
Definition: types.h:250
Definition: resources.h:30
Definition: types.h:449
void loadOtherSpecialAnim(uint32 offset, bool rleCompressed, byte *&buffer, size_t &bufferSize)