Commit Graph

639 Commits

Author SHA1 Message Date
Torbjörn Andersson
3c70f5a85c If the 'time' parameter to displayMsg() is 0, wait until the user clicks
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-10 06:48:50 +00:00
Torbjörn Andersson
dabb32ce1a Some more work on the - still disabled - "right click to clear luggage"
code I added some time ago.

svn-id: r13952
2004-06-10 06:41:08 +00:00
Torbjörn Andersson
0d193e87ce Added another assert(). I'm hunting - unsuccessfully so far - for a
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-10 06:33:11 +00:00
Torbjörn Andersson
c63cc7c7d1 One of my not-so-recent cleanups caused BS2 to produce corrupt savegames.
And no one even noticed! Should be fixed now.

svn-id: r13950
2004-06-10 06:14:07 +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
7e70c86870 Added a few comments, rewrote a few others, and added a couple of assert()s
svn-id: r13947
2004-06-08 06:53:35 +00:00
Torbjörn Andersson
78404c30d4 Added comment.
svn-id: r13946
2004-06-07 05:57:00 +00:00
Torbjörn Andersson
c9c56d2f72 Cleaned up sprite scaling.
svn-id: r13944
2004-06-06 15:40:31 +00:00
Torbjörn Andersson
dac16f4f43 Cleanup
svn-id: r13933
2004-06-05 10:28:42 +00:00
Torbjörn Andersson
1189083fe0 Close menus before restarting. (This is a purely cosmetical fix.)
svn-id: r13831
2004-05-10 07:11:40 +00:00
Torbjörn Andersson
9742985e50 Fixed typo.
svn-id: r13830
2004-05-10 07:10:28 +00:00
Torbjörn Andersson
9e4c641de1 Forgot to remove this file when I changed input handling.
svn-id: r13813
2004-05-09 13:40:39 +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
577600537c When drawing lines and points, mark the corresponding screen area as dirty
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-09 13:24:07 +00:00
Torbjörn Andersson
ed9bac56b0 My recent sound changes broke "restart". This should un-break it again.
svn-id: r13810
2004-05-09 13:20:12 +00:00
Torbjörn Andersson
afb91fc184 Cleanup.
svn-id: r13806
2004-05-07 19:56:19 +00:00
Torbjörn Andersson
0600200980 Take advantage of the changes in the backend's mouse cursor handling. It
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-05 07:22:35 +00:00
Torbjörn Andersson
5882ea5819 Cleanup.
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-05 07:06:18 +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
e830d35a21 Made the "debugoff" console command actually turn *off* the debug info.
svn-id: r13704
2004-05-01 10:24:47 +00:00
Torbjörn Andersson
6a432d10b5 Cleanup. I plan to take a closer look at the sound effects handling later.
svn-id: r13661
2004-04-28 11:47:19 +00:00
Torbjörn Andersson
49fc62b4d0 Cleanup
svn-id: r13649
2004-04-27 08:59:58 +00:00
Jamieson Christian
4ee0365a23 Tweaked a few things to accommodate
MSVC6's idiosyncracies.

svn-id: r13644
2004-04-26 20:28:34 +00:00
Torbjörn Andersson
0fcd887dcd Cleanup. Mostly removal of redundant comments.
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-26 07:37:25 +00:00
Torbjörn Andersson
a575576890 fetchObjectName() no longer assumes that the resource will still be in the
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-24 12:29:35 +00:00
Torbjörn Andersson
8675bcfc6c Fixed a crash regression in setLuggage() that was caused by a change I
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-23 11:43:20 +00:00
Torbjörn Andersson
0ac8c4bd3f I forgot to clear the reference counter when a resource is forcibly removed
and I may as well clear it when a resource is read from disk as well.

svn-id: r13606
2004-04-23 11:36:06 +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
Torbjörn Andersson
0d2d884bb7 Cleanup
svn-id: r13582
2004-04-16 06:46:03 +00:00
Torbjörn Andersson
3a4536e2e2 Cleanup. (Mostly of the comments.)
svn-id: r13579
2004-04-14 07:12:10 +00:00
Torbjörn Andersson
12aeb85e62 Cleanup.
svn-id: r13495
2004-04-07 14:18:27 +00:00
Torbjörn Andersson
489e473fca Cleanup.
svn-id: r13494
2004-04-07 12:31:32 +00:00
Torbjörn Andersson
c2870adf60 Added notice about how I think CP_PUSH_LOCAL_ADDR is used.
svn-id: r13493
2004-04-07 08:53:24 +00:00
Torbjörn Andersson
a1ac764575 Cleanup. (Mostly to change the wording and priority of the debugging
messages to be more like in BS1.)

svn-id: r13491
2004-04-07 06:57:37 +00:00
Torbjörn Andersson
6d460d2e10 Cleanup.
svn-id: r13457
2004-04-04 15:16:05 +00:00
Torbjörn Andersson
b809a5670b Cleanup
svn-id: r13431
2004-03-30 06:54:27 +00:00
Torbjörn Andersson
bf10f5a616 Cleanup.
This removes a bunch of debugging code/commands that either didn't do
anything useful under ScummVM (e.g. "soft" and "hard"), or which did things
that was already easily avaiable elsewhere (e.g. "save" and "restore").

I didn't have the heart to remove the "tony" command, though. :-)

svn-id: r13422
2004-03-29 06:37:46 +00:00
Torbjörn Andersson
6cb86c641f Make clearScene() set the _needFullRedraw variable.
I think the reason I didn't do this from the start was that BS2 used to
call clearScene(), or whatever the function was called back then, between
every frame. Nowadays, it simply assumes that each frame will cover the
previous one.

Anyway, this change prevents the restart/restore dialog from appearing
briefly between the two intro cutscene animations.

svn-id: r13421
2004-03-29 06:32:54 +00:00
Max Horn
14378cb56e Renamed more OSystem methods
svn-id: r13410
2004-03-28 16:30:50 +00:00
Torbjörn Andersson
c831739c9c More format string fixes.
svn-id: r13407
2004-03-28 14:56:02 +00:00
Torbjörn Andersson
00243652e0 Fixed paramters to match format string.
svn-id: r13406
2004-03-28 14:53:09 +00:00
Torbjörn Andersson
129152c18b Fixed format string to match parameters.
svn-id: r13405
2004-03-28 14:52:19 +00:00
Torbjörn Andersson
41ef5a97ea Cleanup.
One of the changes, I'm not quite sure about: buildDisplay() used to open
and close the _thisScreen.background_layer_id resource for each layer it
processed. In particular, it used to "release the screen resource before
cacheing the sprites".

I have no idea why, because I can't see any trace of a sprite cache, and I
can't think of any harm in keeping the resource open during the whole
render cycle. The resource is probably loaded into memory already anyway,
though its reference counter may be 0.

svn-id: r13401
2004-03-28 13:16:01 +00:00
Torbjörn Andersson
3f18905732 Force the engine to pick a cursor after restoring a game. This appears to
be needed when using the -x command-line option to restore a game, though
I'm not quite sure why.

svn-id: r13400
2004-03-28 13:13:16 +00:00
Torbjörn Andersson
93336d8bc9 Don't show the restart/restore dialog if a boot parameter has been given.
And a teensy-weensy little cleanup.

svn-id: r13399
2004-03-28 13:12:10 +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
9b9ebb3a91 Make sure looping music is restarted after loading a savegame, regardless
of how the savegame is loaded. (ScummVM adds two alternative methods: the
-x command-line parameter, and the restart/restore dialog at the beginning
of the game, which is only shown when there are savegames available.)

svn-id: r13386
2004-03-27 12:07:07 +00:00
Torbjörn Andersson
56ae88d5c7 cleanup
svn-id: r13385
2004-03-27 12:02:38 +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
a9789acfc6 Moved Surface/Font code into new 'graphics' module
svn-id: r13357
2004-03-21 21:20:25 +00:00
Max Horn
b94448514e Unify a bit more...
svn-id: r13354
2004-03-21 18:49:04 +00:00
Torbjörn Andersson
4c3a68027f Use the same syntax for accessing script variables as BS1 does, i.e. now
it's Logic::_scriptVars[ID] instead of just ID. Apart from looking cool, it
makes it much easier to tell the difference between variables and constants
when looking at the code.

Of course, this sort of sweeping changes is jolly good for introducing
truly weird regressions, which is why I waited until after 0.6.0.

svn-id: r13331
2004-03-17 09:03:15 +00:00
Max Horn
f8610cd1c5 fix doxygen-comment mistakes
svn-id: r13286
2004-03-15 00:55:44 +00:00
Torbjörn Andersson
0fc86ef674 Fixed a slight logic error in the music fading. At this point the code
should only check if the music is fading, not in which direction. (Also
made a minor cleanup.)

svn-id: r13235
2004-03-13 12:05:01 +00:00
Nicolas Bacca
9e1fa63575 Apply patch #907359 : Broken Sword videos improved frameskip
svn-id: r13180
2004-03-04 18:54:35 +00:00
Torbjörn Andersson
ece97788ac If the user has previous savegames, display a restart/restore dialog when
the game starts. (I know it could look prettier, but I don't have much to
work with here...)

svn-id: r13178
2004-03-04 08:03:32 +00:00
Torbjörn Andersson
1bdcc3e5ef Removed the test for non-existing demo cutscenes: param[0] is an offset
into the chunk of memory handled by the memory manager, not a well-defined
value. Also, it introduced a theoretical memory leak as fnPlaySequence()
wouldn't get to clean up after itself.

The correct place for this check is probably in MoviePlayer::play(), where
you can test the name of the cutscene. On the other hand, the original demo
will gladly play eye.smk if there is one, so why shouldn't we?

svn-id: r13139
2004-03-02 07:02:31 +00:00
Nicolas Bacca
85f888e582 Display keyboard when saving
svn-id: r13118
2004-03-01 07:56:33 +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
Max Horn
d158280425 the OSystem changes we discussed on the ML (note: renaming of the existing OSystem API is not yet finished); porters will have to fix their ports to get them to compile again
svn-id: r13036
2004-02-24 22:39:42 +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
a75b84dc1b Use unsigned characters when drawing the text in the control panel etc.
This is consistent with how the in-game text is drawn, and might possibly
fix the control panel text in the Spanish version (though I have no way of
actually testing this).

svn-id: r12957
2004-02-21 08:30:10 +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
f59eb3b219 renamed (Const)Iterator to (const_)iterator; changed size() to return an uint
svn-id: r12722
2004-02-05 00:19:57 +00:00
Max Horn
da76ac5890 Various changes to the build system which allow building ScummVM in an external directory (and as such, allow you to have a debug, a profiling, and a release build from the same set of source files in parallel). Work in progress
svn-id: r12680
2004-01-30 21:54:28 +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
4dab40f123 fix whitespaces (we should eventually try to remove this code duplication again, folks. maybe add a 'video' global module or so...)
svn-id: r12676
2004-01-30 20:47:21 +00:00
Max Horn
176aa74827 Renamed the 'pan' effect of the mixer to 'balance', since that is what we actually do; applied patch #886786 which corrects a bug in the balance code
svn-id: r12665
2004-01-29 18:15:27 +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
Paweł Kołodziejski
2c3dd03d26 fix warnings
svn-id: r12504
2004-01-18 20:57:46 +00:00
Paweł Kołodziejski
ce3e6d7fd8 fix warning
svn-id: r12498
2004-01-18 20:11:52 +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
James Brown
ad46828d1c BS1 cutscene support. Also bugfixes (don't crash if cutscene ogg unavailable)
svn-id: r12465
2004-01-18 05:52:04 +00:00
James Brown
04f2bc0276 Update BS2 cutscene player with changes from roever: overlay support (default, 8bit backends should define BACKEND_8BIT for fast colour remapping) and sound syncronisation.
svn-id: r12456
2004-01-17 14:20:32 +00:00
Nicolas Bacca
051d5fe2d8 Yet Another EVC fix
svn-id: r12452
2004-01-17 11:15:38 +00:00
Paweł Kołodziejski
4270eebbb4 fix compilation for msvc when libmpeg2 enabled
svn-id: r12447
2004-01-17 09:15:42 +00:00
Torbjörn Andersson
673862dbfd Made a separate function out of the code that retrieves information about
an in-memory WAV file. At the moment it's only used in one place, which is
a bit silly, but I hope to use it for the cutscene player to figure out
when to start the lead-out music.

(To do that I'll need to know how long the cutscene is, though. I haven't
looked into how to find that out yet.)

svn-id: r12424
2004-01-16 08:16:23 +00:00
Torbjörn Andersson
4980331ecf I accidentally introduced a bug when I changed the fading that would cause
fading-up music to distort and eventually deteriorate into white noise.

This was because I allowed _fade to be set on channels that weren't playing
and because I only checked _fade for equality when deciding when to stop
the fading. It should work much better now, I think.

svn-id: r12392
2004-01-14 18:33:30 +00:00
Torbjörn Andersson
f75c122b94 Increased the delay I added to interpolation frames from 0 to 10. This will
probably make the scrolling less smooth (I don't yet know how much), but it
does seem to fix bug #875683.

svn-id: r12381
2004-01-14 10:58:09 +00:00
Torbjörn Andersson
15738c13d3 I wanted to Valgrind the cutscene code, so I had to fix the warnings about
uninitialized values. Now the only warnings I got were from libmpeg2
itself, and I don't know how serious that is.

I've also added some code - disabled by default - to allow the cutscenes to
run with libmpeg 0.3.1, since that's what I've got on my Linux box. It
appears to work on that one, though I only have the "eye" cutscene on it
yet.

Ogg Vorbis playback is still broken for me under Windows, though. I wonder
if it is because I don't have the very latest Ogg Vorbis libraries on it
(since I didn't manage to compile them under MinGW). But surely the file
format hasn't changed in any important way...?

svn-id: r12374
2004-01-14 08:14:25 +00:00
Torbjörn Andersson
b17d77eae9 Changed the music fading so that volume is increased when ABS(_fading)
grows larger, both when fading up or down. This fixes the problem where the
volume would "jump" when changing the fading "direction" of a stream.

Also changed the logic for deciding which music stream to stop if both
streams are playing and a third stream is started. Before it always tried
to pick the one that was fading down. Now it will pick the one with the
lowest volume, assuming that the more faded a stream is the lower its
volume.

Together, this should fix some abrupt music changes at the watchman's hut,
where it would sometimes start two music streams in rapid succession.

svn-id: r12372
2004-01-14 08:06:56 +00:00
Max Horn
c39aa04c31 cut down pointless header interdependencies
svn-id: r12360
2004-01-13 14:22:29 +00:00
Max Horn
34960cf375 Moved some methods into class AnimationState (where they really belong - nicely shown by the fact that now all member vars of AnimationState are private)
svn-id: r12359
2004-01-13 14:16:40 +00:00
Torbjörn Andersson
dca14d9532 Some more formatting cleanups. Made the Ogg file handle part of the
animation state so that it can be deleted in doneAnimation().

svn-id: r12358
2004-01-13 13:12:40 +00:00
Torbjörn Andersson
13481b82c4 As an experiment, I've added a delay of 0 milliseconds when drawing
interpolation frames. It shouldn't delay anything, but I'm hoping it will
allow the other threads some breathing room, which might help bug #875683.

Or not. We'll see.

svn-id: r12357
2004-01-13 10:27:13 +00:00
Torbjörn Andersson
8a66ba33cf Moved the rest of the MoviePlayer class into animation.cpp/.h, plus some
minor cleanups. (Mostly spacing and indentation).

Unfortunately the Ogg Vorbis playback causes ScummVM to crash for me, so I
can't say for certain that I didn't break anything.

svn-id: r12356
2004-01-13 10:09:53 +00:00
Max Horn
b04dac03f2 added legal header; fixed incorrect fscanf use; C++ification (the code still is quite Cish, though :-)
svn-id: r12351
2004-01-13 01:26:18 +00:00
Travis Howell
9471d58720 Add mpeg2 option to mingw makefile
Fix compile on mingw

svn-id: r12350
2004-01-12 23:41:05 +00:00
Oliver Kiehl
d794488645 fixed bug that was causing lots of havoc on BE machines. Thanks eriktorbjorn
svn-id: r12348
2004-01-12 20:04:22 +00:00
Paweł Kołodziejski
b8e3dda84c - whitespaces
- fix for compilation at MAX, at include types
- changed to our types

svn-id: r12344
2004-01-12 19:08:04 +00:00
Torbjörn Andersson
cc67c13711 Don't hog the CPU when playing cutscenes.
svn-id: r12342
2004-01-12 16:36:01 +00:00
James Brown
a685422a13 Initial libmpeg2 cutscene support based on patch #874510.
Pre-converted cutscenes w/ palette files available - ask LeChuck about Cutscenes :)

svn-id: r12338
2004-01-12 11:11:19 +00:00
Torbjörn Andersson
c75f5efd2f Sync the credits so that the text scroll and music will last for about the
same amount of time. I don't think the original did this, but it turned out
to be pretty easy.

svn-id: r12334
2004-01-12 08:01:25 +00:00
Torbjörn Andersson
7309705db5 cleanup
svn-id: r12322
2004-01-11 16:53:33 +00:00
Torbjörn Andersson
a7fe335c82 I forgot this in the previous cleanup.
svn-id: r12311
2004-01-10 21:56:59 +00:00
Torbjörn Andersson
1db3b65825 cleanup
svn-id: r12309
2004-01-10 21:21:20 +00:00
Torbjörn Andersson
06caf87bdc Removed redundant comment.
svn-id: r12282
2004-01-09 15:58:21 +00:00
Torbjörn Andersson
b9c3b7b008 Removed redundant comments.
svn-id: r12279
2004-01-09 14:52:39 +00:00
Torbjörn Andersson
638231cc59 Make it possible to quit while showing in-game dialogs. (Regression fix.)
svn-id: r12273
2004-01-09 07:54:16 +00:00
Torbjörn Andersson
58c46a2b92 Fix a harmless clipping bug (block surfaces were drawn even when their
width or height was 0), and use consistent naming for clip rect parameters.

svn-id: r12272
2004-01-09 07:53:08 +00:00
Torbjörn Andersson
12cd552cab Allow quitting during cutscenes and credits again. This is getting a bit
hackish...

svn-id: r12247
2004-01-08 13:03:50 +00:00
Torbjörn Andersson
6d0dd6aee8 Valgrind fixes. Mostly about memory not being freed when the engine is
deleted.

svn-id: r12211
2004-01-07 07:42:00 +00:00
Torbjörn Andersson
60b59de181 Never call _system->quit() directly. Let ScummVM handle that so that the
engine can be properly deleted first. Apart from being the nice thing to
do, this should make it easier to Valgrind for memory leaks.

svn-id: r12184
2004-01-06 16:49:04 +00:00
Torbjörn Andersson
065f2bb9eb It's a new year in BS2 land, too!
svn-id: r12181
2004-01-06 13:44:17 +00:00
Torbjörn Andersson
eb5c4a1449 Made sure the screen is really cleared when drawing a dialog window, plus
some other cleanups. (This was a regression caused by the less stupid
screen updates implemented recently.)

svn-id: r12180
2004-01-06 13:33:28 +00:00
Torbjörn Andersson
6a7cf6d6cf Marked some more structs as packed. I don't know if it makes any
difference, as they contain only 32-bit integers, but I also believe it
does no harm.

svn-id: r12159
2004-01-05 14:46:12 +00:00
Torbjörn Andersson
8dabcaaef1 Changed some memmove()s to memcpy(), since the memory areas were not
overlapping.

Enabled some sanity-checking code.

Fixed clearWalkGridList() so that it clears the entire walk grid list. That
was a really stupid bug of mine, and I hope it had at least some bearing on
the rare (for me, at least) walk problems I've seen.

svn-id: r12154
2004-01-05 11:09:33 +00:00
Torbjörn Andersson
55167e392e Tiny cleanup.
svn-id: r12153
2004-01-05 11:02:00 +00:00
Torbjörn Andersson
9ea89568da Fixed some debugging messages so they refer to the correct function.
svn-id: r12152
2004-01-05 11:01:12 +00:00
Torbjörn Andersson
5f9cfba548 Slowed down the credits slightly. With the recent optimizations, the music
lasted longer than the text. Now the text lasts longer than the music.

svn-id: r12151
2004-01-05 11:00:12 +00:00
Torbjörn Andersson
8a91ae3257 Adapted LavosSpawn's idea for more efficient screen updating. It still
renders the entire screen every frame, but it tries to update (i.e. copy to
the backend) only the parts of the screen that actually changed. At least
approximately so.

svn-id: r12142
2004-01-04 15:11:30 +00:00
Torbjörn Andersson
5607f41e2d Some cleanup and Valgrind warning fixes.
svn-id: r12141
2004-01-04 15:05:54 +00:00
Torbjörn Andersson
14acddb167 Update a comment to reflect that some functions have different names now.
svn-id: r12140
2004-01-04 14:59:36 +00:00
Max Horn
d1e6c6059e renamed global var _debugLevel to g_debugLevel; let Engine constructor init it (this way all engines get it for free, allows further cleanup); removed some useless/duplicate member vars in SwordEngine
svn-id: r12134
2004-01-04 14:00:58 +00:00
Max Horn
cf6a5c0a04 cleanup
svn-id: r12116
2004-01-03 19:12:23 +00:00
Max Horn
ee3558b748 fix for BE systems
svn-id: r12115
2004-01-03 19:02:18 +00:00
Torbjörn Andersson
c1cddedca8 Fixed bug that made ScummVM crash when loading a savegame where the main
character was walking. (I had missed a case where pointers were cast to
integers.)

svn-id: r12113
2004-01-03 15:52:05 +00:00
Torbjörn Andersson
fa523f7f7e It was pointed out to me that we can't use the DEMO variable here, because
the missing file may be the one with the resource for the global variables.

svn-id: r12112
2004-01-03 14:49:52 +00:00
Max Horn
bfea71b0c4 renamed AudioInputStream -> AudioStream
svn-id: r12110
2004-01-03 14:10:13 +00:00
Torbjörn Andersson
bb8ff0cd90 Made the music code more like the one in BS1, i.e. the fade time is longer
and it now fades both up and down.

Plenty of cleanups, simplifications and just moving code around to group it
in what I hope is a more logical fashion.

Fixed a long-standing bug where spot effects would eventually use up all
available sound effect handles. (I may have introduced this when I removed
the expiration of sound effects from FxServer().)

svn-id: r12108
2004-01-03 11:24:39 +00:00
Torbjörn Andersson
033a847e77 Oops, that was the wrong data type. (Not that it should matter, but...)
svn-id: r12069
2004-01-01 15:15:47 +00:00
Torbjörn Andersson
0d327b3b79 Some tweaking of the new credits code. It is no longer necessary to have
to have the credits.bmp file, though if you don't you won't see the
"Smacker" logo. (Whether or not this is a feature is open to debate.)

Happy New Year!

svn-id: r12062
2003-12-31 23:32:40 +00:00
Torbjörn Andersson
2687402c6b oops, forgot one case
svn-id: r12056
2003-12-31 14:10:42 +00:00
Torbjörn Andersson
c85301b2a9 When saving the music state, remember the name of the music file that was
open so that it can be re-opened afterwards. It's not so much that it may
have changed, but it may have been closed.

This should fix a crash when escaping the credits.

svn-id: r12055
2003-12-31 14:05:53 +00:00
Torbjörn Andersson
6899aa23cb I still don't know how to draw the credits like the original did, but at
least the credits text is showing now.

svn-id: r12053
2003-12-31 13:14:07 +00:00
Torbjörn Andersson
28eb8c4b76 Don't allow the credits to be displayed while in conversation mode.
svn-id: r12052
2003-12-31 12:58:18 +00:00
Torbjörn Andersson
bfd457d913 Enable the line that increases _gameCycle. There's a debugger command that
will display it, and it's so much more interesting this way. :-)

svn-id: r12051
2003-12-31 12:54:41 +00:00
Torbjörn Andersson
40419b1aee tiny cleanup
svn-id: r12017
2003-12-29 17:26:56 +00:00
Torbjörn Andersson
ea39ef6d7d The game sets its own DEMO variable, so we might as well check that one as
checking the GF_DEMO flag. (There's still one "unnecessary" reference to
GF_DEMO in functions.cpp, but I plan on rewriting that function soon so I
don't want to touch it right now.)

svn-id: r12009
2003-12-29 15:30:10 +00:00
Torbjörn Andersson
6ae8218d53 Hopefully the last big renaming. Now the datatypes have names like
"StandardHeader" instead of "_standardHeader".

svn-id: r11997
2003-12-28 15:08:12 +00:00
Max Horn
859a9c0129 o Added SoundMixer::isReady()
o Removed SoundMixer::bindToSystem()
o In scumm, replaced _silentMixer, _silentDigitalImuse and _noDigitalSamples by SoundMixer::isReady()

svn-id: r11893
2003-12-24 17:42:22 +00:00
Max Horn
e9269257f3 turned PlayingSoundHandle into an 'opaque' (well not really :-) data type, mainly because people kept (accidentally and sometimes on purpose :-) misusing them
svn-id: r11881
2003-12-24 00:25:18 +00:00