ScummVM API documentation
resman.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 SUPERNOVA_RESOURCES_H
23#define SUPERNOVA_RESOURCES_H
24
25#include "audio/audiostream.h"
26#include "common/ptr.h"
27#include "math/sinetables.h"
28
29#include "supernova/graphics.h"
30#include "supernova/sound.h"
31#include "supernova/supernova.h"
32
33
34namespace Common {
35class MemoryReadStream;
36}
37
38namespace Supernova {
39class SupernovaEngine;
40
42public:
43 enum CursorId {
44 kCursorNormal,
45 kCursorWait
46 };
47
48public:
49 static const int kNumImageFiles1 = 45;
50 static const int kNumImageFiles2 = 47;
51
52public:
55
56 Audio::SeekableAudioStream *getSoundStream(AudioId index);
57 Audio::AudioStream *getSoundStream(MusicId index);
58 Audio::AudioStream *getSirenStream();
59 MSNImage *getImage(int filenumber);
60 const byte *getCursor(CursorId id) const;
61 int getAudioRate();
62
63private:
64 void initGraphics();
65 void initCursorGraphics();
66 void initImages1();
67 void initImages2();
68 void loadImage(int filenumber);
69 void loadSound1(AudioId id);
70 void loadSound2(AudioId id);
71 void initSiren();
72 byte *generateTone(byte *buffer, int frequency, int length, int audioRate, Math::SineTable &table);
73
74private:
81 SupernovaEngine *_vm;
82 int _audioRate;
83 MSNImage **_images;
84 byte _cursorNormal[256];
85 byte _cursorWait[256];
86};
87
88}
89
90#endif
Definition: audiostream.h:50
Definition: audiostream.h:212
Definition: graphics.h:41
Definition: resman.h:41
Definition: supernova.h:61
Definition: algorithm.h:29