Commit Graph

149349 Commits

Author SHA1 Message Date
Le Philousophe
2a7241a97c PLUGINS: Implement NONE relocations
ARM emit them in some cases and add it to MIPS for completeness

Fixes: #14905
2024-02-24 20:48:21 +01:00
Paul Gilbert
b5e47c8237 M4: Fix crashes opening dialogs from original game dialog 2024-02-24 11:09:59 -08:00
Paul Gilbert
fa10facb6e M4: Add syncSoundSettings to engine initialization 2024-02-24 11:09:59 -08:00
neuromancer
2b15867dac FREESCAPE: better position of the sun and moon in eclipse 2024-02-24 17:30:27 +01:00
Le Philousophe
6342045cc3 BACKENDS: OPENGL: Don't take the alpha channel from the game texture
It's not always set correctly by engines (AGS) and a fill call to clear
the screen will set it to 0 along with the other components.
Setting the framebuffer to some transparent value is not something we
intend to do as this let the content underneath the drawing texture
visible like it's the case on ChromeOS.
This has been reported here: https://forums.scummvm.org/viewtopic.php?p=99293
2024-02-24 16:43:14 +01:00
Lothar Serra Mari
55bb98e8b3
NEWS: Update German NEWS file 2024-02-24 07:47:53 +01:00
Paul Gilbert
4f61f5af6d M4: Fix for barber conversation 2024-02-23 21:54:04 -08:00
Miro Kropacek
9152c3dc4e BACKENDS: ATARI: Buffer also mouse buttons state
Now double-click works also on really slow hardware. And Hatari.

Also, partially revert commit 01a2d2ed because events can't be passed
to the (multitasking) OS. So basically let's hope that it works fine now
even without handling IKBD overruns. I'm not able to replicate the issue
with Hatari + FF + slow UI + mouse movement anymore.
2024-02-24 06:21:43 +01:00
PushmePullyu
e807f89573 ULTIMA: NUVIE: Fix Wizard Eye keyboard control
Disable keymapper during Wizard Eye (spell and crystal ball effect)
so it can be controlled via the cursor keys again.

This was a regression introduced in
12a47d956e
"Add support for ScummVM keymapper".
2024-02-23 18:59:27 -10:00
PushmePullyu
702ddabdec ULTIMA: NUVIE: Lock input to spellbook when looking at it
Undo the lock in Events::endAction().

Allows navigating the book using the cursor keys in new-style.
2024-02-23 18:59:27 -10:00
PushmePullyu
e2a9b6be4d ULTIMA: NUVIE: Fix loss of focus when dragging SpellViewGump 2024-02-23 18:59:27 -10:00
PushmePullyu
46221f1dbd ULTIMA: NUVIE: Fix enchant crash during spell selection
SpellViewGump and SpellView:
When handling a MouseDown event, do not call target_spell() if
event_mode is set, as Events expects us to select a spell in that case.

Prevents calling Events::target_spell() with callback_target set to
nullptr and subsequentially crashing the game.

To reproduce:

1. Start/load a game

2. Acquire a spellbook (obj num 57)

3. Acquire a staff (obj num 78)

4. Enable cheats (CTRL+c)

5. Enable unlimited casting (ALT+w)

6. (C)ast enchant

7. Select the staff as target

8. When prompted to select a spell, press LMB somewhere on the map
 instead
2024-02-23 18:59:27 -10:00
PushmePullyu
382abb7dad ULTIMA: NUVIE: Fix SpellViewGump deleting self/crashing on RMB
Close spellbook in cancelAction when resuming magic.

Additionally, as a precaution, do not propagate RMB events
from SpellViewGump to DraggableView.

On an RMB-down event, SpellViewGump::MouseDown() calls
Events::close_spellbook(), which uses cancelAction() to actually
close the spellbook.

However, this skipped doing so if Magic::is_waiting_to_resume() was
true.

In that case, the still open SpellViewGump received the RMB-up event,
which lead to it getting closed and deleted from
DraggableView::MouseUp().

This resulted in a crash, since the book's SpellViewGump is not
expected to be deleted during gameplay.

To reproduce:

1. Start/load a game in enhanced-mode

2. Acquire a spellbook (obj num 57)

3. Acquire a staff (obj num 78)

4. Enable cheats (CTRL+c)

5. Enable unlimited casting (ALT+w)

6. (C)ast enchant

7. Select the staff as target

8. When prompted to select a spell, press RMB instead
2024-02-23 18:59:27 -10:00
PushmePullyu
696aea82e6 ULTIMA: NUVIE: Fix crash when selecting spell to enchant with
When casting enchant in new-style mode, after selecting an object
to enchant, the spellbook is opened to choose a spell.

While the book was open, walking and other actions were still
possible. This could lead to crashes, e.g. when pressing c to cast
instead of selecting a spell.

To prevent this, lock input to the spellbook's SpellViewGump and
unlock it again in endAction().
2024-02-23 18:59:27 -10:00
PushmePullyu
a609f91a6e ULTIMA: NUVIE: Fix widgets deleting self in event handler
Do not delete widgets marked for deletion in GUI::AddWidget, so it
can safely be used from widget event handlers.

Fixes the following crashes in enhanced mode:

Using the look action on a spellbook in inventory eventually causes
a call to Events::look(Obj *obj) from ContainerWidget::try_click().

For spellbooks, look() then calls view_manager->close_all_gumps().
This closes all open gumps and marks them for deletion, including
the inventory ContainerWidget.

When the spellbook gump gets added via addWidget, this executes
the deletion.

Once control returns to ContainerWidget::try_click(), the
ContainerWidget has been deleted and the game will crash when it
tries to assign to member variable ready_obj.

A similar crash happens when selecting a staff in inventory
as the target for the enchant spell.

Fixes #14957
2024-02-23 18:59:27 -10:00
PushmePullyu
816d1c6d8c ULTIMA: NUVIE: Fix KEYINPUT_MODE keymapper regression
Disable the keymapper when entering KEYINPUT_MODE and restore
its previous state when changing mode.

Makes Events::key_redirect() work again.

The key_redirect method should cause all keyboard input to be
sent to a callback, but it was broken since commit
12a47d956e
 "Add support for ScummVM keymapper".

This caused problems with spellcasting:

1. Keymapper-bound actions (including movement) were still
 possible while the spellbook was open

2. Spell syllables whose keys were bound via the keymapper
 could not be entered.

Fixes #14959
2024-02-23 18:59:27 -10:00
PushmePullyu
037131d977 KEYMAPPER: Add method isEnabled to Common::Keymapper 2024-02-23 18:59:27 -10:00
antoniou79
9d589e2e8e M4: ORIONBURGER: DEMO: Cliking on teleporter icon leads to main menu
Testing with the original interactive Demo (via DosBox) verifies clicking on that icon leads to main menu
2024-02-23 20:54:27 -08:00
antoniou79
94a80f4a35 M4: ORIONBURGER: Fix chute navigation for test 2
When gerbils are asleep Wilbur should be able to use the chute in the top right of the middle floor to go up or down

Also the chute in the middle of floor of the middle floor should lead to Wilbur fallin from the ceiling of the bottom cage floor.
2024-02-23 20:51:43 -08:00
antoniou79
929e755078 M4: ORIONBURGER: Fix shooting the waterdish in room 603
The hole in the dish should persist and Wilbur should say "hmm" the first time, instead of "I've already zapped a hole in it".
2024-02-23 20:49:41 -08:00
antoniou79
636f688e1d M4: ORIONBURGER: Fix softlock when shooting the kibble in Room 602 2024-02-23 20:49:11 -08:00
antoniou79
34493ca7ec M4: ORIONBURGER: Fix shooting the door in room 602
This was resulting in segmentation fault (or animation repeating loop)
2024-02-23 20:46:49 -08:00
antoniou79
a9e9ee50a8 M4: ORIONBURGER: Fix door open misaligned in room 602
After the cage door opens with the alien hand controlled motor, revisiting the room 602 would show the door misaligned to the left.

Revisiting as in leave the room from the chute (go up one floor) and then return to the bottom floor.
2024-02-23 20:45:51 -08:00
antoniou79
a92d98d6f2 M4: ORIONBURGER: Keep Magnet vibrating when revisiting 602
If the wheel motor is running with the alien hand, then revisiting the 602 room should also show the magnet vibating

This could be an "original" bug / missed detail, since the magnet is not vibrating in this case in the demo.
2024-02-23 20:43:02 -08:00
antoniou79
6992ddc37b M4: ORIONBURGER: Fix sound for running motor wheel
The sound sound have a part of accelerating and then a looping part of running

Currently it kept repeating the first part.
2024-02-23 20:42:13 -08:00
Paul Gilbert
b15187d39c M4: Field rename in room 602 2024-02-23 20:42:13 -08:00
antoniou79
352de074e2 M4: ORIONBURGER: Stop Wilbur repeating his line when exiting
When finally exiting the cage, Wilbur currently would repeat his "I'm sorry it had to come to this..." cue.
2024-02-23 20:42:13 -08:00
antoniou79
054fda8f7b M4: ORIONBURGER: Fix Wilbur throwing Kibble at wood shavings
This would crash in the demo and also had some repeating animation issues

The fix includes:
- skipping Wilbur's quote which is missing in the demo (using a new play series "PLAY10Demo").
   I can only test in demo, but I'm assuming the spoken quote exists in the full version.
- fix repeating the animation of throwing the kibble (this seems to have been a typing / copy-paste error)
- Removing the kibble from Wilbur's inventory after he throws it (this is an "original" bug since it's not removed in the demo).
- Waking up the Gerbils, after Wilbur throws the kibble at the wood shavings (this is the behavior in the demo).
2024-02-23 20:42:13 -08:00
Miro Kropacek
01a2d2edab BACKENDS: ATARI: Call original keyboard/mouse routines
This helps to solve the issue when one pushes 'Return' immediately after
Hatari's start. This issue appeared after introducing the
interrupt-driven audio mixer.

Not sure whether this was a real bug but it's much cleaner
implementation now anyway.
2024-02-24 03:54:54 +01:00
Miro Kropacek
f41a678ba1 GRAPHICS: ATARI: Utilize dlmalloc
- every malloc is now aligned on 16 bytes

- no need for the hidden pointers

- ct60_vmalloc() is called only once, the rest is handled
  by dlmalloc (SV XBIOS' vmalloc is pretty fragile)
2024-02-24 03:54:54 +01:00
Miro Kropacek
fda1ce1672 BACKENDS: ATARI: Change dma playback to interrupt-driven
This not only decreases the amount of XBIOS calls but also avoids
repeating the sample buffer in case of a heavier CPU load.

Also clean up the mixer code.
2024-02-24 03:54:54 +01:00
elasota
54b9908323 MTROPOLIS: Fix Obsidian widescreen mod regression 2024-02-23 21:27:23 -05:00
elasota
c92f49971d MTROPOLIS: Fix wrong MIDI gain math in note player 2024-02-23 21:01:42 -05:00
elasota
c817aa8fdc MTROPOLIS: Fix wrong MIDI gain math
Amplitude is 10x = +20dB, not +10dB
2024-02-23 20:57:51 -05:00
Lars Sundström
414c427fd6 IOS7: Use new key overload functions
Call the overload functions for key inputs and return the results
as an array of UIKeyCommands.
2024-02-23 22:41:18 +01:00
Lars Sundström
c5ef6ecb77 IOS7: Add functions creating UIKeyCommands for special keys
Use the helper function to create an array of UIKeyCommands for the
END, HOME, PAGE UP, PAGE DOWN and the ESC keys. Add a generic handler
function that decides which action for which key.

This allows the application to register key presses of these keys,
however some of them requires iOS 13.4 or later.
2024-02-23 22:41:18 +01:00
Lars Sundström
25d7787d9f IOS7: Add functions creating UIKeyCommands for Fn keys
Use the helper function to create an array of UIKeyCommands for the
Fn keys. Add a generic handler function that decides which action
for which key.

This allows the application to register key presses of the Fn keys,
however only supoorted in iOS 13.4 and later.
2024-02-23 22:41:18 +01:00
Lars Sundström
a8314ea05b IOS7: Add functions creating UIKeyCommands for number keys
Use the helper function to create an array of UIKeyCommands for the
number keys. Add a generic handler function that decides which action
for which key.

Since not all keyboards have the function keys, Fn1-Fn12, e.g. the
Apple Magic Keyboard for iPads, map these keys to the number keys
when pressed together with the CMD modifier key. Fn11 and Fn12
requires CMD + Shift as modifier keys.
2024-02-23 22:41:18 +01:00
Lars Sundström
8baa1de5d0 IOS7: Add functions creating UIKeyCommands for roman letter keys
Use the helper function to create an array of UIKeyCommands for the
roman letter keys. Since most of the games supports input of roman
letters, overload these keys. Keys with other characters than these
are not overloaded and will therefore trigger the call to the
delegate function:
"textField:shouldChangeCharactersInRange:replacementString:"
and will therefore still be passed to the IOS7 event handler.
However no modifier flags will be passed for those and they will not
support repeated presses.

Add a generic handler function that decides which action
for which key.
2024-02-23 22:41:18 +01:00
Lars Sundström
2bbbdc75fb IOS7: Add functions creating UIKeyCommands for arrow keys
Use the helper function to create an array of UIKeyCommands for the
arrow keys. Add a generic handler function that decides which action
for which key.

Since not all keyboards have the PAGE UP/DOWN nor HOME/END keys,
e.g. the Apple Magic Keyboard for iPads, map these keys to the arrow
keys when pressed together with the CMD modifier key.
2024-02-23 22:41:18 +01:00
Lars Sundström
99fb3faf9d IOS7: Add helper functions to overload keys
Currently the key inputs are sent to the IOS7 event handler on calls
to the delegate function:
"textField:shouldChangeCharactersInRange:replacementString:"
So when typing on either the software keyboard or a connected HW
keyboard the input is handled by the hidden textfield that is in
focus. The delegate is called on each key input and the character
typed is passed to the IOS7 event handler.

Doing as above has the drawback that if they user holds down a key,
common in games when shooting or moving, the key event is only sent
once. The delegate function is only called once per distinct key
press.

By implementing the keyCommands function and create UIKeyCommands
for a set of keys, the system will call a defined callback function.
This also enables repeatedly calls as long as the key is held down.

Modifier keys can also be configured to create UIKeyCommands to
trigger custom actions. This way we can overload the key functions
when they are pressed at the same time as a modifier key.

Add helper funtions that can be used to create UIKeyCommands for
a set of keys. Keys are represented by their input, e.g. the key
for the character 'c' is defined as a string with only one char,
the 'c', while special keys are represeented by strings defined
by the OS.

Register UIKeyCommands for all types of modifier keys and add a
function that can convert system modifier flags to flags used by
ScummVM.
2024-02-23 22:41:18 +01:00
Lars Sundström
c8d93ad820 IOS7: Pass key modifier flags to key events
Prepare the backend to send key modifier flags in the key events.
No modifier flags are sent at this point but will be added in
upcoming commits.
2024-02-23 22:41:18 +01:00
Walter Agazzi
03c18cd18c AGS: Update black hawk entries, add new game 2024-02-23 16:42:37 +01:00
Paul Gilbert
5d93a675b1 M4: Fix opening save/load dialogs from original options dialog 2024-02-22 22:07:34 -08:00
Paul Gilbert
bf1b150ecd M4: Cleanup and animation fix for test 1 2024-02-22 21:34:07 -08:00
Paul Gilbert
4a2ed4fb17 M4: Added German demo detection entry 2024-02-22 20:23:47 -08:00
Paul Gilbert
d0f0866590 M4: Fixes for shooting woodchips in test 2 2024-02-22 20:13:17 -08:00
Paul Gilbert
06e9351bd2 M4: Failing test in demo immediately restarts it 2024-02-22 19:05:07 -08:00
Hubert Maier
d6b08d4d8d AMIGAOS: Remove local aspect ratio setting 2024-02-22 14:56:10 +01:00
Hubert Maier
7afb1708b0 AMIGAOS: Fix typo 2024-02-22 14:56:10 +01:00