Commit Graph

82885 Commits

Author SHA1 Message Date
Paul Gilbert
11a72a5e0e TITANIC: Add missing strings for Floor & Room # to titanic.dat 2017-10-15 21:20:09 -04:00
Paul Gilbert
ff9c0a9a89 TITANIC: Fix crash exiting game when music room music is active 2017-10-15 21:14:33 -04:00
Paul Gilbert
3e52288a2d TITANIC: Music room handler field renames & better anim sync to music 2017-10-15 20:57:09 -04:00
Colin Snover
e26a677f62 SCI32: Tell OSystem to show/hide cursors as appropriate
This is needed so that the system cursor can be appropriately
hidden outside the game's draw area, to match the normal behaviour
of ScummVM.
2017-10-15 19:03:09 -05:00
Paul Gilbert
17606700c4 TITANIC: Fix use after free and remove IFDEF code from mouse cursors 2017-10-15 19:03:09 -05:00
Paul Gilbert
db5676fec2 TITANIC: Simplify cursors to build up as RGBA during loading 2017-10-15 19:03:09 -05:00
Colin Snover
ef44cc55ee DINGUX: Really constify getFeatureState 2017-10-15 16:54:24 -05:00
Colin Snover
7aef79c421 DINGUX: Fix missing const on hasFeature/getFeatureState implementation 2017-10-15 16:41:04 -05:00
Colin Snover
1f8eeb5920 DINGUX: Replace usage of old SurfaceSdlGraphicsManager APIs 2017-10-15 16:32:58 -05:00
Colin Snover
4263a78aa0 GPH: Replace usage of old SurfaceSdlGraphicsManager APIs 2017-10-15 16:18:10 -05:00
Colin Snover
ea2fa9093d PSP: Improve const-correctness 2017-10-15 16:11:47 -05:00
Colin Snover
2ef10faa1e PSP2: Replace usage of old SurfaceSdlGraphicsManager APIs 2017-10-15 16:00:00 -05:00
Colin Snover
e308605b2f OPENPANDORA: Remove duplicated loadGFXMode code 2017-10-15 15:52:11 -05:00
Thierry Crozat
31f76c962f I18N: Update translations templates 2017-10-15 20:55:46 +02:00
Eugene Sandulenko
fb30dd4362 GUI: Cleanup 2017-10-15 20:55:31 +02:00
Colin Snover
bda253b1ac BACKENDS: Constify PaletteManager::grabPalette implementations 2017-10-15 13:47:19 -05:00
Thierry Crozat
f9ba31e465 I18N: Update translations templates 2017-10-15 20:27:13 +02:00
Colin Snover
7d8d2f80fb Merge branch 'graphics-backends-improvements' 2017-10-15 13:26:39 -05:00
Colin Snover
4757c24c68 BACKENDS: Fix up graphics manager ports with const & override where appropriate 2017-10-15 13:24:21 -05:00
Colin Snover
f6ab0e5c10 SDL: Allow window size to be reset whenever launcher is visible
This ensures the window gets resized properly when a user changes
the scaler options in the GUI. Simply unlocking the window size on
a call to setGraphicsMode is not good enough, because the scaler
mode can be changed by games during mode switches, and we don't
want to reset the window size in that case.
2017-10-15 13:24:21 -05:00
Colin Snover
8b112f57a9 SDL: Support 32bpp cursor rendering
32bpp cursor scaling is not available, but this should be fine as
many of the software scalers are not designed to work with >16bpp
data in any case.

This change also includes some minor cleanup of unnecessary #ifdefs
around code that works equally well with or without USE_RGB_COLOR,
to simplify the implementation.
2017-10-15 13:24:21 -05:00
Colin Snover
d1b77d4b68 BACKENDS: Fix missing mouse events when system cursor cannot be moved
Normally with SDL, a mouse motion event will be sent after the
system mouse cursor has been moved by a call to
SDL_WarpMouseInWindow, but if the system cursor cannot be moved
(e.g. because the window does not have mouse focus), games still
need to receive these mouse events so they can successfully update
the mouse position internally. Otherwise, games continue to think
the mouse is still in the original position and will continue to
try to perform whatever action is associated with that mouse
position.

Refs Trac#9689.
2017-10-15 13:24:21 -05:00
Colin Snover
cd538ffffa BACKENDS: Do not send mouse events to games occurring outside the game draw rect 2017-10-15 13:24:21 -05:00
Colin Snover
319ab07fe0 SDL: Minor code cleanup to declare variables at point of first use 2017-10-15 13:24:20 -05:00
Colin Snover
9e9972a55b GRAPHICS: Send blank cursors to graphics backends
Blank cursors don't mean to continue drawing the previous cursor,
they mean that the cursor in the backend needs to be blank.
2017-10-15 13:24:20 -05:00
Colin Snover
5d8cf6ba42 BACKENDS: Fix GraphicsManager handling of empty cursors
The SDL graphics manager was just ignoring calls from CursorMan to
set the cursor to a blank cursor, which meant engines that did not
immediately send a cursor to CursorMan at startup would still show
the launcher's cursor (usually with a broken palette).

The OpenGL graphics manager would try to generate and draw an
invalid cursor surface when receiving an empty cursor.
2017-10-15 13:24:20 -05:00
Colin Snover
da0a8db704 BACKENDS: Also hide mouse cursor outside game area when an engine has hidden the cursor
The only reason we show the system cursor outside the game area is
to show users where their mouse is when the window is resized and
the mouse is outside the game area. If the game cannot be
interacted with, then the mouse also does not need to be shown in
the black areas.
2017-10-15 13:24:20 -05:00
Colin Snover
de2bbe3b97 BACKENDS: Refactor OpenGL & SDL graphics backends
This patch refactors the OpenGL and SDL graphics backends,
primarily to unify window scaling and mouse handling, and to
fix coordinate mapping between the ScummVM window and the
virtual game screen when they have different aspect ratios.

Unified code for these two backends has been moved to a new
header-only WindowedGraphicsManager class, so named because it
contains code for managing graphics managers that interact with
a windowing system and render virtual screens within a larger
physical content window.

The biggest behavioral change here is with the coordinate
system mapping:

Previously, mouse offsets were converted by mapping the whole
space within the window as input to the virtual game screen
without maintaining aspect ratio. This was done to prevent
'stickiness' when the mouse cursor was within the window but
outside of the virtual game screen, but it caused noticeable
distortion of mouse movement speed on the axis with blank
space.

Instead of introducing mouse speed distortion to prevent
stickiness, this patch changes coordinate transformation to
show the system cursor when the mouse moves outside of the virtual
game screen when mouse grab is off, or by holding the mouse inside
the virtual game screen (instead of the entire window) when mouse
grab is on.

This patch also improves some other properties of the
GraphicsManager/PaletteManager interfaces:

* Nullipotent operations (getWidth, getHeight, etc.) of the
  PaletteManager/GraphicsManager interfaces are now const
* Methods marked `virtual` but not inherited by any subclass have
  been de-virtualized
* Extra unnecessary calculations of hardware height in
  SurfaceSdlGraphicsManager have been removed
* Methods have been renamed where appropriate for clarity
  (setWindowSize -> handleResize, etc.)
* C++11 support improved with `override` specifier added on
  overridden virtual methods in subclasses (primarily to avoid
  myself accidentally creating new methods in the subclasses
  by changing types/names during refactoring)

Additional refactoring can and should be done at some point to
continue to deduplicate code between the OpenGL and SDL backends.
Since the primary goal here was to improve the coordinate mapping,
full refactoring of these backends was not completed here.
2017-10-15 13:24:20 -05:00
Colin Snover
0ad03e492a SDL: Accept signed values for mouse cursor warping
This matches the other ScummVM and SDL APIs for mouse warp.
2017-10-15 13:24:20 -05:00
Colin Snover
969dd565a1 SDL: Allow window resize with non-OpenGL SDL2 backend
The GUI is not redrawn when the window size changes, but that is
not as important as being able to resize the games themselves.
2017-10-15 13:24:20 -05:00
Colin Snover
b53020f704 BACKENDS: Fix some comment typos 2017-10-15 13:24:20 -05:00
Timo Mikkolainen
7fc8619534 I18N: Update translation (Finnish)
Currently translated at 100.0% (959 of 959 strings)
2017-10-15 19:04:23 +02:00
Paolo Bossi
3774e7ca37 I18N: Update translation (Italian)
Currently translated at 100.0% (959 of 959 strings)
2017-10-15 18:42:04 +02:00
Lothar Serra Mari
9b58c83835 I18N: Update translation (German)
Currently translated at 100.0% (959 of 959 strings)
2017-10-15 17:10:50 +02:00
George Kormendi
047b35ff39 I18N: Update translation (Hungarian)
Currently translated at 100.0% (959 of 959 strings)
2017-10-15 16:17:40 +02:00
Thierry Crozat
b48fa180b4 I18N: Update translations templates 2017-10-15 15:55:09 +02:00
Eugene Sandulenko
c71633de77 GUI: UPDATES: Redesign updates dialog as suggested by criezy in PR#1040 2017-10-15 15:53:57 +02:00
Paul Gilbert
8e0833e6de TITANIC: Remove accidentally committed cutscene slowdown 2017-10-14 22:17:12 -04:00
Paul Gilbert
2d25ce2e5a TITANIC: Stop final piano note of music room music getting cut off 2017-10-14 21:59:20 -04:00
Paul Gilbert
23a6533c95 TITANIC: Properly flag audio buffer as finished when song is done 2017-10-14 21:31:35 -04:00
Paul Gilbert
55947e8ae8 TITANIC: Fix rotating on Top of Well balcony 2017-10-13 21:23:24 -04:00
Paul Gilbert
9ac71ca892 TITANIC: Show busy cursor when SuccUBus sending or receiving 2017-10-13 20:59:23 -04:00
Paul Gilbert
75a736bbc8 TITANIC: Workaround for wrong ambient music on load 2017-10-13 19:54:01 -04:00
Paul Gilbert
c339e3261d TITANIC: Renamed GlobalSound methods to AmbientSound 2017-10-13 18:03:30 -04:00
Paul Gilbert
1d8ccbe1ea TITANIC: Cleanup of auto music player classes and messages 2017-10-13 17:51:49 -04:00
Paul Gilbert
44aaaf43b8 TITANIC: Play Pellerator sound only when moving to a new destination 2017-10-12 21:58:34 -04:00
Paul Gilbert
b2ebaf008e TITANIC: DE: Fix showing accented characters in Chat tab 2017-10-12 21:38:20 -04:00
Paul Gilbert
60eca29f3d TITANIC: DE: Fix saying 'ja' to Deskbot during checkin 2017-10-12 20:05:24 -04:00
Thierry Crozat
ea53605365 CREATE_PROJECT: Support using libjpeg for iOS builds 2017-10-12 22:41:15 +01:00
Thierry Crozat
0fde977ad2 CREATE_PROJECT: Fix some compilation issues for iOS
Note that this still doesn't compile with the library package provided
by bSr43 because this package is missing libvorbisfile.a and has a
non standard name for libglib-2.0.a. But it would probably be better
to fix the package than maintain non-standard packages.
2017-10-12 18:59:53 +01:00