1 | Index: simon/items.cpp
|
---|
2 | ===================================================================
|
---|
3 | RCS file: /cvsroot/scummvm/scummvm/simon/items.cpp,v
|
---|
4 | retrieving revision 1.36
|
---|
5 | diff -r1.36 items.cpp
|
---|
6 | 1053c1053
|
---|
7 | < getVarOrWord();
|
---|
8 | ---
|
---|
9 | > _midi_sfx = getVarOrWord();
|
---|
10 | 1550a1551,1553
|
---|
11 | > if (_game == GAME_SIMON1DOS)
|
---|
12 | > playSting(a);
|
---|
13 | > else
|
---|
14 | Index: simon/midi.cpp
|
---|
15 | ===================================================================
|
---|
16 | RCS file: /cvsroot/scummvm/scummvm/simon/midi.cpp,v
|
---|
17 | retrieving revision 1.17
|
---|
18 | diff -r1.17 midi.cpp
|
---|
19 | 64c64,73
|
---|
20 | < void MidiPlayer::read_mthd(File *in, Song *s, bool old, uint music)
|
---|
21 | ---
|
---|
22 | > void MidiPlayer::read_all_songs_old(File *in, uint music, uint16 size)
|
---|
23 | > {
|
---|
24 | > _currentSong = _songs;
|
---|
25 | >
|
---|
26 | > _lastDelay = 0;
|
---|
27 | >
|
---|
28 | > read_one_song(in, &_songs[0], music, size);
|
---|
29 | > }
|
---|
30 | >
|
---|
31 | > void MidiPlayer::read_mthd(File *in, Song *s, bool old, uint music, uint16 size)
|
---|
32 | 100a110,112
|
---|
33 | > if (size)
|
---|
34 | > t->data_size = size - 8;
|
---|
35 | > else
|
---|
36 | 126c138
|
---|
37 | < void MidiPlayer::read_one_song(File *in, Song *s, uint music)
|
---|
38 | ---
|
---|
39 | > void MidiPlayer::read_one_song(File *in, Song *s, uint music, uint16 size)
|
---|
40 | 139c151
|
---|
41 | < read_mthd(in, s, false, music);
|
---|
42 | ---
|
---|
43 | > read_mthd(in, s, false, music, size);
|
---|
44 | 143c155
|
---|
45 | < read_mthd(in, s, true, music);
|
---|
46 | ---
|
---|
47 | > read_mthd(in, s, true, music, size);
|
---|
48 | 283a296
|
---|
49 | > #if 0
|
---|
50 | 300a314
|
---|
51 | > #endif
|
---|
52 | Index: simon/midi.h
|
---|
53 | ===================================================================
|
---|
54 | RCS file: /cvsroot/scummvm/scummvm/simon/midi.h,v
|
---|
55 | retrieving revision 1.7
|
---|
56 | diff -r1.7 midi.h
|
---|
57 | 35a36
|
---|
58 | > void read_all_songs_old (File *in, uint music, uint16 size);
|
---|
59 | 79c80
|
---|
60 | < void read_mthd(File *in, Song *s, bool old, uint music);
|
---|
61 | ---
|
---|
62 | > void read_mthd(File *in, Song *s, bool old, uint music, uint16 size);
|
---|
63 | 81c82
|
---|
64 | < void read_one_song(File *in, Song *s, uint music);
|
---|
65 | ---
|
---|
66 | > void read_one_song(File *in, Song *s, uint music, uint16 size = 0);
|
---|
67 | Index: simon/simon.cpp
|
---|
68 | ===================================================================
|
---|
69 | RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
|
---|
70 | retrieving revision 1.118
|
---|
71 | diff -r1.118 simon.cpp
|
---|
72 | 809c809
|
---|
73 | < if (_game == GAME_SIMON1WIN )
|
---|
74 | ---
|
---|
75 | > if (_game == GAME_SIMON1WIN)
|
---|
76 | 828a829,864
|
---|
77 | > }
|
---|
78 | >
|
---|
79 | > void SimonState::readSting(uint a)
|
---|
80 | > {
|
---|
81 | > char filename[11];
|
---|
82 | > uint16 size;
|
---|
83 | >
|
---|
84 | > _mus_file = new File();
|
---|
85 | >
|
---|
86 | > sprintf(filename, "stings%i.mus", a);
|
---|
87 | >
|
---|
88 | > _mus_file->open(filename, _gameDataPath);
|
---|
89 | >
|
---|
90 | > if (!_mus_file->isOpen())
|
---|
91 | > return;
|
---|
92 | >
|
---|
93 | > size = _mus_file->readUint16LE();
|
---|
94 | >
|
---|
95 | > _mus_offsets = (uint16 *)malloc(size);
|
---|
96 | >
|
---|
97 | > _mus_file->seek(0, SEEK_SET);
|
---|
98 | >
|
---|
99 | > if (_mus_file->read(_mus_offsets, size) != size)
|
---|
100 | > error("Cannot read offsets");
|
---|
101 | > }
|
---|
102 | >
|
---|
103 | > void SimonState::playSting(uint a)
|
---|
104 | > {
|
---|
105 | > readSting(_midi_sfx);
|
---|
106 | >
|
---|
107 | > midi.shutdown();
|
---|
108 | > _mus_file->seek(_mus_offsets[a], SEEK_SET);
|
---|
109 | > midi.read_all_songs_old(_mus_file, a, _mus_offsets[a+1] - _mus_offsets[a]);
|
---|
110 | >
|
---|
111 | > midi.initialize();
|
---|
112 | > midi.play();
|
---|
113 | Index: simon/simon.h
|
---|
114 | ===================================================================
|
---|
115 | RCS file: /cvsroot/scummvm/scummvm/simon/simon.h,v
|
---|
116 | retrieving revision 1.39
|
---|
117 | diff -r1.39 simon.h
|
---|
118 | 102a103,108
|
---|
119 | > File *_mus_file;
|
---|
120 | > uint16 *_mus_offsets;
|
---|
121 | >
|
---|
122 | > void SimonState::readSting(uint a);
|
---|
123 | > void SimonState::playSting(uint a);
|
---|
124 | >
|
---|
125 | 248a255
|
---|
126 | > uint _midi_sfx;
|
---|
127 | Index: simon/vga.cpp
|
---|
128 | ===================================================================
|
---|
129 | RCS file: /cvsroot/scummvm/scummvm/simon/vga.cpp,v
|
---|
130 | retrieving revision 1.24
|
---|
131 | diff -r1.24 vga.cpp
|
---|
132 | 1603a1604,1606
|
---|
133 | > if (_game == GAME_SIMON1DOS)
|
---|
134 | > playSting(a);
|
---|
135 | > else
|
---|
136 |
|
---|