Commit Graph

643 Commits

Author SHA1 Message Date
Alexander Tkachev
b665fc933d ALL: Make simpleSaveNames() a MetaEngineFeature
Added it into hasFeature() of all engines which returned `true` in
simpleSaveNames() before.

As mentioned in #788, SCI is not always using simple names, so it
doesn't have such feature now.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
ab1d160ec8 ALL: Add MetaEngine::simpleSaveNames()
Engines with "simple" savenames would support "Run in background" in
save/load dialog and gradual save slots unlocking. Other engines
save/load feature would be locked until save sync is over.
2016-08-24 16:07:55 +06:00
Thierry Crozat
abb33e5362 DRASCULA: Fix slight delay when interrupting intro animation
The delay occurred when trying to interrupt the animation while at
the start of the first scene with Igor. After the interruption (skipping
the intro, return to launcher or quitting ScummVM) it would continue
to play the animation for a bit longer than necessary.
2016-07-20 20:18:40 +01:00
Eugene Sandulenko
33abb6118f ALL: Change main engine header guard defines to <directory>_<engine>_H
Recently we started to use this as new semantics, although in the past
we used simly <engine>_H. Now these guard defines are consistent with
rest of the files which are used in the engines.
2016-05-17 18:21:30 +02:00
Thierry Crozat
6393315a8e DRASCULA: Remove delays when showing and hiding the inventory
I don't see any purpose to this delays and they were not present in
the original engine. It works fine without those and the interface
seems more responsive.

This fixes bug #7121 DRASCULA: Delay and freeze when pressing
right mouse click on game

Also move a delay when left clicking to after performing the action.
With the delay between the left click and the action, the mouse
position could have moved when performing the action, resulting
in the wrong action being performed (e.g. activating the wrong verb
or picking the wrong object in the inventory). But removing the
delay altogether causes flickering when picking objects from the
inventory.
2016-04-17 23:41:32 +01:00
Thierry Crozat
d05d4263e5 DRASCULA: Remove delay for select verb
The delay, since it updates the mouse position, resulted in a
different verb being selected than the one we clicked on when
moving the mouse quickly after the clic. This was quite confusing
and frustrating. I can't see any reason for this delay and it seems
to work well without it. The initial commit adding it indicates this
was "for better mouse response", but it added a lot of other delays
at the same time, and removing this one doesn't see to impact the
mouse response (on the contrary, we get the new cursor quicker).
2016-04-17 23:23:23 +01:00
Thierry Crozat
e44470ab54 DRASCULA: Fix noise when playing sound.
The original engine skipped the first 32 and last 32 bytes of the
data when playing a sound. We did not do it in ScummVM which
resulted in noise at the start and/or end of some speech. This
was most noticeable with Spanish speech but also occurred
occasionally with English speech.

This fixes bug #7120 Drascula: Audio noise before every voice in
the game
2016-04-17 22:17:01 +01:00
Thierry Crozat
e90f01bc0c DRASCULA: Fix axe visibility flag when entering room 31
The visible[1] flag in room 31 (i.e. for the axe) is now reset according
to flags[13] (which indicate if we picked up the axe already or not).

This fixes bug #7118 Drascula: Axe item can be picked up infinite
times
2016-04-17 22:14:20 +01:00
Thierry Crozat
6dcaef191c DRASCULA: Fix animations speed
To time animations the original engine uses interrupt to get the
Real Time Clock and divides the number of clock ticks by 0.182.
Since there is approximately 18.2 ticks per second, this means
it uses values in 1/100th of a second. In ScummVM we were using
getMillis() / 20, so the animations was two times slower than in
the original.

This might fix bug #7115 Drascula: FPS are incorrect or some
frames are dropped.

Note that for the walk animation we are still not exactly using the
timing of the original. The original engines keeps each walk frames
for 5.7 times 1/100th of a second (i.e. 17.54 FPS). In ScummVM
getTime returns an integer value and as a result each walk frame is
now kept for 6 times 1/100th of a second (i.e. 16.67 FPS, which i
 better than the 8.33 FPS we were getting before this commit).

 as our getTime returns integer values and thus we use
frames for 6 of 1/100th of a second while the original is slightly
faster as it kept frames for 5.7 times 1/100th of a second.
2016-04-16 18:59:27 +01:00
Thierry Crozat
eef8371432 DRASCULA: Swap extraSurface and tableSurface use in chapter 6 for Spanish version
This simplifies the code and bring it closer to the original source code.
This should help if we need to debug issues in the future.
2016-04-16 18:59:27 +01:00
Ori Avtalion
3564032330 JANITORIAL: Reduce audio header dependencies 2016-04-14 16:10:21 +03:00
Thierry Crozat
323549316d DRASCULA: Improve text centering
When splitting strings into several lines to fit on the screen the
original engine could result in lines with one character beyond
the right edge of the screen, which in practice would be drawn
on the next line on its own, aligned to the left (and not centered).
This commits adds a check to avoid this situation. So although
it now behaves slightly differently than the original engine this
is for the better.
2016-04-13 21:08:31 +01:00
Thierry Crozat
7a65c3c4b0 DRASCULA: Fix cursor visibility during animation at start of chapter 6
Here we transition from an animation at end of chapter 5 to another
animation at start of chapter 6. Usually the cursor is hidden when
performing the action that triggers the animation. But here there is
no action to trigger it and the cursor is made visible when starting
a new chapter or entering a room (so between the two animations).
So explicitly hide it at the start of this specific animation (and it gets
shown again when we enter room 102 at the end of the animation).
2016-04-12 22:19:43 +01:00
Thierry Crozat
e3cb949b95 DRASCULA: Fix wrong background for inventory in chapter 6
This was a regression from commit fa3d3e3 and this fixes part of
bug #7113 DRASCULA: Serious sprite glitches.

The original uses extraSurface to draw text in draw_abc() in the
Spanish version while other languages use tableSurface. But in
ScummVM this was changed to use tableSurface for all languages.
However this caused an issue in chapter 6 when displaying the
inventory has it is also using tableSurface, as it was for all languages
in the original. While using the same surface works for other
languages, in the Spanish version we get the wrong background in
the inventory.

Rather than revert to using extraSurface for drawing text which is
a big change and impact all the chapters, I have opted to simply
swap the usage of the tableSurface and extraSurface in chapter 6
for the Spanish version compared to the original engine. The
changes therefore only impact chapter 6 and only the Spanish
version. I played the chapter in full to check that it indeed works
without causing adverse effects.
2016-04-12 22:19:43 +01:00
Thierry Crozat
cb4c6e547d DRASCULA: Fix regression in subtitle display in Spanish version
This code was committed by mistake in the previous commit.
2016-04-11 19:58:29 +01:00
Thierry Crozat
882299a1b4 DRASCULA: Fix typo in variable name 2016-04-11 09:13:05 +01:00
Thierry Crozat
d4a747705f DRASCULA: Fix random crash when loading pendulum scene savegame
When saving from the pendulum scene the curX and curY values are
negative while the curWidth and curHeight values are unset. This
causes random crashes as we may do an array out of bound access
when enterRoom() is called at the end of the load.
2016-04-11 03:40:17 +01:00
Thierry Crozat
a97f9d0ec6 DRASCULA: Rename variable to clarify its meaning 2016-04-11 01:37:08 +01:00
Thierry Crozat
5716b288ac DRASCULA: Fix color for Drascula at the end of chapter 5
I checked the original and the code in ScummVM and there is no
call to talk_solo in chapter 4, while we indeed need to use the red
color for all calls to talk_solo in chapter 5.
2016-04-11 01:36:59 +01:00
Thierry Crozat
1c0362d22f DRASCULA: Improve loading savegames in Pendulum scene
The previous fix only fixed the incomplete state when loading from
the launcher. Now this is fixed when loading from the game as well.
It also fixes loading a savegame from the first stage of the pendulum
scene (when the protagonist is not visible) to any other scene in
chapter 6. The protagonist was not made visible again when loading
the savegame.
2016-04-11 01:36:54 +01:00
Thierry Crozat
1be77fc766 DRASCULA: Fix loading games in room 102 when still chained
Room 102 has two states. The first one has an animation of a
pendulum while the protagonist is chained to a table beneath it.
The second state is after the protagonist free himself. In the second
state the pendulum has stopped. When saving in the first state,
loading the save game did not properly setup the pendulum
animation causing graphic glitches.

This fixes bug #7113 DRASCULA: Serious sprite glitches
2016-04-10 21:22:07 +01:00
Thierry Crozat
57d782420b DRASCULA: Fix character walking off screen
There was an unhandled case in chapter 2 when the character is at
the exact Y location and close to the X location to where we asked
him to walk. The code started the walk but without properly setting
the curDirection and trackProtagonist variables. This resulted in the
walk never stopping.

I checked what the original source code is doing for this case and
implemented it in the same way: the character does not start walking.

This fixes bug #7112: DRASCULA: protagonist walking off the screen
2016-04-09 15:43:04 +01:00
Thierry Crozat
d256f18952 DRASCULA: Fix text alignment to be faithful to the original
The changes in this commit should provide an identical text
placement to the original. In addition to using the original source
code as reference I have checked that is the case by comparing
with DosBox for the intro of the Spanish and English versions as
well as  for parts of the game with the English version. I added
comments for the obscure parts (such as the original adding a
space at the end of the last line of text when splitting a string
into several lines, thus impacting how that last line is aligned).
2016-04-08 02:04:28 +01:00
Thierry Crozat
a7bafd1c5d DRASCULA: Improve text centering and spacing between lines
This in particular fixes bug #7111: Incorrect position in texts, not as the
original. However this codes centers the text better than what we see in
DosBox, so the result is not identical.

This change is based on the code before the commit 7cf7f4b
"Rewrote the very confusing centerText() function into something that
makes more sense". The changes in that commit do not all make
sense to me so I reverted the line spacing (to add back 2 pixels between
text lines) and part of the logic to center text. The result looks a lot
closer to the original engine in DosBox, but not identical.
2016-04-07 01:36:23 +01:00
Matthew Hoops
aa6ff44440 BACKENDS: Only expose one set of functions for AudioCDManager
Engines should only have to call one set of functions and not decide between the two. In fact, the 'emulation' API was documented to just call the 'real CD' API.
2016-03-13 13:57:19 +01:00
Matthew Hoops
fb6fe1332a BACKENDS: Move to an openCD() without parameters as the public API 2016-03-13 13:52:24 +01:00
Johannes Schickel
0b6befdcc5 ENGINES: Make variable names of AdvancedMetaEngine conform to our guidelines.
_singleid   -> _singleId
_gameids    -> _gameIds
_guioptions -> _guiOptions
2016-03-08 19:01:13 +01:00
Johannes Schickel
c5c1209edd DRASCULA: Let listSaves return list sorted on slot numbers. 2016-02-25 21:39:45 +01:00
Johannes Schickel
7a7c783fec DRASCULA: Only request actual save slots in listSaves. 2016-01-26 16:35:30 +01:00
norbertbajko
bcf2e8204c DRASCULA: comment "talk.cpp"
Explain #5903 DRASCULA-IT bug fix
2015-03-01 17:23:28 +01:00
norbertbajko
0abf6d72b0 DRASCULA: comment "talk.cpp"
Explain #5903 DRASCULA-IT bug fix
2015-03-01 17:16:54 +01:00
norbertbajko
43a0992538 DRASCULA: comment "actors.cpp"
Explain #5903 DRASCULA-IT bug fix
2015-03-01 17:06:20 +01:00
Norbert Bajkó
8778603d34 DRASCULA: fix crash/graphic glitch at castle towers
Fix bug #5903 DRASCULA-IT: Crash/graphic glitch at castle towers
2015-03-01 14:48:34 +01:00
Pino Toscano
e8fd25e22f DRASCULA: use Common::String::format when possible
Use Common::String::format instead of a MAXPATHLEN-sized char[] buffer.
2014-12-22 23:10:31 +01:00
Thierry Crozat
021741eedb DRASCULA: Remove unused static variable
This code was used until commit aaf8b58 that reworked the detection
to support French and German versions.
2014-10-11 14:35:20 +01:00
Strangerke
e3ed8d5ff3 DRASCULA: Reduce some variable scope in Animation 2014-06-16 07:19:45 +02:00
Filippos Karapetis
9c4d086165 DRASCULA: Handle audio files in the "audio" folder (bug #6631)
The music add-on packs we provide have the audio files in an "audio"
folder, but without clear indication that its contents should be
copied inside the game data folder. Since this can lead to confusion
from users, we just add support for this case
2014-06-15 03:54:43 +03:00
Johannes Schickel
ae4ffe01f0 ALL: Rename Debugger::DCmd_Register to Debugger::registerCmd. 2014-05-27 02:04:08 +02:00
Johannes Schickel
daa8d57a86 ALL: Rename Debugger::DebugPrintf to Debugger::debugPrintf. 2014-05-27 02:04:07 +02:00
Johannes Schickel
cf91cebb9d DRASCULA: Make GPL headers consistent in themselves. 2014-02-18 02:39:34 +01:00
D G Turner
7432a33137 DRASCULA: Hookup up debug console correctly.
This now opens correctly on CTRL-d keystroke.
2013-12-06 22:55:03 +00:00
D G Turner
ef85456859 BUILD: Remove need for engine.mk in each engine directory.
Each engine now only has to provide a single configure.engine file
adding the engine into the configure script, which then produces the
required other files automatically.
2013-11-24 00:48:01 +00:00
D G Turner
1ac01d2333 BUILD: Remove need for engine-plugin.h in engines.
This is now generated automatically by the configure script from the
engine directory names.
2013-11-24 00:48:01 +00:00
D G Turner
00c27a28f9 BUILD: Split engines/plugins_table header down to a file per engine.
This is the third and final commit enabling fully pluggable engines.

Now providing an engine folder contains a configure.engine, engine.mk
and engine-plugin.h file, it will be picked up automatically by the
configure script.
2013-11-24 00:48:01 +00:00
D G Turner
d77cf95a18 BUILD: Split engines.mk down to a single file per engine.
This is the second part of allowing engines to be added dynamically.
Each folder in engines/ which must contain a file named "engine.mk"
containing the make definitions for that engine.
2013-11-24 00:48:01 +00:00
D G Turner
aa947c9474 BUILD: Split configure.engines down to a single file per engine.
This is the first part of allowing engines to be added dynamically.
They are placed into a folder in engines/ which must contain a file
named "configure.engine" to add the engine, which is pulled into the
top level configure script automatically.
2013-11-24 00:45:38 +00:00
Eugene Sandulenko
fe67837077 DRASCULA: More variables initialized. CID 1003403 2013-11-09 12:51:39 +02:00
Eugene Sandulenko
36ad6a69ca DRASCULA: More uninit variables. CID 1003403 2013-10-29 09:42:11 +02:00
Eugene Sandulenko
6ff57db90f DRASCULA: Initialize class variables. CID 1003403 2013-10-18 16:01:10 +03:00
Willem Jan Palenstijn
ee9e6b94ae DRASCULA: Fix build 2013-10-17 13:40:26 +02:00