[Scummvm-git-logs] scummvm master -> dd3fe3d5070c09bb55d483e3833baf9591066b44
sev-
noreply at scummvm.org
Fri Jan 27 17:45:37 UTC 2023
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
91d6710faf DIRECTOR: Fix debug output
dd3fe3d507 DIRECTOR: Implemented SoundVolume XCMD
Commit: 91d6710fafafad3453f57218dddd911730eb6f22
https://github.com/scummvm/scummvm/commit/91d6710fafafad3453f57218dddd911730eb6f22
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-01-27T18:45:14+01:00
Commit Message:
DIRECTOR: Fix debug output
Changed paths:
engines/director/lingo/xlibs/xplayanim.cpp
diff --git a/engines/director/lingo/xlibs/xplayanim.cpp b/engines/director/lingo/xlibs/xplayanim.cpp
index 37a3b4e8f34..6dfa2043f38 100644
--- a/engines/director/lingo/xlibs/xplayanim.cpp
+++ b/engines/director/lingo/xlibs/xplayanim.cpp
@@ -53,7 +53,7 @@ void XPlayAnim::b_xplayanim(int nargs) {
int x = g_lingo->pop().asInt();
Common::String filename = g_lingo->pop().asString();
- debugN(5, "LB::b_xPlayAnim: x: %i y: %i", x, y);
+ debug(5, "LB::b_xPlayAnim: x: %i y: %i", x, y);
Video::PacoDecoder *video = new Video::PacoDecoder();
bool result = video->loadFile(Common::Path(filename, g_director->_dirSeparator));
if (!result) {
Commit: dd3fe3d5070c09bb55d483e3833baf9591066b44
https://github.com/scummvm/scummvm/commit/dd3fe3d5070c09bb55d483e3833baf9591066b44
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-01-27T18:45:15+01:00
Commit Message:
DIRECTOR: Implemented SoundVolume XCMD
Changed paths:
A engines/director/lingo/xlibs/developerStack.cpp
A engines/director/lingo/xlibs/developerStack.h
engines/director/lingo/lingo-object.cpp
engines/director/module.mk
diff --git a/engines/director/lingo/lingo-object.cpp b/engines/director/lingo/lingo-object.cpp
index 74a7e29b4d2..ede5d79d3be 100644
--- a/engines/director/lingo/lingo-object.cpp
+++ b/engines/director/lingo/lingo-object.cpp
@@ -42,6 +42,7 @@
#include "director/lingo/xlibs/barakeobj.h"
#include "director/lingo/xlibs/cdromxobj.h"
#include "director/lingo/xlibs/darkenscreen.h"
+#include "director/lingo/xlibs/developerStack.h"
#include "director/lingo/xlibs/ednox.h"
#include "director/lingo/xlibs/fileexists.h"
#include "director/lingo/xlibs/fileio.h"
@@ -173,6 +174,7 @@ static struct XLibProto {
{ RearWindowXObj::fileNames, RearWindowXObj::open, RearWindowXObj::close, kXObj, 400 }, // D4
{ RegisterComponent::fileNames, RegisterComponent::open, RegisterComponent::close, kXObj, 400 }, // D4
{ SerialPortXObj::fileNames, SerialPortXObj::open, SerialPortXObj::close, kXObj, 200 }, // D2
+ { DeveloperStack::fileNames, DeveloperStack::open, DeveloperStack::close, kXObj, 300 }, // D3
{ SoundJam::fileNames, SoundJam::open, SoundJam::close, kXObj, 400 }, // D4
{ SpaceMgr::fileNames, SpaceMgr::open, SpaceMgr::close, kXObj, 400 }, // D4
{ VolumeList::fileNames, VolumeList::open, VolumeList::close, kXObj, 300 }, // D3
@@ -407,7 +409,7 @@ bool ScriptContext::setProp(const Common::String &propName, const Datum &value)
return _properties["ancestor"].u.obj->setProp(propName, value);
}
} else if (_objType == kFactoryObj) {
- // D3 style anonymous objects/factories, set whatever properties you like
+ // D3 style anonymous objects/factories, set whatever properties you like
_properties[propName] = value;
return true;
}
diff --git a/engines/director/lingo/xlibs/developerStack.cpp b/engines/director/lingo/xlibs/developerStack.cpp
new file mode 100644
index 00000000000..a18bf0501c1
--- /dev/null
+++ b/engines/director/lingo/xlibs/developerStack.cpp
@@ -0,0 +1,161 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "audio/mixer.h"
+
+#include "director/director.h"
+#include "director/lingo/xlibs/developerStack.h"
+
+/*************************************
+ *
+ * Developer Stack 1.3r
+ * Issue date 11/05/88
+ *
+ * This stack is © 1987,88 Steve Drazga & AnalytX. The individual XCMDs
+ * and scripts are copyrighted by the original authors as stated their description.
+ *
+ * This issue of Developer Stack may be freely distributed by individuals in its
+ * original form with all original messages. DO NOT DISTRIBUTE MODIFIED COPIES!
+ * User groups may distribute it for regular disk fees. Other organizations
+ * desiring to charge for the distribution of Developer Stack should contact AnalytX.
+ *
+ * Developer Stack is intended for educational & training purposes only and
+ * no warranty is made as to the suitablity of anything included in this stack
+ * for any specific purpose. For support on any individual contributions, please
+ * contact the creator directly.
+ *
+ */
+
+ /*
+ * XMCDs:
+ *
+ * Alert
+ * BarButton
+ * ChangeMenu
+ * CheckMenu
+ * ClipToPICTRes
+ * Color
+ * CombineFile
+ * CommInit
+ * CommWrite
+ * DeleteFile2
+ * DeProtect
+ * DispPict
+ * DoList
+ * doRestart
+ * DragOn
+ * DrawPict
+ * Ejector
+ * EnableMenu
+ * GetDANames
+ * HyperSND
+ * Import
+ * ImportPict
+ * InitMidi
+ * MungeMCTB
+ * OSErr
+ * PrintClip
+ * Progress
+ * ResCopy
+ * ResetMIDI
+ * ResetPrinter
+ * sendSerial
+ * SetVolume -- Done
+ * ShowMenu
+ * ShutDown
+ * SoundCapToRes
+ * Speak
+ * StdFile
+ * Stripper
+ * Tabs2Spaces
+ * Talk
+ * TitleBar
+ * TxMIDI
+ */
+
+
+/*************************************
+ *
+ * XCMD: SetVolume
+ *
+ * USED IN:
+ * overringunder: Over-Ring-Under
+ *
+ * This XCMD sets the current volume level of the Macintosh.
+ *
+ * This XCMD is ©1988 by Steve Drazga and all rights are reserved.
+ * It may be used in any non-commercial, shareware, or commercial stacks
+ * as long as the following conditions are met:
+ *
+ * 1) Within the credits of the stack the phrase 'Portions © 1988 Steve Drazga" should be included.
+ *
+ * 2) Send a copy of your finished stack to me at:
+ * Steve Drazga
+ * AnalytX
+ * Box 388
+ * Southampton, PA 18966
+ *
+ * If you need custom XCMDs/XFCNs, stacks, or HyperCard training for your organization contact:
+ * AnalytX at (215) 750-0792.
+ *
+ *
+ * Syntax:
+ * SetVolume "©1988SDrazga",<newVolume>
+ * The first parameter must be the copyright notice (the © symbol is option-g).
+ * The second parameter is the new volume level (0-7)
+ *
+ * Example usage: SetVolume "©1988SDrazga",
+ *
+ *************************************/
+
+namespace Director {
+
+const char *DeveloperStack::xlibName = "SetVolume";
+const char *DeveloperStack::fileNames[] = {
+ "SetVolume",
+ nullptr
+};
+
+static BuiltinProto builtins[] = {
+ { "SetVolume", DeveloperStack::b_setvolume, 2, 2, 300, HBLTIN },
+ { nullptr, nullptr, 0, 0, 0, VOIDSYM }
+};
+
+void DeveloperStack::open(int type) {
+ g_lingo->initBuiltIns(builtins);
+}
+
+void DeveloperStack::close(int type) {
+ g_lingo->cleanupBuiltIns(builtins);
+}
+
+void DeveloperStack::b_setvolume(int nargs) {
+ int volume = g_lingo->pop().asInt();
+ Common::String copyright = g_lingo->pop().asString();
+
+ debug(5, "LB::b_setvolume: copyright: %s vol: %d", copyright.c_str(), volume);
+
+ volume = CLIP<int>(volume, 0, 7);
+
+ g_director->_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, Audio::Mixer::kMaxMixerVolume / 7 * volume);
+}
+
+} // End of namespace Director
diff --git a/engines/director/lingo/xlibs/developerStack.h b/engines/director/lingo/xlibs/developerStack.h
new file mode 100644
index 00000000000..c0c9830b6ba
--- /dev/null
+++ b/engines/director/lingo/xlibs/developerStack.h
@@ -0,0 +1,41 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef DIRECTOR_LINGO_XLIBS_DEVELOPERSTACK_H
+#define DIRECTOR_LINGO_XLIBS_DEVELOPERSTACK_H
+
+namespace Director {
+
+namespace DeveloperStack {
+
+extern const char *xlibName;
+extern const char *fileNames[];
+
+void open(int type);
+void close(int type);
+
+void b_setvolume(int nargs);
+
+} // End of namespace DeveloperStack
+
+} // End of namespace Director
+
+#endif
diff --git a/engines/director/module.mk b/engines/director/module.mk
index ffb32651c49..eae3e9a66a1 100644
--- a/engines/director/module.mk
+++ b/engines/director/module.mk
@@ -45,6 +45,7 @@ MODULE_OBJS = \
lingo/xlibs/barakeobj.o \
lingo/xlibs/cdromxobj.o \
lingo/xlibs/darkenscreen.o \
+ lingo/xlibs/developerStack.o \
lingo/xlibs/ednox.o \
lingo/xlibs/fileexists.o \
lingo/xlibs/fileio.o \
More information about the Scummvm-git-logs
mailing list