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 #include "common/scummsys.h"
25 #include "common/stream.h"
26 
27 #include "pelrock/offsets.h"
28 #include "pelrock/types.h"
29 
30 namespace Pelrock {
31 
32 static const int walkingAnimLengths[4] = {8, 8, 4, 4}; // size of each inner array
33 static const int talkingAnimLengths[4] = {8, 8, 4, 4}; // size of each inner array
34 static const int interactingAnimLength = 2;
35 
37 private:
38  InventoryObject *_inventoryIcons = nullptr;
39 
40 public:
41  ResourceManager(/* args */);
42  ~ResourceManager();
43 
44  void mergeRleBlocks(Common::SeekableReadStream *stream, uint32 offset, int numBlocks, byte *outputBuffer);
45  void loadSettingsMenu();
46  void loadCursors();
47  void loadInteractionIcons();
51  void loadAlfredAnims();
55  void loadOtherSpecialAnim(uint32 offset, bool rleCompressed, byte *&buffer, size_t &bufferSize);
59  void loadAlfredSpecialAnim(int numAnim, bool reverse = false);
60  void clearSpecialAnim();
61  void loadInventoryItems();
62  void loadHardcodedText();
63  void getPaletteForRoom28(byte *palette);
64  Common::Array<Common::StringArray> loadComputerText();
65  void getExtraScreen(int screenIndex, byte *screenBuf, byte *palette);
67  Common::Array<Common::Array<Common::String>> processTextData(byte *data, size_t size, bool decode = false);
68  Sticker getSticker(int stickerIndex);
69  byte *loadStickerPixels(const Sticker &sticker);
70  InventoryObject getIconForObject(byte index);
71  byte *loadExtra();
72 
73  byte *alfredIdle[4]; // 4 directions
74 
75  byte **alfredWalkFrames[4]; // 4 arrays of arrays
76  byte **alfredCrawlFrames[4];// 4 arrays of arrays
77  byte **alfredTalkFrames[4]; // 4 arrays of arrays
78  byte **alfredInteractFrames[4];
79 
80  byte **alfredCombFrames[2];
81 
82  byte *_cursorMasks[5];
83  byte *_verbIcons[9];
84  byte *_popUpBalloon = nullptr;
86  Common::String _left;
87  Common::String _right;
88  Common::String _conversationTerminator;
89 
90  // Special anims
91  AlfredSpecialAnim *_currentSpecialAnim = nullptr;
92  bool _isSpecialAnimFinished = false;
93  static const AlfredSpecialAnimOffset alfredSpecialAnims[];
94 };
95 
96 } // End of namespace Pelrock
97 #endif
Definition: types.h:139
void loadAlfredSpecialAnim(int numAnim, bool reverse=false)
Definition: str.h:59
Definition: array.h:52
Definition: actions.h:27
Definition: stream.h:745
Definition: types.h:429
Definition: types.h:253
Definition: resources.h:36
Definition: types.h:452
void loadOtherSpecialAnim(uint32 offset, bool rleCompressed, byte *&buffer, size_t &bufferSize)