ScummVM API documentation
music_song.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 TITANIC_MUSIC_SONG_H
23 #define TITANIC_MUSIC_SONG_H
24 
25 #include "common/scummsys.h"
26 #include "common/array.h"
27 
28 namespace Titanic {
29 
30 struct CValuePair {
31  int _data;
32  int _length;
33  CValuePair() : _data(0), _length(0) {}
34 };
35 
36 class CMusicSong {
37 public:
39  int _minVal;
40  int _range;
41 public:
42  CMusicSong(int index);
43  ~CMusicSong();
44 
45  int size() const { return _data.size(); }
46 
47  const CValuePair &operator[](int index) const { return _data[index]; }
48 };
49 
50 class CSongParser {
51 private:
52  const char *_str;
53  uint _strIndex;
54  int _field8;
55  char _priorChar;
56  int _field10;
57  int _field14;
58  bool _flag;
59  int _field1C;
60  char _currentChar;
61  int _numValue;
62 private:
63  void skipSpaces();
64 public:
65  CSongParser(const char *str);
66 
70  void reset();
71 
75  bool parse(CValuePair &r);
76 };
77 
78 } // End of namespace Titanic
79 
80 #endif /* TITANIC_MUSIC_SONG_H */
Definition: music_song.h:30
Definition: array.h:52
Definition: music_song.h:50
Definition: music_song.h:36
Definition: arm.h:30
size_type size() const
Definition: array.h:315