Commit Graph

138158 Commits

Author SHA1 Message Date
neuromancer
db1b2cbc2f FREESCAPE: basic parsing of Dark Side DOS demo 2023-02-01 09:20:28 +01:00
neuromancer
9bc385c5cb FREESCAPE: added some initial code for supporting dos release of dark 2023-02-01 09:20:28 +01:00
Eugene Sandulenko
91c01df4b8
DIRECTOR: Mark engine as highres 2023-01-31 13:25:04 +01:00
Walter Agazzi
6fc6981be8 DIRECTOR: Add detection for ronja launcher (trac #14063) 2023-01-31 12:31:23 +01:00
Matthew Duggan
c17976ea3e TETRAEDGE: Fix rendering of character shadow 2023-01-31 17:18:40 +09:00
Matthew Duggan
23719b7b5d TETRAEDGE: Avoid integer underflow on empty point list 2023-01-31 17:18:40 +09:00
Matthew Duggan
7643020114 TETRAEDGE: Improve comments 2023-01-31 17:18:40 +09:00
Matthew Duggan
7a337a818b TETRAEDGE: Clean whitespace 2023-01-31 17:18:40 +09:00
Misty De Meo
efc03d8421
DIRECTOR: switch Cellofania to tailmd5 2023-01-30 19:49:22 -08:00
D G Turner
31a194b3ca DIRECTOR: Restore Redundant Declaration Warning Fix in Grammar Parser Code
This is emitted by GCC if -Wredundant-decls is passed.

The Bison source files to generate this header should be modified to
fix this, but I am unclear on the required workflow.
2023-01-30 22:26:06 +00:00
grisenti
f5be1cf512 HPL1: remove unused class 2023-01-30 23:13:48 +01:00
grisenti
33da9a7921 HPL1: fix unused variable warnings 2023-01-30 23:05:24 +01:00
grisenti
9cd2deb320 HPL1: fix global destructor warning 2023-01-30 23:04:17 +01:00
grisenti
d87da9bff9 HPL1: mark dgVector's empty constructor = default 2023-01-30 22:44:26 +01:00
grisenti
9130534e26 HPL1: make constant value constexpr 2023-01-30 22:31:00 +01:00
Matthew Duggan
cd0b4edb2c TETRAEDGE: Fade between scenes by default 2023-01-30 21:55:20 +09:00
Matthew Duggan
1f760f4003 TETRAEDGE: Ensure game is finished after credits finish. 2023-01-30 21:55:20 +09:00
Matthew Duggan
41c351107a TETRAEDGE: Fix credits animations 2023-01-30 21:55:20 +09:00
Matthew Duggan
2f43b90427 TETRAEDGE: Simplify pathfinding transform to avoid invalid access 2023-01-30 21:55:20 +09:00
Eugene Sandulenko
2e845d0c0c
JANITORIAL: Fix guard defines 2023-01-30 13:39:03 +01:00
Matthew Duggan
7293873e62 TETRAEDGE: Fix gcc warnings 2023-01-30 19:28:06 +09:00
Matthew Duggan
da29ae539e TETRAEDGE: Fix janks in pathfinding
The first and last points of the pathfinding result should not be used as they
are grid-rounded versions of the start and end points.
2023-01-30 17:45:54 +09:00
Matthew Duggan
22a98d80f4 TETRAEDGE: Fix font anti-aliasing result slightly 2023-01-30 16:18:01 +09:00
Matthew Duggan
e7cac97877 TETRAEDGE: Fix many small issues identified by Coverity 2023-01-30 16:11:29 +09:00
Matthew Duggan
057da99725 TETRAEDGE: Fix addAnchorZone to actually add the zone 2023-01-30 15:42:19 +09:00
Matthew Duggan
fad5cac0c0 TETRAEDGE: Work around artifacts on text rendering 2023-01-30 14:32:06 +09:00
Matthew Duggan
4d3337b5db TETRAEDGE: Implement clipping for long dialog 2023-01-30 13:24:09 +09:00
Matthew Duggan
001e4f4e8a TETRAEDGE: Clean up shadow rendering a little
It's still broken, but code is easier to understand now.
2023-01-30 13:24:09 +09:00
Matthew Duggan
c5ebc0a8ad TETRAEDGE: Don't allow quickload direct from main menu 2023-01-30 13:24:09 +09:00
djsrv
80ee9303ac DIRECTOR: LINGO: Ignore bad scriptId field in Lscr 2023-01-29 21:09:01 -06:00
Misty De Meo
668880b448
DIRECTOR: add full Cellofania 2023-01-29 17:36:58 -08:00
Eugene Sandulenko
8b261575ca
DIRECTOR: Fix detection entry for teamxtreme2 2023-01-30 01:02:56 +01:00
grisenti
390fff70c2 HPL1: fix warnings 2023-01-29 22:47:12 +01:00
grisenti
0492f3482e HPL1: fix index increment 2023-01-29 22:34:27 +01:00
Lars Sundström
92b22e4ba6 DOCS: Add draft documentation of Apple TV platform
Add basic documentation needed starting using or developing ScummVM on
the Apple TV.
2023-01-29 21:13:52 +00:00
Le Philousophe
dec343730e IOS7: Add AppleTV support to configure 2023-01-29 21:13:52 +00:00
Lars Sundström
235ebcbfb8 IOS7: Fix compiler warnings
This commit fixes the compiler warnings regarding:
- The local declaration of 'view' hides instance variable [-Wshadow-ivar]
- Some of the gamepad controller buttons is only available in specific
versions of iOS and tvOS.
- Use of non-standard escape character '\E'. \E is a GNU shortcut.
2023-01-29 21:13:52 +00:00
Lars Sundström
fde0aa965d IOS7: Add general handling of the menu button on game controllers
Expose the handleMainMenuKey function and call that when pressing the
menu button on game controllers.
2023-01-29 21:13:52 +00:00
Lars Sundström
770ab0ca50 IOS7: Suspend application if menu key pressed and no game is running
Add isInGame property to track if the launcher is shown of if a game is
running. Handle press on menu key different depending on if launcher is
shown or not. If launcher is shown suspend the application to return to
Apple TV Home Screen since that is the parent view of the launcher. If
in game pause the game and show menu. This is according to Apple
guidelines which can ge read here:
https://developer.apple.com/design/human-interface-guidelines/inputs/remotes
2023-01-29 21:13:52 +00:00
Lars Sundström
4c0cd6f2eb IOS7: Check keyboard visible if inputView being first responder
The keyboard can be presented and dismissed without being triggered by
the showKeyboard/hideKeyboard functions e.g. by pressing the menu button
on the Apple TV remote while the keyboard is shown.
If the keyboard visibility is not set entirely by the showKeyboard/
hideKeyboard functions that means that the _keyboardVisible state
variable can be out of sync.

Check if the keyboard is shown based on if the inputView is the first
responder or not. The check has to be made on the main thread.
2023-01-29 21:13:51 +00:00
Lars Sundström
b2b2d2cf9f IOS7: Trigger joystick presses only once for buttons A and B
All buttons and triggers on MFi game controllers are pressure sensitive
which means that when pressing buttons the registered
valueChangedHandler function is called multiple times providing updates
on the pressure value the button is pressed with. This causes multiple
kInputJoystickButtonDown events to be sent to the EventManager.
In adventure games the pressure value is not relevant and could cause
problems for the user that it triggers multiple presses on e.g. the B
button which often is mapped to the right mouse button. In some games
a click on the right mouse button changes what action that should be
performed.

Keep track on if the joystick buttons A or B (often mapped as left and
right mouse buttons) are being pressed. If the button is already
pressed do not add a new event until the button isn't pressed anymore.

To not interfere with any open dialog, don't send key events while the
keyboard is visible.
2023-01-29 21:13:51 +00:00
Lars Sundström
8a2a6aa197 IOS7: Show inputAccessoryView when hardware keyboad is connected
The inputAccessoryView is only shown if no hardware keyboard is
connected. Some hardware keyboards doesn't necessary have all keys,
e.g. the Apple magic keyboard to the iPads which lacks the escape
key and all function keys.

To give the user the possibility to use these buttons, always show
the inputAccessoryView.
2023-01-29 21:13:51 +00:00
Lars Sundström
3dae4b033e IOS7: Replace UIAlertView with UIAlertAction
The UIAlertView was deprecated in iOS 9 and therefore not supported in
tvOS. Replace the UIAlertView with the suggested UIAlertAction, which is
supported by both iOS and tvOS.

Define a macro to find the root view controller of a view. Use the view
controller of the iPhoneView to present the alert.
2023-01-29 21:13:51 +00:00
Lars Sundström
14ee8b07d3 IOS7: Forward backward key presses when textField is empty
There's a difference between UITextFields and UITextViews that the
delegate function textView:shouldChangeTextInRange:replacementText:
is called when pressing the backward button on a keyboard also when
the textView is empty. This is not the case for UITextFields, the
function textField:shouldChangeTextInRange:replacementText: is not
called if the textField is empty which is problematic in the cases
where there's already text in the open dialog (e.g. the save dialog
when the user wants to overwrite an existing slot). There's currently
no possibility to propagate existing text elements from dialog into
the textField. To be able to handle the cases where the user wants to
delete existing texts when the textField is empty the inputView has
to implement the UITextInput protocol function deleteBackward that is
called every time the backward key is pressed.
2023-01-29 21:13:51 +00:00
Lars Sundström
d731c9c290 IOS7: Implement keyboard support for Apple TV OS
The UITextView is becoming focused by default in iOS and brings up the
keyboard for user input. This is not the case in tvOS. UITextView in
tvOS is not becoming focused by default and if manually setting it to
focused it will still not bring up the keyboard screen.

The UITextField is however becoming focused in both iOS and tvOS and
requires basically the same implementation. So the UITextView is
replaced with UITextField to bring up keyboard in both iOS and tvOS.

The UIToolbar class is not supported in tvOS. Instead implement the
toolbar as a UITabBar. The UITabBar is set directly as the
inputAccessoryView to the keyboard view in tvOS while in iOS it's put in
a UIScrollView (as the previous UIToolbar) to be able to scale the
inputAccessoryView better for small screens.

The UITabBar behaves a little bit different on iOS and tvOS where in
tvOS the delegate function
-(void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item
is called when navigated to a specific toolbar item, while in iOS called
when clicking on an item. To get the tvOS to trigger action on presses,
add a gesture recognizer to handle touch events.

Since the keyboard view on Apple TV always full screen prompted texts
gets hidden behind the keyboard. Delay the showing of the keyboard to
allow the user to understand what's requested as input.
2023-01-29 21:13:51 +00:00
Lars Sundström
5aeef796bc IOS7: Implement support for Apple TV remote
The Apple TV remote has a touch area which functions as a touch
controller. It also has a few buttons that can be programmed for
different actions.

The "touchpad mode" is not really relevant for the Apple TV remote.
However the pointer should be moved when swiping on the touch area
on the remote. Since we don't want to generate actions on touchBegan
and touchEnded for the remote, make sure these are only triggered if
the touch is made on direct contact with the screen, UITouchTypeDirect.

Implement the button handling by implement the microGamepad profile in
the GamepadController class. Only buttons A, X and the menu buttons are
relevant since the touch area is using the touch controller class.
The tvOS simulator however doesn't call the lambda functions defined for
the microGamepad buttons, hence the implementation of the "pressesBegan"
and "pressesEnded" which is called instead when running the simulator.

Implement common handling of the menu button. If the menu button is
pressed the soft keyboard will be shown. If pressing the menu button
again the soft keyboard will be hidden. If pressing the menu button
a third time the application will be suspended.

Implement new gesture recognizers that can be used with the Apple TV
remote. Up/down/left/right actions are triggered on press on the arrow
buttons, or tap on the edges of the touch area.

A long press, 5 seconds, of "Play/Pause" button toggles Mouse-click-and-
drag mode needed by some games.
2023-01-29 21:13:51 +00:00
Lars Sundström
c24ee0d61e IOS7: Add missing break to kInputJoystickButtonUp
Joystick button up events was not sent to the EventManager due to a
missing break in the kInputJoystickButtonUp case. This caused button
presses in the launcher and dialogs not to be triggered.

Adding the break enables use of joystick buttons in ScummVM GUIs.
2023-01-29 21:13:51 +00:00
Lars Sundström
5f54aedbb9 IOS7: Put iOS specific code within platform specific macros
iOS and tvOS shares a lot of code. However some there are parts that are
specific to iOS, for instance handling of UI device orientation and
certain types of gestures.

Currently there are also some limitations on the Apple TV that needs to
be flagged to the  engine. There is no support for virtual keyboard, no
clipboard support and no possibility to open URLs.

Put code specific for iOS within the ObjC platfrom macro TARGET_OS_IOS.
The code specific for tvOS are put within the macro TARGET_OS_TV.
2023-01-29 21:13:51 +00:00
Lars Sundström
29efa1922e CREATE_PROJECT: Add Apple TV OS XCode target
Add Apple TV OS as a new target to the xcode project creator utility.
Make sure that TV OS specific files are not part of the iOS and macOS
targets and the other way around.
The TV OS project will utilize the same source code files as the iOS
project but will instead use the tvos dist files.
2023-01-29 21:13:51 +00:00
Lars Sundström
505c2499c9 TVOS: Add Apple TV OS as a separate dist
The Apple TV OS requires a different type of storyboard than iOS. Also,
the Info.plist file differ since the tvOS platform doesn't handle
different orientations.

The Apple TV OS also need a different set of icons with different
resolutions more suitable for TV screens.

The application icons are required to be of layered type, which means
that a single PNG file is not accepted as an icon file. The icons must
have at least two layers, hence the ScummVM icon is defined by a back
image with just the background color and a front image with the ScummVM
logo.

The icons are then put together when archiving the application in Xcode
to an Assets.car file. However the linux builds are not building the
application using Xcode. Therefore a pre-compiled Assets.car file
containing the image assets (icons, splash screen etc) is added to the
tvos folder. This file is copied to the application bundle. If the icons
are changed in the future a new Assets.car file has to be compiled. This
can only be done on a computer with Xcode installed. To compile run the
following command in the tvos folder:
xcrun actool ./Images.xcassets --compile build --platform appletvos \
--minimum-deployment-target 9.0 --app-icon AppIcon \
--output-partial-info-plist build/partial.plist \
--launch-image LaunchImage

The partial.plist file generated will show what to add to the Info.plist
and if something must be changed in the ports.mk section for the
tvosbundle.
2023-01-29 21:13:51 +00:00