[Scummvm-git-logs] scummvm master -> e329ec78d685c312009aa8c1f3f3fe6068139114
neuromancer
noreply at scummvm.org
Mon Jun 6 19:25:26 UTC 2022
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:
29baaab5a8 HYPNO: enable granade crossair in boyz
e329ec78d6 HYPNO: load arrow pointers for the direction selection in boyz
Commit: 29baaab5a86240ccd6cbc305a086a17b96ed490d
https://github.com/scummvm/scummvm/commit/29baaab5a86240ccd6cbc305a086a17b96ed490d
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-06-06T21:21:30+02:00
Commit Message:
HYPNO: enable granade crossair in boyz
Changed paths:
engines/hypno/boyz/boyz.cpp
diff --git a/engines/hypno/boyz/boyz.cpp b/engines/hypno/boyz/boyz.cpp
index 41a90fc2f42..ab298ac88e1 100644
--- a/engines/hypno/boyz/boyz.cpp
+++ b/engines/hypno/boyz/boyz.cpp
@@ -649,23 +649,21 @@ void BoyzEngine::loadAssets() {
cursorBox = Common::Rect(203, 75, 229, 85);
_crosshairsTarget[4].create(cursorBox.width(), cursorBox.height(), _pixelFormat);
_crosshairsTarget[4].copyRectToSurface(*targets, 0, 0, cursorBox);
-
+ */
// Granade
-
cursorBox = Common::Rect(256, 2, 273, 29);
- _crosshairsInactive[5].create(cursorBox.width(), cursorBox.height(), _pixelFormat);
- _crosshairsInactive[5].copyRectToSurface(*targets, 0, 0, cursorBox);
+ _crosshairsInactive[6].create(cursorBox.width(), cursorBox.height(), _pixelFormat);
+ _crosshairsInactive[6].copyRectToSurface(*targets, 0, 0, cursorBox);
cursorBox = Common::Rect(256, 34, 273, 61);
- _crosshairsActive[5].create(cursorBox.width(), cursorBox.height(), _pixelFormat);
- _crosshairsActive[5].copyRectToSurface(*targets, 0, 0, cursorBox);
+ _crosshairsActive[6].create(cursorBox.width(), cursorBox.height(), _pixelFormat);
+ _crosshairsActive[6].copyRectToSurface(*targets, 0, 0, cursorBox);
cursorBox = Common::Rect(256, 66, 273, 93);
- _crosshairsTarget[5].create(cursorBox.width(), cursorBox.height(), _pixelFormat);
- _crosshairsTarget[5].copyRectToSurface(*targets, 0, 0, cursorBox);
- */
- // Large crossair
+ _crosshairsTarget[6].create(cursorBox.width(), cursorBox.height(), _pixelFormat);
+ _crosshairsTarget[6].copyRectToSurface(*targets, 0, 0, cursorBox);
+ // Large crossair
cursorBox = Common::Rect(56, 98, 88, 125);
_crosshairsInactive[7].create(cursorBox.width(), cursorBox.height(), _pixelFormat);
_crosshairsInactive[7].copyRectToSurface(*targets, 0, 0, cursorBox);
Commit: e329ec78d685c312009aa8c1f3f3fe6068139114
https://github.com/scummvm/scummvm/commit/e329ec78d685c312009aa8c1f3f3fe6068139114
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-06-06T21:21:30+02:00
Commit Message:
HYPNO: load arrow pointers for the direction selection in boyz
Changed paths:
engines/hypno/boyz/arcade.cpp
engines/hypno/boyz/boyz.cpp
engines/hypno/hypno.h
diff --git a/engines/hypno/boyz/arcade.cpp b/engines/hypno/boyz/arcade.cpp
index 7742f92674b..d9f556b0d19 100644
--- a/engines/hypno/boyz/arcade.cpp
+++ b/engines/hypno/boyz/arcade.cpp
@@ -310,6 +310,17 @@ char BoyzEngine::selectDirection() {
while (g_system->getEventManager()->pollEvent(event)) {
Common::Point mousePos = g_system->getEventManager()->getMousePos();
switch (event.type) {
+ case Common::EVENT_MOUSEMOVE:
+ if (button.contains(mousePos))
+ defaultCursor();
+ else if (mousePos.x <= _screenW / 3)
+ changeCursor(_leftArrowPointer, _crosshairsPalette, true);
+ else if (mousePos.x >= 2 * _screenW / 3)
+ changeCursor(_rightArrowPointer, _crosshairsPalette, true);
+ else
+ changeCursor(_crossPointer, _crosshairsPalette, true);
+ break;
+
case Common::EVENT_LBUTTONDOWN:
if (button.contains(mousePos)) {
// TODO: show map, if available
@@ -317,7 +328,6 @@ char BoyzEngine::selectDirection() {
return 'L';
} else
return 'R';
-
break;
default:
@@ -539,6 +549,7 @@ void BoyzEngine::missedTarget(Shoot *s, ArcadeShooting *arc) {
return;
} else if (s->direction > 0) {
char selected = selectDirection();
+ defaultCursor();
if (selected == s->direction) {
int missedAnimation = s->missedAnimation;
diff --git a/engines/hypno/boyz/boyz.cpp b/engines/hypno/boyz/boyz.cpp
index ab298ac88e1..1f42ab98d17 100644
--- a/engines/hypno/boyz/boyz.cpp
+++ b/engines/hypno/boyz/boyz.cpp
@@ -595,7 +595,7 @@ void BoyzEngine::loadAssets() {
_crosshairsActive[2].create(cursorBox.width(), cursorBox.height(), _pixelFormat);
_crosshairsActive[2].copyRectToSurface(*targets, 0, 0, cursorBox);
- cursorBox = Common::Rect(104, 71, 136, 83);
+ cursorBox = Common::Rect(104, 71, 136, 89);
_crosshairsTarget[2].create(cursorBox.width(), cursorBox.height(), _pixelFormat);
_crosshairsTarget[2].copyRectToSurface(*targets, 0, 0, cursorBox);
@@ -676,6 +676,19 @@ void BoyzEngine::loadAssets() {
_crosshairsTarget[7].create(cursorBox.width(), cursorBox.height(), _pixelFormat);
_crosshairsTarget[7].copyRectToSurface(*targets, 0, 0, cursorBox);
+ // Additional pointers
+ cursorBox = Common::Rect(4, 100, 33, 123);
+ _leftArrowPointer.create(cursorBox.width(), cursorBox.height(), _pixelFormat);
+ _leftArrowPointer.copyRectToSurface(*targets, 0, 0, cursorBox);
+
+ cursorBox = Common::Rect(10, 134, 32, 155);
+ _crossPointer.create(cursorBox.width(), cursorBox.height(), _pixelFormat);
+ _crossPointer.copyRectToSurface(*targets, 0, 0, cursorBox);
+
+ cursorBox = Common::Rect(8, 166, 38, 188);
+ _rightArrowPointer.create(cursorBox.width(), cursorBox.height(), _pixelFormat);
+ _rightArrowPointer.copyRectToSurface(*targets, 0, 0, cursorBox);
+
_weaponMaxAmmo[0] = 0;
_weaponMaxAmmo[1] = 10;
_weaponMaxAmmo[2] = 2; // large shotgun
diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h
index 0bbc809a361..b14dde8c202 100644
--- a/engines/hypno/hypno.h
+++ b/engines/hypno/hypno.h
@@ -614,6 +614,9 @@ public:
Graphics::Surface _crosshairsInactive[8];
Graphics::Surface _crosshairsActive[8];
Graphics::Surface _crosshairsTarget[8];
+ Graphics::Surface _leftArrowPointer;
+ Graphics::Surface _rightArrowPointer;
+ Graphics::Surface _crossPointer;
void updateFromScript();
bool checkCup(const Common::String &name);
More information about the Scummvm-git-logs
mailing list