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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
o Removed SoundMixer::bindToSystem()
o In scumm, replaced _silentMixer, _silentDigitalImuse and _noDigitalSamples by SoundMixer::isReady()
svn-id: r11893