59 Commits

Author SHA1 Message Date
Max Horn
7cd2cb2b17 PlayingSoundHandle -> SoundHandle; also, turned the handle activity check into a mixer method
svn-id: r17106
2005-03-12 18:56:09 +00:00
Torbjörn Andersson
a52de03324 Renamed variables in the MPEG animation classes to better conform with
ScummVM standard. It seems the 8-bit version of the code had decayed
slightly, but I believe it's working again now.

svn-id: r17081
2005-03-11 15:30:28 +00:00
Max Horn
0ec193b4be changing AudioDataType -> SoundType, so now the constant names match the name of the data type / the SoundMixer method names
svn-id: r17052
2005-03-09 18:12:54 +00:00
Torbjörn Andersson
e3105f926b Applied patch #1155731, reducing the memory usage of the MPEG player by
about 8 MB.

svn-id: r17007
2005-03-06 14:12:40 +00:00
Torbjörn Andersson
a5356edb36 Got rid of all the .h files but one in the 'driver' directory. They were
either very small or, in the case of driver96.h, a disorganized jumbles.

svn-id: r16952
2005-02-27 16:11:19 +00:00
Torbjörn Andersson
43cfe01f3d This is the second part of the BS2 restructuring. There are two new
classes: Screen and Mouse. Screen handles most of the drawing, except the
mouse cursor and in-game menus.

The old Graphics class is no more.

I've also fixed some "reverse stereo" regressions from the first part of
the restructuring.

I'm not sure what the next step will be, but hopefully it will be smaller
than this one was.

svn-id: r16812
2005-02-19 14:02:16 +00:00
Max Horn
577b04aaad Fix compilation with mpeg2 disabled
svn-id: r16680
2005-01-28 22:10:56 +00:00
Torbjörn Andersson
c0a3816e17 Began what I hope is the final major restructuring of the BS2 engine.
In this first step, I have moved all opcode functions into functions.cpp,
instead of having them scattered all over the place.

To get things to compile again, I had to rewrite the overly complicated
sound effects handling. It's much simpler now.

The next step will be to move any non-trivial code out of the opcode
functions and into the appropriate object. This, I hope, will make it
easier to create well-separated objects, instead of the current mess.

I also want to tear down the artificial boundary between the main directory
and the "driver" directory. We already have a cross-platform layer; there's
no need to have yet another one. (Actually, the rewriting of the sound
effects code took one first step in this direction.)

At the final stage, I'd like to get rid of the "drivers" directory
completely, but I'll probably need some help with that if I want to
preserve the CVS history of the code.

Things will probably be a bit bumpy along the way, but I seem to have
reached a point of relative stability again, which is why I'm commiting
this now.

svn-id: r16668
2005-01-28 16:33:14 +00:00
Torbjörn Andersson
0b461c8506 Updated copyright header, as discussed on the mailing list.
svn-id: r16580
2005-01-17 10:57:15 +00:00
Torbjörn Andersson
c5e83de099 Use Fingolfin's new WAV code.
svn-id: r16540
2005-01-11 08:32:10 +00:00
Max Horn
cffd917165 system.h was being included in tons of places, without any good reason; reduced this (total dependencies on system.h went down from 193 to 85 files)
svn-id: r16527
2005-01-10 22:06:49 +00:00
Torbjörn Andersson
6d966a6e17 Applied patch #1088948, with minor modifications
svn-id: r16421
2005-01-04 15:31:30 +00:00
Torbjörn Andersson
5178822833 Updated copyright year.
svn-id: r16397
2005-01-01 15:10:22 +00:00
Eugene Sandulenko
ae21c99bad Added Russian narration message.
svn-id: r16227
2004-12-21 02:12:58 +00:00
Max Horn
f09293b22c Clean up OSystem::Event
svn-id: r15990
2004-12-05 17:42:20 +00:00
Max Horn
ce8c99bf62 Rename remaining OSystem methods to match our coding guidelines
svn-id: r15332
2004-09-28 20:19:37 +00:00
Torbjörn Andersson
bb62b07f4f Don't try to free text sprites with the memory manager - it uses standard
malloc() nowadays! (This only affected the "dummy" player.

svn-id: r14638
2004-08-17 13:52:18 +00:00
Torbjörn Andersson
0426d38aa5 Cleaned up the palette handling a bit. Renamed _palCopy to _palette since I
found the old name misleading (there is only one array that stores the
palette in the engine, though it could be argued that it's a copy of the
one used by the backend), and removed some code that I'm almost certain was
never used. (I've added assert()s to trigger in the cases where it would
have been used.)

svn-id: r13949
2004-06-09 06:33:29 +00:00
Torbjörn Andersson
fc970b3c75 Removed the buffering of mouse and keyboard events. I don't think any of
our other engines do this, so there is little reason for BS2 to. I did add
a filtering mechanism so that mouse button releases and scroll wheeling is
ignored during normal gameplay, but I don't know if that was necessary
either.

Since this left little more than an empty husk where the Input class used
to be, I've eliminated that class and buried its remains in Sword2Engine.

svn-id: r13812
2004-05-09 13:32:04 +00:00
Torbjörn Andersson
bc77ba431a Simplified the handling of sound effects. It's not necessary for the driver
to keep its own copy of the sound data. It could be even further simplified
(I don't really see any reason for having two different sound queues), but
I seem to have reached a point of stability here and I don't want to jinx
it by making further changes yet.

svn-id: r13705
2004-05-01 10:42:23 +00:00
Torbjörn Andersson
8f8185f035 Major revamping of the BS2 memory manager and, some small changes to the
resource manager. All new code! All new bugs!

svn-id: r13603
2004-04-23 07:02:11 +00:00
Max Horn
14378cb56e Renamed more OSystem methods
svn-id: r13410
2004-03-28 16:30:50 +00:00
Torbjörn Andersson
d109cc1f98 Fixed bug I introduced in the recent cleanup: It's the screen, not the
overlay, that needs to be cleared at the beginning of the movie. Otherwise
what was on the screen may show at the end of the movie.

svn-id: r13398
2004-03-28 13:10:52 +00:00
Torbjörn Andersson
afefe7dcfa Use the binary .pal file format that was introduced for 0.6.0.
Invalidate the lookup table when the screen changes. (TODO: We also have to
invalidate it if the change happens between cutscenes, don't we?)

Some cleanup, particularly in the BS2 cutscene player. More needed, I
guess...

svn-id: r13377
2004-03-24 07:29:59 +00:00
Max Horn
3fddbc18d6 Unify MPEG2 code even more
svn-id: r13365
2004-03-23 00:10:18 +00:00
Max Horn
d24be923f3 share 'init' method, too
svn-id: r13361
2004-03-22 20:46:30 +00:00
Torbjörn Andersson
8f9ffdf43a Fix crash introduced by recent code unification. (Mind you, I'm still
extremely grateful that the BS1 and BS2 cutscene players are finally
sharing at least some of their code now.)

svn-id: r13360
2004-03-22 15:57:51 +00:00
Max Horn
838d3e3a93 some more cleanup
svn-id: r13359
2004-03-22 01:40:24 +00:00
Max Horn
4466a85598 move commong code into separate source file (more could be done, but it's a start)
svn-id: r13358
2004-03-22 01:28:45 +00:00
Max Horn
b94448514e Unify a bit more...
svn-id: r13354
2004-03-21 18:49:04 +00:00
Nicolas Bacca
9e1fa63575 Apply patch #907359 : Broken Sword videos improved frameskip
svn-id: r13180
2004-03-04 18:54:35 +00:00
James Brown
b77231a9a3 Fix from Roever for bug #892827
svn-id: r13107
2004-03-01 04:05:10 +00:00
Travis Howell
2f01efd9f3 Add fix for error at end of sword2demo (From eriktorbjorn)
Prevent false warnings in demo.

svn-id: r13102
2004-03-01 00:32:47 +00:00
Max Horn
c6752cccf5 renamed more OSystem methods to follow our naming scheme; renamed NewGuiColor to OverlayColor; fixed some calls to error() in the SDL backend
svn-id: r13087
2004-02-28 12:58:13 +00:00
Nicolas Bacca
e469cd43a7 Avoid deadlock in MPEG-2 cutscenes + slow devices
svn-id: r12996
2004-02-22 18:13:54 +00:00
Max Horn
aa6ec62e9d Patch #885904 (Flac Support) with some tweaks by me
svn-id: r12984
2004-02-22 14:11:16 +00:00
Max Horn
1d7eafe675 unified code a little
svn-id: r12974
2004-02-21 20:00:51 +00:00
Torbjörn Andersson
55556c813c Proper handling of BS2 cutscene lead-outs, plus some other minor fixes.
svn-id: r12907
2004-02-15 14:22:54 +00:00
Torbjörn Andersson
7d9105b7ba Paint the overlay black at the end of the movie. Not all movies fade out on
their own, and sometimes the cutscene player will have to wait for the lead
out to finish before returning to the game. (This will probably be true
even after we fix the timing of the lead-outs.)

svn-id: r12871
2004-02-14 10:37:21 +00:00
Nicolas Bacca
3c6114bd9c Check for MP3 file in Broken Sword cutscenes - useful for WinCE backend as Tremor crashes for no specific reason (help appreciated :p) here
svn-id: r12837
2004-02-13 00:54:58 +00:00
Torbjörn Andersson
5447cd09b5 Changed the playback code to use the new "elapsed time" function instead.
This fixes bug #880484 for me, but may need some fine-tuning.

svn-id: r12830
2004-02-12 16:55:18 +00:00
Travis Howell
a745b3a7d0 More cutscene fixes from roever
svn-id: r12773
2004-02-08 14:02:43 +00:00
James Brown
91f201af29 Patch #874510 from roever, fixes BS2 demo cutscene problems (bug #884568)
svn-id: r12761
2004-02-07 15:09:13 +00:00
Torbjörn Andersson
802a301a16 Removed some of the #includes from sword2.h
svn-id: r12739
2004-02-05 14:19:07 +00:00
Max Horn
2f8d19d004 avoid using huge static structs - they can't be stripped, and increase the exe size (in this case, 16 MB...)
svn-id: r12678
2004-01-30 20:57:23 +00:00
Max Horn
90b96a94ab whitespaces
svn-id: r12575
2004-01-22 21:02:29 +00:00
Torbjörn Andersson
255e1f9036 Some minor cleanups (comments and spacing), and fixed CPU usage in synced
cutscene playback.

svn-id: r12536
2004-01-20 13:26:00 +00:00
Torbjörn Andersson
4b9602615c This should make subtitles work again in "overlay" cutscene mode.
svn-id: r12506
2004-01-18 21:09:57 +00:00
Torbjörn Andersson
4ff60e231d I know we're not supposed to make cleanup commits at this point, but surely
we can make an exception for removing self-described hacks and utterly
misleading comments? :-)

svn-id: r12497
2004-01-18 19:50:59 +00:00
James Brown
5a4c5e1485 Don't allow overlapping voice in cutscenes. Fixes crash in carib cutscene.
svn-id: r12474
2004-01-18 12:07:21 +00:00