Commit Graph

639 Commits

Author SHA1 Message Date
Max Horn
9a4bc8ce16 Patch #1117443 (Experimental plugin code revision)
svn-id: r17231
2005-03-25 17:55:57 +00:00
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
2f8d85e025 Initialise variable.
svn-id: r16983
2005-03-03 08:34:01 +00:00
Torbjörn Andersson
58dc309969 And, finally, the change I meant to before I got side-tracked: Use
ScummVM's "Rect" data type in the mouse list. The benefit of this is that
we can then use the contains() function in checkMouseList(), which makes
the code a bit less eye-watering.

svn-id: r16961
2005-02-28 14:03:53 +00:00
Torbjörn Andersson
bed897719c Index the "mouse list" from 0 instead of 1. I have no idea why it wasn't
this way to begin with.

svn-id: r16959
2005-02-28 13:28:02 +00:00
Torbjörn Andersson
9424c5aef2 Changed a few more hard-coded text-ids to constants.
svn-id: r16957
2005-02-28 13:22:31 +00:00
Torbjörn Andersson
f628ee836b Restored the original values to the return codes. Since I've been removing
a bunch of them, it's better that the remaining ones keep the same value
between future releases. (Not that the user will ever get error messages,
of course. *cough* :-)

svn-id: r16953
2005-02-27 16:20:01 +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
7298987bba Whitespace changes.
svn-id: r16913
2005-02-25 14:19:30 +00:00
Max Horn
457ee7f582 Fix compilation on BE systems
svn-id: r16861
2005-02-22 18:09:38 +00:00
Torbjörn Andersson
9bb1414818 Moved some debugging stuff into the debugger class.
svn-id: r16859
2005-02-22 07:37:50 +00:00
Robert Göffringmann
c7dad332fa basically the same change as for bs1; don't keep the mutex locked while loading mp3, ogg or wave data. it blocks the playing thread for too long.
Also added index caching for the speech and music clusters to reduce seeks.

svn-id: r16849
2005-02-21 08:35:18 +00:00
Torbjörn Andersson
8edce85e04 Some cleanup and renaming. (It was confusing to see "load" sometimes and
"restore" other times.) The save/restore dialog now has two separate
classes, though they both inherit from the old combined class of course.

svn-id: r16848
2005-02-21 08:16:50 +00:00
Robert Göffringmann
fd5a9be26e removed lots of unnecessary seek()s and read()s by keeping the datafiles' index tables in memory instead of accessing them over and over again, which caused major slowdowns with cd accesses.
Also, the caching of datafiles depends on the memory usage now, not on the number of screens that the player entered in the meantime.
The old behaviour made the engine run out of memory on the PS2.

svn-id: r16843
2005-02-21 02:29:18 +00:00
Torbjörn Andersson
807b33ec29 More BS2 restructuring.
The various game settings are no longer stored in the Gui class. They are
stored in the class that use them.

Code that doesn't belong in the Gui class, e.g. the "restart" code, has
been moved out of it.

Afterwards, the Gui class had been reduced to nothing more than a handful
of trivial methods for invoking the in-game dialogs. So the entire Gui
class has been removed.

svn-id: r16827
2005-02-20 15:38:48 +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
Torbjörn Andersson
5aa2ea2d44 Forgot to check if preFetchCompSpeech() could find the speech file. Now it
will work even if the file is missing. (This only affects the cutscene
player.)

svn-id: r16806
2005-02-18 16:50:51 +00:00
Torbjörn Andersson
fe3e01a110 Now there are two file handles for the music: one for each CD. This is not
the same thing as one for each music stream. If both music streams are
playing music from the same CD, they will both take turns at using the same
file handle.

The only case where both file handles are used is when music from one CD is
fading in while music from the other CD is fading out. Which of course can
only happen if you play the game from hard disk. If the game has to ask for
the other CD, it kills the music immediately.

The reason for doing this is that there was some concern about whether
having two file handles open to the same file was portable or not. I don't
think that question was ever fully answered, so I avoid the situation.

svn-id: r16753
2005-02-08 08:32:50 +00:00
Torbjörn Andersson
00670e2c23 Fixed crash that would happen if the game tried to play music from CD1 and
CD2 at the same time. There will eventually be a better fix for this, I
hope.

svn-id: r16750
2005-02-07 10:51:48 +00:00
Max Horn
577b04aaad Fix compilation with mpeg2 disabled
svn-id: r16680
2005-01-28 22:10:56 +00:00
Max Horn
abd12dd1b6 Use class Mutex instead of MutexRef
svn-id: r16679
2005-01-28 22:05:51 +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
3623ca4637 Corrected the comment: the savegame filename does not include the path at
this stage. (So 128 characters is probably excessive, even if the SCUMM
engine uses 256.)

svn-id: r16634
2005-01-25 07:55:09 +00:00
Torbjörn Andersson
b86423f898 Added a "value step" parameter to the Slider widget class so that clicking
beside the slider handle can move it more than one step. (When the volume
range was 0-14 or 0-16 this wasn't needed, but now it's 0-255.)

svn-id: r16633
2005-01-25 07:27:14 +00:00
Torbjörn Andersson
ca58bfed3b Fixed bug that I must have introduced during one of my cleanups. The
original code read "LLogic.Logic_up( (*params*65536)+2);".

I don't know where this opcode is actually used, though.

svn-id: r16600
2005-01-20 07:32:37 +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
4dda4eb31b On Fingolfin's suggestion I put back the inclusion of util.h into Rect, for
MIN() and MAX(). I then removed util.h from a bunch of files which I don't
think need it any more. (Please let me know if I got too blood-thirsty!)

This reverts some of the changes I made this morning.

svn-id: r16541
2005-01-11 13:25:02 +00:00
Torbjörn Andersson
c5e83de099 Use Fingolfin's new WAV code.
svn-id: r16540
2005-01-11 08:32:10 +00:00
Torbjörn Andersson
13e2c224c8 This is probably not the optimal fix, but at least ScummVM compiles again.
svn-id: r16538
2005-01-11 08:06:19 +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
Max Horn
7df70de2b1 Mark some places which probably should use loadWAVFromStream(); maybe some of the engine maintainers can look into using it
svn-id: r16503
2005-01-09 15:57:38 +00:00
Torbjörn Andersson
b319c32226 Fixed typo (in comment)
svn-id: r16441
2005-01-06 12:30:24 +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
Max Horn
f9b1e4118c Use the mixer to handle sound volumes
svn-id: r16349
2004-12-27 23:43:40 +00:00
Max Horn
d299f0601b Reducing header dependencies a bit
svn-id: r16347
2004-12-27 22:08:20 +00:00
Torbjörn Andersson
29e367a063 Don't use pointers to int. We don't know what size an "int" is.
Also, failing the script checksum test is no longer a fatal error. There
has been a report that could mean there is a German version with incorrect
checksums. Whether or not this change will make it playable is an entirely
different matter, of course.

svn-id: r16341
2004-12-27 17:29:07 +00:00
Max Horn
1d44b0873f Fix volume regression my previous checkin caused
svn-id: r16337
2004-12-27 16:23:21 +00:00
Max Horn
01fc7adffd Use the same volume ranges as most of the rest of ScummVM (i.e. 0-255)
svn-id: r16333
2004-12-27 03:00:36 +00:00
Max Horn
67b311713d Added 'sound types' to the mixer - for now, only plain (for the premixer), SFX and music; volume is now controlled based on the sound type
svn-id: r16330
2004-12-27 00:27:00 +00:00
Eugene Sandulenko
ae21c99bad Added Russian narration message.
svn-id: r16227
2004-12-21 02:12:58 +00:00
Nicolas Bacca
876079be75 Fix dumb CE compiler
svn-id: r16026
2004-12-11 00:37:05 +00:00
Robert Göffringmann
0d7ab01640 Pass subdirectories to gamedetector functions
svn-id: r16002
2004-12-09 15:06:49 +00:00
Max Horn
f09293b22c Clean up OSystem::Event
svn-id: r15990
2004-12-05 17:42:20 +00:00
Eugene Sandulenko
8f863b5d8f Fix music volume
svn-id: r15960
2004-11-29 00:25:15 +00:00
Max Horn
10dd548b85 Changed parameter order of SoundMixer::playInputStream to match that of playRaw
svn-id: r15950
2004-11-28 23:02:28 +00:00
Max Horn
b78ac6a18b Make use of our String class instead of juggling with char pointers; added File::exists method
svn-id: r15913
2004-11-27 15:09:53 +00:00