Commit Graph
1366 Commits
Author SHA1 Message Date
Eugene Sandulenko c518691d7c MOHAWK: Fix warning 2018-08-12 08:09:05 +02:00
David Fioramonti 535c47fced MOHAWK: RIVEN: Delay less for slower systems
Some systems may take longer to process the game loop
than others so we delay by a variable amount so faster
and slower system execute the game loop the same number
of times per second (the fps is capped at 100).

Slower systems that take longer than 10ms to process the game
loop won't have any delay.
2018-08-11 10:47:37 +02:00
David Fioramonti 56389b1a5d MOHAWK: RIVEN: Move input handling to a separate function
Simplifies doFrame().
2018-08-11 10:47:37 +02:00
Bastien Bouclet ab46dae8d7 MOHAWK: RIVEN: Rework font loading so the TTF font is not leaked 2018-08-11 08:58:12 +02:00
Bastien Bouclet ad3feae490 MOHAWK: RIVEN: Fix crash when clicking on a marble with the mouse moving
In some cases a mouse moved event could be handled between the moment
the xtakeit script was queued and the moment it is executed (on the same
frame), causing the mouse position no longer to be over a marble
rectangle.

Fixes #10647.
2018-08-04 06:42:17 +02:00
D G Turner 574318c052 MOHAWK: Fix Unused Variable Compiler Warning.
This occurs when FreeType2 is not enabled and thus fontHeight variable
is unused.
2018-07-31 13:38:33 +01:00
Bastien Bouclet 3a7f85971f MOHAWK: MYST: Add support for the localized 25th games 2018-07-30 20:13:16 +02:00
D G Turner 1f3aaac12c MOHAWK: Silent Compiler Warning About Unused VM Pointer.
This can be restored if required at a later time.
2018-07-29 06:00:42 +01:00
David Fioramonti 51351111d4 MOHAWK: RIVEN: Only use x mouse position to move dome sliders
Fixes Trac#10642.

The original engine will move the dome sliders whenever the player is
dragging a dome slider to the left or right regardless of y position.

In ScummVM the dome slider position would only change to the players x
mouse position when the y value was also in the slider hotspot. This
change removes the y check by making the point to be checked always
have a y value in the hotspot rect.

The x values are also bound to the max and min value that any of the
slider hotspots can have. This allows the slider to go all the way to
the left and right even if the user has gone past the slider area
to the left or right while still holding the slider.
2018-07-27 16:16:29 +02:00
Bastien Bouclet 85a603fdff MOHAWK: MYST: Don't play the flyby movies when going back to Myst 2018-07-25 20:37:27 +02:00
David Fioramonti 3299402a23 HOHAWK: RIVEN: Don't allow autosaving after credits have finished
There is a brief period after the credits finish, but before the engine
closes that autosaving can happen.

Fixes Trac#10635.
2018-07-21 07:45:39 -07:00
Bastien Bouclet 1f914ea759 MOHAWK: MYST: Don't call the mouse up handler if executeMouseUp was used
Fixes Trac#10573.
2018-07-21 09:56:33 +02:00
Bastien Bouclet d7f4cc9382 MOHAWK: RIVEN: Fix white screen before a bad ending's credits
This was happening in the Polish version only.

Fixes #10632.
2018-07-17 06:31:50 +02:00
David Fioramonti bd21a5c0f3 MOHAWK: MYST: Have Mech fortress west direction persists after returning
Fixes Trac#10575.

When stepping away or pressing the buttom for the mechanical age fortress
rotator after setting it west it would be south. This is because some variables
used for a workaround were being reset everytime the rotator puzzle
was being reinitalized (in o_fortressRotation_int). Which happens when
the player steps back up to the rotator controls.

This change simply removes the variables being reset so they retain
the variables they had before. Those variables are already initalized
in the Mechanical constructor.
2018-07-15 07:59:44 +02:00
David Fioramonti b1aec443c4 MOHAWK: MYST: Don't set Mech direction when elevator button is pressed
The direction that the fortress is pointing is calculated when
the user locks on using the left throttle (after the gears have
stopped). It also happens when the user hits the button.

There is only a difference in the two behaviors when the user has
changed the direction, but not locked on.

The 2nd case can lead to the direction be different than
what the last locked on direction was. Since the user
can lock the direction to say north, turn it to west, not
lock on and hit the button, which will set the direction
to west. This can lead to confusion since a direction sound
isn't played in this case.

This change removes code, to prevent the recalculation
of the direction when the button is pressed so that direction
is always what it was last locked onto.
2018-07-15 07:32:47 +02:00
Bastien Bouclet 9729ff3706 MOHAWk: RIVEN: Reset the mouse cursor when changing stack / unpausing 2018-07-13 19:44:54 +02:00
Bastien Bouclet d91ac01419 MOHAWK: RIVEN: Queue opening and closing the main menu as scripts
This way all the other actions are blocked while the card load scripts
are executed. Expecially, it's not possible anymore to open the main
menu while the scripts for returning from the main menu are still
executing.

Fixes Trac#10628.
2018-07-13 19:44:48 +02:00
Bastien Bouclet de86847184 MOHAW: RIVEN: Added more localized 25th resource id workarounds
Fixes Trac#10625, Fixes Trac#10624.
2018-07-11 20:32:08 +02:00
Bastien Bouclet e105c2a78a MOHAWK: RIVEN: Fix off-by-one ids in ospit for the 25th localized versions
Fixes Trac#10620.
2018-07-10 19:09:30 +02:00
Bastien Bouclet 5cff361f04 MOHAWK: MYST: Add delays at each step of Achenar's torture switch anim
Fixes Trac#10606.
2018-07-08 21:55:09 +02:00
Bastien Bouclet 5dd38b8660 MOHAWK: MYST: Play complete audio clip when changing the boiler pressure
Fixes Trac#10607.
2018-07-08 21:55:09 +02:00
David Fioramonti a01babbd38 MOHAWK: MYST: Use degree conversion common math funcs 2018-07-03 23:08:48 +01:00
Bastien Bouclet 9aeb4a356e MOHAWK: MYST: Always clear the screen before playing fullscreen movies
Fixes the broderbund logo movie being partially visible when the Cyan
logo is playing.

Fixes Trac#10595.
2018-07-02 21:48:19 +02:00
Bastien Bouclet cf52951915 MOHAWK: RIVEN: Fix the credits not showing in the Polish version
Fixes Trac#10589
2018-07-02 13:17:23 +02:00
Bastien Bouclet b40e93e11a MOHAWK: Push down the include of advancedDetector.h
So the whole engine is not recompiled when making changes to the
detection code.
2018-06-30 21:57:18 +02:00
Bastien Bouclet bd56983b42 MOHAWK: RIVEN: Tweak a bit the main menu items
* Move the text to the left so the japanese version is not cut.
* Increase the size of the text so it looks better when scaled up.
2018-06-29 13:31:55 +02:00
Bastien Bouclet 573fa47f94 MOHAWK: RIVEN: Fix loading autosaves saved while on the main menu 2018-06-29 13:31:55 +02:00
Eugene Sandulenko 1f4d4b01ea MOHAWK: RIVEN: Removed hardcoded list of language prefixes.
This will let to play with the prefixes without recompilation.
2018-06-29 13:31:55 +02:00
Eugene Sandulenko 318093b41c MOHAWK: Added file sizes to 25th Anniversary Riven entries 2018-06-29 13:31:55 +02:00
Bastien Bouclet 52c89cb1e2 MOHAWK: RIVEN: Disable autosaving while the game is not started 2018-06-29 13:31:55 +02:00
Bastien Bouclet 7884201b43 MOHAWK: RIVEN: Improve some of the main menu translations 2018-06-29 13:31:55 +02:00
Eugene Sandulenko cfa649d7ac MOHAWK: RIVEN: Restrict new menu to 25th Anniversary games 2018-06-29 13:31:55 +02:00
Bastien Bouclet 24977b814c MOHAWK: RIVEN: Add detection for the 25th Anniversary version 2018-06-29 13:31:55 +02:00
Eugene Sandulenko b26fe7de39 MOHAWK: RIVEN: Added Japanese font and menu translation 2018-06-29 13:31:54 +02:00
Eugene Sandulenko 09b94b1fc2 MOHAWK: RIVEN: Translated new menu entries 2018-06-29 13:31:54 +02:00
Eugene Sandulenko be07d10c7a MOHAWK: Drop platform at Riven detection entries
Since we do not distinguish between Win and Mac, we drop the platform
from the detection entries during the autodetection
2018-06-29 13:31:54 +02:00
Bastien Bouclet 6759346bb6 MOHAWK: RIVEN: Show confirmation dialogs on the main menu 2018-06-29 13:31:54 +02:00
Bastien Bouclet e7cb40dde5 MOHAWK: RIVEN: Use an in-game thumbnail when saving from the menu
Instead of a thumbnail of the menu itself.
2018-06-29 13:31:54 +02:00
Bastien Bouclet 45ab57209f MOHAWK: RIVEN: Fix starting a new game with a game currently active 2018-06-29 13:31:54 +02:00
Bastien Bouclet a722fe1194 MOHAWK: RIVEN: Fix saving while in the menu 2018-06-29 13:31:54 +02:00
Bastien Bouclet d848ebe85a MOHAWK: RIVEN: Fix loading and resuming from the main menu 2018-06-29 13:31:54 +02:00
Bastien Bouclet 2f9c9a2c32 MOHAWK: RIVEN: Fix compilation without Riven 2018-06-29 13:31:54 +02:00
Bastien Bouclet 4b900cc432 MOHAWK: RIVEN: Remove the load/save/quit buttons from the options dialog
Those features can now be accessed through the main menu
2018-06-29 13:31:54 +02:00
Bastien Bouclet dc93e5bb6a MOHAWK: RIVEN: Add more options to the main menu 2018-06-29 13:31:54 +02:00
Bastien Bouclet 86e0089cc6 MOHAWK: RIVEN: Patch in the load menu for the game versions missing it 2018-06-29 13:31:54 +02:00
Eugene Sandulenko 23c889db44 MOHAWK: RIVEN: Localize menus 2018-06-29 13:31:54 +02:00
Eugene Sandulenko db359f0f0e MOHAWK: RIVEN: Fix crash for German Riven 2018-06-29 13:31:54 +02:00
Bastien Bouclet 2e8d08c1d0 MOHAWK: RIVEN: Add a save button to the main menu 2018-06-29 13:31:54 +02:00
Eugene Sandulenko 0ca52f62a4 MOHAWK: RIVEN: Draw menu with TTF fonts 2018-06-29 13:31:54 +02:00
Eugene Sandulenko 1e9b58ab4b MOHAWK: RIVEN: Show main menu on ESC 2018-06-29 13:31:54 +02:00