Torbjörn Andersson
8ed56e1834
Keep the Broken Sword cutscene players from using up all available CPU.
...
Probably a regression from the recent video decoder rewrite, but I haven't
checked if it also present in other engines.
svn-id: r49153
2010-05-23 10:50:14 +00:00
Matthew Hoops
11cbdd0318
Committing the rest of the VideoDecoder Rewrite from patch #2963496 .
...
svn-id: r49079
2010-05-18 14:17:24 +00:00
Matthew Hoops
c7fa1074fb
Change VideoDecoder::getCurFrame() to mean the last frame drawn instead of the next frame to draw. This is patch 1 from patch #2963496 (VideoDecoder Rewrite).
...
svn-id: r49063
2010-05-17 21:59:05 +00:00
Torbjörn Andersson
83a25d2e37
Fixed a regression that caused some speech in cutscenes to not be played.
...
svn-id: r49037
2010-05-15 08:54:58 +00:00
Torbjörn Andersson
2da9fa5a6e
Rewrote playMovieSound() to keep it from hogging memory in the resource
...
manager. Perhaps this will finally fix the mysterious bug #2976008 ("BS2: Game
lockup in British Museum").
svn-id: r49036
2010-05-15 08:38:19 +00:00
Torbjörn Andersson
e4a4df960a
Make sure that all the parameters to an mcode command are initialised. This
...
fixes one Valgrind warning mentioned in bug #2976008 ("BS2: Game lockup in
British Museum"), though I don't have high hopes that they are related.
svn-id: r48961
2010-05-06 19:00:39 +00:00
Max Horn
b3e404109c
Move initGraphics and initCommonGFX from to new header.
...
These functions are only used internally be Engine subclasses, and
by moving them to a separate header we can reduce indirect header
dependencies.
svn-id: r48934
2010-05-04 11:58:12 +00:00
Max Horn
5568a8473b
Get rid of Engine::_gameDataDir.
...
This greatly reduces indirect dependencies on several header files
from common.
svn-id: r48933
2010-05-04 11:56:52 +00:00
Max Horn
6d80424908
Fix warnings when FLAC&MP3&VORBIS is disabled; also fixes leak in Tinsel
...
svn-id: r48696
2010-04-17 23:57:50 +00:00
Torbjörn Andersson
499e58caf0
This should fix the scaler Valgrind warning reported in (but probably not the
...
cause of) bug #2976008 ("BS2: Game lockup in British Museum").
svn-id: r48692
2010-04-17 17:23:30 +00:00
Max Horn
a1840bd573
AUDIO: Rename Mixer::playInputStream to playStream
...
svn-id: r48637
2010-04-12 09:14:17 +00:00
Torbjörn Andersson
d38f71c1e4
Added an "fxq" debugger command to print the FX queue. I guess it might help in
...
debugging the "No free slot in FX queue!" bug I've heard of but never actually
seen. (See for instance bug #2976008 , "BS2: Game lockup in British Museum".)
svn-id: r48458
2010-04-01 16:11:29 +00:00
Max Horn
cac0ac66e2
COMMON: Get rid of Common::StringList
...
svn-id: r48287
2010-03-18 15:54:40 +00:00
Max Horn
d78dba3bca
COMMON: Move Common::RandomSource to common/random.*
...
svn-id: r48279
2010-03-18 15:07:11 +00:00
Yotam Barnoy
ef330ed9b4
Patch for bug 2943361 by littleboy, adding full kb modifier support to all engines + GUI and proper keypad handling
...
svn-id: r48101
2010-02-21 04:04:13 +00:00
Johannes Schickel
8ae24a27b3
Yet more Flac -> FLAC changes for consistency.
...
svn-id: r47847
2010-02-03 09:42:40 +00:00
Johannes Schickel
fe35d372da
- Rename FlacStream to FLACStream.
...
- Rename makeFlacStream to makeFLACStream.
svn-id: r47846
2010-02-03 09:42:11 +00:00
Max Horn
1c906a1f08
Hide VagStream implementation, only expose it via a factory method
...
svn-id: r47634
2010-01-28 09:38:21 +00:00
Max Horn
1565f14bc1
Moved audio stream implementations (for MP3, FLAC, etc.) to new dir sound/decoders/
...
svn-id: r47579
2010-01-26 22:48:45 +00:00
Torbjörn Andersson
1928a7ba38
Silenced some cppcheck warnings.
...
svn-id: r47427
2010-01-21 23:05:33 +00:00
Max Horn
7ec2da968c
Switch most AudioStream factories to use DisposeAfterUse::Flag
...
svn-id: r47334
2010-01-16 21:36:08 +00:00
Max Horn
a44c6e4323
Add Mixer::getElapsedTime() method returning a Timestamp, thus offering a higher precision than Mixer::getSoundElapsedTime(). Convert some video code to use it.
...
svn-id: r47213
2010-01-09 22:37:10 +00:00
Max Horn
f720d99b0a
Switch Mixer::playInputStream to use DisposeAfterUse::Flag
...
svn-id: r47182
2010-01-08 22:09:43 +00:00
Max Horn
0cf53b025d
Move DisposeAfterUse::Flag from Common to global namespace, and into a new header common/types.h
...
svn-id: r47180
2010-01-08 22:07:35 +00:00
Johannes Schickel
616e4626f5
Since AudioStream looping is no longer handled by the Mixer, drop Mixer::playAudioStreamLooping. (There's Audio::makeLoopingAudioStream).
...
svn-id: r47160
2010-01-08 16:27:29 +00:00
Johannes Schickel
b47725540f
Cleanup.
...
svn-id: r47133
2010-01-07 17:04:32 +00:00
Johannes Schickel
a597e5fef9
Make VagStream a RewindableAudioStream.
...
svn-id: r47132
2010-01-07 17:04:01 +00:00
Johannes Schickel
d5fe29c3c9
Make makeWAVStream return a RewindableAudioStream.
...
svn-id: r47129
2010-01-07 16:34:56 +00:00
Johannes Schickel
84f3034406
- Move openStreamFile from AudioStream to SeekableAudioStream.
...
- Fix documentation of openStreamFile.
svn-id: r47080
2010-01-06 15:23:33 +00:00
Max Horn
df81b68967
Change BS 1 & 2 to I & II (see discussion on -devel)
...
svn-id: r46951
2010-01-03 21:20:05 +00:00
Max Horn
d083e02215
Rename Common::Stream::readLine_NEW to readLine
...
svn-id: r46779
2009-12-30 23:00:55 +00:00
Torbjörn Andersson
6d52bce14f
Corrected an old comment.
...
svn-id: r46768
2009-12-30 19:06:34 +00:00
Torbjörn Andersson
8ec098d016
Fixed some simple cppcheck warnings.
...
svn-id: r46303
2009-12-09 06:33:00 +00:00
Max Horn
df651bf20f
Added Doxygen comments for the various engine namespaces (currently mostly without details; help filling these out is welcome)
...
svn-id: r46128
2009-11-24 22:10:14 +00:00
Max Horn
51933629d1
Changed foo(void) to foo() in almost all non-backend source files
...
svn-id: r45616
2009-11-02 21:54:57 +00:00
Max Horn
6d9cb7ab14
SWORD2: Turned static vars in Logic::fnISpeak into member vars of class Logic
...
svn-id: r45284
2009-10-20 19:51:32 +00:00
Max Horn
c5c12130f5
SWORD2: Resolve FIXME about weird static var 'k' in Router::smoothCheck
...
svn-id: r45282
2009-10-20 19:12:31 +00:00
Max Horn
774eefe688
SWORD2: Resolve FIXME about static var 'left' in Router::slidyWalkAnimator
...
svn-id: r45281
2009-10-20 19:12:08 +00:00
Max Horn
2bbf708dea
Introduced new type Common::DisposeAfterUse::Flag
...
svn-id: r45233
2009-10-18 19:41:59 +00:00
Filippos Karapetis
422b732dba
Added a new convenience method to the video player, which adds the event of skipping videos with the escape key by default, thereby simplifying the video playing code in all places where it's used
...
svn-id: r45151
2009-10-16 07:42:23 +00:00
Max Horn
3dc7c0a732
SWORD2: Switch from loadWAVFromStream to makeWAVStream.
...
This also fixes a memory leak (the MemoryReadStream wasn't being freed).
svn-id: r45099
2009-10-14 23:28:23 +00:00
Willem Jan Palenstijn
5a8b81119b
Fix free/delete/delete[] mismatches. Patch by salty-horse
...
svn-id: r44512
2009-10-01 11:02:23 +00:00
Max Horn
8ba75fc522
Fix code formatting (esp. 'if(' -> 'if (' etc., but also indention and other things)
...
svn-id: r44495
2009-09-30 16:16:53 +00:00
Filippos Karapetis
b4f1960318
Reverted parts of revisions #44298 , #44299 and #44300 , to prevent warnings and issues in compilers which don't support NORETURN
...
svn-id: r44314
2009-09-24 17:52:53 +00:00
Filippos Karapetis
6b79910bcb
Fixed some more warnings about unreachable code
...
svn-id: r44300
2009-09-24 10:15:50 +00:00
Johannes Schickel
c50940bbf4
Got rid of Common::File::addDefaultDirectory, instead implemented the solution proposed in "Case agnostic handling for directories (and files)" on -devel.
...
svn-id: r44266
2009-09-23 00:15:00 +00:00
Joost Peters
e1ad748f0d
SWORD2: Don't show a pop-up if the 'eye' movie is missing - it was omitted in later re-releases.
...
svn-id: r44187
2009-09-18 16:39:14 +00:00
Max Horn
8e28469f1f
Coding best practice: Always use enums instead of #defines to define integer constants (for many good reasons)
...
svn-id: r43881
2009-09-01 13:02:47 +00:00
Joost Peters
2e72ed0f69
remove double semi-colon -- hopefully this kicks the buildbot back into action =)
...
svn-id: r43388
2009-08-14 23:20:46 +00:00
Max Horn
e9cd07e582
SWORD1 & SWORD2: Replaced ioFailed by err+eos
...
svn-id: r42912
2009-07-29 21:39:34 +00:00
Torbjörn Andersson
7a6329a29b
Broken Sword 2, unsurprisingly, had the same subtitle drawing glitch for small
...
cutscenes that Broken Sword 1 had. And a memory leak. This should fix both.
svn-id: r42861
2009-07-28 17:53:59 +00:00
Johannes Schickel
7e71865e91
Move the event recorder to its own class (EventRecoder inside common/EventRecorder.[h/cpp]).
...
svn-id: r42751
2009-07-25 12:59:46 +00:00
Max Horn
a6b57dc3a9
- Added GCC_PRINTF attribute to several funcs where it makes sense
...
- change some constants from double to float, to avoid "loss of precision due to implicit conversion" warnings
- removed duplicate prototypes for some funcs
- fixed some "increases required alignment of target type" warnings
svn-id: r42009
2009-07-01 20:51:04 +00:00
Eugene Sandulenko
eb909702af
Add GUI options support to Sky, Queen and Sword1&2 engines (which do not use AD)
...
svn-id: r41274
2009-06-06 17:57:39 +00:00
Torbjörn Andersson
0999534749
The error() and warning() functions add ! and newline automatically. (I didn't
...
look at debug() and debugC(), since I'm really bored with this now. :-)
svn-id: r41061
2009-05-31 10:02:16 +00:00
Max Horn
fb79b18571
Changed SaveFileManager methods to take Common::String params (instead of char pointers)
...
svn-id: r41000
2009-05-29 14:38:22 +00:00
Fabio Battaglia
c0d13da750
sword2: base psx demo detection on screens.clu, and let the user decide between full and demo version at the time of adding the game
...
svn-id: r40937
2009-05-27 09:52:32 +00:00
Johannes Schickel
b3c6751b9b
Strip trailing whitespaces in the whole code base.
...
svn-id: r40867
2009-05-24 15:17:42 +00:00
Filippos Karapetis
b7f8990ba8
Renamed the DXA, SMK and FLIC video decoders to reflect the fact that they're decoders, not players
...
svn-id: r40759
2009-05-21 13:02:56 +00:00
Filippos Karapetis
6ec870303f
- Reverted commit #40730 , as it introduced rounding errors
...
- Properly fixed the FLIC player
- The sound chunk tag of DXA files is now read by the DXADecoder's loadFile() method
svn-id: r40736
2009-05-20 10:43:18 +00:00
Torbjörn Andersson
caf9bf0941
Removed the rest of the hard-coded cutscene information. It was only needed to
...
get the number of frames of a cutscene (to find the "lead out frame"), but this
information is already provided by both the DXA and the SMK players. (It wasn't
provided by the now obsolete MPEG player.)
svn-id: r40735
2009-05-20 04:29:09 +00:00
Torbjörn Andersson
358b1a7c7e
Removed the "seamless" flag. It was something I added to cope with the fade
...
in/out behaviour of the MPEG cutscene player, and no longer seems to be needed.
svn-id: r40734
2009-05-20 04:07:34 +00:00
Filippos Karapetis
e358b13ef9
Changed calculations based on frame delay to be based on the scale of 1ms, not 1/100. This fixes the FLIC player and also makes the overall code a bit clearer and easier to understand
...
svn-id: r40730
2009-05-19 19:56:53 +00:00
Max Horn
65b5d31814
COMMON: Removed Stream::ioFailed() and clearIOFailed(), as they are deprecated; however, retained ioFailed in SeekableReadStream and File for now (so for now this mainly affects WriteStream subclasses)
...
svn-id: r40725
2009-05-19 11:42:14 +00:00
Johannes Schickel
f0182121f7
Fix some variable may be used uninitialized warnings.
...
svn-id: r40528
2009-05-13 18:12:17 +00:00
Eugene Sandulenko
af4d23f762
Const correctness
...
svn-id: r40346
2009-05-06 09:12:24 +00:00
Fabio Battaglia
0b2e06e4a4
sword2: add support for BS2 PSX demo
...
svn-id: r39977
2009-04-18 08:37:22 +00:00
Fabio Battaglia
dc9c538a62
Sword2: PSX version support, and GMM loading/saving
...
svn-id: r39896
2009-04-07 19:52:46 +00:00
Fabio Battaglia
1f299bb24a
sword2: added detection for Broken Sword 2 PSX, and a check to say wether pc or psx version is run
...
svn-id: r39417
2009-03-15 11:36:16 +00:00
Max Horn
e080a59337
Renamed SMKPlayer -> SmackerDecoder and DXAPlayer -> DXADecoder, as well as some other tweaks
...
svn-id: r39255
2009-03-09 03:45:23 +00:00
Torbjörn Andersson
c73740f2c0
Added comment about a possible FIXME.
...
svn-id: r39207
2009-03-07 21:38:34 +00:00
Max Horn
f9ecd95d69
Whitespace cleanup: Convert space followed by tab to just tab
...
svn-id: r39203
2009-03-07 19:24:31 +00:00
Torbjörn Andersson
041af01f7d
Don't show a warning dialog for missing cutscenes in the demo. As noted in bug
...
#2669360 , the demo tries to play cutscenes which really aren't there.
svn-id: r39194
2009-03-07 17:27:18 +00:00
Torbjörn Andersson
c252147a40
Don't crash if a cutscene is missing. (Like they are in the demo, for instance.)
...
svn-id: r39186
2009-03-07 15:29:52 +00:00
Jordi Vilalta Prat
047f116515
Renamed MetaEngine::getCopyright() to getOriginalCopyright() to better match the meaning of the returned string, as discussed some time ago in scummvm-devel
...
svn-id: r39132
2009-03-05 12:04:58 +00:00
Max Horn
dd98126423
Engines: Fused several init&go methods into a single run method
...
svn-id: r39003
2009-03-01 04:42:46 +00:00
Max Horn
3fcbda829a
Merged Engine::go() and ::init() into a new run() method (currently implemented by calling the existing init&go methods; to be cleaned up by engine authors
...
svn-id: r39002
2009-03-01 04:30:55 +00:00
Torbjörn Andersson
6e2848ff98
Rewrote the cutscene player to be more like the one in Broken Sword 1. This fixes
...
a subtitle colour regression, but mainly it simplifies the code. The "dummy"
player has been removed. There are almost certainly regressions, but I'm hoping
it's stable enough for testing now.
svn-id: r38697
2009-02-21 15:07:05 +00:00
Torbjörn Andersson
ab4f1d69ad
Since opening a compressed piece of music should no longer be an expensive
...
operation, we can probably keep the mutex locked throughout the entire
streamCompMusic() function. I'm not convinced that it was ever safe to unlock
and relock it partway through. In fact, that's my prime suspect for bug #2614306
("BS2: noise in music or speech").
svn-id: r38638
2009-02-20 22:47:05 +00:00
Torbjörn Andersson
478257f624
Instead of reading an entire compressed sound into a memory stream, use a
...
slightly extended SeekableSubReadStream to stream the sound from a file instead.
This change is experimental, so it should almost certainly not go into 0.13.
svn-id: r38637
2009-02-20 22:43:13 +00:00
Filippos Karapetis
781d7da6b1
Applied my patch for the BS1/2 video player
...
- Support for the MPEG2 videos in BS1/2 has been dropped. The MPEG2 videos were lossy, and support for them complicated the code a lot.
- Support for the non-existing enhanced MPEG cutscene packs for BS1 has been dropped. As a consequence, the credits player and the splitted audio stream players used for these packs has been removed
- The original Smacker videos for both games are now supported, using our Smacker player (which is based off publically available specs and FFMPEG)
- The animations now use the common video player code. Both the Smacker videos and our DXA video packs are supported
svn-id: r38236
2009-02-15 13:29:48 +00:00
Travis Howell
9f2d6d82ca
Make the subtitle settings in Options section of the global main menu optional, and enable only for game engines where subtitles settings are synced.
...
svn-id: r36237
2009-02-07 06:47:19 +00:00
Torbjörn Andersson
7cab911532
Disable the "press c for credits" hotkey (which wasn't in the original anyway)
...
because of strange rumors about the credits running spontaneously every few
minutes. I don't know if this is a temporary or permanent measure.
svn-id: r36155
2009-01-31 07:57:41 +00:00
Max Horn
abc06ca18e
Moved Graphics::PixelFormat into its own header file; turned RGBToColor etc. into methods, and added an operator==
...
svn-id: r35993
2009-01-22 04:35:10 +00:00
Eugene Sandulenko
696897b058
Whoa! Removing trailing spaces.
...
svn-id: r35648
2009-01-01 15:06:43 +00:00
Torbjörn Andersson
a0250fe0b1
Replaced the old stack macros with ScummVM's FixedStack class.
...
svn-id: r35603
2008-12-29 11:55:09 +00:00
Eugene Sandulenko
829cbc4110
Move all video players to separate directory
...
svn-id: r35470
2008-12-21 21:08:17 +00:00
Travis Howell
9c20a533bb
Enable Smacker support, and switch later HE games to Smacker support (since they aren't supported yet).
...
svn-id: r35368
2008-12-14 23:41:48 +00:00
Torbjörn Andersson
1edc1789b1
Changed readLine_OLD() to readLine_NEW(). I guess both this and the previous
...
readLine() change could be more robust, but at least it should be no worse than
it was before.
svn-id: r35226
2008-12-03 21:52:51 +00:00
Torbjörn Andersson
a871e01151
Converted the credits scroller to use readLine_NEW() instead of readLine_OLD().
...
svn-id: r35224
2008-12-03 21:30:41 +00:00
Johannes Schickel
5a0556f09c
Committed my patch #2123680 "SDL: Backend transaction / rollback support".
...
svn-id: r35062
2008-11-14 22:08:10 +00:00
Torbjörn Andersson
926193c9c3
Only hide the cursor for in-game pausing. Pausing from the outside is assumed to
...
bring up the GUI, which has its own cursor. (This fixes the cursor disappearing
when pausing on one of the engine's own dialog windows.)
svn-id: r34977
2008-11-09 20:35:06 +00:00
Filippos Karapetis
7d8e4ca59b
Added a getMaximumSaveSlot() implementation for sword1 and sword2
...
svn-id: r34969
2008-11-09 19:30:09 +00:00
Torbjörn Andersson
b7991b6ad8
Removed some code that was added earlier to deal with dimming/undimming the
...
palette when pausing the game in a mid-fade. The game can only be paused in
mid-fade from the outside, and then the palette isn't dimmed/undimmed.
svn-id: r34958
2008-11-09 14:35:45 +00:00
Torbjörn Andersson
d896c892e5
Allow pausing (from the outside) during credits and palette fades. Refactored the
...
code to distinguish outside pausing from in-game pausing, to avoid cursor-related
problems. The screen is now only dimmed during in-game pausing.
svn-id: r34957
2008-11-09 14:32:24 +00:00
Torbjörn Andersson
2e9e68fc8e
Fixed pausing during credits.
...
svn-id: r34956
2008-11-09 13:50:41 +00:00
Torbjörn Andersson
db3438f2c9
Allow pausing during cutscene movies. (This will need an update to the mixer's
...
getSoundElapsedTime() function to work better.)
svn-id: r34954
2008-11-09 13:20:43 +00:00
Torbjörn Andersson
18414f0a0a
Moved sound-related settings to syncSoundSettings() for the global options dialog.
...
svn-id: r34947
2008-11-09 11:52:52 +00:00
Max Horn
40136f2590
Switched various Engine APIs to use Common::Error
...
svn-id: r34916
2008-11-06 17:05:54 +00:00
Max Horn
edf9f24926
Got rid of OSystem::colorToRGB and RGBToColor; added implementations for OSystem::getOverlayFormat to several ports (pending testing by the porters)
...
svn-id: r34912
2008-11-06 15:02:50 +00:00