aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
Diffstat (limited to 'scumm')
-rw-r--r--scumm/dialogs.cpp4
-rw-r--r--scumm/imuse.cpp28
2 files changed, 19 insertions, 13 deletions
diff --git a/scumm/dialogs.cpp b/scumm/dialogs.cpp
index b6b7c1c1be..08a6babf33 100644
--- a/scumm/dialogs.cpp
+++ b/scumm/dialogs.cpp
@@ -580,8 +580,8 @@ void OptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data
AboutDialog::AboutDialog(NewGui *gui, Scumm *scumm)
: ScummDialog(gui, scumm, 30, 20, 260, 124) {
addButton((_w - kButtonWidth)/2, 100, queryCustomString(23), kCloseCmd, 'C'); // Close dialog - FIXME
- new StaticTextWidget(this, 10, 10, 240, 16, "ScummVM " SCUMMVM_VERSION " (" SCUMMVM_CVS ")", kTextAlignCenter);
- new StaticTextWidget(this, 10, 20, 240, 16, "(built on " __DATE__ ")", kTextAlignCenter);
+ new StaticTextWidget(this, 10, 10, 240, 16, gScummVMFullVersion, kTextAlignCenter);
+// new StaticTextWidget(this, 10, 20, 240, 16, "(built on " __DATE__ ")", kTextAlignCenter);
new StaticTextWidget(this, 10, 30, 240, 16, "http://www.scummvm.org", kTextAlignCenter);
new StaticTextWidget(this, 10, 50, 240, 16, "SCUMM Games (c) LucasArts", kTextAlignCenter);
diff --git a/scumm/imuse.cpp b/scumm/imuse.cpp
index cacf2048bc..00721d01f9 100644
--- a/scumm/imuse.cpp
+++ b/scumm/imuse.cpp
@@ -1104,32 +1104,38 @@ int IMuseInternal::initialize(OSystem *syst, MidiDriver *native_midi) {
void IMuseInternal::initMidiDriver (MidiDriver *midi) {
// Open MIDI driver
- midi->property (MidiDriver::PROP_OLD_ADLIB, _old_adlib_instruments ? 1 : 0);
+ midi->property(MidiDriver::PROP_OLD_ADLIB, _old_adlib_instruments ? 1 : 0);
int result = midi->open();
if (result)
error("IMuse initialization - %s", MidiDriver::getErrorName(result));
// In case we have an MT-32 attached.
- initMT32 (midi);
+ initMT32(midi);
// Connect to the driver's timer
- midi->setTimerCallback (midi, &IMuseInternal::midiTimerCallback);
+ midi->setTimerCallback(midi, &IMuseInternal::midiTimerCallback);
}
void IMuseInternal::initMT32 (MidiDriver *midi) {
byte buffer[32] = "\x41\x10\x16\x12\x00\x00\x00 ";
+ char info[256] = "ScummVM ";
+ int len;
+
+ // Compute version string (truncated to 20 chars max.)
+ strcat(info, gScummVMVersion);
+ len = strlen(info);
+ if (len > 20)
+ len = 20;
// Reset the MT-32
- memcpy (&buffer[4], "\x7f\x00\x00\x01\x00", 5);
- midi->sysEx (buffer, 9);
+ memcpy(&buffer[4], "\x7f\x00\x00\x01\x00", 5);
+ midi->sysEx(buffer, 9);
// Display a welcome message on MT-32 displays.
- memcpy (&buffer[4], "\x20\x00\x00", 3);
- memcpy (&buffer[7], " ", 20);
- memcpy (buffer + 7 + (20 - strlen ("ScummVM " SCUMMVM_VERSION)) / 2,
- "ScummVM " SCUMMVM_VERSION,
- strlen ("ScummVM " SCUMMVM_VERSION));
+ memcpy(&buffer[4], "\x20\x00\x00", 3);
+ memcpy(&buffer[7], " ", 20);
+ memcpy(buffer + 7 + (20 - len) / 2, info, len);
byte checksum = 0;
for (int i = 4; i < 27; ++i)
checksum -= buffer[i];
@@ -1163,7 +1169,7 @@ void IMuseInternal::handleDeferredCommands (MidiDriver *midi) {
if (!ptr->time_left)
continue;
if (ptr->time_left <= advance) {
- doCommand (ptr->a, ptr->b, ptr->c, ptr->d, ptr->e, ptr->f, 0, 0);
+ doCommand(ptr->a, ptr->b, ptr->c, ptr->d, ptr->e, ptr->f, 0, 0);
ptr->time_left = advance;
}
ptr->time_left -= advance;