aboutsummaryrefslogtreecommitdiff
path: root/sword2
AgeCommit message (Collapse)Author
2004-09-04Rewrote the code that loads credits.clu into memory. The new code isTorbjörn Andersson
perhaps less clever than the old one I wrote, but should be much easier to read. Besides, the old code had a small memory leak in it. svn-id: r14897
2004-09-04Fixed a glitch in the music fade-out code.Torbjörn Andersson
svn-id: r14888
2004-09-04Added support for compressed music. I'm sure there are some glitches stillTorbjörn Andersson
to fix, but it should work well enough for now. In this rewrite of the music code, I removed the "save/restore music state" function, since it just complicated things for a very small gain. It wasn't in the original engine, and I added it just for the credits, so that the previously playing music could be resumed afterwards. I might re-add it later, but probably not. svn-id: r14887
2004-08-28Cleanup. Removed the original DipMusic() code. If anyone wants toTorbjörn Andersson
implement it - personally I don't see the need - they can get it from CVS. svn-id: r14819
2004-08-27Use the same code for opening the music clusters as for opening the speechTorbjörn Andersson
clusters. (No, that doesn't mean compressed music is support yet. This is just a tiny little step closer.) svn-id: r14794
2004-08-26Explicitly cast value to uint32, since there was a report about compilationTorbjörn Andersson
problems. Perhaps this will fix it? svn-id: r14762
2004-08-25The original speech clusters are now decoded through a custom AudioStreamTorbjörn Andersson
class, so they are handled the same way as the compressed clusters. The next step will be to migrate the music playback to use the same class, which means the fade-in/out logic needs to be separated from the decoding. Once this is done, adding support for compressed music should be a piece of cake. svn-id: r14740
2004-08-25Added a destructor to the FontRenderer class to free any remaining textTorbjörn Andersson
sprites on exit. As far as I can tell, the only case when this makes any difference is when there is text on screen when you quit ScummVM, so it's not really a memory leak, but Valgrind will report it as one. svn-id: r14738
2004-08-23Fixed the bug that caused Vorbis and FLAC to misbehave with compressedTorbjörn Andersson
speech. (Apparently it was just an accident that MP3 worked.) Unfortunately I had to change the file format of the compressed files to include both the compressed and uncompressed size, but since the tool to create these files has only lived as an item in the patch tracker, no one should have exptected it to be the final, working version, right? Right. svn-id: r14698
2004-08-22Experimental (i.e. slightly broken) code for handling compressed speech.Torbjörn Andersson
The equally experimental compression tool is in patch #854561. Support for compressed music will require some restructuring first. svn-id: r14684
2004-08-17Don't try to free text sprites with the memory manager - it uses standardTorbjörn Andersson
malloc() nowadays! (This only affected the "dummy" player. svn-id: r14638
2004-08-01Correct default settings used by COMITravis Howell
Allow object_labels config option in COMI svn-id: r14408
2004-07-26I shouldn't be mixing cleanups and bug fixes, but I'm doing so anyway, justTorbjörn Andersson
this once. :-) The parameters to drawLine() aren't clipped to the screen size, which meant that it was accessing memory out of bounds when marking the screen as dirty. The function now uses plotPoint(), which does the bounds checking and screen dirtying for us. Apart from being a little easier to read, it dirties only the parts of the screen the line actually passes through, instead of a rectangle defined by the line's end points. Since drawLine() is only used for debugging, I wouldn't consider this a particularly serious bug. Next change is that only the pixels inside the original parallax layer are considered when creating the block surfaces. This may make the drawing slightly more efficient, since fewer surfaces will be labelled as transparent. Plus some other minor cleanups. svn-id: r14340
2004-07-17Allowing both music streams to share the same rate converter only workedTorbjörn Andersson
by accident, and could cause bad noises during music cross-fades. This wasn't a problem in 0.6.0 since all music is sampled at 22050 Hz, which is the most likely output sample rate for ScummVM, so the converter didn't actually have to do anything. Now, however, the output sample rate could be anything. I've given the music streams one converter each. In BS1, which uses similar music code, it was already necessary to do this since some of its music is sampled at 11025 Hz. svn-id: r14237
2004-06-28Enhanced default directory support in the File class; now one can specify ↵Max Horn
arbitrary many default search directories svn-id: r14095
2004-06-27Reversed param order of File::open() -- this allowed me to get rid of a few ↵Max Horn
more getGameDataPath() calls svn-id: r14090
2004-06-25Added Engine::_saveFileMan; thus was able to get rid of auto_ptr usage againMax Horn
svn-id: r14058
2004-06-25Use auto_ptr to avoid leaksMax Horn
svn-id: r14057
2004-06-17Itsy-bitsy cleanup.Torbjörn Andersson
svn-id: r13959
2004-06-12CleanupTorbjörn Andersson
svn-id: r13956
2004-06-11Hopefully fixed the displayMsg() fade-up glitch I accidentally introducedTorbjörn Andersson
yesterday. svn-id: r13955
2004-06-11Fixed a regression caused by my recent cleanup. This one would cause theTorbjörn Andersson
game to crash shortly after Andr� shows you the coyote stone. More precisely, when the camera view shifts from the close-up of the conversation back to the normal view of the caf�. For those who enjoy reading commit messages, this was the crash I was hunting for yesterday. svn-id: r13954
2004-06-10If the 'time' parameter to displayMsg() is 0, wait until the user clicksTorbjörn Andersson
or presses a button. This is how displayMsg() was always used, so the only difference is that the code to check for events is no longer outside the function. In the process, it turned out that removeMsg() was probably unnecessary so I have removed it. May cause regressions, but we can deal with them later. svn-id: r13953
2004-06-10Some more work on the - still disabled - "right click to clear luggage"Torbjörn Andersson
code I added some time ago. svn-id: r13952
2004-06-10Added another assert(). I'm hunting - unsuccessfully so far - for aTorbjörn Andersson
reproducable crash where an invalid pointer is decoded. Strangely, I never saw it being encoded... Oh well, I'll find it eventually. svn-id: r13951
2004-06-10One of my not-so-recent cleanups caused BS2 to produce corrupt savegames.Torbjörn Andersson
And no one even noticed! Should be fixed now. svn-id: r13950
2004-06-09Cleaned up the palette handling a bit. Renamed _palCopy to _palette since ITorbjörn Andersson
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-08Added a few comments, rewrote a few others, and added a couple of assert()sTorbjörn Andersson
svn-id: r13947
2004-06-07Added comment.Torbjörn Andersson
svn-id: r13946
2004-06-06Cleaned up sprite scaling.Torbjörn Andersson
svn-id: r13944
2004-06-05CleanupTorbjörn Andersson
svn-id: r13933
2004-05-10Close menus before restarting. (This is a purely cosmetical fix.)Torbjörn Andersson
svn-id: r13831
2004-05-10Fixed typo.Torbjörn Andersson
svn-id: r13830
2004-05-09Forgot to remove this file when I changed input handling.Torbjörn Andersson
svn-id: r13813
2004-05-09Removed the buffering of mouse and keyboard events. I don't think any ofTorbjörn Andersson
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-09When drawing lines and points, mark the corresponding screen area as dirtyTorbjörn Andersson
so that it gets properly redrawn. Only the debugging code uses these drawing primitives, so it's no big deal, but it's still the right thing to do. svn-id: r13811
2004-05-09My recent sound changes broke "restart". This should un-break it again.Torbjörn Andersson
svn-id: r13810
2004-05-07Cleanup.Torbjörn Andersson
svn-id: r13806
2004-05-05Take advantage of the changes in the backend's mouse cursor handling. ItTorbjörn Andersson
didn't do the change I was hoping for: the coyote stone is still partially see-through, but perhaps it was in the original as well. At least we no longer need to keep the buffer the mouse cursor is decoded to, since that's now handled by the backend. svn-id: r13782
2004-05-05Cleanup.Torbjörn Andersson
Part of this cleanup involved removing _unpauseZone. It was only used by fnISpeak(), and as far as I could tell it was just because the original code didn't trust amISpeaking() and getSpeechStatus() to return sensible values directly after unpausing the game. svn-id: r13781
2004-05-01Simplified the handling of sound effects. It's not necessary for the driverTorbjörn Andersson
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-01Made the "debugoff" console command actually turn *off* the debug info.Torbjörn Andersson
svn-id: r13704
2004-04-28Cleanup. I plan to take a closer look at the sound effects handling later.Torbjörn Andersson
svn-id: r13661
2004-04-27CleanupTorbjörn Andersson
svn-id: r13649
2004-04-26Tweaked a few things to accommodateJamieson Christian
MSVC6's idiosyncracies. svn-id: r13644
2004-04-26Cleanup. Mostly removal of redundant comments.Torbjörn Andersson
I've also made the SaveGameHeader struct packed, which may break savegame compatibility on some architectures (though not on the Linux and Windows boxes I've tried it on). But I'm hoping it will guarantee, or at least make it more likely, that savegames will be portable across architectures. svn-id: r13634
2004-04-24fetchObjectName() no longer assumes that the resource will still be in theTorbjörn Andersson
cache after it's been closed. (Currently it always is, but ideally I'd like for BS to work even if resource caching is disabled.) svn-id: r13610
2004-04-23Fixed a crash regression in setLuggage() that was caused by a change ITorbjörn Andersson
didn't make. :-) (That is, I made the change and then thought better of it, but I forgot to change one line back to its original form.) svn-id: r13608
2004-04-23I forgot to clear the reference counter when a resource is forcibly removedTorbjörn Andersson
and I may as well clear it when a resource is read from disk as well. svn-id: r13606
2004-04-23Major revamping of the BS2 memory manager and, some small changes to theTorbjörn Andersson
resource manager. All new code! All new bugs! svn-id: r13603