[Scummvm-git-logs] scummvm master -> 50a655871f8c1f55c93f38637c901e1e0723d31f
criezy
noreply at scummvm.org
Tue Jan 17 17:27:15 UTC 2023
This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
43bdb0d5c5 AGS: Script API: Mouse.AutoLock
902b92341d AGS: Engine: prevent invalid parameter in video player
028567e890 AGS: Engine: improved parameter logging in SetAudioTypeVolume
e7d348f9a4 AGS: Updated build version (3.6.0.35)
50a655871f AGS: Engine: fixed dialog parser not drawn on the correct position
Commit: 43bdb0d5c5ee8c7dd1b8852c94f8a02e0d4834e7
https://github.com/scummvm/scummvm/commit/43bdb0d5c5ee8c7dd1b8852c94f8a02e0d4834e7
Author: Walter Agazzi (walter.agazzi at protonmail.com)
Date: 2023-01-17T17:27:07Z
Commit Message:
AGS: Script API: Mouse.AutoLock
>From upstream f49501a18b48767184e5f3d5da355405e29ad9e
Changed paths:
engines/ags/engine/ac/mouse.cpp
diff --git a/engines/ags/engine/ac/mouse.cpp b/engines/ags/engine/ac/mouse.cpp
index fb67fb96cc2..19b10d2d5b6 100644
--- a/engines/ags/engine/ac/mouse.cpp
+++ b/engines/ags/engine/ac/mouse.cpp
@@ -316,6 +316,20 @@ void Mouse_EnableControl(bool on) {
_GP(usetup).mouse_ctrl_enabled = on; // remember setting in config
}
+bool Mouse_IsAutoLocking() {
+ return _GP(usetup).mouse_auto_lock;
+}
+
+void Mouse_SetAutoLock(bool on) {
+ _GP(usetup).mouse_auto_lock = on;
+ if (_GP(scsystem).windowed) {
+ if (_GP(usetup).mouse_auto_lock)
+ _GP(mouse).TryLockToWindow();
+ else
+ _GP(mouse).UnlockFromWindow();
+ }
+}
+
//=============================================================================
int GetMouseCursor() {
@@ -546,6 +560,13 @@ RuntimeScriptValue Sc_Mouse_SetControlEnabled(const RuntimeScriptValue *params,
API_SCALL_VOID_PBOOL(Mouse_EnableControl);
}
+RuntimeScriptValue Sc_Mouse_GetAutoLock(const RuntimeScriptValue *params, int32_t param_count) {
+ API_SCALL_BOOL(Mouse_IsAutoLocking);
+}
+
+RuntimeScriptValue Sc_Mouse_SetAutoLock(const RuntimeScriptValue *params, int32_t param_count) {
+ API_SCALL_VOID_PBOOL(Mouse_SetAutoLock);
+}
RuntimeScriptValue Sc_Mouse_GetSpeed(const RuntimeScriptValue *params, int32_t param_count) {
API_SCALL_FLOAT(_GP(mouse).GetSpeed);
@@ -576,6 +597,8 @@ void RegisterMouseAPI() {
ccAddExternalStaticFunction("Mouse::Update^0", Sc_RefreshMouse);
ccAddExternalStaticFunction("Mouse::UseDefaultGraphic^0", Sc_set_default_cursor);
ccAddExternalStaticFunction("Mouse::UseModeGraphic^1", Sc_set_mouse_cursor);
+ ccAddExternalStaticFunction("Mouse::get_AutoLock", Sc_Mouse_GetAutoLock);
+ ccAddExternalStaticFunction("Mouse::set_AutoLock", Sc_Mouse_SetAutoLock);
ccAddExternalStaticFunction("Mouse::get_ControlEnabled", Sc_Mouse_GetControlEnabled);
ccAddExternalStaticFunction("Mouse::set_ControlEnabled", Sc_Mouse_SetControlEnabled);
ccAddExternalStaticFunction("Mouse::get_Mode", Sc_GetCursorMode);
Commit: 902b92341d2d7b273bf791be6562eef9589baa18
https://github.com/scummvm/scummvm/commit/902b92341d2d7b273bf791be6562eef9589baa18
Author: Walter Agazzi (walter.agazzi at protonmail.com)
Date: 2023-01-17T17:27:07Z
Commit Message:
AGS: Engine: prevent invalid parameter in video player
partially from upstream 4efaf8116a2bd0bcf909b174dc28b945e4b52745
Changed paths:
engines/ags/engine/ac/timer.cpp
diff --git a/engines/ags/engine/ac/timer.cpp b/engines/ags/engine/ac/timer.cpp
index f814eb6a20f..aedcb2c5898 100644
--- a/engines/ags/engine/ac/timer.cpp
+++ b/engines/ags/engine/ac/timer.cpp
@@ -41,6 +41,9 @@ std::chrono::microseconds GetFrameDuration() {
}
int setTimerFps(int new_fps) {
+ assert(new_fps >= 0);
+ if (new_fps <= 0)
+ return _G(framerate);
int old_fps = _G(framerate);
_G(tick_duration) = std::chrono::microseconds(1000000LL / new_fps);
_G(framerate) = new_fps;
Commit: 028567e890c574c0f986d3b267c6bc4cf3b985f8
https://github.com/scummvm/scummvm/commit/028567e890c574c0f986d3b267c6bc4cf3b985f8
Author: Walter Agazzi (walter.agazzi at protonmail.com)
Date: 2023-01-17T17:27:07Z
Commit Message:
AGS: Engine: improved parameter logging in SetAudioTypeVolume
from upstream 94598f32ff20494a3239f258ac972f8108bc05bf
Changed paths:
engines/ags/engine/ac/game.cpp
diff --git a/engines/ags/engine/ac/game.cpp b/engines/ags/engine/ac/game.cpp
index 57ae9da485b..f57fedb0fbd 100644
--- a/engines/ags/engine/ac/game.cpp
+++ b/engines/ags/engine/ac/game.cpp
@@ -144,9 +144,10 @@ void Game_SetAudioTypeVolume(int audioType, int volume, int changeType) {
if ((audioType < 0) || ((size_t)audioType >= _GP(game).audioClipTypes.size()))
quitprintf("!Game.SetAudioTypeVolume: invalid audio type: %d", audioType);
- Debug::Printf("Game.SetAudioTypeVolume: type: %d, volume: %d, change: %d", audioType, volume, changeType);
- if ((changeType == VOL_CHANGEEXISTING) ||
- (changeType == VOL_BOTH)) {
+ const char *change_str[3]{"existing", "future", "all"};
+ Debug::Printf("Game.SetAudioTypeVolume: type: %d, volume: %d, change: %s", audioType, volume,
+ change_str[changeType - VOL_CHANGEEXISTING]);
+ if ((changeType == VOL_CHANGEEXISTING) || (changeType == VOL_BOTH)) {
for (int aa = 0; aa < _GP(game).numGameChannels; aa++) {
ScriptAudioClip *clip = AudioChannel_GetPlayingClip(&_G(scrAudioChannel)[aa]);
if ((clip != nullptr) && (clip->type == audioType)) {
@@ -164,7 +165,6 @@ void Game_SetAudioTypeVolume(int audioType, int volume, int changeType) {
// update queued clip volumes
update_queued_clips_volume(audioType, volume);
}
-
}
int Game_GetMODPattern() {
Commit: e7d348f9a444b828659f61188f0b415241f177b0
https://github.com/scummvm/scummvm/commit/e7d348f9a444b828659f61188f0b415241f177b0
Author: Walter Agazzi (walter.agazzi at protonmail.com)
Date: 2023-01-17T17:27:07Z
Commit Message:
AGS: Updated build version (3.6.0.35)
>From upstream b956da6dc1403dae7a25d880b4adfd3990f7b59b
Changed paths:
engines/ags/shared/core/def_version.h
diff --git a/engines/ags/shared/core/def_version.h b/engines/ags/shared/core/def_version.h
index 849abe51870..c0253430312 100644
--- a/engines/ags/shared/core/def_version.h
+++ b/engines/ags/shared/core/def_version.h
@@ -22,9 +22,9 @@
#ifndef AGS_SHARED_CORE_DEFVERSION_H
#define AGS_SHARED_CORE_DEFVERSION_H
-#define ACI_VERSION_STR "3.6.0.34"
+#define ACI_VERSION_STR "3.6.0.35"
#if defined (RC_INVOKED) // for MSVC resource compiler
-#define ACI_VERSION_MSRC_DEF 3.6.0.34
+#define ACI_VERSION_MSRC_DEF 3.6.0.35
#endif
#define SPECIAL_VERSION ""
Commit: 50a655871f8c1f55c93f38637c901e1e0723d31f
https://github.com/scummvm/scummvm/commit/50a655871f8c1f55c93f38637c901e1e0723d31f
Author: Walter Agazzi (walter.agazzi at protonmail.com)
Date: 2023-01-17T17:27:07Z
Commit Message:
AGS: Engine: fixed dialog parser not drawn on the correct position
>From upstream 394866b2928433475fcfd0a3ab298e2b70570cbc
Changed paths:
engines/ags/engine/ac/dialog.cpp
diff --git a/engines/ags/engine/ac/dialog.cpp b/engines/ags/engine/ac/dialog.cpp
index ed0c6059f22..8f6326e7ead 100644
--- a/engines/ags/engine/ac/dialog.cpp
+++ b/engines/ags/engine/ac/dialog.cpp
@@ -764,7 +764,7 @@ void DialogOptions::Redraw() {
parserInput->Width -= bullet_wid;
parserInput->X += bullet_wid;
- parserInput->Draw(ds);
+ parserInput->Draw(ds, parserInput->X, parserInput->Y);
parserInput->IsActivated = false;
}
More information about the Scummvm-git-logs
mailing list