mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-14 16:07:39 +00:00
HYPNO: load arrow pointers for the direction selection in boyz
This commit is contained in:
parent
29baaab5a8
commit
e329ec78d6
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user