[Scummvm-git-logs] scummvm master -> 624d338d5785847883d2e95722fad920d070f95d
dreammaster
dreammaster at scummvm.org
Sun Apr 18 19:51:45 UTC 2021
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:
bb16f3ec42 AGS: Implement AGSController mouseClick method
624d338d57 AGS: Mark Until I Have You as unsupported
Commit: bb16f3ec42de45c61d8b2d6c0381481dc0a067c3
https://github.com/scummvm/scummvm/commit/bb16f3ec42de45c61d8b2d6c0381481dc0a067c3
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2021-04-18T12:48:38-07:00
Commit Message:
AGS: Implement AGSController mouseClick method
Changed paths:
engines/ags/events.cpp
engines/ags/events.h
engines/ags/plugins/ags_controller/ags_controller.cpp
diff --git a/engines/ags/events.cpp b/engines/ags/events.cpp
index 73427362db..4413255a5a 100644
--- a/engines/ags/events.cpp
+++ b/engines/ags/events.cpp
@@ -81,6 +81,9 @@ void EventsManager::pollEvents() {
break;
default:
+ if (e.type == Common::EVENT_MOUSEMOVE)
+ _mousePos = Common::Point(e.mouse.x, e.mouse.y);
+
// Add other event types to the pending events queue. If the event is a
// mouse move and the prior one was also, then discard the prior one.
// This'll help prevent too many mouse move events accumulating
diff --git a/engines/ags/events.h b/engines/ags/events.h
index b0813af80e..5b45fbdeda 100644
--- a/engines/ags/events.h
+++ b/engines/ags/events.h
@@ -35,6 +35,7 @@ private:
Common::Queue<Common::Event> _pendingEvents;
Common::Queue<Common::KeyState> _pendingKeys;
Common::Array<bool> _keys;
+ Common::Point _mousePos;
int16 _joystickAxis[32];
bool _joystickButton[32];
@@ -82,6 +83,13 @@ public:
*/
uint getModifierFlags() const;
+ /**
+ * Get the current mouse position
+ */
+ Common::Point getMousePos() const {
+ return _mousePos;
+ }
+
/**
* Gets a joystick axis position
*/
diff --git a/engines/ags/plugins/ags_controller/ags_controller.cpp b/engines/ags/plugins/ags_controller/ags_controller.cpp
index 4770191277..dfa64bc813 100644
--- a/engines/ags/plugins/ags_controller/ags_controller.cpp
+++ b/engines/ags/plugins/ags_controller/ags_controller.cpp
@@ -75,7 +75,7 @@ int64 AGSController::AGS_EngineOnEvent(int event, NumberPtr data) {
}
void AGSController::Controller_Update() {
- ::AGS::g_events->pollEvents();
+// ::AGS::g_events->pollEvents();
}
void AGSController::ControllerCount(ScriptMethodParams ¶ms) {
@@ -142,7 +142,26 @@ void AGSController::Controller_BatteryStatus(ScriptMethodParams ¶ms) {
}
void AGSController::ClickMouse(ScriptMethodParams ¶ms) {
- error("TODO: ClickMouse - find out what params it gets");
+ PARAMS1(int, button);
+ assert(button < 3);
+ Common::EventType DOWN[3] = {
+ Common::EVENT_LBUTTONDOWN, Common::EVENT_RBUTTONDOWN, Common::EVENT_MBUTTONDOWN
+ };
+ Common::EventType UP[3] = {
+ Common::EVENT_LBUTTONUP, Common::EVENT_RBUTTONUP, Common::EVENT_MBUTTONUP
+ };
+
+ Common::Point mousePos = ::AGS::g_events->getMousePos();
+ Common::Event down, up;
+ down.type = DOWN[button];
+ down.mouse.x = mousePos.x;
+ down.mouse.y = mousePos.y;
+ g_system->getEventManager()->pushEvent(down);
+
+ up.type = UP[button];
+ up.mouse.x = mousePos.x;
+ up.mouse.y = mousePos.y;
+ g_system->getEventManager()->pushEvent(up);
}
} // namespace AGSController
Commit: 624d338d5785847883d2e95722fad920d070f95d
https://github.com/scummvm/scummvm/commit/624d338d5785847883d2e95722fad920d070f95d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2021-04-18T12:51:34-07:00
Commit Message:
AGS: Mark Until I Have You as unsupported
Changed paths:
engines/ags/detection_tables.h
diff --git a/engines/ags/detection_tables.h b/engines/ags/detection_tables.h
index 988b9d97bc..9637611294 100644
--- a/engines/ags/detection_tables.h
+++ b/engines/ags/detection_tables.h
@@ -1615,6 +1615,11 @@ const AGSGameDescription GAME_DESCRIPTIONS[] = {
UNSUPPORTED_GAME_ENTRY("zak2", "TFG - ZAK2.exe", "7971a7c02d414dc8cb33b6ec36080b91", 155632013),
// uses unsupported agslua plugin
UNSUPPORTED_GAME_ENTRY("allthewaydown", "deepuns3.exe", "6c0b5468657c22d62201e3769cd8d2b3", 29830067),
+ // Commercial game that likely uses custom extensions. Not only does it seem
+ // to use AGSController plugin built-in, even when I hooked up AGSController for
+ // the stand-alone AGS 3.5 interpreter, it hangs just like in ScummVM
+ UNSUPPORTED_GAME_ENTRY("untilihaveyou", "until i have you.exe", "cda1d7e36993dd55ba5513c1c43e5b2b", 1089857773), // Steam
+ UNSUPPORTED_GAME_ENTRY("untilihaveyou", "until i have you.exe", "cda1d7e36993dd55ba5513c1c43e5b2b", 1072879555),
// AGDI games. They get their own grouping because they're just that awesome
GAME_ENTRY("kq1agdi", "kqvga.exe", "73f87b30f84e9c34ab09ec8dd7ae109d", 34298679), // 1.0
@@ -1809,8 +1814,6 @@ const AGSGameDescription GAME_DESCRIPTIONS[] = {
GAME_ENTRY("theterribleoldman", "the terrible old man.exe", "e07a475bcf14bc75c016724186f222ac", 369769127), // Steam
GAME_ENTRY("theterribleoldman", "the terrible old man.exe", "b3a10d7d3b5a728330b028ec28ff2d05", 103852030), // Steam
GAME_ENTRY("timegentlemenplease", "tgp.exe", "86a5359bac7c88f0dfa060478800dd61", 74077811), // Steam
- GAME_ENTRY("untilihaveyou", "until i have you.exe", "cda1d7e36993dd55ba5513c1c43e5b2b", 1089857773), // Steam
- GAME_ENTRY("untilihaveyou", "until i have you.exe", "cda1d7e36993dd55ba5513c1c43e5b2b", 1072879555),
GAME_ENTRY("waitingfortheloop", "waitingfortheloop.exe", "0241777c2537fc5d077c05cde10bfa9f", 51472537), // Steam
GAME_ENTRY("waitingfortheloop", "waitingfortheloop.exe", "0241777c2537fc5d077c05cde10bfa9f", 51273604),
GAME_ENTRY("welcometosunnymunarvagir", "alpha4.ags", "392dbdd0697ae32af4cfe5212f9213c5", 23000263),
More information about the Scummvm-git-logs
mailing list