177 Commits

Author SHA1 Message Date
Filippos Karapetis
1330cb7c99 ZVISION: Remove superfluous check 2015-01-21 01:42:01 +02:00
Torbjörn Andersson
ad83f03315 ZVISION: Fix mis-parsing of criteria, a.k.a bug #6774
A condition in a criteria is made up of three tokens: An id, an
operator and an id/value. However, in my copy of ZGI, puzzle:07507
has "[00202] !3  # SPELL_12_IN_BOOK", i.e. there was no space
between the second and third tokens. This caused the "glorf" spell
to not be properly inscribed in your spell book.

To fix this, if the second token is more than one character we use
the rest of it as the third token.
2015-01-20 19:21:39 +01:00
Filippos Karapetis
750d72812b ZVISION: Properly skip commented out puzzle criteria - fixes bug #6776
In the Zork: Nemesis version bundled in the ZGI SE DVD, the bell rope
puzzle has been modified so that it's non-interactive, i.e. there isn't
a hotspot to click while the video is playing, and the player is
transported to the next room. In the patched script, all criteria of
that puzzle were commented out, resulting in an invalid criteria list.
Skip any commented out criteria, to avoid ending with an invalid list.
2015-01-20 02:16:21 +02:00
Filippos Karapetis
5f9858844a ZVISION: Fix saving when using the original save dialog
A regression from commit dcac5be493
2015-01-20 01:21:16 +02:00
Filippos Karapetis
5df2e08c16 ZVISION: Fix bug #6771 (unable to leave room when loading a game)
Avoid overwriting the previous location when loading a saved game
2015-01-19 23:54:42 +02:00
Filippos Karapetis
dcac5be493 ZVISION: Simplify the checks in the location changing code 2015-01-19 23:54:41 +02:00
Filippos Karapetis
68b7839d99 ZVISION: Fix bug #6768 (unable to save in the prison area)
The save buffer preparation code had a bug, which triggered in the
jail area because its room is 'j'
2015-01-19 05:09:03 +02:00
RichieSams
3a31e1de96 ZVISION: Don't change location when coming back from ScummVM save dialog and do change location when coming back from restore dialog
Fixes bug # 6771

We don't need to change locations, since we use the ScummVM save dialog instead
of the original one (which is actually a location). Instead we just need to reset _nextLocation to
_currentLocation so the engine can stop trying to save. If we change locations, the
StateKey_LastWorld/Room/etc. end up being overwritten with the current room. So if a script
refers to location 0, 0, 0, 0 (aka, the last room), the engine will try to change location to the same room.

On restore, we have to force a location change, just in case we restore to the same room. (Since the logic
will only do a location change if _nextLocation != _currentLocation)
2015-01-18 20:22:02 -06:00
RichieSams
0fafb6a62c Revert "ZVISION: Don't change location when coming back from ScummVM save dialog"
This reverts commit b835eacc0cd401bb0d15a33e60d2ac47ebb4d718.
2015-01-18 20:11:10 -06:00
RichieSams
b835eacc0c ZVISION: Don't change location when coming back from ScummVM save dialog
Fixes bug # 6771

We don't need to change locations, since we use the ScummVM save dialog instead
of the original one (which is actually a location). Instead we just need to reset _nextLocation to
_currentLocation so the engine can stop trying to save. If we change locations, the
StateKey_LastWorld/Room/etc. end up being overwritten with the current room. So if a script
refers to location 0, 0, 0, 0 (aka, the last room), the engine will try to change location to the same room.
2015-01-18 19:26:49 -06:00
RichieSams
a26a9c7268 ZVISION: Fix formatting and add curlies 2015-01-18 17:06:37 -06:00
Sven Hesse
3f66f28624 ZVISION: Remove trailing whitespace 2015-01-18 20:35:51 +01:00
Filippos Karapetis
263c592490 ZVISION: Fix bug #6769 (the "Alchemical debacle" video in ZGI) 2015-01-17 23:38:50 +02:00
Filippos Karapetis
9f00880aa4 ZVISION: Properly handle sounds reusing the same sound slot (bug #6761)
This is based on Marisa-Chan's observations in commit 28e27ea1d9.
Tested with both ZNEM and ZGI
2015-01-16 14:08:15 +02:00
RichieSams
89f233f488 ZVISION: Set the state value for the lever position during user dragging
Not just during the "returning" animation. Addresses part of bug #6761
2015-01-15 00:41:13 -06:00
RichieSams
4f28cec6ac ZVISION: Keep the hand cursor during lever movement
We have to explicitly set the cursor each call otherwise the cursor will
be reset to the idle cursor. Addresses part of bug #6761
2015-01-15 00:40:37 -06:00
RichieSams
28e27ea1d9 ZVISION: Allow multiple sound effects to play at the same time
This is the original behavior. This was noted in bug #6761. Specifically,
the knocker on the door plays a sound whenever it is a the top of the bottom
of the swing. By only allowing one sound effect to play at the same time, the
knocker would only play once, even though it bounces at the bottom.
2015-01-15 00:31:39 -06:00
Filippos Karapetis
21e9007d80 Revert "ZVISION: Remove ActionRestoreGame and loading of r.svr (restart slot)"
This reverts commit 9f642074ba8e17aa23b01bcee82b2293fe84f8f1, as it
broke the credits screen in ZGI.

This has been rewritten to use the common save code
2015-01-10 22:03:15 +02:00
Filippos Karapetis
899cf4813c ZVISION: Change screen resolution for the hires DVD videos to 800x600
Also, this hooks up the MPEG-PS decoder, but only if libmpeg2 is
compiled in. The DVD videos are still disabled until AC3 audio support
is implemented.
The hires DVD videos are encoded a 720x480 resolution, with double the
frame rate of the lowres ones (29.97FPS up from 15FPS)
2015-01-10 21:32:15 +02:00
Filippos Karapetis
616b34e629 ZVISION: Change wording 2015-01-10 17:30:11 +02:00
Filippos Karapetis
79b92fe046 ZVISION: Clean up save logic, and fix a thumbnail-related FIXME
This fixes the save game thumbnails when using the original save/load
screens
2015-01-09 01:09:53 +02:00
Filippos Karapetis
4ffaf4df37 ZVISION: Add stubs for the hires VOB MPEG2 videos of ZGI DVD
VOB file handling is based on clone2727's work. The lowres videos are
played for now, until AC3 sound handling is implemented
2015-01-07 11:42:27 +02:00
Filippos Karapetis
cdbc06d0f7 ZVISION: Use a common function for loading game animations 2015-01-07 11:42:26 +02:00
Filippos Karapetis
9f642074ba ZVISION: Remove ActionRestoreGame and loading of r.svr (restart slot)
This is handled internally now, so r.svr isn't needed anymore
2015-01-07 11:42:24 +02:00
Filippos Karapetis
64979d5e45 ZVISION: Fix regression in the handling of multiple animations
A regression from 0c4e0673c3. Thanks to Marisa-Chan for noticing
2014-12-30 15:38:03 +02:00
RichieSams
68d3ebd57b ZVISION: Rename some scripting classes to better represent what the classes are
Also, rename the graphics 'Effect' class in order to avoid naming clashes (and/or coder
confusion) with the newly named ScriptingEffect class.
Lastly, add some documentation for the classes for further clarity.
2014-12-30 01:10:36 -06:00
Filippos Karapetis
6c3af3c2e7 ZVISION: White space 2014-12-30 03:51:31 +02:00
Filippos Karapetis
0c4e0673c3 ZVISION: Further cleanup to the AnimationNode class 2014-12-30 03:08:39 +02:00
Filippos Karapetis
f4d5b150f1 ZVISION: Show system messages when subtitles are disabled
Thanks to Marisa-Chan for spotting this
2014-12-29 12:34:55 +02:00
Matthew Hoops
6d55998b40 ZVISION: Make the rest of the controls properly use VideoDecoder timing
The hacky use of getDuration() to retrieve the framerate() is gone

Thanks to md5 for testing (and for filling in a few gaps since I was coding in the blind ;))
2014-12-28 21:27:56 -05:00
Filippos Karapetis
587b1ad69c ZVISION: The fist control is only used in one location 2014-12-28 18:42:18 +02:00
Filippos Karapetis
78b2c87d51 ZVISION: Document some more controls 2014-12-28 15:27:55 +02:00
Matthew Hoops
d0ac190625 ZVISION: Use VideoDecoder facilities better in AnimationNode
setEndFrame() will ensure the audio stops when it is supposed to. Also removes the hack of retrieving the frame rate through the getDuration()'s timestamp return value.

Thanks to md5 for testing
2014-12-28 04:43:22 -05:00
Filippos Karapetis
1016838bd5 ZVISION: Add support for disabling animations while turning
Also, clean up and document game configuration options, and add a TODO
for QSound support
2014-12-27 16:34:27 +02:00
Filippos Karapetis
db37cfb1b0 ZVISION: Remove duplicate blitting code for images and animations 2014-12-26 22:30:32 +02:00
Filippos Karapetis
e5f0ee2271 ZVISION: Implement auto-saving 2014-12-26 18:22:18 +02:00
Filippos Karapetis
eea1ee445f ZVISION: Move more graphics code out of the main engine code 2014-12-26 13:14:24 +02:00
Filippos Karapetis
e8820d26e7 ZVISION: Fix a warning 2014-12-26 12:42:01 +02:00
Filippos Karapetis
5a72eea2bb ZVISION: Move some event/rendering code out of the main engine code 2014-12-26 12:41:36 +02:00
Filippos Karapetis
2350eca546 ZVISION: Remove some unused actions. Cleanup 2014-12-26 12:04:21 +02:00
Filippos Karapetis
4d0ebfaa22 ZVISION: Move the save manager together with the other file classes 2014-12-26 04:03:20 +02:00
Filippos Karapetis
3661bc4cf1 ZVISION: Normalize and cleanup all the menu-related enums 2014-12-25 22:11:29 +02:00
Filippos Karapetis
6368a6ea91 ZVISION: Move the menu code together with the other scripting code 2014-12-25 22:00:55 +02:00
Filippos Karapetis
6c451c9cf4 ZVISION: Document where MIDI commands are used 2014-12-25 21:48:59 +02:00
Filippos Karapetis
06fbca1e81 ZVISION: Remove dead code 2014-12-25 20:10:24 +02:00
Filippos Karapetis
36c851d0e4 ZVISION: Fix frame rate for RLF videos and remove hack in AnimationNode
_frameTime refers to msec, not ticks
2014-12-25 16:22:36 +02:00
Filippos Karapetis
5535cb02fc ZVISION: Resolve some TODOs 2014-12-25 15:14:59 +02:00
Filippos Karapetis
319323c668 ZVISION: Document some of the ActionRegion effects 2014-12-25 15:09:46 +02:00
Filippos Karapetis
fa2d8d927b ZVISION: Plug more memory leaks 2014-12-24 23:27:03 +02:00
Filippos Karapetis
75d78c71cc ZVISION: Plug another memory leak. Some cleanup 2014-12-24 23:18:01 +02:00