aboutsummaryrefslogtreecommitdiff
path: root/sword2/driver
AgeCommit message (Collapse)Author
2006-01-18Update copyright noticeEugene Sandulenko
svn-id: r20088
2005-12-21Added debugging messages to track which CD (1 or 2) the game thinks it'sTorbjörn Andersson
supposed to be reading data from. Maybe this will help track down the mysterious missing speech problem reported on the forum. svn-id: r19823
2005-12-20If drawSurface() is called with no clip rect, clip to the screen size. ThisTorbjörn Andersson
prevents the subtitles-only cutscenes fallback from drawing outside the screen. svn-id: r19813
2005-12-11Fixed Valgrind memory leak warnings, either by freeing memory on exit orTorbjörn Andersson
(in one case) by not allocating file handles dynamically. While this isn't really necessary at the moment, it makes it easier to find the real memory leaks, if there are any. svn-id: r19775
2005-11-19Fixed misleading warning message when playing without sound files.Torbjörn Andersson
svn-id: r19661
2005-10-29Applied my own patch #1341495, in an attempt to fix alignment issuesTorbjörn Andersson
reported by Crilith. To elaborate a bit, the engine no longer accesses resource data through packed structs. Instead it uses memory streams and the READ/WRITE functions. If data is mainly read, not written, I have replaced the old struct with a new one with a read() function to read the whole thing from memory into the struct's variables, and a write() function to dump the struct's variables to memory. In fact, most of these write() functions remain unused. If data is both read and written, I have replaced the struct with a class with individual get/set functions to replace the old variables. This manipulates memory directly. Since I'm fairly sure that these structs are frequently stored as local variables for a script, all script variables (both local and global) are stored as little-endian and accessed through the READ/WRITE functions, rather than being treated as arrays of 32-bit integers. On a positive note, the functions for doing endian conversion of resources and save games have been removed, and some general cleanups have been made to assist in the rewrite. Initial reports indicate that this patch indeed fixes alignment issues, and that I have not - surprisingly - broken the game on big-endian platforms. At least not in any immediately obvious way. And there's still plenty of time to fix regressions before 0.9.0, too. svn-id: r19366
2005-10-23Some more Broken Sword I & II -> 1 & 2 changesMax Horn
svn-id: r19257
2005-10-18Update FSF address. Eek. Actually that took place on May 1, 2005Eugene Sandulenko
svn-id: r19142
2005-10-17Fixed off-by-one error when decoding the original sound files. I thought ITorbjörn Andersson
had already done this, but I guess not... svn-id: r19126
2005-10-16There was a mention of the "Expected XXX samples..." error in the IRC logs.Torbjörn Andersson
Without a proper bug report, it's hard to diagnose, but this change might allow it to recover after such an error. Maybe. svn-id: r19108
2005-08-15Fixed long-standing bug with sound decompression that would cause a slightTorbjörn Andersson
pop at the end of some sounds because it was trying to decode one sample too many. svn-id: r18691
2005-08-10Don't explicity check for tremor and vorbis everywhere andJonathan Gray
require both USE_TREMOR and USE_VORBIS to be defined when using tremor. svn-id: r18642
2005-08-10Rest of the changes required for tremor to actually work.Jonathan Gray
Based on patches against 0.7.1 by Jolan Luff. svn-id: r18641
2005-07-30Remove trailing whitespaces.Eugene Sandulenko
svn-id: r18604
2005-07-09This should really be two or three different commits, but I'm too lazy forTorbjörn Andersson
that: * Re-worked the elevator script bug workaround so that it's more consistent with the other two script bug workarounds. * Some renamings to make it more clear that game events and input events are two completely different things. * Added function for clearing pending input events, and used that to fix an annoying keyboard repeat bug when closing the debug console. (The console would keep re-opening because the key press to open it kept repeating even though the key had been released.) svn-id: r18522
2005-05-12Whitespace: "(type *)something" instead of "(type *) something", becauseTorbjörn Andersson
that's how we write it in most other places. svn-id: r18069
2005-05-11Moved some more stuff to namespace Audio (enough for tonight)Max Horn
svn-id: r18040
2005-05-10Moved class SoundMixer to Audio::Mixer (didn't call the namespace 'Sound' ↵Max Horn
because we already have many classes with that name) svn-id: r18039
2005-05-10Moved class File and the MD5 stuff to namespace CommonMax Horn
svn-id: r18037
2005-05-08Fix doxygen warningMax Horn
svn-id: r17970
2005-05-08Quitting the game now implies that the game is done fading the screen.Torbjörn Andersson
svn-id: r17962
2005-05-08Forgot to remove this.Torbjörn Andersson
svn-id: r17961
2005-05-05Fixed some doxygen warningsMax Horn
svn-id: r17923
2005-05-02Don't let drawSprite() modify the SpriteInfo struct.Torbjörn Andersson
svn-id: r17897
2005-05-02Cleanup. Most of is simply moves the credits code out of Logic and intoTorbjörn Andersson
Screen. I've also added an unused "splash screen" function that displays the image that used to be shown by CacheNewCluster() while copying a data file from CD to hard disk. ScummVM doesn't do that, but it's a nice image that I wish we could do something useful with, and it's easier to have the code here for reference than having to dig through old revisions of the resource manager. svn-id: r17894
2005-04-27Patch #1186744 (Common line-drawing function)Max Horn
svn-id: r17842
2005-04-25Better support for "seamless" cutscenes, i.e. ones where - in theory - youTorbjörn Andersson
shouldn't see where the cutscene begins/ends as it's the same image as is currently displayed by the game engine itself. Of course, in reality you can still see the seams easily. But at least it looks a bit beter now. I made most of this change yesterday, but it's less hard-wired now. svn-id: r17797
2005-04-24Don't wait for the lead-out sound to finish when playing the "shaman"Torbjörn Andersson
cutscene, as it's obviously meant to blend in with the rest of the game. svn-id: r17791
2005-04-20Replaced drawLine() with a shorter version described in Wikipedia. It usesTorbjörn Andersson
a callback to plot each point so that it doesn't need to worry about how the caller deals with screen dirtying, etc. My plan is to move this function into a standard class. (That's why I used the American spelling "color" instead of "colour".) I just haven't made up my mind on which is the most appropriate one yet. svn-id: r17715
2005-03-12PlayingSoundHandle -> SoundHandle; also, turned the handle activity check ↵Max Horn
into a mixer method svn-id: r17106
2005-03-11Renamed variables in the MPEG animation classes to better conform withTorbjörn Andersson
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-09changing AudioDataType -> SoundType, so now the constant names match the ↵Max Horn
name of the data type / the SoundMixer method names svn-id: r17052
2005-03-06Applied patch #1155731, reducing the memory usage of the MPEG player byTorbjörn Andersson
about 8 MB. svn-id: r17007
2005-02-27Got rid of all the .h files but one in the 'driver' directory. They wereTorbjörn Andersson
either very small or, in the case of driver96.h, a disorganized jumbles. svn-id: r16952
2005-02-21basically the same change as for bs1; don't keep the mutex locked while ↵Robert Göffringmann
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-19This is the second part of the BS2 restructuring. There are two newTorbjörn Andersson
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-18Forgot to check if preFetchCompSpeech() could find the speech file. Now itTorbjörn Andersson
will work even if the file is missing. (This only affects the cutscene player.) svn-id: r16806
2005-02-08Now there are two file handles for the music: one for each CD. This is notTorbjörn Andersson
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-07Fixed crash that would happen if the game tried to play music from CD1 andTorbjörn Andersson
CD2 at the same time. There will eventually be a better fix for this, I hope. svn-id: r16750
2005-01-28Fix compilation with mpeg2 disabledMax Horn
svn-id: r16680
2005-01-28Began what I hope is the final major restructuring of the BS2 engine.Torbjörn Andersson
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-17Updated copyright header, as discussed on the mailing list.Torbjörn Andersson
svn-id: r16580
2005-01-11Use Fingolfin's new WAV code.Torbjörn Andersson
svn-id: r16540
2005-01-10system.h was being included in tons of places, without any good reason; ↵Max Horn
reduced this (total dependencies on system.h went down from 193 to 85 files) svn-id: r16527
2005-01-09Mark some places which probably should use loadWAVFromStream(); maybe some ↵Max Horn
of the engine maintainers can look into using it svn-id: r16503
2005-01-04Applied patch #1088948, with minor modificationsTorbjörn Andersson
svn-id: r16421
2005-01-01Updated copyright year.Torbjörn Andersson
svn-id: r16397
2004-12-27Use the mixer to handle sound volumesMax Horn
svn-id: r16349
2004-12-27Fix volume regression my previous checkin causedMax Horn
svn-id: r16337
2004-12-27Use the same volume ranges as most of the rest of ScummVM (i.e. 0-255)Max Horn
svn-id: r16333