Commit graph

234 commits

Author SHA1 Message Date
Eugene Sandulenko
82e3286f61
ZVISION: Plug memory leak. CID 1432261 2024-10-25 15:59:57 +02:00
Hubert Maier
c41e59ee67 JANITORIAL: ZVISION: Fix typos 2024-09-16 09:41:27 +03:00
BLooperZ
0fb9bbd55b ZVISION: Support BiDi text in tty 2024-08-12 23:31:49 +03:00
BLooperZ
6863fc5777 ZVISION: Use UTF-32 buffer in tty processing 2024-08-12 23:31:49 +03:00
Cameron Cawley
d2996b9ed2 ZVISION: Make use of the ADGF_DVD flag 2024-07-06 07:57:24 +03:00
Cameron Cawley
1357bfe672 COMMON: Avoid including engine headers in common code for DebugChannelDef 2024-06-20 20:15:57 +01:00
Le Philousophe
043e5ad420 ZVISION: Migrate engine to Path 2023-12-24 13:19:25 +01:00
Le Philousophe
26dd9a05fa ZVISION: Don't use unsafe sprintf and vsprintf 2022-10-23 22:46:19 +02:00
Le Philousophe
523ed4a34d ZVISION: Don't use unsafe strcat and strcpy 2022-10-23 22:46:19 +02:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Paul Gilbert
baccbedf50 GRAPHICS: Changed surface classes sizes from uint16 to int16 2021-07-04 18:24:27 -07:00
Filippos Karapetis
0849ba9068 ZVISION: Fix bug #7176 (Nemesis - missing temple fountain SFX)
This reverts commit 0bc61d3c21.
The volume mapping does not match what the original is doing. In the
case of this bug, a volume of 127 for the fountain sound would be
mapped to 2/255 when standing right in front of it, which is too quiet.
2020-08-30 23:34:36 +03:00
Torbjörn Andersson
629b121e17 ZVISION: Work around music playing over Charon cutscenes
When riding with Charon in one direction, the script stops the
background sounds. When you ride in the other direction, it doesn't.
Since the cutscenes play music, you may now have two pieces of music
playing over each other. Work around this by pausing the mixer during
the cuscenes (there are two different ones) for going back.
2020-08-30 16:12:58 +03:00
Torbjörn Andersson
02a1552efe ZVISION: Implement indirect addressing in add()
Some ZGI scripts use action:add(14999, [...]) to add to the score.
Without this, it would always add 0 instead. This affected the puzzles
where you use the snapdragon and where you open the first time tunnel.
2020-08-24 14:15:23 +02:00
Torbjörn Andersson
022a65ee52 ZVISION: Delay location changes one cycle
Since the script that triggers a location change can also trigger other
scripts, wait one cycle before actually changing the location to give
them time to run. This fixes a couple more missing points. I've verified
that this does not cause any obvious regressions in ZGI. I'll try
Nemesis when all is done, to see if any of the fixes needs to be for ZGI
and ZGI only.
2020-08-24 14:15:23 +02:00
Torbjörn Andersson
496484b94b ZVISION: Do not terminate scripts when they change location
It was pointed out on the GOG forum that you can't get a perfect score
in Zork: Grand Inquisitor. Once case I've found that looks like it
should award points, but doesn't, is the Spell Checker (tp4g.scr). It
turns out that the script doesn't award the points until after it has
changed your location, and ScummVM interprets the location change as a
signal that the script has ended. With this change, the script continues
until it finishes on its own.

As far as I can see, this is how ScummVM has always done it. I don't
think the original Z-Engine project did, though.

If this was the only such case, I would feel much more comfortable about
making this change. As it is, I'm a bit nervous about it. One other
positive difference is that with the change, you get to keep the sword
and rope after entering the monastery (um1e.scr). Without it, they are
lost but apparently no longer needed?
2020-08-24 14:15:23 +02:00
Torbjörn Andersson
6f9199e502 ZVISION: Fix the Zork Nemesis safe puzzle
This reverts bb2f218fa1 which was in
response to a Coverity report. Maybe it can be written in a better way -
I haven't wrapped my head around the trigonometry of it - but clicking
on a number on the safe dial is supposed to rotate the dial until that
number is at the red arrow head.

This way, it works. You can test it with "location a c 4 g 0".
2020-07-23 11:55:39 +02:00
Cameron Cawley
6ed8dea829 ZVISION: Disable the keymap when InputControl is focused 2020-03-15 17:35:09 +01:00
Bastien Bouclet
e3abab45ab ZVISION: Add override keywords 2020-02-09 12:55:00 +01:00
D G Turner
008e2b85b6 ZVISION: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
2019-10-24 02:04:53 +01:00
Thierry Crozat
e2935acfe4 ZVISION: Disable MPEG movies when liba52 is not enabled 2018-11-04 22:33:22 +01:00
Torbjörn Andersson
4cc71d42a2 ZVISION: Play hi-res videos, even if they have no low-res version
This is used for some logo animations at the start of the game. I
don't know if it's used for anything else, but probably not.
2018-11-04 22:33:22 +01:00
Torbjörn Andersson
e9052a0085 ZVISION: Enable hi-res videos for testing purposes 2018-11-04 22:33:22 +01:00
Torbjörn Andersson
f6a0e197b1 ZVISION: Add workaround for ZGI bug #10605
It's possible to get the "Fire! Fire!" timer stuck after setting
the the inquisitor doll on fire. This should work around that.
2018-07-29 09:48:47 +02:00
Torbjörn Andersson
2982792eb1 ZVISION: Add workaround for bug #10604
It was possible to render the game unplayable simply by looking at
Jack's cigar box while waiting for him to return to examine the
lamp. Note that this bug is only present in the DVD version. For
whatever reason, it adds a dummy location for playing the cutscene.
Applying the bugfix in the CD version actually breaks the game.
2018-07-29 09:48:19 +02:00
Eugene Sandulenko
bb2f218fa1 ZVISION: Fix atan2() arguments order. CID 1394387 2018-07-23 23:46:06 +02:00
Torbjörn Andersson
a506a8f7eb ZVISION: Clarified comment for workaround for bug #6770
I should have done this before it was merged, but I completely
forgot that dafioram had verified that the bug *does* in fact
happen in the original game as well.
2018-01-14 18:05:32 +01:00
Torbjörn Andersson
c7b8bc8169 ZVISION: Workaround for bug #6770
Explicitly check if the time tunnel is open (and therefore shown in
close-up) before executing the scripts that draw the lever that is
shown in the normal view. This apparently doesn't happen in the
original engine, which suggests there may be a ScummVM bug. But it
still doesn't seem like the *wrong* thing to do here.
2018-01-14 15:34:16 +00:00
Eugene Sandulenko
fab199d37e JANITORIAL: Make GPL headers uniform 2016-09-03 12:46:38 +02:00
Ori Avtalion
3564032330 JANITORIAL: Reduce audio header dependencies 2016-04-14 16:10:21 +03:00
Max Horn
856475067a MISC: Remove some unused private member variables 2015-07-19 17:13:18 +02:00
David Russo
fdc4edfa99 ZVISION: Correct code style 2015-07-07 15:24:25 +01:00
Matthew Hoops
ddf170de4a ZVISION: Silence gcc warnings 2015-04-11 16:12:47 -04:00
Torbjörn Andersson
ec16861ec9 ZVISION: Silence Cppcheck warning 2015-03-22 08:14:18 +01:00
Filippos Karapetis
b45e706012 ZVISION: Fix script bug #6803 (tuning fork box state) 2015-02-17 01:49:59 +02:00
Filippos Karapetis
53a2c30cb0 ZVISION: Fix script bug #6791 (max value of delay_render)
This fixes the delay outside the Frobozz Electric building.
In all other places, delay_render is called with a value
ranging from 1 to 10, so the 100 here looks to be a script
bug, and causes an unnecessary long pause in that scene.
Thus, we're capping the frame delay value to 10.
2015-02-14 15:27:01 +02:00
Filippos Karapetis
9ce285a11e ZVISION: Also reference the script manager in ResultAction members 2015-02-14 15:08:28 +02:00
Filippos Karapetis
60c06b84b6 ZVISION: Fix script bug #6794 - "ZVISION: Yoruk's coffin instant death"
Fixes an edge case where the player goes to the dark room with the grue
without holding a torch, and then quickly runs away before the grue's
sound effect finishes. Many thanks to eriktorbjorn for the original
workaround
2015-02-14 15:08:28 +02:00
Filippos Karapetis
14914b2a31 ZVISION: Add custom equality operators for game location
This makes the location checks more readable
2015-02-14 15:08:28 +02:00
RichieSams
a851fa8e1a ZVISION: Refactor text rendering code in order to fix word wrapping
and clarify the logic. Fixes bug #6801
2015-02-11 15:13:19 -06:00
Torbjörn Andersson
cbbd1a9219 ZVISION: Set safe control state value after animation finishes
If we set it before the animation starts, the final turn of the
wheel won't be animated, because the puzzle will already be solved.
2015-02-08 15:47:20 +01:00
Torbjörn Andersson
8725f2cff2 ZVISION: Limit input text to the width of the input control
This is to prevent the player from entering ridiculously long
savegame descriptions.
2015-02-08 13:56:01 +01:00
Torbjörn Andersson
b7b4e9cc58 ZVISION: Draw transparent text in original save dialog
Before this change, text was drawn in black boxes in Zork Nemesis,
so while this does make it look better (and more like the original)
this may actually make the text slightly harder to read. The
original dialogs allowed only upper-case letters, but I think that
it's better to leave that to the player.
2015-02-08 10:13:18 +01:00
Filippos Karapetis
6c07f918c6 ZVISION: Fix for script bug #6783 (no sound in the ZNem fist puzzle)
This is a bug in the original game script of the Zork Nemesis fist
puzzle, which we now patch so that the sound checks are correct for the
left fist animation
2015-02-03 12:31:58 +02:00
Filippos Karapetis
1adcb23d71 ZVISION: Fix bug #6784 (wrong scaling in the fist control) 2015-02-03 04:16:02 +02:00
Torbjörn Andersson
bc2c1c6a3c ZVISION: Remove \n from debug message 2015-02-02 01:11:53 +01:00
Torbjörn Andersson
8c8261aa2a ZVISION: Cleanup.
We usually don't check a pointer before deleting it.
2015-01-26 22:18:23 +01:00
Torbjörn Andersson
dd5cd42f2e ZVISION: Use ValueSlot for volume in ActionMusic
As suggested by Marisa-Chan. I had based my earlier implementation
on parseCritera(), and was unaware of this alternative. The good
thing is that the diff from the old code is now much smaller, which
should reduce the risk of regressions. (There is a lot I haven't
tested here...)
2015-01-26 22:18:23 +01:00
Torbjörn Andersson
51e90b2422 ZVISION: Fix ActionMusic volume
The volume can be either a constant or a state value. The latter is
used by ZGI to simulate a sound being heard at different distances,
e.g. the beehive in the Dungeon Master's hideout.
2015-01-26 19:34:21 +01:00
Marisa-Chan
568c13b115 ZVISION: Use correct virtual class type instead of MusicNode 2015-01-23 16:31:10 +06:00