Commit Graph

90 Commits

Author SHA1 Message Date
Max Horn
cb49cbdd45 * Reimplemented Mixer::pauseAll to simply invoke pause on all channels
(implying change of semantics)
* Reordered the params of Mixer::playRaw (the SoundType now comes first, not last)
* Removed Mixer::isPaused
* Removed Mixer::getSoundElapsedTimeOfSoundID
* Added some doxygen comments to the Mixer

svn-id: r25356
2007-02-03 19:05:53 +00:00
Torbjörn Andersson
0080ae687a Stop movie lead-in/out when restarting the game (as I already claimed in a
comment that I was doing) to *really* fix bug #1645480. This time for sure...

svn-id: r25231
2007-01-27 22:10:50 +00:00
Torbjörn Andersson
d2910fe758 Added separate function for playing cutscene lead-in/out sounds, and made sure
that these are stopped whenever the engine is going to do a mass killing of
game resources, e.g. when restoring or restarting the game. Should fix bug
#1645480. (This was a regression added during the rewrite to support DXA.)

svn-id: r25204
2007-01-26 18:21:41 +00:00
Eugene Sandulenko
cd8a5f3a98 First phase of detection-related plugins interface improvements. Now plugins
return StringMap instead of fixed list of parameters. This adds great
flexibility.

Current patch should not alter any functionality, i.e. if there are regressions,
submit a report. Phase 2 will benefit from these changes and will come later.

svn-id: r25134
2007-01-20 21:27:57 +00:00
Torbjörn Andersson
85b780baf1 Use FRAMES_PER_SECOND, not getFramesPerSecond(), to calculate the number of
frames before a sound effect is triggered. This is not dependent on _gameSpeed.

svn-id: r24971
2007-01-03 07:56:24 +00:00
Torbjörn Andersson
6496482de5 Added experimental "fast mode" for Broken Sword 2. (Use Ctrl-f to toggle.)
svn-id: r24970
2007-01-03 07:36:44 +00:00
Torbjörn Andersson
4c46f4a878 The MPEG player no longer handles frame syncing/dropping, so this comment is
obsolete now.

svn-id: r24872
2006-12-18 07:55:31 +00:00
Torbjörn Andersson
51a964d056 Applied patch #1597800 to better support the Spanish end credits.
svn-id: r24727
2006-11-16 21:20:24 +00:00
Max Horn
8d37c135c0 Since we now generate warnings/messages for engine instantiation failures in a central place, get rid of such messages printed by engines
svn-id: r24686
2006-11-12 03:26:44 +00:00
Torbjörn Andersson
b1434f2632 Fixed regression caused by recent debug console cleanup. The key stroke that
invoked the debug console would repeat after the console was closed. Another
example why keyboard repeat should be centralized, I guess...

svn-id: r24649
2006-11-07 20:30:39 +00:00
Max Horn
9edf1e6a1a cleanup
svn-id: r24407
2006-10-21 12:44:10 +00:00
Max Horn
b5cbbd705a Added some more const keywords
svn-id: r24330
2006-10-15 02:15:38 +00:00
Torbjörn Andersson
60aee54bfe Fixed bug #1569594 ("BS2 DXA Movie Exit/Crash"). That's what I get for only
testing with subtitles enabled... :-)

svn-id: r24089
2006-10-02 23:07:43 +00:00
Max Horn
4c14cf6d1a Moved base/engine.cpp and .h to engines/ (main motivation: helps untangle the linker dependency graph). Porters will have to update project files
svn-id: r23974
2006-09-23 00:42:35 +00:00
Max Horn
651d22b873 * Added virtual Engine::getDebugger() method
* Removed code from errorString() methods that hooked the debugger(s)
  into error(), in favor of using getDebugger() from within error()
* As a consequence, removed most custom errorString() methods

svn-id: r23894
2006-09-16 19:31:23 +00:00
Max Horn
919092e5fc Overhaul of the debugger code
* Moved Common::Debuggger to GUI::Debugger (mainly to satisfy linker
  restrictions)
* Change the base Debugger class to *not* be a template class anymore;
  instead, a thin (template based) wrapper class is used to hook up
  debugger commands
* Removed duplicate Cmd_Exit and Cmd_Help methods in favor of a single
  version of each in GUI::Debugger
* New Cmd_Help doesn't word wrap after 39/78 chars, but rather queries
  the console to determine when to wrap
* Debugger::preEnter and postEnter aren't pure virtual anymore

svn-id: r23890
2006-09-16 16:58:27 +00:00
Torbjörn Andersson
c51d6bb903 Fixed compilation.
svn-id: r23842
2006-09-09 10:47:32 +00:00
Chris Apers
6ee4d1b317 Fixed crashes on Zodiac and add support for this device
svn-id: r23840
2006-09-09 10:29:14 +00:00
Torbjörn Andersson
8ae050ff08 Renamed graphics/animation.[cpp|h] to graphics/mpeg_player.[cpp|h] to be more
consistent with dxa_player.[cpp|h]. (Though actually, "decoder" might be more
accurate...)

svn-id: r23774
2006-08-27 09:10:24 +00:00
Torbjörn Andersson
cc3b4cdf99 Now that the cutscene handling in both BS1 and BS2 has been extended to play
DXA movies (the MPEG movies still work, of course), there is no longer any need
for the MPEG decoder to handle sound and frame syncing. That is now the
responsibility of the player, not the decoder.

The obvious next step, then, would be to put that in a new player class, and
have both BS1 and BS2 use that. Maybe FF as well.

svn-id: r23757
2006-08-26 12:29:00 +00:00
Torbjörn Andersson
4f9576e033 The DXA player now bases subtitle position on screen size, rather than frame
size. This should help people who want to use the smaller, low-quality
cutscenes instead of the high-quality ones.

The MPEG player probably doesn't know this trick. Maybe later.

svn-id: r23742
2006-08-23 21:13:11 +00:00
Torbjörn Andersson
d4d2146a0a Run the game detector before creating the engine. This is based entirely on a
recent change to the CINE engine (which in turn was based on some other engine,
I forget which), and should fix bug #1544796. Of course, given how primitive
the Broken Sword 2 detector is, it's easy to fool it. There isn't really any
need for it to be smart, though.

svn-id: r23741
2006-08-23 04:26:01 +00:00
Max Horn
4a80db4c7b * Added copyright string to all engine plugins
* Modified about dialog to list all available plugins with their resp. copyright
* Modified about dialog credits to show the GPL last (like movie end credits do with their legal text, too)

svn-id: r23645
2006-07-31 13:41:21 +00:00
Johannes Schickel
e5934c8f21 Using FilesystemNode::name instead of FilesystemNode::displayName in the sword2 detector code too.
svn-id: r23557
2006-07-22 14:39:54 +00:00
Torbjörn Andersson
8242e6966d Cleanup.
svn-id: r23551
2006-07-22 09:05:13 +00:00
Oystein Eftevaag
17f8c7067a Removing redundant paranthesis
svn-id: r23543
2006-07-21 11:04:21 +00:00
Torbjörn Andersson
6c0edab41e Some cleanups and restructuring. The clearScreen() function has been renamed
clearFrame(), and is only responsible for clearing the frame buffer. Frame
syncing and frame drawing are now separate from each other.

svn-id: r23525
2006-07-15 23:44:44 +00:00
Torbjörn Andersson
961e56c636 Fixed regression: Test if there's a text object to close before closing it.
svn-id: r23524
2006-07-15 23:18:11 +00:00
Torbjörn Andersson
c7babbea99 Close the current text object when the movie is ended, to avoid potential
memory leak, and be a bit more robust about handling text objects in the dummy
player.

svn-id: r23523
2006-07-15 22:42:28 +00:00
Torbjörn Andersson
700953cff7 Oops. I just noticed I was using _black to track the white colour, and _white
to track the black colour.

svn-id: r23522
2006-07-15 22:22:39 +00:00
Torbjörn Andersson
68c150df3c This is more consistent with how we usually initialize arrays of structs, and
seems to still keep msvc8 happy.

svn-id: r23521
2006-07-15 22:04:42 +00:00
Johannes Schickel
db58d3477b Should fix shadowing warnings with gcc.
svn-id: r23520
2006-07-15 21:27:29 +00:00
Johannes Schickel
59d0ddf806 Fix building with msvc8.
svn-id: r23518
2006-07-15 21:23:08 +00:00
Torbjörn Andersson
cd020a688e Moved the initial screen clearing from play() to load(), so that it will be
done before the MPEG player calls showOverlay().

svn-id: r23482
2006-07-10 18:57:40 +00:00
Torbjörn Andersson
d8e974ba72 Fixed bug #1519817, "ALL: Build failure if libmpeg2 is disabled".
svn-id: r23470
2006-07-10 09:29:12 +00:00
Torbjörn Andersson
7bfaa0db78 Cleanup
svn-id: r23439
2006-07-08 20:45:01 +00:00
Torbjörn Andersson
1e0b6995aa More robust handling of the optional startup.inf file.
svn-id: r23436
2006-07-08 20:20:55 +00:00
Torbjörn Andersson
5aff1df220 Slightly more verbose debug message.
svn-id: r23428
2006-07-08 15:39:26 +00:00
Torbjörn Andersson
5658e71f4d Added support for DXA cutscenes, while still retaining support for the old MPEG
cutscenes and the "dummy" (subtitles and voice-over) mode. Several tweaks and
cleanups were made in this process, and there may very well be regressions, but
it should be stable enough to commit.

svn-id: r23420
2006-07-08 11:42:07 +00:00
Max Horn
9a955180a4 * Renamed config.mak to config.mk
* Renamed common.rules to rules.mk
* Removed explicit declaration of MODULE_DIRS in various spots (instead we let rules.mk compute it)

svn-id: r23275
2006-06-24 08:48:11 +00:00
Max Horn
d210b19aec Move backends/fs/fs.h and .cpp to common/fs/fs.h and .cpp
Rationale: backend implementations belong to backends/, but portable APIs meant to be used by high level code is for common / sound / graphics / ... (compare also with backends/midi vs. sound/mididrv.h)

svn-id: r23274
2006-06-24 08:07:48 +00:00
Torbjörn Andersson
3114f19d94 MPEG player fixes:
* Initialise _frameWidth and _frameHeight to prevent them from being undefined.
* Fix BS2 subtitle positioning. (Fixes bug #1499916)
* In BS2, copy the frame to the backend in 8-bit mode.
* Fix compilation in 8-bit mode.

BS2 subtitles aren't quite right in 8-bit mode, but I expect we want to
re-design things a bit if we ever add DXA cutscenes. We can fix minor details
then.

svn-id: r22859
2006-06-03 09:43:10 +00:00
Torbjörn Andersson
e06ee0c490 We already have a default setting for subtitles, so this shouldn't be needed.
svn-id: r22704
2006-05-28 08:16:07 +00:00
Torbjörn Andersson
8062eb6ec3 Set and show/hide mouse cursors through a "cursor manager" (analogous to the
recently added (cursor) palette manager) so that the cursor can be properly
restored after returning from the GUI.

If there's any C++ magic that can keep the backend functions from being called
by anything else than these managing classes, that would probably be a good
idea. Also, since the cursor manager keeps a copy of the cursor image, perhaps
there are at least some backends that will no longer need to?

svn-id: r22639
2006-05-25 22:51:42 +00:00
Torbjörn Andersson
f83f1a77b6 Only check if the files on "CD 0" are present. The others are requested with
"insert CD" messages. (Of course, that isn't supported, or even well tested,
but the idea is sound.) This makes it possible to run the BS2 demo again.

Incidentally, this is how I *meant* for it to work when I added that check - I
even wrote so in the comment above that section of the code - so how on earth
did I manage to screw it up like that?

svn-id: r22594
2006-05-24 04:48:39 +00:00
Torbjörn Andersson
6b90c405e8 Initialise _resList to avoid crash (from freeing an invalid pointer) if the
data files are missing.

svn-id: r22520
2006-05-18 14:28:19 +00:00
Torbjörn Andersson
e563d0c182 Renamed screenChanged() to handleScreenChanged().
svn-id: r22518
2006-05-18 13:58:33 +00:00
Torbjörn Andersson
5c1f91eed4 Allow changing scaler while playing MPEG cutscenes.
svn-id: r22515
2006-05-18 13:18:02 +00:00
Eugene Sandulenko
14ec3f45fa - Heavily modified patch #1214784: "Disable overlay scaling"
- Eriktorbjorn's patch from same tracker item for scaling sword1/2 cutscenes
  is applied as is. It lacks resolution switch on-the-fly.
- GUI widgets are repositioned on the fly and use most space, even aspect
  ratio corrected screen is used without scaling
- Heavy tesing is required, but works for me in all cases except for bug
  #1483272: "GUI: SCUMM pause dialog breaks upon scaler switch" which needs more
  work.
- I probavly broke some backend or two

svn-id: r22505
2006-05-17 23:52:45 +00:00
Torbjörn Andersson
d2030f17b3 Removed hack that was used to limit the mouse cursor to (at most) 80x80 pixels.
That limit has been lifted from the SDL backend.

NOTE: This may cause problems in other backends!

svn-id: r22405
2006-05-10 20:50:59 +00:00