Commit graph

119 commits

Author SHA1 Message Date
Thierry Crozat
75f8cfac56 DREAMWEB: Use more accurate vsync timing
The vsync delay is 14 ms (1000 / 70), and using a loop with
a sleep of 10ms until we had passed that delay meant we were
actually waiting anytime between 14 and 23 milliseconds, which
made the game slower than it should be. This was partially
corrected by using a delay of 11 ms (800 / 70), but this was
still inacurate and too slow in average.

In addition, since the change in commit 87c8b60, it was ignoring
the time spent in the game loop, which on slow devices is not
negligeable, and this has been fixed as well.

Finally also change the fast speed from 20 to 4. In commit
87c8b60 the delay was changed from macroseconds to milliseconds,
and any speed above 14 would then result in a delay of 0 due to
the integer division. We have the turbo mode for that, so it
seems to make sense to make the fast mode a bit slower rather
than having two modes that do the same thing.
2020-05-03 00:13:33 +01:00
Paul Gilbert
a00e44ba6c ENGINES: Merge saveGameState virtual methods into a single one 2020-02-16 15:44:28 -08:00
Paul Gilbert
f21ffdca33 DREAMWEB: Refactor to use Engine debugger 2020-02-16 13:07:19 +02:00
Bastien Bouclet
606ad04533 DREAMWEB: Add override keywords 2020-02-09 12:43:15 +01:00
Eugene Sandulenko
8c26862614 DREAMWEB: Added override keywords 2020-02-05 15:15:32 +01:00
Paul Gilbert
5b80320525 ENGINES: Adding override keyword to hasFeature methods 2020-02-04 20:04:11 -08:00
Eugene Sandulenko
93dfd3922e DREAMWEB: Added support for Russian fan-translation 2020-01-29 00:50:41 +01:00
Filippos Karapetis
b6db761e3e DREAMWEB: Remove unused code 2020-01-24 01:42:25 +02:00
Filippos Karapetis
87c8b60ee1 DREAMWEB: Change the vsync code to use a delay, instead of an interrupt
This adjusts the screen update code to check for events more often,
which will help with the game's responsiveness on some platforms
2020-01-23 00:36:14 +02:00
sluicebox
b8390fa161 GRAPHICS: Add interface for horizontal shake 2019-11-19 00:20:40 +01:00
Filippos Karapetis
f524745774 DREAMWEB: Simplify the character kerning checks 2018-07-09 00:41:04 +03:00
Filippos Karapetis
fc5261b0c4 DREAMWEB: Fix speech during the monk cutscene in non-English versions
Fixes bugs #6288 and #6417
2018-07-09 00:41:04 +03:00
Colin Snover
a6659ba9d5 DREAMWEB: Use accurate memory reclamation for Ex transfers
When the Ex memory regions are close to full, it is possible for
the game to fail to purge objects and then crash with an OOM error
even if it isn't actually out of memory. This patch calculates the
amount of free memory truly needed when allocating to Ex memory to
allow exactly the entire frame & text regions to be used, instead
previously where a hard-coded amount of free space to maintain was
used, which guaranteed that the entire memory region could not
actually be used by the game.

This change may be masking some underlying memory leak, or it may
just be that near the end of the game the game naturally comes
close to reaching the maximum memory region size. For the moment,
I am assuming the latter.

This commit also adds some assertion checks to the memory transfer
functions to make sure the regions don't quietly overflow in other
cases, since pickupConts performs transfers in a manner that
doesn't ensure enough free memory exists for them to be successful.

Fixes Trac#6820.
2017-11-12 23:15:05 -06: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
Ori Avtalion
3564032330 JANITORIAL: Reduce audio header dependencies 2016-04-14 16:10:21 +03:00
Strangerke
137f625548 DREAMWEB: Some British to American english 2014-02-19 21:45:22 +01:00
Johannes Schickel
aaff7b1736 DREAMWEB: Make GPL headers consistent in themselves. 2014-02-18 02:39:34 +01:00
D G Turner
260ee4f390 DREAMWEB: Add missing getDebugger() for engine API. 2013-12-06 23:43:08 +00:00
Strangerke
06f9a5265a DREAMWEB: Remove dead function enableSavingOrLoading() (which fixes CID 1003402) 2013-11-09 23:54:09 +01:00
Thierry Crozat
88c216e086 DREAMWEB: Make some static arrays const 2013-02-26 22:42:14 +00:00
Thierry Crozat
4530dd23a5 DREAMWEB: Add localised commands in the network terminal
The original interpreter only used english commands in the terminal
even when playing one of the localised version (and even though
everything else in the terminal was localised). This adds the possibility
to either use the English commands or the localised ones.
Localized commands have been added for French, German (thanks to
SimSaw, who also proposed that idea) and Italian (thanks to Maff).
2013-02-26 22:17:42 +00:00
D G Turner
396f45f551 DREAMWEB: Fix usage of defines, rather than values for screen size. 2012-11-30 08:49:23 +00:00
D G Turner
bf876a13c6 DREAMWEB: Remove dead code functions and minor formatting cleanup. 2012-11-30 04:35:54 +00:00
D G Turner
a6f2703ec2 DREAMWEB: Further cleanup to keyboard input buffer code.
Removed the buffer from being a global non-const variable. Also, the
code changes should allow the buffer size to be increased by just
changing the size of _keyBuffer if needed.
2012-11-29 03:00:17 +00:00
D G Turner
bcee44793f DREAMWEB: Simplify _lastHardKey usage and migrate to Common::KeyCode.
This improves readability and should help with dealing with changes
to fix bug #3590814 ("DREAMWEB: M key does not work in Network").
2012-11-29 01:39:08 +00:00
Filippos Karapetis
42b8f3db4d DREAMWEB: Add an extra line showing the available terminal commands
This is possible, since the game is freeware now. It is very
helpful when playing the game in order to avoid referring to the
manual. The extra help text is shown when the player uses the
'help' command inside the game terminal.

Also, the list of games where copy protection is skipped has been
reordered alphabetically in the README
2012-11-15 14:30:42 +02:00
Torbjörn Andersson
bf27ff1438 DREAMWEB: Increase _operand1 buffer size
Theoretically, it should be almost as big as _inputLine, so let's
make them the exact same size just for simplicity. This fixes crashes
for me when trying to use very long parameters to the monitor's READ
command, and could possibly fix a bug reported in the German version
where you supposedly have to read "kurzmitteilung".
2012-09-14 20:22:12 +02:00
Ori Avtalion
f9d2871eb4 JANITORIAL: Remove extra semicolons 2012-07-03 18:28:14 +03:00
D G Turner
628cfa3d47 DREAMWEB: Objectify Sound functions & data into DreamWebSound class.
This change should have no functional change, but makes the sound code
more decoupled, modular and readable, prior to attempting a fix for
bug #3528164 - "DREAMWEB: missing sound effects/music cues during main
title".
2012-05-31 05:16:10 +01:00
D G Turner
ae31469a9a DREAMWEB: Replaced vsync() function with waitForVSync().
As a call to waitForVSync() was the only contents of vsync(), there
should be no functional change.
2012-05-30 04:23:34 +01:00
D G Turner
0cff5c547c DREAMWEB: Add _speechDirName to remove duplication of Directory name. 2012-05-08 16:48:01 +01:00
Thierry Crozat
a4aaca5919 DREAMWEB: Minor style fixes 2012-04-16 21:26:55 +01:00
Thierry Crozat
a3406aab13 DREAMWEB: Support opening data files from ES and FR CD version 2012-04-15 11:45:14 +01:00
Filippos Karapetis
d41d7e5f36 DREAMWEB: Clean up the palette brightness code 2012-03-04 01:11:50 +02:00
D G Turner
a397748ace DREAMWEB: Migrate loadTextFile() to using datafile prefix variable. 2012-02-24 15:04:15 +00:00
D G Turner
bca22d4bee DREAMWEB: Migrate loadGraphicsFile() to using datafile prefix variable. 2012-02-24 15:04:13 +00:00
D G Turner
e3c5f9180c DREAMWEB: Migrate loadSounds() to using datafile prefix variable. 2012-02-24 15:04:12 +00:00
D G Turner
31bf535a83 DREAMWEB: Migrate loadTempText() to using datafile prefix variable. 2012-02-24 15:04:10 +00:00
D G Turner
542014c309 DREAMWEB: Add datafile name prefix to engine and modify showPCX() to it.
This new variable removes the need for duplicates strings of the form
"DREAMWEB.*" spread throughout the dreamweb engine, replacing them with
a common const string on the engine holding the datafile name prefix.

This will reduce binary size and it should also simplify adding support
for foreign language variants, where the datafile name prefix is
changed.

To demostrate usage and prove this, showPCX() is migrated to using this.
2012-02-24 15:04:09 +00:00
Eugene Sandulenko
54c87f20e3 Merge pull request #189 from fingolfin/cleanup
ALL: Cleanup
2012-02-23 23:55:45 -08:00
Alyssa Milburn
6e70f77289 DREAMWEB: Dynamically allocate GraphicsFile::_frames.
This avoids extra memory usage due to the previous commit.
2012-02-23 22:37:21 +01:00
Alyssa Milburn
256d160679 DREAMWEB: Remove shared temp graphics variables.
Instead, have a different variable for each use.
2012-02-23 22:34:22 +01:00
Max Horn
37216ab381 DREAMWEB: Avoid including advancedDetector.h from dreamweb.h 2012-02-22 18:25:37 +01:00
Willem Jan Palenstijn
3fc8b7227b DREAMWEB: Fix missing subtitle lines in speech+subtitle mode
This is done by adding a (very ugly) way to force the previous timed-temp
line off screen, so the next one can be shown.
2012-02-12 23:57:09 +01:00
D G Turner
0d6b4df014 DREAMWEB: Remove uneeded duplicate function "printUnderMon". 2012-02-08 17:18:35 +00:00
Torbjörn Andersson
0a5df02134 DREAMWEB: Extend the number of saveslots from 7 to 21 in the original
save/load dialogs.
2012-01-08 19:36:59 +01:00
Willem Jan Palenstijn
d09be37c69 DREAMWEB: Minor clean up 2011-12-29 14:39:53 +01:00
D G Turner
311e1c495c DREAMWEB: Minor clean up and removal of goto usage in dreamweb(). 2011-12-28 23:37:16 +00:00
Max Horn
dc4af2afc2 DREAMWEB: Added commandOnlyCond() method 2011-12-28 23:06:49 +01:00
Max Horn
bfd891d571 DREAMWEB: Mark some member vars as only being used in keypad.cpp; cleanup 2011-12-28 23:06:49 +01:00