File tree Expand file tree Collapse file tree 5 files changed +94
-5
lines changed Expand file tree Collapse file tree 5 files changed +94
-5
lines changed Original file line number Diff line number Diff line change 24
24
25
25
#include " mm/mm1/events.h"
26
26
#include " mm/mm1/views/bash.h"
27
- #include " mm/mm1/views/title.h"
28
27
#include " mm/mm1/views_enh/character_info.h"
29
28
#include " mm/mm1/views_enh/character_inventory.h"
30
29
#include " mm/mm1/views_enh/character_select.h"
44
43
#include " mm/mm1/views_enh/quick_ref.h"
45
44
#include " mm/mm1/views_enh/rest.h"
46
45
#include " mm/mm1/views_enh/search.h"
46
+ #include " mm/mm1/views_enh/title.h"
47
47
#include " mm/mm1/views_enh/trade.h"
48
48
#include " mm/mm1/views_enh/trap.h"
49
49
#include " mm/mm1/views_enh/unlock.h"
@@ -155,6 +155,7 @@ struct Dialogs {
155
155
ViewsEnh::QuickRef _quickRef;
156
156
ViewsEnh::Rest _rest;
157
157
ViewsEnh::Search _search;
158
+ ViewsEnh::Title _title;
158
159
ViewsEnh::Trade _trade;
159
160
ViewsEnh::Trap _trap;
160
161
ViewsEnh::Unlock _unlock;
@@ -164,7 +165,6 @@ struct Dialogs {
164
165
ViewsEnh::WhoWillTry _whoWillTry;
165
166
ViewsEnh::WonGame _wonGame;
166
167
Views::Bash _bash;
167
- Views::Title _title;
168
168
public:
169
169
Dialogs () {}
170
170
};
Original file line number Diff line number Diff line change
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
+ #include " mm/mm1/views_enh/title.h"
23
+ #include " mm/mm1/mm1.h"
24
+
25
+ namespace MM {
26
+ namespace MM1 {
27
+ namespace ViewsEnh {
28
+
29
+ bool Title::msgFocus (const FocusMessage &msg) {
30
+ Views::Title::msgFocus (msg);
31
+ g_engine->_sound ->playSong (" inn.m" );
32
+ return true ;
33
+ }
34
+
35
+ bool Title::msgUnfocus (const UnfocusMessage &msg) {
36
+ g_engine->_sound ->stopSong ();
37
+ return Views::Title::msgUnfocus (msg);
38
+ }
39
+
40
+ } // namespace ViewsEnh
41
+ } // namespace MM1
42
+ } // namespace MM
Original file line number Diff line number Diff line change
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 MM1_VIEWS_ENH_TITLE_H
23
+ #define MM1_VIEWS_ENH_TITLE_H
24
+
25
+ #include " mm/mm1/views/title.h"
26
+
27
+ namespace MM {
28
+ namespace MM1 {
29
+ namespace ViewsEnh {
30
+
31
+ class Title : public Views ::Title {
32
+ public:
33
+ Title () : Views::Title() {}
34
+ virtual ~Title () {}
35
+
36
+ bool msgFocus (const FocusMessage &msg) override ;
37
+ bool msgUnfocus (const UnfocusMessage &msg) override ;
38
+ };
39
+
40
+ } // namespace ViewsEnh
41
+ } // namespace MM1
42
+ } // namespace MM
43
+
44
+ #endif
Original file line number Diff line number Diff line change @@ -170,6 +170,7 @@ MODULE_OBJS += \
170
170
mm1/views_enh/select_number.o \
171
171
mm1/views_enh/text_entry.o \
172
172
mm1/views_enh/text_view.o \
173
+ mm1/views_enh/title.o \
173
174
mm1/views_enh/trade.o \
174
175
mm1/views_enh/trap.o \
175
176
mm1/views_enh/unlock.o \
Original file line number Diff line number Diff line change 25
25
#include " common/config-manager.h"
26
26
#include " mm/shared/xeen/sound.h"
27
27
#include " mm/shared/xeen/sound_driver_adlib.h"
28
+ #include " mm/xeen/xeen.h"
28
29
#include " mm/mm.h"
29
30
30
31
namespace MM {
@@ -215,12 +216,13 @@ void Sound::playSong(const Common::String &name, int param) {
215
216
Common::File mf;
216
217
if (mf.open (name)) {
217
218
playSong (mf);
218
- } else {
219
219
#ifdef ENABLE_XEEN
220
+ } else if (dynamic_cast <MM::Xeen::XeenEngine *>(g_engine)) {
220
221
File f (name, _musicSide);
221
- #else
222
- File f (name);
222
+ playSong (f);
223
223
#endif
224
+ } else {
225
+ File f (name);
224
226
playSong (f);
225
227
}
226
228
}
You can’t perform that action at this time.
0 commit comments