Commit graph

91 commits

Author SHA1 Message Date
Bastien Bouclet
84b2dc5cc8 MOHAWK: Fix some clang-tidy warnings 2018-03-31 13:36:09 +02:00
Bastien Bouclet
757459bd49 MOHAWK: Myst: Don't cast function pointers when registering commands 2017-07-22 20:38:56 +02:00
Bastien Bouclet
a99397f126 MOHAWK: Myst: Improve script execution tracing 2017-07-22 20:38:56 +02:00
Bastien Bouclet
3e99dd8ccc MOHAWK: Myst: Switch to bounds checked opcode arguments 2017-07-22 20:38:56 +02:00
Bastien Bouclet
75040819c6 MOHAWK: Myst: Rewrite the sound code
It now more closely matches the original. Effect sounds are now stopped
when resuming background sounds.

Fixes #9574, Fixes #9920.
2017-07-22 20:38:56 +02:00
Bastien Bouclet
a2fc282e1c MOHAWK: Myst: Move the sound code to its own class 2017-07-22 20:38:56 +02:00
Bastien Bouclet
64303abb07 MOHAWK: Myst: Update the screen only once per frame
Change all inner loops to call the same frame function.

Remove the draw delay code. Now that we have proper frame pacing it is
not necessary anymore to wait before drawing to make sure the previous
frame stayed on the screen long enough.

Fixes #9915, #9922, #9923.
2017-07-22 20:38:56 +02:00
Bastien Bouclet
8f0fa86fbc MOHAWK: Myst: Change blocking sounds to use the main loop 2017-07-22 20:38:56 +02:00
Bastien Bouclet
3dd4da0c37 MOHAWK: Myst: Change the delay opcode to use the main loop 2017-07-22 20:38:56 +02:00
Bastien Bouclet
8f59348ec3 MOHAWK: Myst: Start reworking mainloop detection 2017-07-22 20:38:56 +02:00
Bastien Bouclet
060caebf47 MOHAWK: In Myst v1.0 English the take page opcode takes no arguments
Fixes #9645, crash when trying to take a book page.
2017-03-18 16:15:09 +01:00
Ori Avtalion
253e18c440 JANITORIAL: Reduce GUI header dependencies 2016-04-14 13:30:14 +03:00
Bastien Bouclet
c8bb597e67 MOHAWK: Fix endianness issue in Myst opcode 30
The previous code was reading data of the system's endianness as little endian.
Now the data is converted to little endian before it is read.

Attempt to fix #7100.
2016-04-03 08:11:56 +02:00
Bastien Bouclet
23c251bac9 MOHAWK: Replace an unneeded TODO with an explanation 2016-02-20 14:00:59 +01:00
Bastien Bouclet
4b81c807c8 MOHAWK: Issue a warning when trying to pop with no card pushed 2016-02-14 09:58:43 +01:00
Bastien Bouclet
3a4a94bbd2 MOHAWK: Always apply the volume when changing the background sound 2016-02-11 08:30:26 +01:00
Bastien Bouclet
1f6bfda0ef MOHAWK: Share the code for reading sound blocks 2016-02-11 07:56:58 +01:00
Bastien Bouclet
19ee63703b MOHAWK: Share the code applying sound blocks 2016-02-11 07:38:23 +01:00
Bastien Bouclet
0463e00fb6 MOHAWK: Don't downcast _invokingResource using static_cast 2016-02-07 15:27:03 +01:00
Bastien Bouclet
cddb5cd53a MOHAWK: Rename Myst's Area classes 2016-02-07 15:27:03 +01:00
Bastien Bouclet
0c8d8bbd40 MOHAWK: Use nullptr where applicable in the Myst code 2016-02-07 15:27:03 +01:00
Bastien Bouclet
47bc90f5a3 MOHAWK: Remove some dead code 2016-02-07 15:27:03 +01:00
Bastien Bouclet
7be4a74305 MOHAWK: Fix incorrect condition in Myst's sound block opcode 2016-01-12 19:34:28 +01:00
Strangerke
0b4a1ec223 MOHAWK: Add a comment about suspicious dead code in o_changeBackgroundSound 2016-01-12 10:56:25 +01:00
Johannes Schickel
abd9e92086 MOHAWK: Make GPL headers consistent in themselves. 2014-02-18 02:39:36 +01:00
Bastien Bouclet
07ee25c87d MOHAWK: Implement most of Myst's transition system 2012-12-16 06:54:13 +01:00
Christoph Mallon
d21cef4117 JANITORIAL: Avoid the ugly operator invocation syntax. 2012-03-13 15:43:23 +01:00
Matthew Hoops
5e52b0a5d4 MOHAWK: Split the graphics classes into their own files 2012-03-10 13:55:08 -05:00
D G Turner
f487092c9a MOHAWK: Corrected Regression due to minor typo in Myst o_disableAreas.
Thanks to bgKa for looking at this.
2011-07-27 12:51:41 +01:00
Bastien Bouclet
8e80f5690d MOHAWK: Misc Mechanical fixes. Many thanks to Patrick Monnerat for the patch.
- Adds break statements where missing in Mechanical::toggleVar() and Mechanical::setVarValue()
- Restore proper numbering of Achenar and Sirrus panel state variables, which were wrongly swapped.
- When bird is singing, play sound continuously.
- When operating the fortress elevator, keep the engine sound active while the elevator is moving.
2011-07-02 22:01:46 +02:00
Bastien Bouclet
771345da3a MOHAWK: Made some Myst common opcodes match the original better
Plus some minor cleanup
2011-06-25 15:22:21 +02:00
Bastien Bouclet
e0e28aaeb2 MOHAWK: Implement "Show Map" feature for Myst ME 2011-05-15 17:41:54 +02:00
Bastien Bouclet
7cc82487d3 MOHAWK: When running scripts in Myst, add delays when necessary between draws to mimic older hardware. 2011-05-14 14:10:45 +02:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Ori Avtalion
9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Bastien Bouclet
30f1eead19 MOHAWK: Add a workaround for a missing image when going up the stairs in Mechanical. 2011-02-15 21:43:36 +01:00
Bastien Bouclet
3cc86aedac MOHAWK: Remove Myst's var store from the build since it is not used
anymore.

Keep the files are to be kept around for reference until Mechanical is
finished.
2011-02-13 13:27:01 +01:00
Bastien Bouclet
0b69b6a842 MOHAWK: Myst, pass the playback direction from the calling script to the movie player.
svn-id: r55657
2011-01-30 13:54:39 +00:00
David Turner
e395aeff05 MOHAWK: Removed direct OSystem Quit calls from Myst Mohawk Interpreter.
This avoids the same issue that caused leakage in other engines.

svn-id: r55584
2011-01-28 08:37:27 +00:00
Matthew Hoops
2aca6d3838 MOHAWK: Rename some Myst-specific sound functions; cleanup
svn-id: r55314
2011-01-18 21:10:58 +00:00
Matthew Hoops
c35fa646ce MOHAWK: Move Myst's o_quit opcode to the base class
svn-id: r55304
2011-01-18 17:42:34 +00:00
Bastien Bouclet
b55e593cdd MOHAWK: Merge Myst intro opcode 100 with generic opcode 40 into engine method changeStack
svn-id: r55152
2011-01-07 19:26:31 +00:00
Matthew Hoops
8a77f49a59 MOHAWK: Cleanup some spacing, formatting, and naming
svn-id: r55109
2011-01-03 20:40:07 +00:00
Bastien Bouclet
6cd890aaac MOHAWK: Merge classes MystVariables and MystSaveLoad to form MystGameState
svn-id: r55041
2010-12-26 14:31:03 +00:00
Bastien Bouclet
c870bf22d1 MOHAWK: Separate background sound handling from other sounds for Myst. Allow the scripts to change the background sound volume.
svn-id: r54953
2010-12-18 13:12:56 +00:00
Bastien Bouclet
24808d49eb MOHAWK: Added the "resources" command to Myst's debug console, which lists the resources in the current card.
Allow the "drawRect" debug command to take a resource id as a parameter, to draw the resource's bounding rect.

svn-id: r54933
2010-12-16 16:12:38 +00:00
Bastien Bouclet
d4ce603361 MOHAWK: Rework Myst GFX updates
- Initial card state is drawn to the back buffer
- Script driven updates are drawn to the front buffer
Allows opcode 28 (copy back buffer to screen) and opcodes 29/33 (copy image to screen / back buffer) to work properly.
Fixes among others the generator room lights, and the matchbox.

svn-id: r54907
2010-12-14 19:11:16 +00:00
Bastien Bouclet
adc7dc0785 MOHAWK: Fix using wrong coordinates in Myst opcode 28, restoreDefaultRect
svn-id: r54864
2010-12-11 12:59:56 +00:00
Bastien Bouclet
fb854b1483 MOHAWK: Fix Myst library books, fireplace combination book, and bookcase transform animation.
svn-id: r54802
2010-12-06 20:29:45 +00:00
Bastien Bouclet
24a0b50ac3 MOHAWK: Implement Myst opcodes 158 to 166: Rocket sliders + check lever + link book
svn-id: r54776
2010-12-05 08:36:41 +00:00